data table issue
bkasodariya Aug 27, 2011 10:29 AMHi,
I am facing data table issue. When i open my page first time its showing proper grids. but when i open it second time table grids goes away and table comes withoug grid.
Here is my code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head></h:head>
<h:body>
<h:form id="vendorListForm">
<rich:panel>
<f:facet name="header">
Product List
</f:facet>
<h:panelGrid columnClasses="acent" id="buttonPanel" columns="2">
<a4j:commandButton id="searchButton" action="#{productMaster.search}"
render="panel" value="Search">
</a4j:commandButton>
<a4j:commandButton id="createButton" action="#{productMaster.create}"
render="panel" value="New">
</a4j:commandButton>
</h:panelGrid>
<h:panelGrid columnClasses="acent" id="panel">
<rich:dataScroller for="table" maxPages="5" />
<rich:dataTable value="#{productMaster.allProductItems}"
var="productList" id="table" rows="10"
binding="#{productMaster.htmlTable}">
<!-- <rich:column>
<f:facet name="header">
<h:outputText value="Select" />
</f:facet>
<h:selectBooleanCheckbox />
</rich:column>-->
<rich:column>
<f:facet name="header">
<h:outputText value="EAN" />
</f:facet>
<h:commandLink action="#{productMaster.edit}"
value="#{productList.ean}">
</h:commandLink>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Product Desc" />
</f:facet>
<h:outputText value="#{productList.productDesc}" />
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="" />
</f:facet>
<h:commandLink actionListener="#{productMaster.delete}"
value="Delete" render="panel">
</h:commandLink>
</rich:column>
</rich:dataTable>
<rich:dataScroller for="table" maxPages="5" />
</h:panelGrid>
</rich:panel>
</h:form>
</h:body>
</html>
Thanks