Wednesday 19 June 2013

ADF : Disable and Enable TableSelectionListener

Some times in the development we need to enable or disable the table so that the user is not able to make row selection from the table.
Suppose there is a case in which a row selected in the table is in edit mode in a form, and you don't want to allow the user to select any other row during the edit operation. So for this purpose you need to disable the table selection.
You can use the following code for doing so :



tableBinding.setRowSelection(RichTable.ROW_SELECTION_NONE);

Here :
  1.  "tableBinding" is the binding of table in the bean. 
And after your work when you want to again enable the rowSelection. You can use it as follows :
tableBinding.setRowSelection(RichTable.ROW_SELECTION_SINGLE);

No comments:

Post a Comment