[
https://issues.apache.org/jira/browse/PIVOT-771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sandro Martini resolved PIVOT-771.
----------------------------------
Resolution: Fixed
Resolved. Thanks to Edvin for this.
For a future release, verify if could be useful (in
ListView/TableView/TreeView) to notify a warning when the selection mode in not
single, before returning the first element.
> getSelectedIndex()/getSelectedPath() in TreeView, ListView and TableView
> should not throw Exception when in SelectMode.MULTI
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: PIVOT-771
> URL: https://issues.apache.org/jira/browse/PIVOT-771
> Project: Pivot
> Issue Type: Improvement
> Components: wtk
> Affects Versions: 2.0, 2.0.1
> Reporter: Edvin Syse
> Assignee: Sandro Martini
> Priority: Minor
> Fix For: 2.0.2
>
> Attachments: getSelectedReturnsFirstSelected.patch
>
>
> This applies to TreeView, ListView and TableView. I'll use TableView in the
> example.
> If you set the TableView to SelectMode.MULTI and call getSelectedIndex(), an
> Exception is thrown. Most GUI frameworks I've worked with simply returns the
> first selected index is this case. I propose to remove the exception and
> delegate to getFirstSelectedIndex() to be more in line with other GUI
> frameworks.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira