• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

JSF + RichFaces not able to reRender

 
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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" >
<h:outputText value="Location"/>
</f:facet>
<h:outputText value="#{car.location}"/>
</h:column>

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

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

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

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

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

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

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

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

<h:column>
<f:facet name="header" >
<h:outputText value="BodyStyle"/>
</f:facet>
<h:outputText 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do we have someone who can look into this.....
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey got the problem solved.... i wrote everything in a panel and it worked..
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic