Last Comment Bug 282840 - Implement @selection for select
: Implement @selection for select
Status: RESOLVED WONTFIX
:
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Doron Rosenberg (IBM)
: Stephen Pride
:
Mentors:
: 377871 (view as bug list)
Depends on:
Blocks: 322255 326372 326373
  Show dependency treegraph
 
Reported: 2005-02-19 05:52 PST by Olli Pettay [:smaug] (reviewing overload)
Modified: 2016-07-15 14:46 PDT (History)
8 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
simple testcase (1.35 KB, application/xhtml+xml)
2006-01-26 14:43 PST, aaronr
no flags Details

Description Olli Pettay [:smaug] (reviewing overload) 2005-02-19 05:52:46 PST
 
Comment 1 Olli Pettay [:smaug] (reviewing overload) 2005-08-22 11:09:44 PDT
This is done for select1, 
changing summary
"Implement @selection for select/select1" ->
"Implement @selection for select"
Comment 2 alexander :surkov 2005-10-26 20:24:08 PDT
Is there any suggestions how it can be realized? I have in view controls behaviour/looks when @selection is open. As I understand user should be able to specify some new values for select control. How can it be achieved from interface view point? Should user be able to modify some values or remove them?
Comment 3 Doron Rosenberg (IBM) 2005-10-27 08:16:19 PDT
The easiest way would be to add a input above the select where the user can enter stuff and press enter, which will add it.
Comment 4 aaronr 2005-10-27 09:24:15 PDT
(In reply to comment #3)
> The easiest way would be to add a input above the select where the user can
> enter stuff and press enter, which will add it.
> 

But will it add the item(s) to the list for the life of the form?  What if the instance is 'reset'?
Comment 5 Doron Rosenberg (IBM) 2005-10-27 13:52:58 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > The easiest way would be to add a input above the select where the user can
> > enter stuff and press enter, which will add it.
> > 
> 
> But will it add the item(s) to the list for the life of the form?  What if the
> instance is 'reset'?
> 

If the data is supposed to stay there for ever, would be easy to do (store in a seperate array).
Comment 6 aaronr 2005-10-27 14:33:24 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > The easiest way would be to add a input above the select where the user can
> > > enter stuff and press enter, which will add it.
> > > 
> > 
> > But will it add the item(s) to the list for the life of the form?  What if the
> > instance is 'reset'?
> > 
> 
> If the data is supposed to stay there for ever, would be easy to do (store in a
> seperate array).
> 


I don't think that items added by the user with @selection="open" to still be there after a xforms-reset, though.  Even though xforms-reset is targeted at the model to make sure that all of its contained instance documents are set back to their initial values (which conceptually wouldn't affect a control that reflects non-instance data), I think that the 'real' purpose behind it is to be able to reset a form just like you can do in html forms.  A good question for the WG, though.  Allan?
Comment 7 Allan Beaufour 2005-10-28 01:23:55 PDT
(In reply to comment #6)
> I don't think that items added by the user with @selection="open" to still be
> there after a xforms-reset, though.  Even though xforms-reset is targeted at
> the model to make sure that all of its contained instance documents are set
> back to their initial values (which conceptually wouldn't affect a control that
> reflects non-instance data), I think that the 'real' purpose behind it is to be
> able to reset a form just like you can do in html forms.  A good question for
> the WG, though.  Allan?

Yes, I think xforms-reset should _reset_ back to initial data state, so the user entered values should not be saved.

I must admit that I've "just" seen selection="open" for select as the same as select1, just with the posibility of writing multiple (space seperated) values in the input.

The spec. states:
"For open selections: If the initial instance values match the storage value specified by one or more of the items, the all such matching items are selected. If the initial instance values do not match the storage value specified by one or more of the items, all such non-matching items are included as selected values, as if entered through free entry. Free entry text is handled the same as form control input 8.1.2 The input Element, possibly in multiplicity"

That does not contradict my understanding... but it's not validating it either.

Is there a problem in just "copying" the select1 understanding of it?
Comment 8 Doron Rosenberg (IBM) 2005-10-28 08:08:42 PDT
So we need to change one of the interfaces xbl widgets inherit from to contain a "reset" method or such.
Comment 9 Leigh L. Klotz, Jr. 2005-10-28 09:57:31 PDT
 (In reply to comment #6)
> Even though xforms-reset is targeted at the model to make sure that all of its contained instance documents are set
> back to their initial values (which conceptually wouldn't affect a control that
> reflects non-instance data), I think that the 'real' purpose behind it is to be
> able to reset a form just like you can do in html forms.  A good question for
> the WG, though.  Allan?

Note that select and select1 can participate in multiple models, and in particular, the itemset can come from one model and the ref from the other, so some thought needs to be given to what happens if you want to propagate a reset on the model containing the itemset to a select1 whose ref points to a different model which is not reset.

Also note that the larger topic of UI resets (as opposed to instance data resets) includes what to do about initial states for xf:switch as well, so consulting the WG would be a good idea. 

(I had originally proposed undo instead of reset, but we threw it out because of the difficulties in undoing setvalue and other side-effects in event handlers, which would require authors pairing each action with an undo action.)

Comment 10 aaronr 2006-01-26 14:43:42 PST
Created attachment 209759 [details]
simple testcase

simple testcase.  Doesn't do anything special in Novell, XSmiles or formsPlayer, so I'm guessing that no one has implemented it, yet.
Comment 11 aaronr 2006-01-26 15:12:48 PST
Also need to consider what to do if user types in "foo" and "foo" is later added to the itemset through another action.  Should there now be two foo's or just the one from the itemset?  More straight to the point -> do we allow a user to enter an item that is already on the list?  Or do we ensure that the user entered items NOT duplicate existing items?
Comment 12 Leigh L. Klotz, Jr. 2006-01-26 16:09:59 PST
One quite reasonable idea for open select if the lexical value space supports it (e.g., is declared to be NCName) is to present appearance="compact" as a typein box with completion.  Mark Birbeck has written a blog entry on this topic, though he implemented it using a select and a dynamic itemset for completion.  This type of completion-via-popup UI is quite a popular JavaScript application these days (Google Suggest, Delicious tags completion), and the semantics of it are really just <select appearance="compact" selection="open"> with a specified itemset, and bound to a datatype that has space delimiters.
Comment 13 Allan Beaufour 2006-02-03 04:57:19 PST
(In reply to comment #12)
> One quite reasonable idea for open select if the lexical value space supports
> it (e.g., is declared to be NCName) is to present appearance="compact" as a
> typein box with completion.  Mark Birbeck has written a blog entry on this
> topic, though he implemented it using a select and a dynamic itemset for
> completion.  This type of completion-via-popup UI is quite a popular JavaScript
> application these days (Google Suggest, Delicious tags completion), and the
> semantics of it are really just <select appearance="compact" selection="open">
> with a specified itemset, and bound to a datatype that has space delimiters.

I vote for that. Supporting "completion-via-popup" directly would be _really_ nice.
Comment 14 aaronr 2006-02-03 10:53:37 PST
works for me.  Can someone ref a page that has a similar control so that we can see what it looks like?
Comment 15 Leigh L. Klotz, Jr. 2006-02-03 11:13:33 PST
XForm has long left it up to processors how to present the ui for an open enumeration with an existing itemset as completion choices.  Below are the UI choices that non-XForms systems have made to present this same case.  Consistency in GUI systems is helpful, and it may be that making similar UI presentation choices will result in a better user experience:

http://www.google.com/webhp?complete=1&hl=en
You'll need to sign up for an account to get this to work:
http://del.icio.us/YOURUSERNAMEHERE?v=4&noui&url=http://www.mozilla.org
Here's the same thing but with controls for the choices shown as well as completion:
http://del.icio.us/YOURUSERNAMEHERE?v=4&noui&url=http://www.mozilla.org

Here is an implementation of select/@selection='open' done in XForms by Mark Birbeck of x-port.net in his FormsPlayer XForms processor:
Mark's example uses an input and a select1.  The itemset of the second select1 is populated during typing in the input by using an xf:send from the incremental value of the input, and the action on the select1 items completes the typing in the input.  

The dynamic xf:send part is a separate feature; the recommendation here is merely a UI presentation for the static condition of an itemset in select when selection='open' and appearance='minimal', resulting in a simple typein box with some kind of pop-up display of completion choices.  Again, the mechanism by which the itemset gets populated is immaterial to this feature, though really cool...
Comment 17 aaronr 2007-04-18 12:26:38 PDT
*** Bug 377871 has been marked as a duplicate of this bug. ***
Comment 18 David Bolter [:davidb] 2016-02-04 12:21:41 PST
RIP xforms

Note You need to log in before you can comment on or make changes to this bug.