You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <P....@albourne.com> on 2009/01/22 09:10:57 UTC

Re: Multi-select list

you would need to use some JavaScript, something like this:

var selected = new Array(); 
for (var i = 0; i < ob.options.length; i++) 
  if (ob.options[i].selected) 
    selected.push(ob.options[i].value);

The palette gives you this list already though... so I still can't see what the benefit is in avoiding two lists, its a lot more trouble using a <select.

Peter


 
----- Original Message -----
From: "ligboo" <li...@gmail.com>
To: users@tapestry.apache.org
Sent: Monday, 29 December, 2008 23:25:10 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: Multi-select list


dumb question:  how do you get the selected elements out of the <t:select
multiple="true> component??


Peter Stavrinides wrote:
> 
> Okay, that wasn't clear from your initial question, well you could still
> use the informal parameter multiple="true" on an <t:select /> and that
> should work, but unfortunately then you wont have the option of a
> java.util.list like you do with the pallet.
> 
> 
> ----- Original Message -----
> From: "rs1050" <rs...@gmail.com>
> To: users@tapestry.apache.org
> Sent: Monday, 17 November, 2008 2:16:47 PM GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: Multi-select list
> 
> 
> I saw palette, but I would like to have just one list from which users can
> highlight several rows - not have to move them around from 'available' to
> 'selected' (which requires two lists)
> 
> Thank you.
> Roman.
> -- 
> View this message in context:
> http://www.nabble.com/Multi-select-list-tp20533280p20538365.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Multi-select-list-tp1508013p2090366.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org