Author: smukhina
Date: 2007-06-11 09:01:10 -0400 (Mon, 11 Jun 2007)
New Revision: 2106
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/AjaxCURDApplicationWithSeamAndRichFaces.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedForCreatingaJSFApplication.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforCreatingaStrutsApplication.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforJSFwithHibernate.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedStrutsValidationExamples.xml
Log:
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/AjaxCURDApplicationWithSeamAndRichFaces.xml
===================================================================
---
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/AjaxCURDApplicationWithSeamAndRichFaces.xml 2007-06-08
21:26:44 UTC (rev 2105)
+++
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/AjaxCURDApplicationWithSeamAndRichFaces.xml 2007-06-11
13:01:10 UTC (rev 2106)
@@ -39,11 +39,11 @@
<section id="CreatingASeamProjectUsingSeamGen">
<?dbhtml filename="CreatingASeamProjectUsingSeamGen.html"?>
<title>Creating a Seam Project using Seam Gen</title>
-<orderedlist>
+<itemizedlist>
<listitem>Stop your JBoss AS Server by clicking on the stop button as shown below.
We are
doing this so that the generated application can be deployed properly when the server
starts.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Stopping JBoss AS Server</title>
<mediaobject>
@@ -52,10 +52,10 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>To create a Seam project, select Seam Gen -> Setup/Configuration ->
Setup to
launch the Seam Gen setup window as shown below. Note: </listitem>
-</orderedlist>
+</itemizedlist>
<note>
<title>Note:</title>
<para>If this is the first time you run
@@ -123,10 +123,10 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Start the application server. Open your favorite browser and point to the
following URL
http://localhost:8080/EclipseCon. You should see the following
page:</listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title>Created Project</title>
<mediaobject>
@@ -136,11 +136,11 @@
</mediaobject>
</figure>
<para>Congratulations! You have written your first Seam application.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Let us take a look at the database connection that was created by the
Eclipse
Plugin and browse the database provided. The database connection view should now have
a
connection to our sample database as shown below.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Connections View</title>
<mediaobject>
@@ -165,7 +165,7 @@
<section id="GeneratingACRUDApplicationUsingSeamGen">
<?dbhtml filename="GeneratingACRUDApplicationUsingSeamGen.html"?>
<title>Generating a CRUD application using Seam Gen</title>
-<orderedlist>
+<itemizedlist>
<listitem>The next step in our exercise is to generate a full blown application
using Seam Gen.
This application will generate CRUD pages and Search pages for all the entities in the
database.
Click on Seam Gen -> Generate Entities. Seam Gen will connect to the database we
defined in the
@@ -178,7 +178,7 @@
synchronized with the application server.</listitem>
<listitem>Point your favorite browser to the following URL
http://localhost:8080/EclipseCon.
You will see the following page:</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>EclipseCon Project</title>
<mediaobject>
@@ -187,13 +187,13 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Let us now look at one of the entities and see what has been generated.
Click on the
"Offices List" to see a search page that allows you to filter the list
and the list of all the
offices in the database.</listitem>
<listitem>Type in USA in the country field and click on Search to get a list of
offices in the
USA as shown below.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Search Panel</title>
<mediaobject>
@@ -203,13 +203,13 @@
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Let us now check out the editing capability of the generated Seam
application. Select
the first office code and click on the Edit button. You will be prompted for a userID
and
password. Use "seamuser" for both user and password. You should at
this point see the edit page
as shown below. Notice that the NOT NULL columns in the database table are
automatically marked
with the red * to indicate that they are required.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Generated Edit Page</title>
<mediaobject>
@@ -218,14 +218,14 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Change a few things and save changes. This should update the record in
the database.
There you have it. A simple and easy way to bootstrap your
applications.</listitem>
<listitem>Let us look at how validations are done in Seam. Go back to and edit
another office
record and this time leave the city blank and click on the Save button. You will see
the default
Seam validations get triggered. In this case the "value required"
validation is fired as shown
below.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Error Reporting</title>
<mediaobject>
@@ -238,12 +238,12 @@
<section id="CustomizingTheGeneratedApplication">
<?dbhtml filename="CustomizingTheGeneratedApplication.html"?>
<title>Customizing the generated application</title>
-<orderedlist>
+<itemizedlist>
<listitem>Let us look at a couple of simple things we can change in the generated
application
to show you that the generated application can be customized. Let us start by changing
the edit
page that we just saw. We will clean up the labels using the Facelet designer as shown
below.
Open the view directory in your project and double click on the OfficeEdit.xhtml
file.</listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title>Facelet Designer</title>
<mediaobject>
@@ -256,11 +256,11 @@
Developer Studio are designed for developers to rapidly find their way in a source
file, while
still allowing them to visually look at a document.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>To change a label text, click on a label in the designer. This will
position the
cursor at the correct location in the source view. Type the new label there. The
designer does
not force the developer to use the WYSIWIG environment. Change all the labels for the
edit page.</listitem>
- </orderedlist>
+ </itemizedlist>
<para>Once you save the page, the IDE automatically rebuilds the application and
re-deploys it.
So, just reload your browser and you should see an updated web page like the following.
If for
some reason the re-deployment did not work, stop and restart the server normally
resolves the issue.</para>
@@ -279,10 +279,10 @@
<para>As part of generating the application, Seam Gen also generates JPA entities
that are used
to interact with the database. Let us quickly take a look at Hibernate tools and see how
we can
interact with the database using HQL and the Hibernate Criteria API.</para>
- <orderedlist>
+ <itemizedlist>
<listitem>Open the Hibernate Configurations View. You should be able to open the
console like
the other views we have seen so far in the tutorial. Your view should resemble the
following:</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Hibernate Configurations View</title>
<mediaobject>
@@ -291,7 +291,7 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Before we run the HQL, let us open up the "Hibernate Query
Result" and the "Hibernate
Dynamic SQL Preview" views. You should be able to do that in a manner similar
to other views we
have opened in this tutorial. Alternatively you can open the Hibernate Console
Perspective where
@@ -299,7 +299,7 @@
<listitem>Click on the "HQL" icon in the "Hibernate
Configurations" view. This will open up
the HQL Designer view as shown below. Also, select "EclipseCon" from
the drop down menu next to
the green "run" button.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>HQL Designer View</title>
<mediaobject>
@@ -308,11 +308,11 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Type in a simple query as shown above "from Offices o"
and click on the green "run"
button. You should see the result of the HQL query in the "Hibernate Query
Result" window as
shown below.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Hibernate Query Result Window</title>
<mediaobject>
@@ -321,11 +321,11 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Click on any of the objects in the result and you should be able see the
contents of
the objects in the Property view as shown below. If you don't have the view
open in your
perspective, you can open this view like all other views in this
tutorial.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Property View</title>
<mediaobject>
@@ -345,38 +345,38 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Let us try a slightly more complex query. Type in the following query in
the query
window and see how the query result changes and the SQL Preview
changes.</listitem>
- </orderedlist>
+ </itemizedlist>
<programlisting role="JAVA"><![CDATA[select city, state,
postalcode
from Offices o
where country = 'USA'
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Let us try the Hibernate criteria APIs next. To use Hibernate Criteria
APIs click on
the "CRI" button in the Hibernate Configurations View. This will open
the Criteria API designer
view. Type in this simple criteria query as shown below and click on the green run button
to see
the results. Also, select "EclipseCon" from the drop down menu next to
the green "run" button.</listitem>
- </orderedlist>
+ </itemizedlist>
<programlisting
role="JAVA"><![CDATA[session.createCriteria(Offices.class)
]]></programlisting>
<para>The results will be very similar to the HQL query except that the criteria
query does not
generate the SQL in the "Hibernate Dynamic SQL Preview"
view.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Let us try something a little more complex. Let us filter all offices in
the USA as
shown below. The results of this query should be very similar to the results of the
HQL.</listitem>
- </orderedlist>
+ </itemizedlist>
<programlisting
role="JAVA"><![CDATA[session.createCriteria(Offices.class)
.add(Restrictions.eq("country", "USA")) ;
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Finally let us visually see the entity model of the generated JPA
objects. Before we
do that, open the "Hibernate Entity Model" view and select the
"Configurations" option in the
"Hibernate Configurations" view. The plug-in will show all the
entities in a visual format.
You can either manually align your objects or click on the "Layout"
button on the right of the
"Hibernate Entity Model" view to generate a default
layout.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Hibernate Entities</title>
<mediaobject>
@@ -437,21 +437,21 @@
</itemizedlist>
<para>Ajax4Jsf provides a simple JSF component <emphasis
role="bold"><property><aj4:support></property></emphasis>
that simplifies this process. Let us
take our example and add AJAX to it.</para>
-<orderedlist>
+<itemizedlist>
<listitem>Click on the checknumber field in the visual designer, it will position
you at the
correct location in the source. You will notice that the inputText tag does not have a
closing
tag. Let us add a closing tag to the input text field as shown below.</listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JSP"><![CDATA[<h:inputText
id="checknumber"
value="#{paymentsList.payments.checknumber}">
<a4j:support event="onkeyup"
reRender="paymentsList"/>
</h:inputText>
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Now let us add the AJAX support tag to let Ajax4Jsf know that when the
user presses a
key we want to go to the server to get a list of payments that match the characters
entered in
the checknumber text box. Add the tag that is highlighted below to the inputText
tag.</listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JSP"><![CDATA[<h:inputText
id="checknumber"
value="#{paymentsList.payments.checknumber}">
<a4j:support event="onkeyup"
reRender="paymentsList"/>
@@ -460,10 +460,10 @@
<para>This tag is pretty self explanatory, it posts the server when a key is
pressed and then
takes the response from the server and re-renders the section of the page that has an id
of
"paymentList".</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem>If you follow along in the page, you will see that the section that
displays the
results is in a div tag that has an id of
"paymentsList"</listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JSP"><![CDATA[<div class="results"
id="paymentsList">
<h3>search results</h3>
<h:outputText value="No payments exists"
@@ -471,11 +471,11 @@
...
</div>
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Save the changes and refresh your browser. You will see that as you type
characters
in the checknumber field, all payments that begin with those characters will be displayed
in the
table automatically.</listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title>Data Fields</title>
<mediaobject>
@@ -486,11 +486,11 @@
</figure>
<para>But there is still one more problem in this page, you will see that the
"Next" and
"Previous" buttons will be displayed even for search results that are
small as shown above.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem>The tag that we added in the previous step only updates the table. Let us
add an AJAX
region around the page buttons at the bottom of the table. This will allow Ajax4Jsf to
update
those buttons independently.</listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JSP"><![CDATA[<a4j:outputPanel
ajaxRendered="true">
<div class="tableControl">
...
@@ -508,11 +508,11 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Let add one more thing to complete this part of the sample. When we type
a character in
the "checknumber" field, there is no visual feedback to the user that
there is a request being
made to the server.</listitem>
- </orderedlist>
+ </itemizedlist>
<para>Ajax4Jsf has a pre-built tag <emphasis
role="bold"><property><a4j:status></property></emphasis>
that allows you to either render a text or an
image in response to an AJAX event. Add the following code, right after the end of the
<emphasis
role="bold"><property><h:inputText></property></emphasis>
tag.</para>
@@ -524,11 +524,11 @@
]]></programlisting>
<para>Save changes to the page and refresh the browser. You will see the image when
the AJAX
request is active. The image will disappear as soon as the response is
received.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Finally, let us place the image beside the
"checknumber" text box. Place a
<emphasis
role="bold"><property><h:panelGroup></property></emphasis>
around the <emphasis
role="bold"><property><h:inputText></property></emphasis>
and <emphasis
role="bold"><property><a4j:status></property></emphasis>
tags as shown below.
Save changes and refresh the browser. You should see the image right next to the text
box.</listitem>
- </orderedlist>
+ </itemizedlist>
<programlisting role="JSP"><![CDATA[<h:panelGroup>
<h:inputText id="checknumber"
value="#{paymentsList.payments.checknumber}">
@@ -567,10 +567,10 @@
]]></programlisting>
<para>In this page, we are going to replace the "quantityordered"
text box with the spinner
control.</para>
- <orderedlist>
+ <itemizedlist>
<listitem>In the visual view of the page, click on the
"quantityordered" text box, this will
select the appropriate markup in the source view. Delete the selected
markup.</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Deleting Selected Markup</title>
<mediaobject>
@@ -602,9 +602,9 @@
required="true"/>
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Save changes and refresh the browser page. Your output page should look
like this:</listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title>Output Page</title>
<mediaobject>
@@ -613,12 +613,12 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Although this is not the best situation to use a slider, let us take a
quick look at
another RichFaces control <emphasis
role="bold"><property><rich:inputNumberSlider></property></emphasis>.
The slider control is similar to the the
spinner control; it is bound to the same object. Replace the spinner with the following
markup.
Save the page and refresh your browser window.</listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JSP"><![CDATA[<rich:inputNumberSlider
value="#{orderdetailsHome.definedInstance.quantityordered}"
styleClass="slider"
@@ -632,17 +632,17 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem>Seam Gen also generates a date picker control for all date fields in an
edit page.
Click on "Order List" and edit one of the orders to see an example of
the date picker control
that is bundled with Seam.</listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title>Order List</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/OrderedList.png"/>
+ <imagedata fileref="images/itemizedlist.png"/>
</imageobject>
</mediaobject>
</figure>
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedForCreatingaJSFApplication.xml
===================================================================
---
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedForCreatingaJSFApplication.xml 2007-06-08
21:26:44 UTC (rev 2105)
+++
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedForCreatingaJSFApplication.xml 2007-06-11
13:01:10 UTC (rev 2106)
@@ -30,14 +30,14 @@
<?dbhtml filename="SettingUpTheProject.html"?>
<title>Setting Up the Project</title>
<para>We are first going to create a new project for the application.</para>
-<orderedlist>
+<itemizedlist>
<listitem><para>Go to the menu bar and select File > New > Project...
.</para></listitem>
<listitem><para>Select Red Hat Developer Studio > JSF > JSF Project in
the New Project dialog box.</para></listitem>
<listitem><para>Click Next</para></listitem>
<listitem><para>Enter jsfHello as the project
name.</para></listitem>
<listitem><para>Leave everything else as is, and click
Finish.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="TheJSFApplicationConfigurationFile">
<?dbhtml filename="TheJSFApplicationConfigurationFile.html"?>
@@ -51,13 +51,13 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click the plus sign next to jsfHello to reveal the child
nodes.</para></listitem>
<listitem><para>Click the plus sign next to WebContent under
jsfHello.</para></listitem>
<listitem><para>Click the plus sign next to WEB-INF under
WebContent.</para></listitem>
<listitem><para>Then double-click on the faces-config.xml node to display the
JSF application configuration file editor.</para></listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title></title>
<mediaobject>
@@ -79,7 +79,7 @@
<section id="AddingTwoViews(JSPPages)">
<?dbhtml filename="AddingTwoViews(JSPPages).html"?>
<title>Adding Two Views (JSP Pages)</title>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Right-click anywhere on the diagram and select New View...
from the pop-up
menu</para></listitem>
<listitem><para>In the dialog box, type pages/inputname as the value for
From-view-id</para></listitem>
@@ -93,14 +93,14 @@
<listitem><para>In the dialog box, type pages/greeting as the value for
From-view-id</para></listitem>
<listitem><para>Leave everything else as is</para></listitem>
<listitem><para>Click Finish</para></listitem>
-</orderedlist>
+</itemizedlist>
<section id="CreatingTheTransition(NavigationRule)">
<?dbhtml filename="CreatingTheTransition(NavigationRule).html"?>
<title>Creating the Transition (Navigation Rule)</title>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>In the diagram, select the connection icon third from the top
along the upper left
side of the diagram</para></listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title>Connection icon</title>
<mediaobject>
@@ -110,10 +110,10 @@
</mediaobject>
</figure>
<para>to get an arrow cursor with a two-pronged plug at the arrow's
bottom.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click on the pages/inputname page icon and then click on the
pages/greeting page icon</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>A transition should appear between the two icons.</para>
<figure>
<title>Transition between two icons</title>
@@ -123,9 +123,9 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Select File/Save from the menu
bar.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
</section>
</section>
@@ -133,7 +133,7 @@
<?dbhtml filename="AddingAManagedBeanToTheApplication.html"?>
<title>Adding a Managed Bean to the Application</title>
<para>To store data in the application, we will use a managed bean.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click on the Tree tab at the bottom of the editing
window</para></listitem>
<listitem><para>Select the Managed Beans node and then click the Add...
button displayed along
the right side of the editor window</para></listitem>
@@ -147,7 +147,7 @@
Class is not filled in, String is the assumed type.)</para></listitem>
<listitem><para>Click Finish</para></listitem>
<listitem><para>Select the personBean node in the
tree</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>You should see this now:</para>
<figure>
<title>Tree view in Config Editor</title>
@@ -157,9 +157,9 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Select File/Save from the menu
bar.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>You have now registered the managed bean and created a stub-coded class file
for it.</para>
</section>
<section id="EditingTheJSPViewFiles">
@@ -169,11 +169,11 @@
<para>Now we will finish editing the JSP files for our two
"views" using Exadel's JSP Visual Page</para>
<section id="Inputname.jsp">
<title>inputname.jsp</title>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click on the Diagram tab for the configuration file
editor</para></listitem>
<listitem><para>Open the editor for this first JSP file by double-clicking on
the /pages/inputname.
jsp icon</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The Visual Page Editor will open in a screen split between source code along
the top and
a WYSIWIG view along the bottom:</para>
@@ -186,12 +186,12 @@
</mediaobject>
</figure>
<para>Some JSF code will already be in the file because we selected a template when
creating the page.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Select the Visual tab, so we can work with the editor
completely in its WYSIWYG
mode</para></listitem>
<listitem><para>To the right of the editor, in the Red Hat Palette, expand
the JSF HTML palette folder
by selecting it</para></listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title></title>
<mediaobject>
@@ -200,7 +200,7 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click on form within this folder, drag the cursor over to the
editor,
and drop it inside the red box in the editor</para></listitem>
@@ -224,7 +224,7 @@
<listitem><para>Then, select the View Actions/greeting node and click on the
Ok button</para></listitem>
<listitem><para>Back in the attributes dialog box, type in Say Hello as the
value for the value
attribute ("Say Hello") and then click on the Finish
button</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The source coding should be something like this now:</para>
<programlisting role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
@@ -252,13 +252,13 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Save the file by selecting File/Save from the menu
bar.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="Greeting.jsp">
<title>greeting.jsp</title>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click on the faces-config.xml tab to bring the diagram
back</para></listitem>
<listitem><para>Open the editor for the second file by double-clicking on the
/pages/greeting.jsp
icon</para></listitem>
@@ -272,7 +272,7 @@
<listitem><para>Then, select the Managed Beans/personBean/name node, click on
the Ok button,
and then click on the Finish button</para></listitem>
<listitem><para>Right after the output field, type an exclamation point
(!)</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The source coding should be something like this now:</para>
<programlisting role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
@@ -287,25 +287,25 @@
</body>
</html>
]]></programlisting>
-<orderedlist continuation="continues">
-<listitem><para>Save the
file.</para></listitem></orderedlist>
+<itemizedlist continuation="continues">
+<listitem><para>Save the
file.</para></listitem></itemizedlist>
</section>
</section>
<section id="CreatingTheStartPage">
<?dbhtml filename="CreatingTheStartPage.html"?>
<title>Creating the Start Page</title>
<para>You also need to create a start page as an entry point into the
application.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>In the Package Explorer view to the left, right-click
jsfHello/WebContent and select
New/JSP File</para></listitem>
<listitem><para>For Name type in index, for Template select JSPRedirect and
click Finish.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>A JSP editor will open up on the newly created file.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>In the Source part of the split screen, type
/pages/inputname.jsf in between
the quotes for the page attribute</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The source coding should look like this now:</para>
<programlisting role="JSP"><![CDATA[<!doctype html public
"-//w3c//dtd html 4.0 transitional//en">
<html>
@@ -318,9 +318,9 @@
<para>Note the .jsf extension for the file name. This is a mapping defined in the
web.xml file
for the project for invoking JavaServer Faces when you run the application.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Select File/Save from the menu
bar.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="RunningTheApplicationJSF">
<?dbhtml filename="RunningTheApplicationJSF.html"?>
@@ -336,14 +336,14 @@
</imageobject>
</mediaobject>
</figure>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Start up Tomcat by clicking on the first icon from left. (If
Tomcat is already running,
stop it by clicking on the third icon from the left and then start it again. Remember,
the JSF run-time requires restarting the servlet engine when any changes have been
made.) After the messages in the Console tabbed view stop scrolling, Tomcat is
available.</para></listitem>
<listitem><para>Click on the Red Hat run icon in the
toolbar:</para></listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title></title>
<mediaobject>
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforCreatingaStrutsApplication.xml
===================================================================
---
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforCreatingaStrutsApplication.xml 2007-06-08
21:26:44 UTC (rev 2105)
+++
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforCreatingaStrutsApplication.xml 2007-06-11
13:01:10 UTC (rev 2106)
@@ -15,7 +15,7 @@
<section id="StartingUp">
<title>Starting Up</title>
<para>We are first going to create a new project for the application.</para>
- <orderedlist>
+ <itemizedlist>
<listitem><para>Go to the menu bar and select File/New/Project...
.</para></listitem>
<listitem><para>Select Red Hat Developer Studio/Struts/Struts Project in the
New Project dialog box.</para></listitem>
<listitem><para>Click Next >.</para></listitem>
@@ -23,14 +23,14 @@
<listitem><para>Leave everything else as is, and click Next
>.</para></listitem>
<listitem><para>Click Next> again.</para></listitem>
<listitem><para>7. Make sure that struts-bean.tld, struts-html.tld, and
struts-logic.tld are checked in the list of included tag libraries and then click
Finish.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>A StrutsHello node should appear in the upper-left Package Explorer
view.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Click the plus sign next to StrutsHello to reveal the child
nodes.</para></listitem>
<listitem><para>Click the plus sign next to WebContent under
StrutsHello.</para></listitem>
<listitem><para>Click the plus sign next to WEB-INF under
WebContent.</para></listitem>
<listitem><para>Then, double-click on the struts-config.xml node to
display a diagram of the Struts application configuration file in the editing
area.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>At this point, its empty except for the background grid lines.</para>
</section>
@@ -46,7 +46,7 @@
the code a little bit later.</para>
<section id="CreatingthePagePlaceholders">
<title>Creating the Page Placeholders</title>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Bring the Web Projects view to the front of the Package
Explorer view by selecting the Web Projects tab next to that
tab.</para></listitem>
<listitem><para>Right-click the StrutsHello/WEB-ROOT (WebContent) folder in
the Web Projects view and select New/Folder... .</para></listitem>
<listitem><para>Enter pages for a folder name and click
Finish.</para></listitem>
@@ -57,28 +57,28 @@
<listitem><para>For Name type in inputname (the JSP extension
will be automatically added to the file), for Template select StrutsForm, and then click
on the Finish button.</para></listitem>
<listitem><para>Right-click the pages folder again and select New/File/JSP...
.</para></listitem>
<listitem><para>For Name type in greeting , for Template leave as Blank, and
then click on the Finish button.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>Just leave these files as is for now.</para>
</section>
<section id="PlacingthePagePlaceholders">
<title>Placing the Page Placeholders</title>
<para>Lets now place the two pages just created on the diagram.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Click on the struts-config.xml tab in the Editing area to
bring the diagram to the front.</para></listitem>
<listitem><para>Click on the inputname.jsp page in the Web Projects view,
drag it onto the diagram, and drop it.</para></listitem>
<listitem>Click on the greeting.jsp page in the Web Projects view, drag it onto the
diagram,
and drop it to the right of the /pages/inputname.jsp icon with some extra
space.</listitem>
-</orderedlist>
+</itemizedlist>
<para>You should now have two JSP pages in the diagram.</para>
</section>
</section>
<section id="CreatinganActionMappings">
<title>Creating an Action Mappings</title>
<para>Using a context menu on the diagram, we are next going to create an Action
mapping.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Right-click between the two icons and select
Add/Action</para></listitem>
<listitem><para>Enter the following values:</para></listitem>
- </orderedlist>
+ </itemizedlist>
<table>
<tgroup cols="2">
<tbody>
@@ -106,9 +106,9 @@
</tgroup>
</table>
<para>(GetNameForm is the name for a form bean that we will create
later.)</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click Finish.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The /greeting action should appear in two places, in the diagram and also
under the action-mappings node under the struts-config.xml node in the Outline view. Also,
note the
asterisk to the right of the name, struts-config.xml, in the Outline view showing that
the file has been changed, but not saved to disk.</para>
@@ -116,9 +116,9 @@
<section id="CreatingaLink">
<title>Creating a Link</title>
<para>Let's now create a link from the inputname.jsp page to the
action.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>On the left-hand side of the diagram in the column of icons,
click on this icon:</para></listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Create New Connection Icon</title>
<mediaobject>
@@ -127,17 +127,17 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>In the connect-the-components mode you are in
now, click on the /pages/inputname.jsp icon in the diagram and then click on the /greeting
action.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>A link will be created from the page to the action.</para>
</section>
<section id="CreatingaForward">
<title>Creating a Forward</title>
<para>Next, we are going to create a forward for the action.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>On the left-hand side of the diagram in the column of icons,
click on this icon, again:</para></listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Create New Connection Icon</title>
<mediaobject>
@@ -146,7 +146,7 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">>
+ <itemizedlist continuation="continues">>
<listitem><para>Click on the /greeting action icon in the diagram and then
click on the /pages/greeting.jsp icon.</para></listitem>
<listitem><para>Thats it. A link will be drawn from the actions new greeting
forward to the greeting.jsp JSP page. Note that the forwards name will be set based on the
name of the target JSP file
@@ -156,12 +156,12 @@
<listitem><para>Expand the struts-config.xml/action-mappings//greeting node
and then select the greeting forward.</para></listitem>
<listitem><para>In the Properties Editor to the right, change the text to
sayHello in the Name field.</para></listitem>
<listitem><para>Select the Diagram tab at the bottom of the editor window and
see how the diagram is also updated to reflect the change.</para></listitem>
- </orderedlist>
+ </itemizedlist>
</section>
<section id="CreatingaGlobalForward">
<title>Creating a Global Forward</title>
<para>One last component that we need to create in the diagram is a global
forward.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Somewhere in the top-left corner of diagram, right-click and
select Add/Global Forward....</para></listitem>
<listitem><para>Enter getName in the Name
field.</para></listitem>
<listitem><para>Select the Change... button for
Path.</para></listitem>
@@ -169,11 +169,11 @@
<listitem><para>Expand the StrutsHello/WEB-ROOT (WebContent)/pages node and
then select the inputname.jsp page.</para></listitem>
<listitem><para>Click Ok.</para></listitem>
<listitem><para>Leave the rest of the fields blank and click
Ok.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>A forward object now appears on the diagram and also in the global-forwards
folder in the Outline view.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Tidy up the diagram, by clicking and dragging
around each icon, so that the diagram looks something like
this:</para></listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Diagram View</title>
<mediaobject>
@@ -186,13 +186,13 @@
<section id="CreatingaFormBean">
<title>Creating a Form Bean</title>
<para>One last thing that we need to do is to create a form bean.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Switch to the Tree viewer in the editor for the
struts-config.xml file, by selecting the Tree tab at the bottom of the editor
window.</para></listitem>
<listitem><para>Right-click struts-config.xml/form-beans and select Create
Form Bean.</para></listitem>
<listitem><para>Enter GetNameForm in the name field and sample.GetNameForm
for type.</para></listitem>
<listitem><para>Click Finish.</para></listitem>
<listitem><para>To save your changes to struts-config.xml, select File/Save
from the menu bar.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>Note the disappearance of the asterisk next to the name,
struts-config.xml.</para>
</section>
</section>
@@ -204,18 +204,18 @@
code for the action component. We also need to write an action class for the
/greeting mapping
along with a FormBean. To aid in the coding phase, Red Hat Developer Studio can
generate Java class
stubs for all of the components shown in the diagram.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Switch back to the diagram, by selecting the Diagram tab at
the bottom of the editor window.</para></listitem>
<listitem><para>Right-click a blank space in the diagram and select Generate
Java Code.</para></listitem>
<listitem><para>Leave everything as is in the dialog box and click Generate
.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>You should see a screen that says:</para>
<para>Generated classes: 2</para>
<para>Actions: 1</para>
<para>Form beans: 1</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Click Finish.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>The Java files will be generated in a JavaSource/sample folder that you can
see in the Package
Explorer view under the StrutsHello node. One Action stub and one FormBean stub will
have been generated.</para>
</section>
@@ -226,34 +226,34 @@
from previous steps, and a new start JSP page we will have to create.</para>
<section id="JavaStubClasses">
<title>Java Stub Classes</title>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>To finish the two Java classes, switch to the Package
Explorer view and expand the JavaSource/sample folder.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<section id="GetNameForm.java">
<title>GetNameForm.java</title>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Double-click GetNameForm.java for
editing.</para></listitem>
<listitem><para>You are looking at a Java stub class that was generated by
Red Hat Developer Studio. Now we are going to edit the
file.</para></listitem>
<listitem><para>Add the following attributes at the beginning of the
class:</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>private String name = "";</para>
<para>private String greetName = "";</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Inside the reset method, delete the TO DO and throw lines and
add:</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>this.name = "";</para>
<para>this.greetName = "";</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Inside the validate method, delete the TO DO and throw lines
and add:</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>ActionErrors errors = new ActionErrors();</para>
<para>return errors;</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Right-click and select Source/Generate Getters and Setters...
from the context menu.</para></listitem>
<listitem><para>In the dialog box, check the check boxes for name and
greetName, select First method for Insertion point, and click on the OK
button.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>The final GetNameForm.java file should look like this:</para>
<programlisting role="JAVA"><![CDATA[
package sample;
@@ -297,16 +297,16 @@
}
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Save the file.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="GreetingAction.java">
<title>GreetingAction.java</title>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Open GreetingAction.java for
editing.</para></listitem>
<listitem><para>Inside the execute method, delete the TO DO and throw lines
and add the following:</para></listitem>
- </orderedlist>
+ </itemizedlist>
<programlisting role="JAVA"><![CDATA[
String name = ((GetNameForm)form).getName();
@@ -342,10 +342,10 @@
}
}
]]></programlisting>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Save the file.</para></listitem>
<listitem><para>Close the editors for the two Java
files.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>The last thing left to do is to code the JSP files whose editors should still
be open from having been created as placeholders.</para>
</section>
</section>
@@ -354,7 +354,7 @@
<section id="inputname.jsp">
<title>inputname.jsp</title>
<para>In this page, the user will enter any name and click the submit button. Then,
the greeting action will be called through the form.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Click on the inputname.jsp tab in the Editing area to bring
its editor forward.</para></listitem>
<listitem><para>In the Web Projects view, expand
StrutsHello/Configuration/default/strutsconfig.xml/action-mappings and select
/greeting.</para></listitem>
<listitem><para>Drag it and drop it between the quotes for the action
attribute to the html:form element in the Source pane of the
editor.</para></listitem>
@@ -364,7 +364,7 @@
<listitem><para>Select the Visual pane of the
editor.</para></listitem>
<listitem><para>Then, in the Red Hat Palette, expand the Struts Form library,
select text, and drag it onto the box.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Red Hat Palette</title>
<mediaobject>
@@ -373,12 +373,12 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>In the Insert Tag dialog box, type in name for property and
select Finish.</para></listitem>
<listitem><para>In the Struts Form library in the Red Hat Palette, select
submit, and drag it to right after the the text box in the Visual pane of the
editor.</para></listitem>
<listitem><para>Right-click the submit button and select
<html:submit> Attributes from the context
menu.</para></listitem>
<listitem><para>In the Attributes dialog box, select the value field and type
in Say Hello! for its value.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>After tidying the page source, the Editor window for the file should look
something like this:</para>
<figure>
<title>Editor window</title>
@@ -392,10 +392,10 @@
<section id="greeting.jsp">
<title>greeting.jsp</title>
<para>Next, we will fill in the result page.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click on the greeting.jsp tab in the Editing area to bring
its editor forward.</para></listitem>
<listitem><para>Type in the following code:</para></listitem>
- </orderedlist>
+ </itemizedlist>
<programlisting role="XML"><![CDATA[
<html>
<head>
@@ -409,20 +409,20 @@
]]></programlisting>
<para>To complete editing of this file, we will use macros from the Red Hat
Palette. This palette is a view that should be available to the right of the editing
area.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>Click on the Struts Common folder in the Red Hat Palette to
open it.</para></listitem>
<listitem><para>Position the cursor at the beginning of the greeting.jsp file
in the Source pane and then click on bean taglib in the Red Hat
Palette.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>This will insert the following line at the top of the file:</para>
<programlisting role="JAVA"><![CDATA[
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Click on the Struts Bean folder in the Red Hat Palette to
open it.</para></listitem>
<listitem><para>Position the cursor inside the p
element.</para></listitem>
<listitem><para>Click on write in the Red Hat
Palette.</para></listitem>
<listitem><para>Type in GetNameForm for the name attribute and add a property
attribute with greetName as its value.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>The editor should should now look like this:</para>
<figure>
<title>Editor window</title>
@@ -436,7 +436,7 @@
<section id="index.jsp">
<title>index.jsp</title>
<para>Finally, we will need to create and edit an index.jsp page. This page will
use a Struts forward to simply redirect us to the getName global forward.</para>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>In the Web Projects view, right-click on
StrutsHello/WEB-ROOT(WebContent)</para>
<para>node and select New/File/JSP... .</para>
</listitem>
@@ -447,15 +447,15 @@
<listitem><para>Back on the palette, select the Struts Logic folder of
macros.</para></listitem>
<listitem><para>Click on redirect.</para></listitem>
<listitem><para>Delete the ending tag, put a forward slash in front of the
closing angle bracket, and type forward=getName in front of the
slash.</para></listitem>
- </orderedlist>
+ </itemizedlist>
<para>The finished code for the page is shown below:</para>
<programlisting role="JAVA"><![CDATA[
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<logic:redirect forward="getName"/>
]]></programlisting>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem><para>To save all the edits to files, select File/Save All from the
menu bar.</para></listitem>
- </orderedlist>
+ </itemizedlist>
</section>
</section>
</section>
@@ -479,7 +479,7 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist continuation="continues">
<listitem>Start up JBoss AS by clicking on the first icon from left in this panel.
(If JBoss AS is
already running, stop it by clicking on the third icon from the left and then start
it
again. Remember, the Struts run-time requires restarting the servlet engine when
@@ -487,7 +487,7 @@
<listitem>After the messages in the Console tabbed view stop scrolling, JBoss AS is
available.
At this point, right-click on the getName global forward in the struts-config.xml
diagram view and select Run on Server.</listitem>
- </orderedlist>
+ </itemizedlist>
<para>The browser should appear with the application started.</para>
</section>
</chapter>
\ No newline at end of file
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforJSFwithHibernate.xml
===================================================================
---
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforJSFwithHibernate.xml 2007-06-08
21:26:44 UTC (rev 2105)
+++
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforJSFwithHibernate.xml 2007-06-11
13:01:10 UTC (rev 2106)
@@ -14,7 +14,7 @@
<title>Installing the Project</title>
<para>We are first going to download and import this project (ormHibernate3-jsf)
into Eclipse.</para>
-<orderedlist>
+<itemizedlist>
<listitem><para>Download:
http://webdownload.exadel.com/dirdownloads/ormhib/examples/ormHibernate3-...
<listitem><para>Unzip this file into your Eclipse workspace
folder.</para></listitem>
<listitem><para>Launch Eclipse.</para></listitem>
@@ -22,7 +22,7 @@
<listitem><para>Click Next.</para></listitem>
<listitem><para>Browse to where the project was
unzipped.</para></listitem>
<listitem><para>Find the web.xml file inside the WebContent folder in the
WEB-INF folder, select it, and Click Finish.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The ormHibernate3-jsf project should appear in the Package Explorer with a
standard Web application
structure. As we mentioned before, this is a JSF application. To see the JSF
configuration file, browse to
WebContent/WEB-INF/faces-config.xml.</para>
@@ -70,11 +70,11 @@
<para>We are ready to run this project in a Web browser and see how it looks. We
don't need to
compile these classes, because Eclipse did it for us when we imported the
project.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Start Tomcat.</para></listitem>
<listitem><para>Click on the running-man-and-blue-butterfly icon from the
toolbar.</para></listitem>
<listitem><para>Go ahead and play with the
application.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>Initially users don't exist, so entering any ID will prompt you to
enter user details. Once you have saved a user, you can go back to the main page by
clicking on the Back to Login Page link. If you then enter that user's id again,
the application will locate and display the user's details.</para>
</section>
@@ -97,19 +97,19 @@
<para>Let's start by using Red Hat Developer Studio with the application
project. First, we create
the object/relational mapping from our simple object model to a database schema after
adding Hibernate
capabilities to our project.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Right-click on ormHibernate3-jsf in the Package Explorer view
and select Exadel</para></listitem>
<listitem><para>Studio/Add Hibernate Capability... from the context
menu.</para></listitem>
<listitem><para>Click on Yes in the the dialog box with Add Hibernate Jars
selected.</para></listitem>
<listitem><para>In the Configuration Wizard, click twice in the Value field
for dialect and select org.hibernate.dialect.HSQLDialect from the pop-up
menu.</para></listitem>
<listitem><para>Click Finish</para></listitem>
<listitem><para>Select Object to Schema for the Mapping
Approach.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>We are only interested in saving the User class in a database, so we are
going to create a mapping for the User class to a database table.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>In the Persistent Classes Wizard dialog that appears next,
click on the SelectClasses.</para></listitem>
<listitem><para>Leave all other values as they are in the next dialog box and
click Finish.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="EditTheHibernateConfiguration">
@@ -118,9 +118,9 @@
<para>Afterwards, the Hibernate configuration file, hibernate.cfg.xml, will appear
in an editor window.
So, let's adjust this file first.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Replace these two lines:</para></listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="XML"><![CDATA[<property
@@ -148,17 +148,15 @@
<session-factory>
<property name="hibernate.connection.datasource">java:comp/env/jdbc/
kickstart</property>
-Exadel Studio 3.0
-page 4 of 10
-<property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</
+<property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect/>
property>
<mapping resource="demo/User.hbm.xml"/>
</session-factory>
</hibernate-configuration>
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Save the file.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="EdittheMappingFile">
@@ -166,13 +164,13 @@
<title>Edit the Mapping File</title>
<para>Next, we need to make on slight change to the mapping file,
User.hbm.xml.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>In the ORM Explorer view, reveal the
ormHibernate3-jsf/JavaSource/hibernate.cfg.xml/demo/User -> user node, right-click it,
and select
Open Mapping from the context menu.</para></listitem>
<listitem><para>In the editor that opens up for the mapping file, just change
the class
attribute for generator to a value of assigned and you're done with this
file.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>Here is what the edited User.hbm.xml file should now look like:</para>
@@ -200,19 +198,19 @@
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Save the file.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="AddAGeneralClassForIncorporatingHibernate">
<?dbhtml filename="AddAGeneralClassForIncorporatingHibernate.html"?>
<title>Add a General Class for Incorporating Hibernate</title>
<para>Next, we will need to create a special Java class for incorprating Hibernate
into our application.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Switch to the Package Explorer view and create the class,
HibernateHelper.java, in JavaSource/demo with this content and save
it.</para></listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JAVA"><![CDATA[
package demo;
import org.hibernate.HibernateException;
@@ -296,18 +294,18 @@
<para>We also need to modify the two bean classes in our application to
"Hibernate-ize" them.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Modify the GetUserIdBean.java class in JavaSource/demo by
adding these imports:
</para></listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JAVA"><![CDATA[import org.hibernate.Session;
import javax.faces.application.FacesMessage;
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Then, replace the action() method with this code and
save.</para></listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JAVA"><![CDATA[{
public String action()
throws Exception
@@ -354,16 +352,16 @@
}
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Modify the UserFormBean.java class in JavaSource/demo by
adding these
imports:</para></listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JAVA"><![CDATA[import org.hibernate.Session;
import org.hibernate.Transaction;
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Then, replace the save() method with this code and save the
class.</para></listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JAVA"><![CDATA[public String save() throws
Exception {
Map sessionMap =
FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
@@ -402,12 +400,12 @@
<?dbhtml filename="CreatingtheDatabaseTable.html"?>
<title>Creating the Database Table</title>
<para>Let's first create the script for our database table in Red Hat
Developer Studio.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>In the ORM Explorer view, right-click on
JavaSource/hibernate.cfg.xml and select "Generate DDL
Wizard".</para></listitem>
<listitem><para>Select HSQL as the Dialect and leave Location as
is.</para></listitem>
<listitem><para>Click Finish.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>A DDL file called schema.sql will be created in the root of the project and
will be opened in an
editor window.</para>
</section>
@@ -415,24 +413,24 @@
<?dbhtml filename="MakingTheDatabaseAvailableForTheApplication.html"?>
<title>Making the Database Available for the Application</title>
<para>The databse server, HSQLDB, is provided with the project. It's
located in the ormHibernate3-jsf/hsqldb folder.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Start the database server:
.../ormHibernate3-jsf/hsqldb/bin/server.bat</para></listitem>
<listitem><para>In a separate window, start the admin tool:
.../ormHibernate3-jsf/hsqldb/bin/dbadmin.bat</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>This will launch a small GUI application, HSQL Database
Manager.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Leave all values as they are, only change URL: to the
following: jdbc:hsqldb:hsql://localhost</para></listitem>
<listitem><para>Click OK.</para></listitem>
<listitem><para>Select File/Open Script... from the menu bar of HSQL Database
Manager.</para></listitem>
<listitem><para>Find and open the the DDL file we just
created.</para></listitem>
<listitem><para>Click Execute back in the main screen of the Database
Manager.</para></listitem>
<listitem><para>38. Select View/Refresh Tree from the menu
bar.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The User database should now appear in the expand/collapse tree to the
left.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Select File/Exit from the menu
bar.</para></listitem>
<listitem><para>Stop the database server:
.../ormHibernate3-jsf/hsqldb/bin/shutdown.bat</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="SettinguptheApplicationServer">
@@ -442,26 +440,26 @@
<para>Finally, we need to set up the application server before we can run the
database-enabled
application in a Web browser. To do this, we'll need to modify the application
context in the-
Tomcat server.xml file.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Stop the Tomcat server, if it's
running.</para></listitem>
<listitem><para>Locate the server.xml file in the Package Explorer view under
the Tomcat Server
node under Servers.</para></listitem>
<listitem><para>Double-click the file to open an editor on
it.</para></listitem>
<listitem><para>Find the Context tag for your application in the file. It
will have a path attribute
with a value of /ormHibernate3-jsf.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>You'll need to convert this "empty" XML element
into one with beginning and ending tags,
so we can insert the special resource tags for Tomcat to run this application with a
database.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Delete the closing slash at the end of the Context
tag.</para></listitem>
<listitem><para>Insert a blank line after the tag and then start another
line.</para></listitem>
<listitem><para>On this line, insert a closing
tag:</para></listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="JAVA"><![CDATA[</Context>
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>On the blank line between the starting and ending tags, add
the following resource definition coding.</para></listitem>
-</orderedlist>
+</itemizedlist>
<programlisting role="XML"><![CDATA[<Resource
name="jdbc/kickstart" scope="Shareable"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/kickstart">
@@ -500,20 +498,20 @@
</parameter>
</ResourceParams>
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Finally, copy .../ormHibernate3-jsf/hsqldb/lib/hsqldb.jar to
your
Tomcat .../common/lib folder.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="RunningOurNewApplication">
<?dbhtml filename="RunningOurNewApplication.html"?>
<title>Running Our New Application</title>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Start the database server:
.../ormHibernate3-jsf/hsqldb/bin/server.bat</para></listitem>
<listitem><para>Start the Tomcat server.</para></listitem>
<listitem><para>Run the application.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>Play with the application. Restart Tomcat and the database server. If you run
the application
again and enter a user that you already saved, the application should retrieve it from
the database
and display its details.</para>
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedStrutsValidationExamples.xml
===================================================================
---
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedStrutsValidationExamples.xml 2007-06-08
21:26:44 UTC (rev 2105)
+++
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedStrutsValidationExamples.xml 2007-06-11
13:01:10 UTC (rev 2106)
@@ -34,7 +34,7 @@
serverside validation. You need to enable validation as part of the project, define an
error message,
and tie it into the appropriate part of the application.</para>
-<orderedlist>
+<itemizedlist>
<listitem><para>Right-click the plug-ins node under the
StrutsHello/Configuration/default/
struts-config.xml node in the Web Projects view and select Create Special
Plugin/Validators from the context
menu.</para></listitem>
@@ -63,7 +63,7 @@
<listitem><para>Enter name.required in the Name field, and enter A
person's name in the Value field.</para></listitem>
<listitem><para>Click Finish, then Ok, and then Ok
again.</para></listitem>
<listitem><para>Select File/Save All from the menu
bar.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="Client-SideValidation">
@@ -73,14 +73,14 @@
<para>to actually do the validation. In a Struts application using the Validation
Framework, however,</para>
<para>you don't actually have to do any of the script coding. The
Validation Framework handles this.</para>
<para>To see how this works in our application, you'll just need to make a
couple of modifications to one of the JSP files.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Double-click inputname.jsp under StrutsHello/WEB-ROOT
(WebContent)/ pages to open it for editing.</para></listitem>
<listitem><para>Find the tag near the top and hit Return to make a new line
under it.</para></listitem>
<listitem><para>In the Red Hat Palette view to the right, open the HTML
folder and click on the javascript tag.</para></listitem>
<listitem><para>Back in the editor, just in front of the closing slash for
this inserted tag, hit Ctrl+Space and select formName from the prompting
menu.</para></listitem>
<listitem><para>Over in the Web Projects view, select GetNameForm under the
StrutsHello/Configuration/ default/struts-config.xml/form-beans node, drag it, and drop it
between the quotes in the editor.</para></listitem>
<listitem><para>Modify the <html:form> tag by inserting this
attribute:</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>onsubmit="return validateGetNameForm(this)"</para>
<para>The file should now look like this:</para>
<programlisting role="HTML"><![CDATA[
@@ -108,13 +108,13 @@
</body>
</html:html>
]]></programlisting>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Select File/Save from the menu
bar.</para></listitem>
<listitem><para>28. Start JBoss Application Server by clicking on its icon (a
right-pointing arrow) in the toolbar.</para></listitem>
<listitem><para>29. Click on the Run icon in the
toolbar.</para></listitem>
<listitem><para>Start Tomcat by clicking on its icon (a right-pointing arrow)
in the toolbar.</para></listitem>
<listitem><para>Click on the Run icon in the
toolbar.</para></listitem>
-</orderedlist>
+</itemizedlist>
<figure>
<title></title>
<mediaobject>
@@ -139,12 +139,12 @@
<section id="EditingTheJSPFile">
<?dbhtml filename="EditingTheJSPFile.html"?>
<title>Editing the JSP File</title>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Reopen inputname.jsp for
editing.</para></listitem>
<listitem><para>Delete the onsubmit attribute in the
<html:form> element that you put in for client-side
validation.</para></listitem>
<listitem><para>Add an <html:errors/> tag after the
</html:form> tag.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The JSP file should now look like this:</para>
<programlisting role="HTML"><![CDATA[
@@ -178,23 +178,23 @@
<section id="EditingTheAction">
<?dbhtml filename="EditingTheAction.html"?>
<title>Editing the Action</title>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>In the Web Projects view, expand the node under the
StrutsHello/Configuration/ default/struts-config.xml/action-mappings node, right-click the
/greeting action, and then select Properties... from the context
menu.</para></listitem>
<listitem><para>In the Edit Properties window, insert the cursor into the
value column for the input property and click on the ...
button.</para></listitem>
<listitem><para>In the dialog box, make sure the Pages tab is selected,
select StrutsHello/WEB-ROOT(WebContent)/pages/inputname.jsp, click the Ok button, and then
click on the Close button.</para></listitem>
-</orderedlist>
+</itemizedlist>
</section>
<section id="EditingTheFormBean">
<?dbhtml filename="EditingTheFormBean.html"?>
<title>Editing the Form Bean</title>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Right-click the /greeting action again and select Open
Form-bean Source to open the GetNameForm.java file for
editing.</para></listitem>
<listitem><para>Change the class that it extends to from:
org.apache.struts.action.ActionForm to:
org.apache.struts.validator.ValidatorForm</para></listitem>
<listitem><para>Comment out out the validate
method.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The file should now look like this:</para>
<programlisting role="JAVA"><![CDATA[
package sample;
@@ -240,11 +240,11 @@
<para>Select File/Save All from the menu bar.</para>
-<orderedlist continuation="continues">
+<itemizedlist continuation="continues">
<listitem><para>Reload the application into JBoss AS by clicking on the
Change Time Stamp icon (a finger pointing with a little star) in the
toolbar.</para></listitem>
<listitem><para>Run the application.</para></listitem>
<listitem><para>In the browser window, click on the Say Hello! button without
having entered any name in the form.</para></listitem>
-</orderedlist>
+</itemizedlist>
<para>The error message should appear in a refreshed version of the
form.</para>
</section>
</chapter>
\ No newline at end of file