Java Reference
In-Depth Information
rules="all"
border="1"
cellpadding="5">
<h:column>
<f:facet name="header">
<h:outputText value="Time Stamp" />
</f:facet>
<h:outputText value="#{toDo.timeCreated}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Task" />
</f:facet>
<h:outputText value="#{toDo.taskText}" />
</h:column>
</h:dataTable>
<p><h:commandButton id="back" value="Back" ac-
tion="index" /></p>
</h:form>
</body>
The value of the dataTable is listBean.toDos , the list returned by the managed
bean's getToDos method, which in turn calls the session bean's getToDos method.
Each row of the table displays the timeCreated and taskText fields of the individu-
al task. Finally, a Back button returns the user to the index.xhtml page.
Running the producerfields Example
You can use either NetBeans IDE or Ant to build, package, deploy, and run the produ-
cerfields application.
To Build, Package, and Deploy the producerfields Example Using NetBeans IDE
1. If the database server is not already running, start it by following the instruc-
tions in “ Starting and Stopping the Java DB Server ” on page 43 .
2. From the File menu, choose Open Project.
3. In the Open Project dialog, navigate to:
tut-install /examples/cdi/
4. Select the producerfields folder.
5. Select the Open as Main Project check box.
6. Click Open Project.
Search WWH ::




Custom Search