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

JSF + RichFaces not able to reRender

 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to show the contents of the dataTable on clicking of the button. The results are getting populated but the problem is that the headers of the table are coming on each display. I want to hide the dataTable before the user clicks on it and make it visible only when it has some results.

For this i did the following things:
1. <h:dataTable var="car" value="#{bean.carList}" id="searchTable"
bgcolor="#F1F1F1" border="1" cellpadding="5" cellspacing="3"
width="100%" rendered="#{bean.show}">

2. And i m setting this proprty to true on the click event. But hen also it is not getting visible.

Please help.


<h:dataTable var="car" value="#{bean.carList}" id="searchTable"
bgcolor="#F1F1F1" border="1" cellpadding="5" cellspacing="3"
width="100%" rendered="#{bean.show}">
<h:column>
<f:facet name="header" >
<hutputText value="Location"/>
</f:facet>
<hutputText value="#{car.location}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="Model"/>
</f:facet>
<hutputText value="#{car.model}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="Make"/>
</f:facet>
<hutputText value="#{car.make}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="Consigner"/>
</f:facet>
<hutputText value="#{car.consigner}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="Year"/>
</f:facet>
<hutputText value="#{car.year}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="Auction Type"/>
</f:facet>
<hutputText value="#{car.auctionType}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="Series"/>
</f:facet>
<hutputText value="#{car.series}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="Color"/>
</f:facet>
<hutputText value="#{car.color}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="Odometer"/>
</f:facet>
<hutputText value="#{car.odometer}"/>
</h:column>

<h:column>
<f:facet name="header" >
<hutputText value="BodyStyle"/>
</f:facet>
<hutputText value="#{car.bodyStyle}"/>
</h:column>
</h:dataTable>


-----------------------------------------------------------------------
<a4j:commandButton value="Ajax Search" action="#{bean.search}" reRender="searchTable" />
-----------------------------------------------------------------------
public void search(){
this.show = true;
this.carList = CarInventory.getCarList();
}
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do we have someone who can look into this.....
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey got the problem solved.... i wrote everything in a panel and it worked..
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic