[
https://issues.apache.org/jira/browse/TOBAGO-906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901961#action_12901961
]
D. W. commented on TOBAGO-906:
------------------------------
Thanks for your quick reaction and apologies for my late reply :)
I agree, that it seems to be the default behavior in other user interfaces.
However, I - personally - was never quite happy with such a behavior. Why
should the user be able to select something, which he/she cannot unselect
anymore. In the worst case, this is like a trap for the user, since once you
made a selection among several items, you are stuck with the given options and
have to select at least one. The same goes for the radio buttons. I guess this
is also the reason, why you sometimes see a blank entry in a select box -
exactly to give the user the chance to not select/unselect his choice.
Having said this, I see four possible solutions:
1) Simply allow the user to unselect an item or the last remaining item. And
don't change anything on the programmers side, i.e. in the tag definitions.
This is against common user interface behavior, however with the reasons given
above, I actually see an improvement in the user experience.
2) Implement your idea of a selectable="singleOrNone" . Here the programmer can
choose to allow or disallow unselecting an item or the last remaining item for
a "single select".
3) Instead of a new attribute value for "selectable", add a new attribute
"unselectable" which can be true or false. This would give a more consistent
behavior w.r.t. "multi select", because then the programmer can also enforce at
least one selected item, once an item has been selected.
4) Replace all given values of attribute "selectable" and introduce the
following ones:
- "zero" (equal to "none")
- "one" (only one item can be selected; item cannot be unselected)
- "zeroOrOne" (only one item can be selected; item can be unselected)
- "oneOrMore" (mulitple items can be selected; last remaining item cannot be
unselected)
- "zeroOrMore" (multiple items can be selected; last remaining item can be
unselected)
I would go for the boldest approach in 1) or alternatively for the clearest +
most customizable approach in 4).
What do you think?
Best wishes,
dw
> It should be possible to unselect a selected row in a selectable tc:sheet.
> --------------------------------------------------------------------------
>
> Key: TOBAGO-906
> URL: https://issues.apache.org/jira/browse/TOBAGO-906
> Project: MyFaces Tobago
> Issue Type: Improvement
> Components: Core
> Environment: e.g. in Firefox 3.6.8
> Reporter: D. W.
> Priority: Minor
>
> Dear all,
> Given a tc:sheet is set to be selectable (selectable="single"), then one can
> select the rows and the selected row is highlighted in some way. So far so
> good. Now, if the user wants to unselect this row, then there is no way to do
> this. This means the row remains selected and highlighted. However, I think
> the row should be unselected, when the user clicks on the highlighted row.
> Thanks for your feedback on this issue,
> D.W.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.