I was just implementing a crude functionality using jsf+richfaces and came across this situation, so putting this to the open forum for some answers.
I have a text field and rich:dataTable inside a form. When value changes in textField, table data is populated and table is supposed to be reRendered with latest data.
Now the point in question : What if I have rendered condition on dataTable saying render this table if list of values is not-null/non-empty? So for the 1st time when screen appears, list is null/empty and hence table is not rendered, as and when I modify textField, values are populated and reRender on table is fired but as a whole table does not exist.
Is there a way to solve this behaviour? If I reload the page, yes table definitely appears :)
Here is the sample code for this :
<h:form id="userSearchForm" prependId="false">
<h:inputText value="#{ldapSearch.searchString}">
<a4j:support event="onkeyup" ignoreDupResponses="true" ajaxSingle="true" reRender="usersTable"
requestDelay="50" actionListener="#{ldapSearch.searchUser}"/>
</h:inputText>
<rich:dataTable id="usersTable"
rendered="#{not empty ldapSearch.users}"
value="#{ldapSearch.users}" var="user">
<rich:column sortable="false" label="Name">
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
<h:outputText title="#{user.displayName}" value="#{user.displayName}"/>
</rich:column>
</rich:dataTable>
</h:form>