Try the select multiple component in tassel?
Otherwise, the contrib:palette works well, too.
Using it is really about the same as using PropertySelection.
The only difference is that you're passing a (modifiable) list instead
of a single object in.

Here's an example...

<select jwcid="@contrib:Palette" model="ognl:coursesModel"      
     selected="ognl:selectedCourses"
     availableTitleBlock="ognl:components.unenrolled"
     selectedTitleBlock="ognl:components.enrolled"/>

<span jwcid="[EMAIL PROTECTED]">
        Unenrolled
</span>
<span jwcid="[EMAIL PROTECTED]">
        Enrolled
</span>

Robert

Dan   wrote:
> Hi,
> 
> I am newbie to tapestry. I am having problems getting the selected
> values from a MULTIPLE select.
> 
>> From googling the net and reading the docs, the method i approached to
>> get 
> 
> the selected value from a SINGLE select list(dropwdown) is by iterating
> over the collection being rendered and check if isSelected() is true.
> 
> example:
> 
> Page spec:
> 
> <select jwcid="@Select">
>  <span jwcid="@Foreach" source="ognl:colorList" value="ognl:color">
>    <option jwcid="@Option" selected="ognl:color.selected"
> label="ognl:color.name"/>
>  </span>
> </select>
> 
> Java code:
> 
> public Color getCurrentColor(){
>  List l = getColorList();
>  Color p;
>  for (int i=0;i<l.size();i++){
>    p = (Color)l.get(i);
>    if (p.isSelected())
>     return p;
>  }
>  return null;
> }
> 
> I try to do similar thing with mulitple select, ie return a List of
> objects whose  isSelected() == true. But this doesnt seem to work.
> 
> Could someone please guide as to how do they retrieve the selected
> objects from the multiple select?
> 
> Also are there any contrib:palette examples out there? The book
> doesnt...neither did googling help.
> 
> Thanks a bunch!
> 
> _________________________________________________________________
> Don’t just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to