-
1. Re: How to reRender a component self (reRender)?
sergeysmirnov Mar 19, 2007 3:47 PM (in response to lisaanm)Does laufzettelBean has a request scope ?
-
2. Re: How to reRender a component self (reRender)?
lisaanm Mar 20, 2007 4:15 AM (in response to lisaanm)Hi.,
Thanks for ur reply.
Does laufzettelBean has a request scope ?
laufzettelBean is SESSION scoped Seam component.
Thanks -
3. Re: How to reRender a component self (reRender)?
sergeysmirnov Mar 20, 2007 11:22 AM (in response to lisaanm)OK. This is an expected behavior. When rendered becomes false, the component rendering result is not included in the Ajax response and the DOM for this component is not updated after that.
So, put <a4j:outputPanel id="foo"> and point to it with reRender. I.e. do not point to the component that might not be rendered -
4. Re: How to reRender a component self (reRender)?
premheiko Mar 24, 2007 9:07 AM (in response to lisaanm)Hi.,
Thanks for ur tip.. its working now !!!! -
5. Re: How to reRender a component self (reRender)?
james_hays Apr 9, 2007 5:24 PM (in response to lisaanm)Can you post your code that you have working now? I'm having a similar issue and want to make sure I'm using the a4j:outputPanel correctly.
Thanks, -
6. Re: How to reRender a component self (reRender)?
james_hays Apr 9, 2007 6:41 PM (in response to lisaanm)So, here's what I'm doing, maybe it's a bit different, but what I'm trying to do is reRender the parent element of the a4j:support.
Here's my code.<h:panelGroup id="ProductList"> <a4j:repeat var="productRecord" value="#{profileGate.productRecords}"> <li id="product_#{productRecord.id}"> <h:panelGroup styleClass="removeProduct"> <a4j:support action="#{viewProfileRecord.requestProductRemoval(productRecord, profileGate)}" ignoreDupResponses="true" event="onclick" onsubmit="toggleStatusBar('Updating Product: #{productRecord.name}')" oncomplete="toggleStatusBar('Complete', 2000)" reRender="ProductList"/> </h:panelGroup> <s:link id="ProductLink" view="/productManagement.xhtml" propagation="nest" title="#{productRecord.productTemplate.description}"> <h:outputText>#{productRecord.name} - #{productRecord.status.code}</h:outputText> <f:param name="id" value="#{productRecord.id}"/> </s:link> </li> </a4j:repeat> </h:panelGroup>
Here is what is dumped in the a4j log:
debug[16:40:08,486]: call getElementById for id= ProfileGates:_id65:ProductList
warn[16:40:08,486]: Node for replace by response with id ProfileGates:_id65:ProductList not found in document
If I reRender ProductList from a component outside of this iteration, it works fine and the entire list is regenerated. Am I missing something here?
I'm using RichFaces and Ajax4JSF snapshot from April 3. -
7. Re: How to reRender a component self (reRender)?
sergeysmirnov Apr 9, 2007 7:14 PM (in response to lisaanm)So, <h:panelGroup id="ProductList"> has no id="ProfileGates:_id65:ProductList" in the result html. Can you can what the id is ?
-
8. Re: How to reRender a component self (reRender)?
james_hays Apr 10, 2007 11:58 AM (in response to lisaanm)I'm not quite sure what you are asking. I've run this with an <a4j:support tag outside of the <h:panelGroup id="ProductList"> and received this in the debug log.
debug[9:52:53,510]: Such element exist in document
debug[9:52:53,510]: Update page part from call parameter for ID ProfileGates:0:_id65:ProductList
So, it does exist. I just can't seem to use it if my a4j:supportTag is inside the reRendered panelGroup.
Here is what is rendered in xhtml:<span id="ProfileGates:0:_id65:ProductList"> <li id="product_214"> <span class="removeProduct" onclick="toggleStatusBar('Updating Product: Final Quad Chart');A4J.AJAX.Submit('_viewRoot','ProfileGates:0:_id65',event,{'eventsQueue':'ProfileGates:0:_id65:_id67:0:_id70','parameters':{'ProfileGates:0:_id65:_id67:0:_id70':'ProfileGates:0:_id65:_id67:0:_id70'},'actionUrl':'/LCGM/viewLifecycle.seam','oncomplete':function(request,event,data){toggleStatusBar('Complete', 2000)},'ignoreDupResponses':true})"/> <a id="ProfileGates:0:_id65:_id67:0:ProductLink" href="/LCGM/productManagement.seam?id=214&cid=17&clr=true&conversationPropagation=nest" title="The original Quad Chart, updated with the most current opportunity information. The Final Quad Chart ensures that additional information is captured.">Final Quad Chart - ppd</a> </li> <li id="product_215"> </li> <li id="product_216"> <span class="removeProduct" onclick="toggleStatusBar('Updating Product: Bid/No Bid Critera Evaluation Form');A4J.AJAX.Submit('_viewRoot','ProfileGates:0:_id65',event,{'eventsQueue':'ProfileGates:0:_id65:_id67:2:_id70','parameters':{'ProfileGates:0:_id65:_id67:2:_id70':'ProfileGates:0:_id65:_id67:2:_id70'},'actionUrl':'/LCGM/viewLifecycle.seam','oncomplete':function(request,event,data){toggleStatusBar('Complete', 2000)},'ignoreDupResponses':true})"/> <a id="ProfileGates:0:_id65:_id67:2:ProductLink" href="/LCGM/productManagement.seam?id=216&cid=17&clr=true&conversationPropagation=nest" title="Used to document intent at the Bid/No Bid Gate, summarize New Business efforts to date, and capture signature approval for Bid and Proposal funds.">Bid/No Bid Critera Evaluation Form - ppd</a> </li> <li id="product_308"> </li> <li id="product_309"> </li> <li id="product_310"> <span class="removeProduct" onclick="toggleStatusBar('Updating Product: James');A4J.AJAX.Submit('_viewRoot','ProfileGates:0:_id65',event,{'eventsQueue':'ProfileGates:0:_id65:_id67:5:_id70','parameters':{'ProfileGates:0:_id65:_id67:5:_id70':'ProfileGates:0:_id65:_id67:5:_id70'},'actionUrl':'/LCGM/viewLifecycle.seam','oncomplete':function(request,event,data){toggleStatusBar('Complete', 2000)},'ignoreDupResponses':true})"/> <a id="ProfileGates:0:_id65:_id67:5:ProductLink" href="/LCGM/productManagement.seam?id=310&cid=17&clr=true&conversationPropagation=nest" title="">James - ppa</a> </li> </span>
Does this help any? -
9. Re: How to reRender a component self (reRender)?
james_hays Apr 10, 2007 1:05 PM (in response to lisaanm)I've updated to the latest Snapshots from April 10, for both Ajax4JSF and RichFaces and it now works.
Case Closed...