-
1. How can I get only the actual selected item in pickList?
ilya40umov Feb 8, 2011 4:49 AM (in response to keymaker)1 of 1 people found this helpfulLook at this link:
http://livedemo.exadel.com/richfaces-demo/richfaces/pickList.jsf?tab=info&cid=281678
fastMoveControlsVisible false false javax.el.ValueExpression
(must evaluate toboolean
)If "false", 'Copy All' and 'Remove All' controls aren't displayed. Even if this value is "true", the 'Copy All' and 'Remove All' controls will not be displayed if the "copyAllVisible" and "removeAllVisible" attribute values are "false". Default value is "true". Then add valueChangeListener and a4j:support for your pickList
valueChangeListener false false javax.el.MethodExpression
(signature must matchvoid valueChangeListener(javax.faces.event.ValueChangeEvent)
)Listener for valu P.S. Look at this thread:
-
2. How can I get only the actual selected item in pickList?
keymaker Feb 9, 2011 1:20 AM (in response to ilya40umov)Hi Ilya,
thanks a lot for your fast response. I checked the thread you sugessted before I wrote here. I don't want to use ListShuttle.
About the CopyAll and RemoveAll controls; thanks for the hint, but I meant moving more than one item. Not all of them. I removed them already. So, normal copy button would also move multiple items from one side to other. I want, user can select only one item for copying, because I'm combining this selection with another String and writing it to a third list like its given here :
http://livedemo.exadel.com/richfaces-demo/richfaces/pickList.jsf?tab=usage&cid=287673
I used a4j:support with onlistchanged and Filter the list as I need in the bean. This was helpful. The only remaining problem is preventing user from moving more than one item from left to right. Do you have any ideas about this?
-
3. How can I get only the actual selected item in pickList?
liuliu Feb 9, 2011 3:21 AM (in response to keymaker)hi,
why not use selectonelist if you want only one item can be selected one time?
liu
-
4. How can I get only the actual selected item in pickList?
keymaker Feb 9, 2011 4:22 AM (in response to liuliu)Hi Liu,
We are using pickList because it shows the selected items in a more understandable form. By the way we don't need single selection property anymore. Selecting more than one item is more practical in our modified usecase.
Thanks a lot for responses.