incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renzo Tomaselli <>
Subject [Trinidad] selectedRowKeys usage
Date Wed, 03 Jan 2007 16:16:15 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
<font size="+1">Hi, selection mechanism for tr:table works well, but
I'm not able to get the meaning of the selectedRowKeys attribute.<br>
I'd like to preselect some rows at rendering time. This seems to work
well automatically across requests, but I would like also to preselect
at the very beginning of component life. This is not shown in any demo
or documentation.<br>
Well, I did place in tr:table:<br>
and in my bean:<br>
&nbsp;&nbsp;&nbsp; public RowKeySet getSelection() {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; RowKeySetImpl set = new RowKeySetImpl();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; set.setCollectionModel(data);&nbsp;&nbsp;
// my CollectionModel<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ArrayList&lt;String&gt;
list = dataSource.getSelection();&nbsp;&nbsp; //
my current selection<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (String k: list)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return set;<br>
&nbsp;&nbsp;&nbsp; }<br>
but it doesn't work, and furthermore it disables selection storage
across requests. On the other hand - I miss the rationale of getting a
selection this way - since I might well grab the table component during
any life step and play with setSelectedRowKeys() on its own RowKeySet.<br>
So I miss how and why I should provide a foreign set to the
selectRowKeys attribute for preselecting.<br>
Any help ?<br>
Thanks -- Renzo<br>

View raw message