You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Wolfgang <wk...@ebi.ac.uk> on 2007/09/06 09:14:22 UTC

link out of a drop down menu

Hi,

I would like to link directly out of the drop down menu, but I don't get 
it running.
Here each entry in the drop down menu has a different link.
My drop down menu will be created in a dynamic way.

Here's my code:
XHTML:
<h:selectOneMenu value="#{statistics.choosedValue}">
<f:selectItems value="#{statistics.list}" />
</h:selectOneMenu>

BEAN:

private List<SelectItem> list;

public void dropDown()
{
list = new ArrayList<SelectItem>();

Integer num = new 
Integer(instance.getCurrentDatasetHolderInstance().countDatasets());

list.add(new SelectItem(num.toString()));

for (Dataset dataset : datasetList) {
list.add(new SelectItem(dataset.getName()));
}

+ Getter und Setter

Does anyone know how to link direclty ot of the drop down menu

Thx for your efforts,
Cheers Wolfgang