You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Baroukh <mb...@cardiweb.com> on 2006/12/08 14:20:34 UTC
Options transfer select
Hi.
I wanted to use option transfer select, but finally, I don't understand
when it can be used because it need 2 lists : one with elements on the
left and one with elements on the right.
But all the example I found, or things I have to do are "not selected
elements on the left and selected elements on the righ" witch is
different because it only need one list.
In struts showcase, examples are
Favourite Motorcycles / Non Favourite Motorcycles
Favourite Countries / Non Favourite Countries
...
So, in database terms, I will only save selected elements and "not
selected" elements are "all elements minus selected elements".
What I would have expected in input for the tag is
- one list with all elements
- one list with selected elements.
It would automatically know wich elements to put on left and wich to put
on right.
I am wrong or is it not adapted to "real world" ?
Another question please : I try to use it anyway. For this, I triy to
compute left/right list with ognl.
Here is what I tried but it don't work. May somebody point me out
"where" is the problem ?
<s:optiontransferselect
name="valies"
list="%{mylist.{values.contains(#this?this:null}}"
doubleList="%{mylist.{!values.contains(#this?this:null}}"
... />
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---