scrollableDataTable issues with selecting rows

add this to your scrollableDataTable tag:

  1. binding="#{bean.table}" selection="#{bean.selection}"      

Add this(with appropriate getters and setters) into your bean(backing bean class):

  1. private Selection scrollableDataTableSelection;   
  2.    private HtmlScrollableDataTable sdTable;   
And you can make this in your action listener:
  1. public void listener(ActionEvent event)   
  2. {   
  3.   
  4.    Iterator keys = table.getKeys();   
  5.   
  6.    while(keys.hasNext())   
  7.    {   
  8.        Object key = keys.next();   
  9.        table.setRowKey(key);   
  10.        Object rowData = table.getRowData();   
  11.   
  12.        // here do what you want with your rowData   
  13.   
  14.    }   
  15. }      

你可能感兴趣的:(bean)