listControl
Code: Select all
<composite:interface>
<composite:attribute name="bean" required="true" />
<composite:attribute name="canRaiseUpdateAt" required="true" />
</composite:interface>
<composite:implementation>
<h:selectOneMenu style="text-align:center;" value="#{cc.attrs.bean.fieldToSearch}">
<composite:insertChildren />
</h:selectOneMenu> 
<p:commandButton action="#{cc.attrs.bean.search}" update="#{cc.attrs.canRaiseUpdateAt},mMessages,gMessages," /> 
<h:commandButton action="#{cc.attrs.bean.goCreate}"/> 
</composite:implementation>
Code: Select all
<composite:interface>
<composite:attribute name="bean" required="true" />
<composite:attribute name="idTable" required="true" />
<composite:attribute name="rows" default="10" />
<composite:attribute name="paginator" default="true" />
<composite:attribute name="paginatorPosition" default="bottom" />
</composite:interface>
<composite:implementation>
<div align="center">
<p:dataTable paginatorPosition="#{cc.attrs.paginatorPosition}" paginator="#{cc.attrs.paginator}" rows="#{cc.attrs.rows}" id="#{cc.attrs.idTable}" var="entity" value="#{cc.attrs.bean.entities}">
<composite:insertChildren />
</p:dataTable>
</div>
</composite:implementation>
Code: Select all
<wetsand:listControl bean="#{bean}" canRaiseUpdateAt="tableId">
<f:selectItem itemValue="name" itemLabel="Name"/>
<f:selectItem itemValue="id" itemLabel="Id"/>
</wetsand:listControl>
<wetsand:listTable bean="#{bean}" idTable="tableId">
<p:column sortBy="#{entity.id}" filterBy="#{entity.id}">
<f:facet name="header">
<h:outputText value="Id" />
</f:facet>
<h:outputText value="#{entity.id}"/>
</p:column>
</wetsand:listTable>
Is there anything I'm doing wrong?
Another thing,, I was wondering to pass var attribute from dataTable by attribute... but it does not work with me... is there any way to do that too?
In the past I used to use the following: bean[action] (where action could be action or even property) on composting facelets... is that still possible on JSF 2.0 componenents?