-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathselectManyMenu.xhtml
41 lines (39 loc) · 1.83 KB
/
selectManyMenu.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:showcase="http://liferay.com/faces/showcase"
template="/WEB-INF/templates/component-1col-60.xhtml">
<ui:define name="col1">
<h:form>
<showcase:example renderedCheckbox="true" requiredCheckbox="true">
<showcase:field label="#{i18n['favorite-liferay-benefit']}">
<h:selectManyMenu id="selectManyMenu" rendered="#{showcaseModelBean.selectedComponent.rendered}"
required="#{showcaseModelBean.selectedComponent.required}"
requiredMessage="Selection is required"
value="#{selectManyModelBean.favoriteIds}">
<f:selectItem itemValue="#{null}" itemLabel="-- Select --" noSelectionOption="true" />
<f:selectItem itemLabel="Compatible" itemValue="1" />
<f:selectItem itemLabel="Enterprise Ready" itemValue="2" />
<f:selectItem itemLabel="Powerful Integration" itemValue="3" />
<f:selectItem itemLabel="Lightweight" itemValue="4" />
<f:selectItem itemLabel="Open Source" itemValue="5" />
</h:selectManyMenu>
<h:message for="selectManyMenu" />
</showcase:field>
<showcase:note smallIcon="true">
<h:outputText escape="false" value="#{i18n['note-chromium-issue-4579']}" />
</showcase:note>
<hr />
<h:commandButton action="#{selectManyBackingBean.submit}" value="#{i18n['submit']}">
<f:ajax execute="@form" render="@form" />
</h:commandButton>
</showcase:example>
<showcase:results label="#{i18n['model-value']}">
<h:panelGroup id="modelValue">
<ui:repeat value="#{selectManyModelBean.favoriteIds}" var="favoriteId">
<h:outputText value="#{favoriteId}" /><br />
</ui:repeat>
</h:panelGroup>
</showcase:results>
</h:form>
</ui:define>
</ui:composition>