File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rendering a4j:outputPanel with bean property

 
Elizabath Lima
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm having a rich tree component.
It is calling a method onNodeSelect() method on nodeSelectListener attribute and rerenders two <a4jutputPanel> coponents.
These two <a4jutputPanel> components have the rendered property depending on displayStatus attribute value of the backing bean. Each <a4jutputPanel> is having a dataTable component.

<a4jutputPanel id="summary" rendered="#{CriteriaBean.displayStatus=='false'}">
<h:dataTable value="#{CriteriaBean.summaryList}" var="summary" id="summaryPane" >

I'm setting the displayStatus in the onNodeSelect() method. But the page is not displaying the dataTable eventhough i put reRender=summary in the rich tree.

I also tried binding the dataTable to backing bean and setting the rendered property there. It also not working.
How can i fix this?
Please help.
 
Leonardo Rafaeli
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it wont be reRendered because if it wasnt rendered, the ID of your component will not show at your jsp page

so, the best way to reCreate your component is putting other component as parent of your panel, like that:

<t:panelGrid id="myPanel">
<a4jutputPanel id="summary" rendered="#{CriteriaBean.displayStatus=='false'}">
<h:dataTable value="#{CriteriaBean.summaryList}" var="summary" id="summaryPane" />
</t:panelGrid>

when your tree triggers an event you must reRender myPanel only

try it
 
Leonardo Rafaeli
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or try to move rendered="#{CriteriaBean.displayStatus=='false'}" in your dataTable
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic