-
1. Re: Richfaces extendedDataTable row select issue
skidvd.seamframework.abilsoft.com May 15, 2009 4:40 PM (in response to pradeepmeruva)I have never done this; however, I would think you could track the selection with something like
<a4j:support event="onkeyup" ....
or
<a4j:support event="onkeypress" ...
and using the associated action method to select the appropriate row of the table. You will need to use binding or another method (search the component tree) to access the underlying dataModel and perform the selection in the refernced action method. Assuming the row is actually selected in the dataModel, this should support the sending of the proper row data when the Enter key is subsequently pressed.
-
2. Re: Richfaces extendedDataTable row select issue
pradeepmeruva May 18, 2009 9:59 AM (in response to pradeepmeruva)Hi Todd,
thanks for the reply.
I have tried using the
<a4j:support event=
onkeyup
.....I am not able to pass the object or row selected to the action method.
can u please detail me how I go about using dataModel fro the richfaces extended data table.
thanks ,
pradeep -
3. Re: Richfaces extendedDataTable row select issue
holly_bony Apr 5, 2010 5:24 PM (in response to pradeepmeruva)I hope you problem is solved. But anyway, with jQuery is very easy, may is not the best solution but work for me:
<script type="text/javascript">
function esc(myid) {
return '#' + myid.replace(/(:|\.)/g,'\\$1');
}
function showPanel(event){
if (event.keyCode == 13){
var els =jQuery(esc('#{rich:clientId('itemsFound')}') + ' .extdt\\-row\\-selected');
if(els.length>0){
els[0].ondblclick(event);return false;
}
}
}
</script>
<rich:extendedDataTable id="itemsFound" onkeypress="showPanel(event)"
selectionMode="single" enableContextMenu="false">
.
.
.
</rich:extendedDataTable>