Hi all,

I have a form with a multiple select field:
<input t:type="Select" t:model="regions" t:value="preferredRegions" t:id="preferredRegions" t:multiple="true" size="13" />

Where the t:model="regions" = HashMap<Long, String>. 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<Long, String> getPreferredRegions() {
        HashMap<Long, String> l = new HashMap<Long, String>();
        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<Long> 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

Reply via email to