创建一个小 JSF form

From . http://i-csdn.com/index.php?option=com_content&view=article&id=316:i-csdn-building-a-simple-form-using-jsf&catid=44:jsp-jsf&Itemid=102


<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>

<%@ taglib prefix= "h"  uri= "http://java.sun.com/jsf/html"  %>

<html>
<head>
<title>Edit</title>
</head>
<body>

<f:use_faces>
<h:form formName= "sampleForm" >

////////////// here we bind managed bean to text-area input:

<h:input_textarea id= "text"  valueRef= "sampleBean.text"  rows= "3"  cols= "30" >
<f:validate_required/>
</h:input_textarea>

<br><h:output_errors  for = "text" />

<p><h:output_text value= "This is a Label" /></p>
..........
</h:form>
</f:use_faces>

</body>
</html>

你可能感兴趣的:(JSF)