<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<body>
<f:view>
<h:form id="myForm">
<table>
<tr>
<td><h:outputLabel value="My Key" for="myKey" /></td>
<td><h:inputText id="myKey"
value="#{MyControllerClass.myKey}" required="true" /></td>
<td><h:message for="myKey" /></td>
</tr>
<tr>
<td><h:outputLabel value="My Int" for="myInt" /></td>
<td><h:inputText id="myInt"
value="#{MyControllerClass.myInt}" required="true" >
<!--f:converter converterId="javax.faces.Short"/-->
<f:validateLongRange minimum="50" maximum="1000000"/>
<f:validateLength minimum="2" maximum="4"/>
</h:inputText>
</td>
<td><h:message for="myInt" /></td>
</tr>
<tr>
<td><h:outputLabel value="My Double" for="myDouble" /></td>
<td><h:inputText id="myDouble"
value="#{MyControllerClass.myDouble}" required="true" >
<f:convertNumber locale="tr"
currencySymbol="YTL"
maxFractionDigits="2"
maxIntegerDigits="6"
type="currency"
/>
</h:inputText>
</td>
<td><h:message for="myDouble" /></td>
</tr>
<tr>
<td><h:outputLabel value="My Email" for="myEmail" /></td>
<td><h:inputText id="myEmail"
value="#{MyControllerClass.myEmail}" required="true" >
<!-- <f:validator validatorId="godoro.EmailValidator"/>-->
<f:converter converterId="godoro.EmailConverter"/>
</h:inputText>
</td>
<td><h:message for="myEmail" /></td>
</tr>
<tr>
<td><h:outputLabel value="My Date" for="myDate" /></td>
<td><h:inputText id="myDate"
value="#{MyControllerClass.myDate}" required="true" >
<f:convertDateTime pattern="dd/MM/yy"/>
</h:inputText>
</td>
<td><h:message for="myDate" /></td>
</tr>
<tr>
<td><h:outputLabel value="Another Value" for="myInt" /></td>
<td><h:inputText id="anotherValue"
value="#{MyControllerClass.anotherValue}" /></td>
<td><h:message for="anotherValue" /></td>
</tr>
<tr>
<td><h:outputLabel value="Select One Of Them" for="oneOfThem" /></td>
<td><h:selectOneListbox id="oneOfThem"
value="#{MyControllerClass.oneOfThem}">
<f:selectItems value="#{MyControllerClass.selectItems}"/>
</h:selectOneListbox></td>
<td><h:message for="oneOfThem" /></td>
</tr>
<tr>
<td><h:outputLabel value="Select Some Of Them" for="someOfThem" /></td>
<td><h:selectManyCheckbox id="someOfThem"
value="#{MyControllerClass.someOfThem}">
<f:selectItem itemValue="Item One" itemLabel="Item One"/>
<f:selectItem itemValue="Item Two" itemLabel="Item Two"/>
<f:selectItem itemValue="Item Three" itemLabel="Item Three"/>
</h:selectManyCheckbox></td>
<td><h:message for="someOfThem" /></td>
</tr>
</table>
<h:panelGroup>
<h:commandButton id="submitAddSomething" value="Add"
action="#{MyControllerClass.addSomething}" />
<h:commandButton id="submitDoSomething" value="Do"
action="#{MyControllerClass.doSomething}"/>
</h:panelGroup>
</h:form>
</f:view>
</body>
</html>
Dosyayı İndir