Author: ochikvina
Date: 2008-03-27 13:24:31 -0400 (Thu, 27 Mar 2008)
New Revision: 7154
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/rad_jsf_application.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-261 - looking through JSF chapter; correcting a bit
its first section and replacing RAD HAT DS with Jboss DS
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/rad_jsf_application.xml
===================================================================
---
trunk/documentation/guides/GettingStartedGuide/en/modules/rad_jsf_application.xml 2008-03-27
17:16:20 UTC (rev 7153)
+++
trunk/documentation/guides/GettingStartedGuide/en/modules/rad_jsf_application.xml 2008-03-27
17:24:31 UTC (rev 7154)
@@ -21,8 +21,8 @@
<property>"RAD"</property> philosophy. We will
create the familiar
Guess Number application. The scenario is the following. You are asked to guess a
number
between 0 and 100. If the guess is correct, a success page is displayed with a
link to play
- again. If the guess is incorrect, a message is printed notifying that a smaller
or
- a larger number should be entered and the game continues.</para>
+ again. If the guess is incorrect, a message is printed notifying that a smaller
or a larger
+ number should be entered and the game continues.</para>
<para>We'll show you how to create such an application from scratch,
along the way
demonstrating powerful features of JBoss Developer Studio such as project
templating, Visual
Page Editor, code completion and others. You will design the JSF application and
then run
@@ -31,15 +31,13 @@
<section id="SettingUpTheProject12">
<?dbhtml filename="SettingUpTheProject12.html"?>
<title>Setting up the project</title>
- <para>Now you know how to create a new JSF 1.2 project. </para>
- <para>First, we will create a JSF 1.2 project using an integrated
JBDS's new
+ <para>First, you should create a JSF 1.2 project using an integrated
JBDS's new
project wizard and predefined templates. Follow the next steps:</para>
<itemizedlist>
<listitem>
<para>In Web Projects View (if it is not open select
<emphasis>
<property>Window > Show View > Others
> JBoss Tools Web
- > Web Projects View</property>)
- </emphasis> click <emphasis>
+ > Web Projects View</property>)
</emphasis> click <emphasis>
<property>Create New JSF Project</property>
</emphasis> button. <figure>
<title>Create New JSF Project</title>
@@ -54,7 +52,7 @@
<listitem>
<para>Put <property>GuessNumber</property> as a project
name, in JSF Environment
- drop down list choose <property>JSF
1.2.</property></para>
+ drop down list choose <property>JSF
1.2</property></para>
</listitem>
<listitem>
<para>Leave everything else as it is and click <emphasis>
@@ -62,8 +60,8 @@
</emphasis></para>
</listitem>
</itemizedlist>
- <para>Our project will appear in Project Explorer and Web Projects Views.
As you can see Red
- Had Developer Studio has created for us the whole skeleton for the project
with all
+ <para>Our project will appear in Project Explorer and Web Projects Views.
As you can see
+ JBoss Developer Studio has created for us the whole skeleton for the project
with all
needed libraries, faces-config.xml and web.xml files.</para>
<figure>
<title>New JSF Project</title>
@@ -74,19 +72,19 @@
</mediaobject>
</figure>
+ <para>As the project has been set up, new JSP pages should be created
now.</para>
</section>
<section id="CreatingJSPPages">
<?dbhtml filename="CreatingJSPPages.html"?>
<title>Creating JSP Pages</title>
- <para>After you created a new JSF project you can create new JSP
pages.</para>
- <para>And now, let's add two pages to our
application.</para>
- <para>The first page is inputnumber.jsp. It prompts you to
- enter a number. If the guess is incorrect, the same page will be redisplayed
with a
- message indicating whether a smaller or a larger number should be tried. The
second page
- is success.jsp. This page will be shown after you guess the number correctly.
From this
- page you also have the option to play the game again.</para>
- <para>On the first page inputnumber.jsp you will enter a
number.</para>
+ <para>Here, we are going to add two pages to our application. The first
page is
+ inputnumber.jsp. It prompts you to enter a number. If the guess is incorrect,
the same
+ page will be redisplayed with a message indicating whether a smaller or a
larger number
+ should be tried. The second page is success.jsp. This page will be shown
after you guess
+ the number correctly. From this page you also have the option to play the
game again.</para>
+
+ <para>Now, we will guide you through the steps on how to do
this.</para>
<itemizedlist>
<listitem>
<para>Open <emphasis>
@@ -151,7 +149,7 @@
<section id="CreatingTransition">
<?dbhtml filename="CreatingTransition.html"?>
<title>Creating Transition between two views</title>
- <para>Then, we should create connection between jsp pages.</para>
+ <para>Then, we should create connection between jsp pages.</para>
<itemizedlist>
<listitem>
<para>In the diagram, select the <emphasis>
@@ -193,13 +191,15 @@
</listitem>
</itemizedlist>
</section>
-
+
<section id="CreatingResourceFile">
<?dbhtml filename="CreatingResourceFile.html"?>
<title>Creating Resource File</title>
- <para>A resource file is just a file with a
<emphasis>.properties</emphasis> extension for collecting text messages in one
central place.
- JBoss Developer Studio allows you to create quickly a resource file. The
messages stored in resource file can be displayed to you on a Web page during application
execution. </para>
- <para>With resource file first, you don't hard code anything
into the JSP pages.
+ <para>A resource file is just a file with a
<emphasis>.properties</emphasis> extension for
+ collecting text messages in one central place. JBoss Developer Studio allows
you to
+ create quickly a resource file. The messages stored in resource file can be
displayed to
+ you on a Web page during application execution. </para>
+ <para>With resource file first, you don't hard code anything into
the JSP pages.
And second, it makes it easier to translate your application to other
languages. All you
have to do is to translate all your messages to the other language and save
them in a
new properties file with a name that ends with the appropriate ISO-639
language code.</para>
@@ -300,7 +300,8 @@
<section id="CreatingJavaBean">
<?dbhtml filename="CreatingJavaBean.html"?>
<title>Creating Java Bean</title>
- <para>In this section you'll see how to create a Java bean that
will hold business logic of our application.</para>
+ <para>In this section you'll see how to create a Java bean that
will hold business
+ logic of our application.</para>
<itemizedlist>
<listitem>
<para>Right click <emphasis>
@@ -532,11 +533,14 @@
</faces-config>
]]></programlisting>
<para>The first navigation rule states that from any page
(<property>*</property> stands for
- any page) an outcome of playagain will take you to
-
<emphasis><property>/pages/inputnumber.jsp</property></emphasis>.
Outcome values are returned from backing
- bean methods in this example. The second navigation rule states that if you
are at the
- page
<emphasis><property>/pages/inputnumber.jsp</property></emphasis>,
and the outcome is success, then
- navigate to the
<emphasis><property>/pages/success.jsp</property></emphasis> page.
</para>
+ any page) an outcome of playagain will take you to <emphasis>
+ <property>/pages/inputnumber.jsp</property>
+ </emphasis>. Outcome values are returned from backing bean methods in
this example. The
+ second navigation rule states that if you are at the page <emphasis>
+ <property>/pages/inputnumber.jsp</property>
+ </emphasis>, and the outcome is success, then navigate to the
<emphasis>
+ <property>/pages/success.jsp</property>
+ </emphasis> page. </para>
</section>
<section id="EditingTheJSPViewFiles2">
<?dbhtml filename="EditingTheJSPViewFiles2.html"?>
@@ -649,9 +653,8 @@
</listitem>
<listitem>
<para>Click on <emphasis>
- <property>outputText</property>,
- </emphasis> drag the cursor over to the editor, and drop it
inside the blue
- box in the editor</para>
+ <property>outputText</property>,
</emphasis> drag the cursor over to the
+ editor, and drop it inside the blue box in the
editor</para>
</listitem>
<listitem>
@@ -683,8 +686,7 @@
<para>Select <emphasis>
<property>how_to_play</property>
</emphasis> value and click <emphasis>
- <property>Ok</property>.
- </emphasis> Then click <emphasis>
+ <property>Ok</property>. </emphasis> Then
click <emphasis>
<property>Finish</property>
</emphasis>
<figure>
@@ -724,9 +726,8 @@
</listitem>
<listitem>
<para>On the Palette click on <emphasis>
- <property>inputText</property>,
- </emphasis> drag the cursor over to the editor, and drop it
inside the
- editor after the text.</para>
+ <property>inputText</property>, </emphasis>
drag the cursor over to the
+ editor, and drop it inside the editor after the
text.</para>
</listitem>
<listitem>
<para>Switch to a Source mode and insert <emphasis
role="bold">
@@ -742,9 +743,8 @@
</listitem>
<listitem>
<para>On the Palette click on <emphasis>
- <property>inputText</property>,
- </emphasis> drag the cursor over to the editor, and drop it
inside the
- editor after the text</para>
+ <property>inputText</property>, </emphasis>
drag the cursor over to the
+ editor, and drop it inside the editor after the
text</para>
</listitem>
<listitem>
<para>Select <emphasis>
@@ -811,8 +811,7 @@
<itemizedlist>
<listitem>
<para>Click <emphasis>
- <property>Ok</property>,
- </emphasis> then click <emphasis>
+ <property>Ok</property>, </emphasis> then
click <emphasis>
<property>Finish</property>
</emphasis></para>
</listitem>
@@ -842,9 +841,9 @@
</listitem>
<listitem>
<para>On the Palette, click on <emphasis>
- <property>commandButton</property>,
- </emphasis> drag the cursor over to the editor, and drop it
inside the
- editor after the inputText component.</para>
+ <property>commandButton</property>,
</emphasis> drag the cursor over to
+ the editor, and drop it inside the editor after the inputText
+ component.</para>
</listitem>
<listitem>
<para>In the editing dialog select <emphasis>
@@ -884,10 +883,15 @@
</emphasis></para>
</listitem>
<listitem>
- <para>In Source mode add <emphasis
role="bold"><property><br/></property></emphasis>
- tags between <emphasis
role="bold"><property><outputText></property></emphasis>,
- <emphasis
role="bold"><property><inputText></property></emphasis>
- and <emphasis
role="bold"><property><commandButton></property></emphasis>
components to place them on different lines</para>
+ <para>In Source mode add <emphasis
role="bold">
+ <property><br/></property>
+ </emphasis> tags between <emphasis
role="bold">
+ <property><outputText></property>
+ </emphasis>, <emphasis role="bold">
+ <property><inputText></property>
+ </emphasis> and <emphasis role="bold">
+
<property><commandButton></property>
+ </emphasis> components to place them on different
lines</para>
</listitem>
</itemizedlist>
<para>inputnumber.jsp page should look like this:</para>
@@ -1025,8 +1029,9 @@
Console tabbed view stop scrolling, JBoss is available)</para>
</listitem>
<listitem>
- <para>Right-click on project <emphasis><property>Run AS
> Run on
- Server</property></emphasis></para>
+ <para>Right-click on project <emphasis>
+ <property>Run AS > Run on Server</property>
+ </emphasis></para>
</listitem>
<listitem>
<para>Play with the application by entering correct as well as
incorrect