This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Rendering the command link based on the value of the hidden variable
Problem with h:message and richfaces
How can I dynamically choose which component to use at render-time?
Error when using Map.values() in dataTable
Actions don't work inside a dataTable column?