7 total views, 7 views today
JSF Selectmanymenu Example
The JSF SelectManyMenu renders an HTML
JSF SelectManyMenu
h:selectManyMenu value=“#{user.color}”>
f:selectItem itemLabel=“Blue” itemValue=“Blue” />
f:selectItem itemLabel=“Green” itemValue=“Green” />
f:selectItem itemLabel=“Red” itemValue=“Red” />
h:selectManyMenu>
HTML
JSF h:SelectManyMenu Example
The below JSF has a
Below is the backing bean class
package com.catgovind; import javax.faces.bean.ManagedBean; @ManagedBean public class User { private String color[]=new String[]{"Red"}; public String[] getColor() { return color; } public void setColor(String[] color) { this.color = color; } public void printSelectedColors(){ System.out.println("Selected Colors"); for(String color: getColor()){ System.out.println(color); } } }
This is how the page looks like in the browser. As you see below, The SelectManyMenu display only one item
Download Project
SelectManyMenu_Example
This post first appeared on Oracle ADF, BPM, BI And Primavera P6 Tutorials, please read the originial post: here