using h:commandLink inside h:selectOneListBox

i have one doubt,

inside a h:selectOneListBox , i want all the selectItems to be links that lead to another page. At the same time, the user should not be able to select them and do a submit. (i know we can acheive this by not having a backing bean property for this, but i dont want the user to even be able to select an item from this listbox and highlight it)

thanks balusc, your site has solved many a problem for me.

if i can get a reply before new year, wonderful. :)

[498 byte] By [dilip_jsfa] at [2007-11-26 13:35:12]
# 1
I've replied here: http://forum.java.sun.com/thread.jspa?threadID=5117614&tstart=0
BalusCa at 2007-7-7 22:18:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
here is another scenario i want an answer for. Is there a way of having pre-selected items inside a h:selectManyListBox ? Iam setting an integer array to hold the value.help here will be much appreciated.
dilip_jsfa at 2007-7-7 22:18:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Yes, this is possible. Pass it through the getter of the valuebinding.

public List<Integer> getSelectedItems() {

if (selectedItems == null) {

// Put preselected items in selectedItems.

}

return selectedItems;

}

BalusCa at 2007-7-7 22:18:02 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...