This content has been marked as final.
Show 7 replies
-
1. Re: Rerender html tags
ilya_shaikovsky Jun 22, 2009 4:49 AM (in response to dianne)<a4j:command reRender="toReRender"/> <a4j:outputPanel id="toReRender" layout="block"> ....content to be ReRendered </a4j:outputPanel>
-
2. Re: Rerender html tags
dianne Jun 22, 2009 8:16 AM (in response to dianne)Thanks Ilya, your suggestion worked :)
Now I am trying to perform a conditional rerendering using the rerender attribute on the a4j:outputPanel<a4j:command reRender="toReRender"/> <a4j:outputPanel id="toReRender" layout="block" rerender="#{not empty list}"> ....content to be ReRendered </a4j:outputPanel>
However, adding the condition caused the a4j:outputPanel to stop getting rendered after the a4j:command. Is there a work around? -
3. Re: Rerender html tags
panky_p Jun 22, 2009 8:19 AM (in response to dianne)use rendered instead of rerender
<a4j:outputPanel id="toReRender" layout="block" rendered="#{not empty list}">
-
4. Re: Rerender html tags
ilya_shaikovsky Jun 22, 2009 8:49 AM (in response to dianne)and do not reRender conditionally rendered elements directly. Some parent should be reREndered instead.
-
5. Re: Rerender html tags
dianne Jun 23, 2009 12:58 AM (in response to dianne)"panky_p" wrote:
use rendered instead of rerender<a4j:outputPanel id="toReRender" layout="block" rendered="#{not empty list}">
Sorry, that was a typo as a4j:outputPanel does not have a rerender attribute."ilya_shaikovsky" wrote:
and do not reRender conditionally rendered elements directly. Some parent should be reREndered instead.
The following works as you suggested. However, I had to use two a4j:outputPanel tags. Is there another way of doing this?<a4j:command reRender="toReRender"/> <a4j:outputPanel id="toReRender" layout="block"> <a4j:outputPanel rendered="#{not empty list}"> ....content to be ReRendered </a4j:outputPanel> </a4j:outputPanel>
-
6. Re: Rerender html tags
ilya_shaikovsky Jun 23, 2009 6:47 AM (in response to dianne)This limitation comes from the fact that we can't know where you need to insert new element if it not exist in DOM tree before.
B.t.w. read more about outputPanel more. To avoid two panels - one with "none" layout could be used. -
7. Re: Rerender html tags
ilya_shaikovsky Jun 23, 2009 6:52 AM (in response to dianne)but in the case with none layout rendered conditions should be on elements inside that panel and reRender should be pointed to inner content. So it seems that you willl have the same nesting structure.