-
1. rich:dataTable onRowDblClick
ilya40umov Feb 8, 2011 4:03 AM (in response to anonyin)1) Try this approach:
<rich:dataTable rows="10" value="#{bean.resultList}" var="_result" width="100%" style="width:100%;">
<a4j:support event="onRowDblClick" action="#{bean.selectRow}" reRender="panelContent" > \
<a4j:actionparam name="id" value="#{_result.id}" assignTo="#{bean.selectedId}"/>
</a4j:support>
- Then in #{bean.selectRow} I suggest you to find this object again by ID from DB. It looks like the best solution for me because this object can be changed by another user and thus you will show the most recent data in your panel.
- Another solution is binding rich:dataTable to UIData in your bean. Then you will be able to use
java.lang.Object
getRowData()
Return the data object representing the data for the currently selected row index, if any.
2) Look at the following link:
Then I you can add a4j:support to h:selectManyCheckbox and also add selectAll checkbox to header(I guess that the best way to do that is implementing selectAll/diselectAll on the server side and then reRender the table)
-
2. rich:dataTable onRowDblClick
anonyin Feb 8, 2011 12:22 PM (in response to ilya40umov)Thanks A Lot IIlya,
Will try out these options.
Kiran.
-
3. rich:dataTable onRowDblClick
anonyin Feb 11, 2011 3:00 PM (in response to anonyin)IIlya,
Both the solutions suggested above by you worked for me. But I have another scenario here.
I have the pagination implemented using the <rich:datascroller ..> for the datagrid. I want the checkboxes selected across different pages to be intact(while moving between different pages) and the values to be available when I submit the page to my bean method. Currently the Map<String,boolean> is refelecting only the 10(rows) values in the current page I'm in.
Is there anyway to acheive the checkbox selection across different pages posted to the bean method when submitted ? Let me know if you want me to start a new discussion for this.
Thanks In advance.
Kiran.
-
4. rich:dataTable onRowDblClick
ilya40umov Feb 11, 2011 3:13 PM (in response to anonyin)As I understood a4j:keepAlive tag should do the trick in your case.
-
5. rich:dataTable onRowDblClick
anonyin Feb 11, 2011 5:48 PM (in response to ilya40umov)Ilya I tried "a4j:keepAlive" but it doesn't help.
Let me try to explain my scenario one more time.
<rich:dataTable...> with <rich:dataScroller...> pagination. First column in the dataTable is checkbox. Say I have 2 pages of data. If I check 2 checkboxes(rows) in the First page and then I navigate to 2nd page using the pagination button provided by <rich:dataScroller....> and come back to the First page. The 2 checkboxs I have checked before are no longer checked now.
As shown below, my Seam POJO is in SESSION scope and the datatable is pointed to a List in that pojo.
@Scope(ScopeType.SESSION)
@Name("sectorBean")
public class SectorBean
{
..........
private List resultList;
..........
}
<rich:dataTable rows="10" value="#{sectorBean.resultList}" .......>
How can I acheive the checkboxes selected information intact while I'm navigating across different pages.
Thanks
Kiran.
-
6. rich:dataTable onRowDblClick
anonyin Feb 11, 2011 8:43 PM (in response to anonyin)In otherwords I am looking for a solution for below scenario
http://community.jboss.org/message/35908
Thanks
Kiran.
-
7. rich:dataTable onRowDblClick
anonyin Feb 11, 2011 8:53 PM (in response to anonyin)Nevermind,
I got the answer from one of your previous posts. You are awesome.
http://community.jboss.org/message/17631#17631
Thanks
Kiran.