Re: T5: Multiple Select preselected values

2009-04-13 Thread Thiago H. de Paula Figueiredo
On Fri, Apr 10, 2009 at 4:04 AM, Kasper  wrote:
> Hi all,

Hi!

> I have a form with a multiple select field:
>  t:id="preferredRegions" t:multiple="true" size="13" />

Tapestry's Select component does not have a "multiple" parameter nor
supports maps as the edited value. Maybe the Palette component is what
you're looking for.

-- 
Thiago

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



T5: Multiple Select preselected values

2009-04-10 Thread Kasper

Hi all,

I have a form with a multiple select field:
t:id="preferredRegions" t:multiple="true" size="13" />


Where the t:model="regions" = HashMap. Now when the page  
loads I want some preferredRegions to be set. For normal form fields I  
use a setFieldValue(), so I tried to do this also for this Select field.


public HashMap getPreferredRegions() {
HashMap l = new HashMap();
l.put(Long.valueOf(1), "first field");
l.put(Long.valueOf(2), "second field");
l.put(Long.valueOf(3), "third field");
return l;
}

This doesn't work, it also doesn't work when I try to use List  
or just long[]. It does work when I use plain long. But then only one  
option can be preselected.


Does anyone have a clue how to let more than one value be preseleced?

Thanks,
Yours,
Kasper


--
http://kasper.nekoconeko.nl






This message was sent using IMP, the Internet Messaging Program.


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