problem with rich:scrollableDataTable (richfaces 3.3.0.GA)
gradhakr Mar 30, 2009 3:35 PMI am using richfaces-3.3.0.GA & currently facing this problem. I have a simple 'rich:scrollableDataTable' on my web page. Initially when the web page is displayed, the underlying data bean associated with the table doesn't have any data (userMBean). When the user clicks on a search button on the screen, a ajax call is made & the data bean gets populated. For some reason, I am unable to get the table header to show up after the ajax call completes. Here is the code.
<h:form id="form0">
<h:panelGrid id="srchgrid" columns="3">
<h:outputText style="width: 130px;"
value="#{msg_bundle.label_first_name}" styleClass="outputText" />
<h:inputText id="fname" value="#{userMBean.bean.firstName}"
style="width: 180px" styleClass="inputText" tabindex="1" />
<a4j:commandButton id="search" styleClass="commandButton"
value="#{msg_bundle.button_search}"
action="#{pc_maintainEcoUsers.doSearchAction}" type="submit"
tabindex="3" reRender="usertable" status="pstat" />
<h:outputText style="width: 130px;"
value="#{msg_bundle.label_last_name}" styleClass="outputText" />
<h:inputText id="lname" value="#{userMBean.bean.lastName}"
style="width: 180px" styleClass="inputText" tabindex="2" />
<h:outputText value="hello"/>
</h:panelGrid>
<rich:spacer height="10px" />
<rich:scrollableDataTable value="#{userMBean.resultSet}" var="user"
columnClasses="col" id="usertable" rows="20" height="400px" width="550px">
<rich:column>
<f:facet name="header"><h:outputText value="#{msg_bundle.label_user_name}" /></f:facet>
<h:outputText value="#{user.loginId}" />
</rich:column>
<rich:column>
<f:facet name="header"><h:outputText value="#{msg_bundle.label_first_name}" /></f:facet>
<h:outputText value="#{user.firstName}" />
</rich:column>
</rich:scrollableDataTable>
<rich:spacer height="10px" />
<h:panelGroup id="udetails">
<h:panelGrid id="actgrid" columns="3">
<h:commandButton id="edit" styleClass="commandButton"
value="#{msg_bundle.button_edit}"
action="#{pc_maintainEcoUsers.doEditAction}" type="submit"
tabindex="4" />
<h:commandButton id="add" styleClass="commandButton"
value="#{msg_bundle.button_add}"
action="#{pc_maintainEcoUsers.doAddAction}" type="submit"
tabindex="5" />
<h:commandButton id="delete" styleClass="commandButton"
value="#{msg_bundle.button_delete}"
action="#{pc_maintainEcoUsers.doDeleteAction}" type="submit"
tabindex="6" />
</h:panelGrid>
</h:panelGroup>
</h:form>I have configured richfaces to use the default skin in web.xml (Blue sky). Not sure what the problem could be. I tried using rich:dataTable & it displayed the header correctly.
I would appreciate if someone could point out where I might be going wrong....