-
1. Re: Example Of Selecting Rows In A Table
swd847 Sep 26, 2008 1:04 PM (in response to leesy)Create a class to use for the row, give it a boolean field for the checkbox to bind to.
Now you need to create a list of these and expose them to the front end.
There are two ways, expose it through a factory method, @Unwrap or just have it as a List property a seam component. Don't just have the list as a property though, it will work but the performance is lousy because the seam interceptors will get called too many times.
Now in you dataTable put in a column with a h:selectBooleanCheckbox and bind it to the boolean property on your row.
Stuart
-
2. Re: Example Of Selecting Rows In A Table
swathis Nov 24, 2008 9:03 AM (in response to leesy)Actually I am also looking for the same example.. can I get any example of such... as we can do it in Gmail
thanks
Swathi -
3. Re: Example Of Selecting Rows In A Table
blabno Nov 24, 2008 9:22 AM (in response to leesy)Check out seam dvd example dvdstore/src/com/jboss/dvd/seam/ShoppingCartBean.java and dvdstore/view/checkout.xhtml
-
4. Re: Example Of Selecting Rows In A Table
swathis Nov 24, 2008 10:05 AM (in response to leesy)Thank You Bernard for the reply but I want to delete the selected item from data table where am using h:selectManyCheckBox when I select few rows and click on delete the selected items should get deleted.
I just called removed method from action class to delete the selected rows, but am not able to deletexhtml
<rich:dataTable id="processNodesList" var="nodes" value="#{processNodesList.resultList}" rendered="#{not empty processNodesList.resultList}" rowClasses="#{tableLnF.getRowSettings(skinBean.skin)}" headerClass="#{tableLnF.getHeaderSettings(skinBean.skin)}" cellpadding="0" cellspacing="0" columns="3" columnClasses="formFont2"> <rich:column align="left" colspan="1"> <f:facet name="header"><h:outputText style="text-align:left;" value="Select"></h:outputText></f:facet> <h:selectManyCheckbox value="#{userGroupHome.processName}"> <f:selectItem itemValue="#{nodes.name}"/> </h:selectManyCheckbox> </rich:column> <rich:column align="left" colspan="1"> <f:facet name="header">Name</f:facet> #{nodes.name} </rich:column> </rich:dataTable>
ActionClass
@Override @End public String remove() { super.remove(); return "removed"; }