[richfaces-issues] [JBoss JIRA] Created: (RF-8271) org.richfaces.model.selection.Selection interface has no JavaDoc / API doc, and it is not very user-friendly
Ian Springer (JIRA)
jira-events at lists.jboss.org
Mon Jan 18 13:32:56 EST 2010
org.richfaces.model.selection.Selection interface has no JavaDoc / API doc, and it is not very user-friendly
------------------------------------------------------------------------------------------------------------
Key: RF-8271
URL: https://jira.jboss.org/jira/browse/RF-8271
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-tables
Affects Versions: 3.3.2.SR1
Reporter: Ian Springer
This interface is used by rich:extendedDataTable's selection attribute, and possibly by some of the other dataTable components. It currently has no JavaDoc whatsoever, which is especially bad because it is not intuitive what some of the methods return:
1) public Iterator<Object> getKeys()
Does this return just the keys of the selected items, or does it return the keys for all items on the current page (the presence of the isSelected() method seems to suggest the latter)? Why provide just the keys of the selected items, rather than the entire Objects? 90% of the time, the GUI developer's going to want to get at the Objects themselves to do some sort of CRUD on them. Why not save them the trouble of having to map the key to the actual Object, when RF can do it for them?
2) public int size()
Does this return just the number of selected items, or does it return the size of the current page (the presence of the isSelected() method seems to suggest the latter)?
3) public boolean isSelected(Object rowKey)
What's the idea behind this method - to also provide easy access to what rows are *not* selected? If so, wouldn't an easier to use API be:
List getSelectedRows()
List getUnselectedRows()
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list