-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidgetSelector.xhtml
More file actions
47 lines (46 loc) · 1.96 KB
/
widgetSelector.xhtml
File metadata and controls
47 lines (46 loc) · 1.96 KB
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
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html 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">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Widget Selector Example</title>
</h:head>
<h:body>
<ui:composition template="../layout/custom_template.xhtml">
<ui:define name="content">
<h:form>
<p>The following are examples that are generated from the use of CDI
producers. Please refer to the class <b>org.javaee7.chapter07.WidgetBean</b>
for the sources.</p>
<p>
Please select a widget type below to return that widget type:
</p>
<label for="widgetType">Widget Type:</label>
<h:selectOneMenu id="widgetType" value="#{widgetBean.widgetType}">
<f:selectItem itemLabel="Generic" itemValue="Generic"/>
<f:selectItem itemLabel="Plastic" itemValue="Plastic"/>
<f:selectItem itemLabel="Metal" itemValue="Metal"/>
<f:ajax execute="@this" render="widget"/>
</h:selectOneMenu>
<br/>
<h:outputText id="widget" value="#{widgetBean.widget.type}"/>
<br/><br/>
<p>The following is a list that was produced by CDI:</p>
<br/>
<h:dataTable id="widgets" var="widget" value="#{widgetBean.widgets}">
<h:column>
<h:outputText value="#{widget.type}"/>
</h:column>
</h:dataTable>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>