wood burning stoves 2.0*
The moose likes JSF and the fly likes Rendering a4j:outputPanel with bean property Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Rendering a4j:outputPanel with bean property" Watch "Rendering a4j:outputPanel with bean property" New topic
Author

Rendering a4j:outputPanel with bean property

Elizabath Lima
Ranch Hand

Joined: Nov 23, 2005
Posts: 32
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

Joined: Dec 12, 2005
Posts: 58
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


SCJP 1.4, SCWCD 1.4, SCBCD 5, OCUP, SCEA 5 (I), Oracle SOA Implementation Specialist, IBM Websphere Lombardi 7.1 Fundamentals
Blog: [url]http://www.leozin.com.br/blog[/url]
Leonardo Rafaeli
Ranch Hand

Joined: Dec 12, 2005
Posts: 58
or try to move rendered="#{CriteriaBean.displayStatus=='false'}" in your dataTable
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rendering a4j:outputPanel with bean property
 
Similar Threads
How can I dynamically choose which component to use at render-time?
Rendering the command link based on the value of the hidden variable
Actions don't work inside a dataTable column?
Problem with h:message and richfaces
Error when using Map.values() in dataTable