A UIForm component represents an input form that has child components representing data that is either presented to the user or submitted with the form. You can create an empty form or generate form code from an existing entity class. For more infomation about JSF form components, see need link here.
To generate an empty JSF form:
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%> <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
The IDE enters the following code in the JSP page:
<f:view> <h:form> </h:form> </f:view>
To generate a JSF form from an entity class:
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%> <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
If you speficied a read-only form, the IDE enters the following code in the page:
<f:view> <h2>Detail</h2> <h:form> <h:panelGrid columns="2"> <h:outputText value="column1-title:"/> <h:outputText value="#{anInstanceOfclass-name.column1}" title="column1-title" /> ... </h:panelGrid> </h:form> </f:view>
If you speficied an editable form, the IDE enters the following code:
<f:view> <h2>Create</h2> <h:form> <h:panelGrid columns="2"> <h:outputText value="column1-title:"/> <h:inputText title="column1-title" value="#{anInstanceOfclass-name.column1}" title="column1-title" /> </h:panelGrid> </h:form> </f:view>