Author: smukhina
Date: 2009-03-05 13:54:45 -0500 (Thu, 05 Mar 2009)
New Revision: 14043
Modified:
trunk/as/docs/reference/pom.xml
trunk/documentation/guides/GettingStartedGuide/en/master_output.xml
trunk/documentation/jbds-docs/all-guides.xml
trunk/hibernatetools/docs/reference/en/master_output.xml
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
trunk/jbpm/docs/reference/en/master_output.xml
trunk/jsf/docs/jsf_tools_ref_guide/en/master_output.xml
trunk/jsf/docs/jsf_tools_tutorial/en/master_output.xml
trunk/jsf/docs/userguide/en/master_output.xml
trunk/seam/docs/reference/en/master_output.xml
trunk/struts/docs/struts_tools_ref_guide/en/master_output.xml
trunk/struts/docs/struts_tools_tutorial/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-640
errors (& instead of &) in files were fixed
output folder name for jbpm guide is change to correspond the name on index page
Modified: trunk/as/docs/reference/pom.xml
===================================================================
--- trunk/as/docs/reference/pom.xml 2009-03-05 18:34:07 UTC (rev 14042)
+++ trunk/as/docs/reference/pom.xml 2009-03-05 18:54:45 UTC (rev 14043)
@@ -67,11 +67,11 @@
<version>1.0.0</version>
<type>jdocbook-style</type>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossorg-docbook-xslt</artifactId>
<version>1.1.0</version>
- </dependency-->
+ </dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossorg-jdocbook-style</artifactId>
Modified: trunk/documentation/guides/GettingStartedGuide/en/master_output.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/master_output.xml 2009-03-05
18:34:07 UTC (rev 14042)
+++ trunk/documentation/guides/GettingStartedGuide/en/master_output.xml 2009-03-05
18:54:45 UTC (rev 14043)
@@ -26,3961 +26,3962 @@
<!ENTITY jbossportallink
"../../jboss_portal_tools_ref_guide/html_single/index.html">
<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
<!ENTITY wslink "../../ws_ref_guide/html_single/index.html">
-]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
- <bookinfo>
- <title>Getting Started with JBoss Developer Studio</title>
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
- <releaseinfo>Version: 2.0.0.GA</releaseinfo>
- <abstract>
- <title></title>
- <para>
- <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/GettingSta...
version</ulink>
- </para>
-</abstract>
-
-
-</bookinfo>
- <toc></toc>
-
-
-
-
-<chapter id="getting_started"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml"
xreflabel="getting_started">
- <?dbhtml filename="getting_started.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Getting Started with JBoss Developer Studio</title>
-
- <section id="intro1">
- <title>What is JBDS?</title>
- <para><property moreinfo="none">JBoss Developer
Studio</property> is a set of eclipse-based development tools that
- are pre-configured for JBoss Enterprise Middleware Platforms and Red Hat Enterprise
Linux.
- Developers are not required to use <property moreinfo="none">JBoss
Developer Studio</property> to develop on
- JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these pre-configured
tools offer
- significant time-savings and value, making them more productive and speeding time to
deployment.</para>
- <para>This guide covers the first steps to get started working with <property
moreinfo="none">JBoss Developer
- Studio</property>. You will learn how to install and configure necessary
software for your OS
- (currently Linux, Microsoft Windows or Mac OSX).</para>
- <para>Thus this guide will provide you with detailed info on how to start JDK,
JBDS and JBoss
- Tools.</para>
- </section>
-
- <section id="ConfigJavaEnvironment">
- <?dbhtml filename="ConfigJavaEnvironment.html"?>
- <title>Configuring Your Java Environment</title>
- <para>You must have a working installation of JDK 5 before you install
<property moreinfo="none">JBoss Developer
- Studio</property>. Currently it will only fully work with a 32-bit JVM, not a
64-bit JVM. On a
- 64-bit JVM the visual editor fails to launch because of feature of OS architecture.
Thus in this
- guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux Platform and
Microsoft
- Windows Platform.</para>
-
- <section id="InstallJDK50onLinux">
- <title>Installing and Configuring 32-bit Sun JDK 5.0 on Linux</title>
- <para>To install 32-bit Sun JDK 5.0 on Linux and configure it, you should follow
the next steps:</para>
- <itemizedlist>
- <listitem>
- <para>Download the <ulink
url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0
- (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK
5.0 Update
- <x>" (where "x" is the latest update number) for
- download and then select "Red Hat Package Manager in self-extracting"
file
- for Linux. Read the instructions on Sun's website for installing the
JDK.</para>
- </listitem>
- <listitem>
- <para>If you don't want to use SysV service scripts you can install the
- "self-extracting file" for Linux instead of choosing the "RPM in
- self-extracting" file. In that case you can skip the next step mentioned here.
But it
- is recommended to use the SysV service scripts for production
servers.</para>
- </listitem>
- <listitem>
- <para>Download and install the appropriate -compat RPM from JPackage <ulink
url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-f...;.
- Please ensure you choose a matching version of the -compat package to the JDK
you've
- installed.</para>
- </listitem>
- <listitem>
- <para>Create an environment variable that points to the JDK installation
directory and call it
- JAVA_HOME. Add <emphasis>
- <property moreinfo="none">$JAVA_HOME/bin</property>
- </emphasis> to the system path to be able to run java from the command line.
You can do this
- by adding the following lines to the .bashrc file in your home
directory.</para>
- <programlisting format="linespecific"><![CDATA[#In this example
/usr/java/jdk1.5.0_11 is the JDK installation directory.
-export JAVA_HOME=/usr/java/jdk1.5.0_11
-export PATH=$PATH:$JAVA_HOME/bin]]></programlisting>
- </listitem>
- </itemizedlist>
-
- <note>
- <title>Note:</title>
-
- <para>If you have JDK already installed and added in your system path, you
should add
- <emphasis>$JAVA_HOME/bin</emphasis> before the old
<emphasis>$PATH</emphasis> (not after it)
- so that the new version of JDK can be found first, i. e. <emphasis>
- <emphasis>export PATH=$JAVA_HOME/bin:$PATH</emphasis>
- </emphasis> This way, the machine will pick up the new JVM first. You only
need to run
- "alternative" as a safe guard for the right JVM. </para>
- </note>
-
- <para>Set this variable for your account doing the installation and also for the
user account
- that will run the server.</para>
- <itemizedlist>
- <listitem>
- <para>If you have more than one version of JVM installed on your machine, make
sure you are
- using the JDK 1.5 installation as the default java and javac. You can do this using
the
- alternatives system. The alternatives system allows different versions of Java from
different
- sources to co-exist on your system.</para>
- </listitem>
- </itemizedlist>
- <section id="SelectAlternativesforJava">
- <title>Select alternatives for java, javac and java_sdk_1.5.0</title>
- <itemizedlist>
- <listitem>
- <para>As a root user, type the following command at the shell prompt and you
should see
- something like this:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"><![CDATA[[root@vsr ~]$
/usr/sbin/alternatives --config java
-There are 2 programs that provide 'java'.
-Selection Command
------------------------------------------------
- 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
-*+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java
-Enter to keep the current selection[+], or type selection
number:]]></programlisting>
- <para>Make sure the Sun version [jre-1.5.0-sun in this case] is selected
(marked with a
- '+' in the output), or select it by entering its number as
prompted.</para>
- <itemizedlist>
- <listitem>
- <para>Repeat the same for javac and java_sdk_1.5.0.</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"><![CDATA[[root@vsr ~]$
/usr/sbin/alternatives --config javac
-There is 1 program that provides 'javac'.
- Selection Command
------------------------------------------------
-*+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
-Enter to keep the current selection[+], or type selection number:
-
-[root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
-There is 1 program that provide 'java_sdk_1.5.0'.
- Selection Command
------------------------------------------------
-*+ 1 /usr/lib/jvm/java-1.5.0-sun
-Enter to keep the current selection[+], or type selection
number:]]></programlisting>
- <para>You should verify that java, javac and java_sdk_1.5.0 all point to the
same manufacturer
- and version.</para>
- <note>
- <title>Note:</title>
- <para>You can always override this step by setting the JAVA_HOME environment
variable as
- explained in the previous step.</para>
- </note>
- <itemizedlist>
- <listitem>
- <para>Make sure that the java executable is in your path and that you are
using an appropriate
- version. To verify your Java environment, type "java -version" at the
shell
- prompt and you should see something like this:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"><![CDATA[[root@vsr ~]$ java
-version
-java version "1.5.0_11"
-Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
-Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode,
sharing)]]></programlisting>
- </section>
-
- </section>
- <section id="InstallJDK50onWindows">
- <title>Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft
Windows</title>
-
- <para>To install and configure 32-bit Sun JDK 5.0 on Microsoft Windows, follow
these steps:</para>
- <itemizedlist>
- <listitem>
- <para>Download the <ulink
url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0
- (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK
5.0 Update
- <x>" (where "x" is the latest update number) for
- download and then select your Windows Platform options to perform the
installation.</para>
- </listitem>
- <listitem>
- <para>Create an environment variable called JAVA_HOME that points to the JDK
installation
- directory, for example:
- <literallayout class="normal" format="linespecific">
- <emphasis>C:\Program Files\Java\jdk1.5.0_11\</emphasis>
- </literallayout></para>
- </listitem>
- </itemizedlist>
-
- <para>In order to run java from the command line, add the
<emphasis>jre\bin</emphasis> directory
- to your path, for example:</para>
- <para>
- <emphasis>C:\Program Files\Java\jdk1.5.0_11\jre\bin</emphasis>
- </para>
- <para>To do this, open the <emphasis>
- <property moreinfo="none">Control Panel</property>
- </emphasis> from the <emphasis>
- <property moreinfo="none">Start</property>
- </emphasis> menu, switch to Classic View if necessary, open the System Control
Panel applet (<emphasis>
- <property moreinfo="none">System</property>
- </emphasis>), select the <emphasis>
- <property moreinfo="none">Advanced</property>
- </emphasis> Tab, and click on the <emphasis>
- <property moreinfo="none">Environment Variables</property>
- </emphasis> button.</para>
- <para>Now, when 32-bit Sun JDK 5.0 has been successfully installed, we can pass
on to the next
- step.</para>
- </section>
-
- </section>
-
- <section id="InstallingJBDS">
- <?dbhtml filename="InstallingRHDS.html"?>
- <title>JBoss Developer Studio Installation</title>
-
- <para>This chapter will provide you with detailed information on how to install
<property moreinfo="none">JBoss
- Developer Studio</property>.</para>
-
- <para>JBDS comes with a simple installer, bundled with tested/pre-configured
versions of Eclipse,
- WTP, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next
steps:</para>
-
- <itemizedlist>
- <listitem>
- <para>First of all you need the appropriate installation file for your platform
from
- <ulink
url="https://www.redhat.com/apps/store/developers/jboss_developer_st...
Hat
- website</ulink>.</para>
- </listitem>
- <listitem>
- <para>Then run in console:</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-2.0.0.GA.jar
-]]></programlisting>
- </listitem>
- <listitem>
- <para>Follow the instructions presented by the installation
wizard:</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>JBoss Developer Studio Installation Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Provide the installation path</para>
- </listitem>
- <listitem>
- <para>Select Java VM</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Select Java VM</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>By selecting <emphasis>
- <property moreinfo="none">Default Java VM</property>
- </emphasis> you set default Java VM of your system (to verify your Java
environment, type
- "java -version" in console).</para>
- </tip>
-
- <para>Selecting <emphasis>
- <property moreinfo="none">Specific Java VM</property>
- </emphasis> you can provide the path to non-default Java VM.</para>
-
- <note>
- <title>Note:</title>
- <para>JBoss Developer Studio needs Java 5 and "gij" isn't
available on
- every platform.</para>
- </note>
-
- <itemizedlist>
- <listitem>
- <para>Installation process includes <ulink
url="http://www.jboss.com/products/platforms/application">JBoss Enterprise
Application
- Platform</ulink>. Select <emphasis>
- <property moreinfo="none">Yes</property>
- </emphasis> to use it in JBoss Developer Studio. This step lets you
configure locally available JBoss Application Servers: </para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>JBoss Enterprise Application Platform Installing</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-<itemizedlist>
- <listitem><para>You can fill the list automatically using the
<emphasis><property
moreinfo="none">Find</property></emphasis> button: click
<emphasis><property
moreinfo="none">Find</property></emphasis>, select a folder where
search of available JBoss Application Servers should be started and click on
<emphasis><property
moreinfo="none">Ok</property></emphasis>: </para>
</listitem>
-</itemizedlist>
-
- <figure float="0">
- <title>Finding Servers in the Selected Directory</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_3_3_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para></para>
-
- <itemizedlist>
- <listitem><para> All available servers in the selected directory will be
added to the list with the following information specified: Name, Type, Version and
Location.
- </para></listitem>
- </itemizedlist>
-
-
- <figure float="0">
- <title>List of Servers Added</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_3_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para></para>
-
- <itemizedlist>
- <listitem> <para>You can also add servers one by one using the
<emphasis><property
moreinfo="none">Add</property></emphasis> button:</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Add Server to be Configured</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_3_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para></para>
-
-<para>Click on <emphasis><property
moreinfo="none">Browse</property></emphasis> and select the
server location. Fields Name, Type and Version will be filled in
automatically:</para>
-
- <figure float="0">
- <title>Specify Server Location</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_3_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para></para>
-
-
- <para>Click on <emphasis><property
moreinfo="none">Ok</property></emphasis>. The server is added to
the list with the details on its type, version and location.</para>
-
-
-
- <para>The <emphasis><property
moreinfo="none">Remove</property></emphasis> button will the
remove the selected server from the list. If necessary, you can edit the server details
clicking on the <emphasis><property
moreinfo="none">Edit</property></emphasis> button:</para>
-
- <figure float="0">
- <title>Edit Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_3_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para></para>
-
-
-
- <!-- <note>
- <title>Note:</title>
- <para>The installer installs JBoss Enterprise Application Platform for running
your applications
- if you select this option during the installation process. If you want to use a
different server
- than ours, you can change the setting in JBoss Developer Studio.</para>
- </note>-->
-
- <itemizedlist>
- <listitem>
- <para>Click <emphasis><property
moreinfo="none">Next</property></emphasis>. Check your
installation paths and see the components to install. If you'd like to change
- something, press the <emphasis>
- <property moreinfo="none">Previous</property>
- </emphasis> button. Click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> to start installation. </para>
- </listitem>
- </itemizedlist>
-
- <para></para>
-
- <figure float="0">
- <title>Summary Information</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="jbds_jbosstools">
-
- <title>JBoss Developer Studio and JBoss Tools</title>
-
- <para>This section uncovers the points on the differences between <property
moreinfo="none">JBoss Developer
- Studio</property> and <property moreinfo="none">JBoss
Tools</property> and provides the steps on <property
moreinfo="none">JBoss
- Tools</property> installation as well.</para>
-
- <section id="WhatDifferenceBetweenJBDSAndJBossTools">
- <title>What is the difference?</title>
-
- <para><property moreinfo="none">JBoss Tools</property> is
what went into our <property moreinfo="none">JBoss Developer
- Studio</property> which comes as an easy-to-install Eclipse based IDE fully
configured and ready
- to run with the bundled <property moreinfo="none">JBoss Enterprise
Application Platform</property>.</para>
-
- <para>In short <property moreinfo="none">JBoss
Tools</property> are just a set of Eclipse plugins and
- <property moreinfo="none">JBoss Developer Studio</property>
adds:</para>
- <itemizedlist>
- <listitem>
- <para>An installer</para>
- </listitem>
- <listitem>
- <para>Eclipse and Web Tools preconfigured</para>
- </listitem>
- <listitem>
- <para>JBoss EAP with JBoss AS and Seam preconfigured</para>
- </listitem>
- <listitem>
- <para>3rd party plugins bundled and configured</para>
- </listitem>
- <listitem>
- <para>Access to RHEL and Red Hat Network</para>
- </listitem>
- <listitem>
- <para>Access to the JBoss/Red Hat supported software</para>
- </listitem>
- </itemizedlist>
- <para> For additional information see <ulink
url="http://www.jboss.com/products/devstudio">JBoss.com</...
- </section>
-
- <section id="JBossToolsInstall">
- <title>JBoss Tools Installation</title>
- <para>Here, let's consider the installation of the <property
moreinfo="none">JBoss Tools</property>
- modules.</para>
- <para><property moreinfo="none">JBoss Tools</property> is
an umbrella project for the JBoss developed plugins
- that will make it into <property moreinfo="none">JBoss Developer
Studio</property>. The JBoss Tools modules are:</para>
- <itemizedlist>
- <listitem>
- <para>JBoss AS Tools</para>
- </listitem>
- <listitem>
- <para>Seam Tools</para>
- </listitem>
- <listitem>
- <para>Hibernate Tools</para>
- </listitem>
- <listitem>
- <para>Visual Page Editor</para>
- </listitem>
- <listitem>
- <para>JST Tools</para>
- </listitem>
- <listitem>
- <para>JBPM Tools</para>
- </listitem>
- </itemizedlist>
-
- <para>To install the JBoss Tools plugins for Eclipse, you need the
following:</para>
-
- <itemizedlist>
- <listitem>
- <para>Get Eclipse and Web Tools</para>
- </listitem>
- </itemizedlist>
- <para>The current version of JBoss Tools (3.0.0.GA) targets at Eclipse
3.4.2/Ganymede SR2 and WTP
- 3.0.3+</para>
-
- <tip>
- <title>Tip:</title>
- <para>We recommend you do not use
Eclipse.org update site to go from Eclipse
3.3 to Eclipse 3.4.
- Instead we suggest that you download the full binary from <ulink
url="http://www.eclipse.org/downloads/">here</ulink>.&...
- </tip>
-
- <para>If you can only use Eclipse 3.3 use <ulink
url="http://www.jboss.org/tools/download/index.html#stable">... Tools
2.1.2</ulink>, but
- JBoss Tools 2.x will not have any of the new features.</para>
-
- <note>
- <title>Note:</title>
- <para>Remember to choose the download that matches your OS and use Java 5 when
you run
- it.</para>
- </note>
-
- <itemizedlist>
- <listitem>
- <para>Get the <ulink
url="http://download.jboss.org/jbosstools/builds/nightly/latestBuild...
JBoss Tools build</ulink></para>
- </listitem>
- </itemizedlist>
-
- <para>Some of our newer plugins, like TPTP and BIRT, need additional drivers. On
the left side of
- the download page you can find all of the required drivers for chosen build and their
versions.</para>
- <para>Instead of downloading the nightly build version manually, it's also
possible to
- get the latest release of <property moreinfo="none">JBoss
Tools</property> from one of our update sites: <itemizedlist>
- <listitem>
- <para>Stable Updates: <ulink
url="http://download.jboss.org/jbosstools/updates/stable">ht...
- </listitem>
- <listitem>
- <para> Development Updates: <ulink
url="http://download.jboss.org/jbosstools/updates/development"&...
- </listitem>
- </itemizedlist>
- </para>
-
- <itemizedlist>
- <listitem>
- <para>Finally, install the build</para>
- </listitem>
- </itemizedlist>
-
- <para>Unzip the file(s) directly into your Eclipse <emphasis>
- <property moreinfo="none">plugins/features</property>
- </emphasis> directory and it will be readily available. It might be necessary
to start Eclipse
- with eclipse -clean to make sure it starts clean and rereads the new list of
plugins.</para>
-
- <para>If you need to install any standalone plug-in from JBoss Tools visit a
<ulink
url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools
Wiki</ulink> page to read
- about dependencies between standalone plug-ins.</para>
- </section>
-
- </section>
-
- <section id="Welcome">
- <title>Welcome to JBoss Developer Studio</title>
- <para>In this section we'll show you how to work with the welcome page of the
<property moreinfo="none">JBoss
- Developer Studio</property>.</para>
- <para>The welcome page is the first page you see when you first launch
<property moreinfo="none">JBoss Developer
- Studio</property>. </para>
-
- <figure float="0">
- <title>Welcome to JBoss Developer Studio</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>With the help of its page you will be able:</para>
- <itemizedlist>
- <listitem>
- <para>to get quick access to Getting Started Documentation (guides, tutorials
and
- viewlets)</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Getting Started Documentation</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>to create new Seam projects, jBPM Process, JSF or Struts projects using
JBDS
- wizards</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Create New...</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>to get short description of perspectives that JBDS offers for more
productive
- development</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Perspectives</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/getting_started/getting_started_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>to visit JBoss Developer Studio web resources.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Web Resources</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_9.png"
scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Start work with <property moreinfo="none">JBoss Developer
Studio</property> by clicking on <emphasis>
- <property moreinfo="none">Workbench</property>
- </emphasis> button or simply close the Welcome page.</para>
-
- </section>
-
- <section id="Upgrading">
- <?dbhtml filename="Upgrading.html"?>
- <title>Upgrading</title>
- <para>To upgrade, just uninstall your current version and install the new
one.</para>
- </section>
-
- <section id="Uninstalling">
- <?dbhtml filename="Uninstalling.html"?>
- <title>Uninstalling</title>
- <itemizedlist>
- <listitem>
- <para>Make sure <property moreinfo="none">JBoss Developer
Studio</property> is not running</para>
- </listitem>
- <listitem>
- <para>Uninstall your current version of <property
moreinfo="none">JBoss Developer Studio</property> by running
- Uninstaller</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="Support">
- <?dbhtml filename="Support.html"?>
- <title>Support</title>
- <para>If you have comments or questions, you can discuss them at our <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
- Developer Studio Forum</ulink>.</para>
- <para>When writing to the forum for questions, please include the following
information:</para>
- <orderedlist continuation="restarts" inheritnum="ignore">
- <listitem>
- <para>JBoss Developer Studio version</para>
- </listitem>
- <listitem>
- <para>Exact error message</para>
- </listitem>
- <listitem>
- <para>Steps to reproduce the issue</para>
- </listitem>
- </orderedlist>
-
- <para><property moreinfo="none">JBDS</property> subscribers
can get necessary support on our <ulink
url="https://network.jboss.com/jbossnetwork/login.html">Support
Portal</ulink>.</para>
- </section>
-
-
- <section id="OtherRelevantResourcesOnTheTopic33">
- <?dbhtml filename="OtherRelevantResourcesOnTheTopic33.html"?>
- <title>Other relevant resources on the topic</title>
- <para>JBDS on JBoss: <ulink
url="http://labs.jboss.com/rhdevstudio/">JBoss Developer
- Studio</ulink></para>
- <para>Forum: <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
- Forum</ulink></para>
- <para>Subscription: <ulink
url="https://www.redhat.com/apps/store/developers/jboss_developer_st...
- Subscription</ulink></para>
-
- <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
- </section>
-
-</chapter>
-
-
-<chapter id="manage"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml"
xreflabel="manage">
- <?dbhtml filename="manage.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Deploy</keyword>
- <keyword>Deployment</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Manage JBoss AS from JBoss Developer Studio</title>
-
- <para>In this chapter we'll focus more on how to operate the <property
moreinfo="none">JBoss
- AS</property> from <property moreinfo="none">JBoss
Developer Studio</property>.</para>
- <para><property moreinfo="none">JBoss Developer
Studio</property> ships with <property moreinfo="none">JBoss EAP
- v.4.2</property> bundled. When you followed the default installation of
<property moreinfo="none">JBoss
- Developer Studio</property>, you should already have a JBoss EAP 4.3
Server installed and
- defined. To run JBoss AS you need JDK 1.5, JDK 6 is not formally supported yet,
although
- you may be able to start the server with it.</para>
-
- <section id="JBossbundled">
- <?dbhtml filename="JBossbundled.html"?>
- <title>How to Manage the JBoss AS Bundled in JBDS</title>
- <para>This section covers the basics of working with the <property
moreinfo="none">JBoss Server</property>
- supported directly by <property
moreinfo="none">JBDS</property> via bundled AS plug-in. To read more
- about AS plug-in, refer to the <ulink
url="../../as/html_single/index.html">Server Manager
- guide</ulink>.</para>
-
- <section id="StartingServer">
- <?dbhtml filename="StartingServer.html"?>
- <title>Starting JBoss Server</title>
- <para>Starting <property moreinfo="none">JBoss
Server</property> is quite simple. <property moreinfo="none">JBoss
- Developer Studio</property> allows you to control its behaviour
with the help of
- a special toolbar, where you could start it in a regular or debug mode,
stop it or
- restart it.</para>
-
- <itemizedlist>
- <listitem>
- <para>To launch the server click the green-with-white-arrow
icon on the
- <property moreinfo="none">JBoss Server View
</property>or right click server name in
- this view and select <emphasis>
- <property
moreinfo="none">Start</property>
- </emphasis>. If this view is not open, select
<emphasis>
- <property moreinfo="none">Window >
Show View > Other > Server
- > JBoss Server View</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Starting from Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>While launching, server output is written to the <property
moreinfo="none">Console
- view</property>:</para>
-
- <figure float="0">
- <title>Console Output</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>When the server is started you should see <emphasis>
- <property moreinfo="none">Started</property>
- </emphasis> in the square brackets right next its name in
<property moreinfo="none">JBoss Server
- View</property>.</para>
-
- <figure float="0">
- <title>Server is Started</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <!--para>To see event log after the server is started, expand
<property>Event
- Log</property> branch beneath <property>JBoss Server
View</property>:</para>
- <figure>
- <title>Event Log</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_5.png"/>
- </imageobject>
- </mediaobject>
- </figure-->
- </section>
-
- <section id="StoppingJBoss">
- <?dbhtml filename="StoppingJBoss.html"?>
- <title>Stopping JBoss Server</title>
- <para>To stop the server, click the <emphasis>
- <property moreinfo="none">Stop</property>
- </emphasis> icon in <property moreinfo="none">JBoss
Server View</property> or right click the server
- name and press <emphasis>
- <property moreinfo="none">Stop</property>.
</emphasis></para>
-
- <figure float="0">
- <title>Stopping Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>When the server is stopped you will see <emphasis>
- <property moreinfo="none">Stopped</property>
- </emphasis> in the square brackets next to its name.</para>
- </section>
- <section id="ServerPreferences">
- <?dbhtml filename="ServerPreferences.html"?>
- <title>Server Container Preferences</title>
- <para>You can control how <property
moreinfo="none">JBoss Developer Studio</property> interacts with
- server containers in the <property moreinfo="none">Server
editor</property>. Double-click the server
- to open it in the editor.</para>
-
- <figure float="0">
- <title>Server Overview</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Here you can specify some common settings: host name, server
name, runtime as well
- as settings related to the publishing, timeouts and server
ports.</para>
-
- </section>
- </section>
-
- <section id="JBossInstances">
- <?dbhtml filename="JBossInstances.html"?>
- <title>How to Use Your Own JBoss AS Instance with JBDS</title>
- <para>Although <property moreinfo="none">JBoss Developer
Studio</property> works closely with
- <property moreinfo="none">JBoss EAP 4.2</property>
we do not ultimately tie you to any particular
- server for deployment. There are some servers that Studio supports directly
(via the
- bundled Eclipse WTP plug-ins). In this section we discuss how to manage
self-installed
- JBoss AS. Suppose you want to deploy the application to <property
moreinfo="none">JBoss 4.2.3
- server</property>. First of all you need to install
it.</para>
- <section id="JBossInstalling">
- <?dbhtml filename="JBossInstalling.html"?>
- <title>JBoss AS Installation</title>
- <itemizedlist>
- <listitem>
- <para>Download the binary package of <property
moreinfo="none">JBoss 4.2.3</property> and save
- it on your computer: <ulink
url="http://labs.jboss.com/jbossas/downloads">http://labs.jb...
- </listitem>
- </itemizedlist>
- <para>It does not matter where on your system you install JBoss
server.</para>
-
- <note>
- <title>Note:</title>
- <para>The installation of JBoss server into a directory that has a
name containing
- spaces provokes problems in some situations with Sun-based VMs. Try
to avoid
- using installation folders that have spaces in their
names.</para>
- </note>
-
- <para>There is no requirement for root access to run JBoss Server on
UNIX/Linux systems
- because none of the default ports are within the 0-1023 privileged port
- range.</para>
- <itemizedlist>
- <listitem>
- <para>After you have the binary archive you want to install,
use the JDK jar
- tool (or any other ZIP extraction tool) to extract the
jboss-4.2.3.GA.zip
- archive contents into a location of your choice. The
jboss-4.2.3.GA.tgz
- archive is a gzipped tar file that requires a gnutar compatible
tar which
- can handle the long pathnames in the archive. The extraction
process will
- create a jboss-4.2.3.GA directory. </para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="AddingJBossServer">
- <?dbhtml filename="AddingJBossServer.html"?>
- <title>Adding and Configuring JBoss Server</title>
- <para>Now we should add just installed server into server manager in
<property moreinfo="none">JBoss
- Developer Studio</property>.</para>
- <itemizedlist>
- <listitem>
- <para>Open the <property moreinfo="none">JBoss
Server View</property> by selecting <emphasis>
- <property moreinfo="none">Window >
Show View > Other > Server
- > JBoss Server View</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Right click anywhere in this view and select
<emphasis>
- <property moreinfo="none">New
Server</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">JBoss Community
> JBoss 4.2 Server</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Selecting Server Type</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Note:</title>
-
- <para>Now in the <property moreinfo="none">New
Server wizard</property> there is a separation
- between the .org servers (the <emphasis>
- <property moreinfo="none">JBoss
Community</property>
- </emphasis> category) and product server that comes bundled
with JBoss EAP (the
- <emphasis>
- <property moreinfo="none">JBoss Enterprise
Middleware</property></emphasis> category).</para>
- </note>
-
- <itemizedlist>
- <listitem>
- <para>To create a new runtime, which Jboss AS 4.2 matches to,
click <emphasis>
- <property
moreinfo="none">Next</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <listitem>
- <para>In the next step make <property
moreinfo="none">JBoss Developer Studio</property> to know
- where you have installed the Server and define JRE.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Defining JBoss Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <note>
- <title>Note:</title>
- <para>When adding a new server you will need to specify what JRE to
use. It is
- important to set this value to a full JDK, not JRE. Again, you need a
full JDK
- to run Web applications, JRE will not be enough.</para>
- </note>
-
- <itemizedlist>
- <listitem>
- <para>In the next dialog verify the specified information and
if something is
- unfair go back and correct it</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Configuring Projects</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>In the last wizard's dialog modify the projects that
are
- configured on the server and click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis>.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Configuring Projects</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>A new <property moreinfo="none">JBoss
Server</property> should now appear in the <property
moreinfo="none">JBoss
- Server view</property>.</para>
- <figure float="0">
- <title>New JBoss Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/manage/manage_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Now, we are ready to create the first web
application.</para>
- </section>
-
- </section>
-</chapter>
-
-
-<chapter id="first_seam"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml"
xreflabel="first_seam">
- <?dbhtml filename="first_seam.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Seam</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Write Your First Project with JBoss Developer Studio</title>
-
- <para>This chapter is a set of hands-on labs. You get step-by-step information
about how the JBoss
- Developer Studio can be used during the development process.</para>
-
- <section id="create_seam_application">
- <title>Create a Seam Application</title>
-
- <para>In this section you get to know how to create a Seam project in JBDS, how
to start the
- server and what a structure your project has after creating.</para>
-
- <section id="start_dev_db">
- <title>Start Development Database</title>
-
- <para>Before opening the JBoss Developer studio you need to <ulink
url="http://anonsvn.jboss.org/repos/jbosstools/trunk/documentation/g...
and start a Workshop Database.</para>
- <para>To start the database just run <property
moreinfo="none">./runDBServer.sh</property> or
- <property moreinfo="none">runDBServer.bat</property> from
the database directory.</para>
- <para>The end result should be a console window that looks
like:</para>
-
- <figure float="0">
- <title>Starting DataBase</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="create_deploy_seam">
- <title>Create and deploy Seam Web Project</title>
-
- <para>Minimize the terminal window and run the <property
moreinfo="none">JBoss Developer Studio</property>
- from Applications Menu or from the desktop icon.</para>
- <para>First of all you get the Workspace Launcher. Change the default
workspace location if
- it's needed. Click on <property
moreinfo="none">Ok</property>. </para>
-
- <figure float="0">
- <title>Workspace Launcher Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After startup, you see the welcome page. You could read how to work
with welcome pages
- in <link linkend="Welcome">previous</link> chapter. Now
select <property moreinfo="none">Create
- New...</property> icon and then press on <property
moreinfo="none">Create Seam Project</property>
- link.</para>
-
- <para>The <property moreinfo="none">New Seam Project
wizard</property> is started. You need to enter a name
- (e.g., "workshop") and a location directory for your new project. The
- wizard has an option for selecting the actual Server (and not just WTP runtime)
that will be
- used for the project. This allows the wizard to correctly identify where the
needed
- datasource and driver libraries need to go.</para>
-
- <figure float="0">
- <title>New Seam Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>All settings are already specified here, you can just modify the
Configuration. Click on
- the <emphasis>
- <property moreinfo="none">Modify...</property>
- </emphasis> button to configure your custom facets pattern:</para>
-
-
- <figure float="0" id="ProjectFacetsSpecifyingScreen">
- <title>Project Facets Specifying</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the whole the dialog allows to select the "features" you
want to use in your project.
- Doing this <property moreinfo="none">JBoss Developer
Studio</property> setups the appropriate tooling for
- your project. Since JBoss Seam integrates all popular Java EE frameworks, you can
select any
- combination of technologies from the list. Here, for the default configuration,
Dynamic Web
- Module, Java, JavaServer Faces (JSF), and Seam Facet are already selected for a
typical
- database-driven web application. The default project facets should
suffice.</para>
-
- <para>In the <property moreinfo="none">Project
Facets</property> form you can also bring up server runtimes
- panel by clicking <property moreinfo="none">
Runtimes</property> tab on the right corner. This panel shows
- available server runtimes.</para>
-
- <figure float="0">
- <title>Runtimes Selecting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click on <emphasis>
- <property moreinfo="none">Ok</property>
- </emphasis> and then <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> to proceed further.</para>
-
- <para>A dynamic web application contains both web pages and Java code. The
wizard will ask you
- where you want to put those files. You can just leave the default values or
choose another
- folder.</para>
-
- <figure float="0">
- <title>Web Module Settings</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the next form, you will be able to select where those library JARs
come from. The
- easiest is just to select the JARs provided by the JBoss AS runtime associated
with this
- project. That is why it is important to chose the right JBoss AS 4.2 runtime in
the project
- setup window.</para>
- <itemizedlist>
- <listitem>
- <para>Check <emphasis>
- <property moreinfo="none">Server Supplied JSF
Implementation</property>
- </emphasis>. We will use <ulink
url="../../seam/html_single/index.html#addJSFCapab">JSF
- implementation</ulink> that comes with JBoss server</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>JSF Capabilities Adding</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Next wizard step needs more settings that previous. Let's start
with
- <property moreinfo="none">General</property>
section.</para>
- <para>Leave the default Seam runtime and check a WAR
deployment.</para>
-
- <figure float="0">
- <title>Seam Facet Setting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Next <property
moreinfo="none">Database</property> section is a little tricky. The
<property moreinfo="none">Connection
- Profile</property> needs to be edited so that the new project works
properly with the
- external HSQLDB server. By default the project wizard tries to use the JBoss
embedded
- HSQLDB, but the tutorial uses an external database to replicate a more real
world
- development scenario. Click on <property
moreinfo="none">Edit</property> to modify the Connection
- Profile.</para>
-
- <figure float="0">
- <title>DataBase Setting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam8_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select <property moreinfo="none">JDBC Connection
Properties</property>. Make sure the URL is set to <emphasis>
- <property
moreinfo="none">jdbc:hsqldb:hsql://localhost:1701</property>
- </emphasis></para>
-
- <figure float="0">
- <title>JDBC Connection Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Try click on <property moreinfo="none">Test
Connection</property> button. It probably won’t work. This
- happens if the hsql jdbc driver is not exactly the same. This can be worked
around by
- modifying the HSQLDB database driver settings. To modify the settings, click the
- <property moreinfo="none">“...”</property> next to the
drop-down box.</para>
-
- <para>The proper Driver JAR File should be listed under <property
moreinfo="none">Driver File(s)</property>.
- Select the hsqldb.jar file found in the database/lib directory and click on
- <property moreinfo="none">Ok</property>.</para>
-
- <figure float="0">
- <title>Driver Details</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select <property moreinfo="none">Hypersonic
DB</property> and click on <property
moreinfo="none">Ok</property>. Again,
- this only happens if the selected hsqldb.jar is different from the running
database.</para>
-
- <figure float="0">
- <title>Hypersonic DB Selecting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now, the <property moreinfo="none">Test
Connection</property> should succeed. After testing the
- connection, click on Ok.</para>
-
- <figure float="0">
- <title>Connection Testing</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can leave the <property moreinfo="none">Code
Generation</property> section as is. It refers to Java
- packages in which the generated code will be placed.</para>
-
- <figure float="0">
- <title>Code Generation Setting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click on <property
moreinfo="none">Finish</property> button. Now, there should be a new
Seam project
- called “workshop” listed in Package Explorer view.</para>
-
- <figure float="0">
- <title>"worskhop" Project in the Package Explorer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="start_JBossAS">
- <title>Start JBoss Application Server</title>
-
- <para>The complete information on how to manage JBoss AS from JBoss Developer
Studio you can
- read in a <link linkend="manage">corresponding
chapter</link>.</para>
- <para>Now you just need to start the server by clicking on green
circle/triangle icon in the
- JBoss Server View.</para>
-
- <figure float="0">
- <title>Starting the Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Then run the project by selecting the project and use
<emphasis><property moreinfo="none">Run As... >
- Run on Server</property>.</emphasis></para>
-
- <note>
- <title>Note:</title>
- <para>If the project does not show up, then you can use a normal browser
and use <emphasis>
- <property
moreinfo="none">http://localhost:8080/workshop/home.seam</property>
- </emphasis> as the url.</para>
- </note>
-
- <para>Your project looks like this:</para>
-
- <figure float="0">
- <title>"workshop" Project Started</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="workshop_code_overview">
- <title>Workshop Project Code Overview</title>
-
- <para>Now let's examine the project and its structure. Go back to the
Package Explorer view in
- JBoss Developer Studio.</para>
-
- <para>It seems like it's not much for project but this shell application
contains a login
- screen with default login logic, a menu template that can be further modified,
and other
- layout templates.</para>
-
- <para>It's important to note that the business logic will reside in the
<emphasis>
- <property moreinfo="none">src/hot</property>
- </emphasis> folder, by default. And, the package naming conventions that
were used in <property moreinfo="none">New Seam
- project wizard</property> could have been changed to something different
from <emphasis>
- <property
moreinfo="none">org.domain.workshop.session</property>.
- </emphasis> Also, notice that there is a default <property
moreinfo="none">Authenticator. java</property>
- file. This is where custom security logic can be added. Seam has a nice
declarative security
- model that we will explore in a bit more detail later on. The <emphasis>
- <property moreinfo="none">src/main</property>
- </emphasis> folder is a model directory. It stores the project's JPA
entity beans.</para>
-
- <figure float="0">
- <title>Project Structure</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The view tier of the
- application is also important. Seam uses facelets and there is a built-in
facelets GUI
- editor that has some nice WYSIWYG and component drag/drop functionality. Try this
out by
- opening <property moreinfo="none">home.xhtml</property>
from <property moreinfo="none">WebContent</property>
folder.</para>
-
- <figure float="0">
- <title>Facelets GUI Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam18.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Notice that the templates reside in the <emphasis>
- <property moreinfo="none">WebContent/layout</property>
- </emphasis> folder. There is a stylesheet in the <emphasis>
- <property
moreinfo="none">WebContent/stylesheet</property>
- </emphasis> folder. There is also a login and default error page. The
Facelet editor will be
- explored in more detail later in the lab.</para>
-
- <para>The project already has a datasource that was created per the Seam
project wizard
- database settings. And, obviously all of the Seam specific configuration files
and JAR
- dependencies are included and placed in the proper locations. On last noteworthy
line item
- is related to the build script. There isn’t a build script because the Eclipse
WTP(Web Tools
- Project) plugin is used to publish web application changes. As you can see, JBoss
Developer
- Studio is removing a great deal of complexity from the enterprise Java project
- setup/deployment process. The end result is a developer that is writing code, not
spending
- days/weeks trying to figure out how to get a decent development environment and
project
- build process.</para>
-
- </section>
-
- </section>
-
-
- <section id="seam_action_dev">
- <title>Seam Action Development</title>
-
- <para>Now, it’s time to write some code. The good news is that JBoss Developer
Studio can also
- help out in this respect. In this section, we will create a new Seam Action POJO
and facelet
- with some custom business logic and some GUI changes.</para>
-
- <section id="create_seam_action">
- <title>Create a New Seam Action</title>
-
- <para>Go to main menu bar and click on <emphasis>
- <property moreinfo="none">File > New > New Seam
Action</property>
- </emphasis> to start the New Seam Action wizard.</para>
-
- <para>Specify a <property moreinfo="none">Seam component
name</property> (e.g., "myAction").
- The other properties will be auto-completed for you so there is no need to change
them.
- Click on <property
moreinfo="none">Finish</property>.</para>
-
- <figure float="0">
- <title>New Seam Action Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam19.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now, open the <property
moreinfo="none">MyAction.java</property> file and replace the
- "myAction" method with this logic:</para>
-
- <programlisting format="linespecific"><![CDATA[public void
myAction() {
-Calendar cal = Calendar.getInstance();
-log.info("myAction.myAction() action called");
-facesMessages.add("MyAction Executed on:" + cal.getTime());
-}]]></programlisting>
-
- <para>You also need to import the <property
moreinfo="none">java.util.Calendar</property> class by clicking
- <emphasis><property moreinfo="none">CTRL + Shift +
O</property>.</emphasis></para>
-
- </section>
-
- <section id="test_seam_action">
- <title>Test Seam Action</title>
-
- <para>The new action can be tested by browsing the workshop-test project.
JBoss Developer
- Studio has already created a TestNG test case for you.</para>
-
- <figure float="0">
- <title>"workshop-test" Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam20.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The test case simulates a Seam component/method execution for the
- <property moreinfo="none">MyAction.myAction()</property>
logic.</para>
- <para>To run the test case, right click on <property
moreinfo="none">MyActionTest.xml</property> and click <emphasis>
- <property moreinfo="none">Run As > TestNG
Suite</property>
- </emphasis> or use the <property moreinfo="none">Run
As...</property> toolbar shortcut as shown
- below.</para>
-
- <figure float="0">
- <title>TestNG Running</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam21.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>With any luck, the test case will pass. Look at the TestNG
view.</para>
-
- <figure float="0">
- <title>TestNG Results</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam22.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now, it’s safe to test the new Seam Action in a web browser. The
fastest way to do that
- is to right click on <property
moreinfo="none">myAction.xhtml</property> and use <emphasis>
- <property moreinfo="none">Run As... > Run On
Server</property>
- </emphasis> which will show the appropriate url in the browser.
Alternatively you can
- manually enter <emphasis>
- <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
- </emphasis> into a browser.</para>
-
- <figure float="0">
- <title>Seam Action in a Web Browser</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam23.png"
scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="modify_seam_action">
- <title>Modify Seam Action User Interface</title>
-
- <para>Browse to <emphasis>
- <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
- </emphasis> and click on <property
moreinfo="none">myAction</property>. This executes the “myAction”
method.
- This looks pretty good, but we could make this page look a little
better.</para>
-
- <para>Open <emphasis>
- <property
moreinfo="none">WebContent/myAction.xhtml</property>
- </emphasis> in JBoss Developer Studio to use the nice facelets
editor.</para>
-
- <figure float="0">
- <title>Open Seam Action with Editor </title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam24.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Right click on the "myAction!" button in the visual part of
editor and
- select <property moreinfo="none"><h:commandButton>
Attributes</property>.</para>
-
- <figure float="0">
- <title>Seam Action Editing</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam25.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Change the <property
moreinfo="none">value</property> of the button to something different.
If desired,
- you can change any other text on the page. Then, type <emphasis>
- <property moreinfo="none">CTRL + S</property>
- </emphasis> to save the facelet.</para>
-
- <figure float="0">
- <title>Attributes Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam26.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Refresh <emphasis>
- <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
- </emphasis> and now you should see your changes.</para>
-
- <para>Notice that you did not have to publish the application. JBoss
Developer Studio
- auto-published it for you.</para>
-
- <figure float="0">
- <title>Seam Action Is Modified</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam27.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
-
- </section>
-
- <section id="declarative_security">
- <title>Declarative Security</title>
-
- <para>In this section you will see how it’s easy to secure the facelets and
facelet components
- in Seam. Let’s go ahead and secure the action button, then we will secure the
entire
- page.</para>
-
- <section id="edit_login">
- <title>Edit Login Authentication Logic</title>
-
- <para>There is a class called <property
moreinfo="none">Authenticator.java</property>. The login page will
- execute the <property
moreinfo="none">Authenticator.authenticate()</property> method by
default, so we’ll
- start by adding some custom login logic.</para>
- <para>Open <property
moreinfo="none">Authenticator.java</property> in JBoss Developer Studio
and replace the
- <property moreinfo="none">authenticate()</property>
method with this code:</para>
-
- <programlisting format="linespecific"><![CDATA[public boolean
authenticate() {
-if (identity.getUsername().equals("admin")
-&& identity.getPassword().equals("password")) {
-identity.addRole("admin");
-return true;
-}
-else
-return true;
-}]]></programlisting>
-
- </section>
- <section id="secure_seam_page">
- <title>Secure Seam Page Component</title>
-
- <para>Open <property
moreinfo="none">myAction.xhtml</property> and add a new secured command
button:</para>
- <programlisting
format="linespecific"><![CDATA[<h:commandButton
id="myActionSecured"
-value="Secured Action Button"
-action="#{myAction.myAction}"
-rendered="#{s:hasRole('admin')}"/>]]></programlisting>
-
- <para>Refresh <emphasis>
- <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
- </emphasis> If you are not logged in you will only see one button. If you
are logged in,
- there will be two buttons.</para>
-
-
- <figure float="0">
- <title>One Button on a Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam28.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The secured button is not visible because the user isn’t logged in as
- <property
moreinfo="none">"admin"</property>.</para>
-
- <figure float="0">
- <title>Secured Button is Visible</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam29.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The user is logged in as <property
moreinfo="none">"admin"</property>. Securing
- components is easy but securing pages is pretty simple as well. </para>
- <para>Open <emphasis>
- <property
moreinfo="none">WebContent/WEB-INF/pages.xml</property>
- </emphasis>. Then add this markup directly underneath the
<pages>
- element:</para>
-
- <programlisting format="linespecific"><![CDATA[<page
view-id="/myAction.xhtml"
login-required="true"/>]]></programlisting>
-
- <para>Refresh <emphasis>
- <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
- </emphasis> If you are not logged in you will get bounced back to the login
page.</para>
-
- <figure float="0">
- <title>Login Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam30.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Thus, if you enter login credentials for the
- <property moreinfo="none">"admin"</property>
user, you will be re-directed to the
- secured page and secured component. If you enter different login credentials,
page access
- will be granted, but the secured component will not be displayed.</para>
-
- <para>Congratulations! You have secured your new action both at the facelet
component and page
- level. You also added custom authentication logic to the login
action.</para>
-
- </section>
-
- </section>
-
- <section id="browsing_workshop_db">
- <title>Browsing Workshop Database</title>
-
- <para>In this section you get to know how to use the workshop database that was
started at the
- beginning of the lab.</para>
-
- <section id="database_connectivity">
- <title>Database Connectivity Setup</title>
-
- <para>The workshop data can be browsed inside of JBoss Developer
Studio.</para>
-
- <para>To open the Data Source Explorer, click on <emphasis><property
moreinfo="none">Window > Open Perspective
- > Other > Database
Development</property>.</emphasis></para>
- <para>In the Data Source Explorer, expand a <property
moreinfo="none">Databases</property> node and select a
- <property moreinfo="none">Default</property> database.
Right click on it, select
- <property moreinfo="none">Connect</property> from the
context menu.</para>
-
- <figure float="0">
- <title>Data Source Explorer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam31.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="browsing_workshop_db2">
- <title>Browse Workshop Database</title>
-
- <para>Then in the current view, drill down to the <property
moreinfo="none">CUSTOMERS</property> table.</para>
-
- <figure float="0">
- <title>"CUSTOMERS" Table</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam32.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Right click on <property
moreinfo="none">CUSTOMERS</property>, select <emphasis>
- <property moreinfo="none">Data > Sample
Contents</property>
- </emphasis> to view the data in the table.</para>
-
- <para>There should be a SQL Results view on the workbench, but it could be
hidden. Click on
- the <property
moreinfo="none">"Result1"</property> tab in the right side
and you should
- see the data in the CUSTOMERS table.</para>
-
-
- <figure float="0">
- <title>SQL Results View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam33.png"
scale="92"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Note:</title>
- <para>If you can’t find the SQL Results view tab, click on
<emphasis><property moreinfo="none">Window > Show
- View > Other > SQL Development > SQL
Results</property>.</emphasis></para>
- </note>
-
- <para>Congratulations! You just connected to the workshop database and
queried the content
- using Database Explorer tools.</para>
-
- </section>
-
- </section>
-
- <section id="db_programming">
- <title>Database Programming</title>
-
- <para>Now, it’s time to reverse engineer the workshop database into a fully
functioning Seam
- CRUD(Create Read Update Delete) application.</para>
-
- <section id="reverse_engineer_crud">
- <title>Reverse Engineer CRUD from a Running Database</title>
-
- <para>In <property moreinfo="none">JBoss Developer
Studio</property>, switch to <property moreinfo="none">Seam
- perspective</property>, and then right-click the project and select
- <emphasis><property moreinfo="none">New > Seam
Generate Entities</property>.</emphasis></para>
-
- <para>"workshop" project in the <property
moreinfo="none">Seam Generate Entities
- wizard</property> will be selected automatically. There is no need to
change something
- more, click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> to proceed further.</para>
-
- <figure float="0">
- <title>Generate Seam Entities</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam34.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the next page use the <emphasis>
- <property moreinfo="none">Include</property>
- </emphasis> button to include all the tables from the database and click
<emphasis>
- <property
moreinfo="none">Finish</property>.</emphasis></para>
-
- <figure float="0">
- <title>Selecting Tables</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam34a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After running the Generate Entities action, you will see new
<emphasis>
- <property
moreinfo="none">org.domain.workshop.entity</property>
- </emphasis> classes. These classes represent insert/update/delete/query
logic.</para>
-
- <figure float="0">
- <title>org.domain.workshop.entity Classes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam35.png"
scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>There are also <emphasis>
- <property
moreinfo="none">org.domain.workshop.entity</property>
- </emphasis> package that contains the JPA classes. These are the entity
beans that are
- mapped to database tables.</para>
-
- <para>Last, but not least, there are facelets for all of the CRUD screens.
The best way to get
- a feel for the generated code is to open a browser and play around with the
application. Go
- to <emphasis>
- <property
moreinfo="none">http://localhost:8080/workshop</property>
- </emphasis> and insert/update/delete/query a few records. There is quite a
bit of AJAX in
- this application, but which we will explore further later on in the lab. For now,
take note
- of the page tabs, required field logic and data table sorting in the list pages.
</para>
-
- <figure float="0">
- <title>CustomersList.xhtml in the Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam36.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Congratulations! You now have a fully functioning CRUD application that
is already AJAX
- enabled.</para>
-
- </section>
-
- <section id="use_hibernate_tools">
- <title>Use Hibernate Tools to Query Data via JPA</title>
-
- <para>Now, it's time to write some JPA queries using the Hibernate
perspective in
- <property moreinfo="none">JBoss Developer
Studio</property>.</para>
- <para>In the upper right corner of the workbench there is a small icon (see
the figure below),
- click on it and choose <property
moreinfo="none">Hibernate</property>.</para>
-
- <figure float="0">
- <title>Hibernate Perspective</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam37.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Look at the Hibernate Configurations view. In the "workshop"
project,
- drill down on the <property moreinfo="none">Session
Factory</property> and notice that the JPA
- entities/attributes are listed in a nice tree view.</para>
-
- <figure float="0">
- <title>Hibernate Configurations View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam38.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Right click on the <property moreinfo="none">Session
Factory</property> and select <property moreinfo="none">HQL
- Editor</property>. This will open a JPA query scratch pad
window.</para>
-
- <para>Write your query and click on the "Hibernate Dynamic SQL
Preview" tab.
- You should see the SQL that will be executed if this JPA query is
run.</para>
-
- <figure float="0">
- <title>JPA Query Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam39.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Run the query by clicking on the green run icon.</para>
-
- <para>The results are listed in the "Hibernate Query Result" tab.
There is a
- "Properties" tab in the workbench that can be used to see a specific
JPA
- result. These results represent the JPA objects because our query did not specify
column
- names.</para>
-
- <figure float="0">
- <title>Hibernate Query Result View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam40.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The query can be refined, and take note that there is nice code
completion in the JPA
- query editor.</para>
-
- <figure float="0">
- <title>Code Completion</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam41.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>A refined query will return results that are more ResultSet oriented.
Notice the join
- logic that JPA supports.</para>
-
- <figure float="0">
- <title>The Results</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam42.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>There was no need to specify an <property
moreinfo="none">Employees</property> table in the
- <property moreinfo="none">from</property> part of the JPA
query because JPA supports reference traversal
- via Java class attribute references. Not only are JPA and HQL queries fully
supported, but
- Criteria based queries can also be written in the Criteria Editor. You should
spend some
- time tinkering with different queries and possibly Criteria based queries, even
though the
- instructions are not provided in this lab.</para>
-
- <figure float="0">
- <title>Criteria Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam43.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="use_hibernate_to_vizualize">
- <title>Use Hibernate Tools to visualize the Data Model</title>
-
- <para>Now, it’s time to view the data model for the workshop
database.</para>
-
- <para>In the Hibernate Configurations view, select "workshop"
project and
- expand the <property
moreinfo="none">Configuration</property> node. Select the
- <property moreinfo="none">Customers</property> entity,
right click on it, choose <property moreinfo="none">Open Mapping
- Diagram</property>.</para>
-
- <figure float="0">
- <title>Mapping Diagram Opening</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam44.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>You see a Diagram tab for the CUSTOMERS table and any tables that have
FK references.
- This is a handy way to view the data model and JPA mappings. Now, you’ve got
access to
- something that the Erwin Data Modeler can’t do.</para>
-
-
- <figure float="0">
- <title>Diagram Tab</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam45.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- </section>
-
-
- <section id="rich_components">
- <title>Rich Components</title>
-
- <para>This lab will conclude with one last AJAX twist. In this section we add a
RichFaces
- <property moreinfo="none">inputNumberSlider</property> to
the Order Details edit screen.</para>
-
- <section id="add_richfaces">
- <title>Add a Richfaces component to the CRUD Application</title>
-
- <para>Switch to Seam perspective, open <emphasis>
- <property
moreinfo="none">WebContent/OrderdetailsEdit.xhtml</property>
- </emphasis> in JBoss Developer Studio.</para>
- <para>Change the form field values using the visual editor. Seam has
generated the form field
- names that match the database column names. This is not ideal for business
users.</para>
-
- <figure float="0">
- <title>Form Fields Editing</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam46.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Also, replace the QTY Ordered input field with a <property
moreinfo="none">inputNumberSlider</property>.
- You can use the JBoss Developer Studio palette or right click on the form and
insert the
- RichFaces component.</para>
-
- <figure float="0">
- <title>RichFaces Component Inserting</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam47.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>One the last option is to use the source view and manually copy the
inputNumberSlider
- markup listed below:</para>
-
- <programlisting
format="linespecific"><![CDATA[<rich:inputNumberSlider
id="quantityOrdered" required="true"
-
value="#{orderdetailsHome.instance.quantityordered}"/>]]></programlisting>
-
- <figure float="0">
- <title>Adding the Source</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/first_seam/first_seam48.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The end result is an edit page that has better form labels and a new
RichFaces
- control.</para>
-
- <figure float="0">
- <title>The Result Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/first_seam/first_seam49.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Congratulations! You have completed the JBoss Developer Studio
lab.</para>
-
- </section>
-
- </section>
-</chapter>
-
-
-<chapter id="jsp_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml"
xreflabel="jsp_application">
- <?dbhtml filename="jsp_application.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JSP</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Developing a simple JSP web application</title>
-
- <note>
- <title>Note:</title>
- <para>We highly recommend developing in <property
moreinfo="none">Seam</property>. This chapter is for users
- who for some reason cannot use Seam.</para>
- </note>
-
- <para>In this chapter you'll find out how to create a simple <ulink
url="http://java.sun.com/products/jsp/">JSP</ulink> application using
the
- <property moreinfo="none">JBoss Developer Studio</property>. The
application will show a classic
- "Hello World!" on the page.</para>
- <para>We'll assume that you have already launched <property
moreinfo="none">JBoss Developer
- Studio</property> and also that the <property moreinfo="none">Web
Development</property> perspective is the
- current perspective. If not, make it active by selecting <emphasis>
- <property moreinfo="none">Window > Open Perspective >
Web Development</property>
- </emphasis> from the menu bar or by selecting <emphasis>
- <property moreinfo="none">Window > Open Perspective >
Other...</property>
- </emphasis> from the menu bar and then selecting Web Development from the Select
Perspective
- dialog box.</para>
-
- <section id="SettingUpTheProject">
- <?dbhtml filename="SettingUpTheProject.html"?>
- <title>Setting Up the Project</title>
- <para>We are going to start with the creating a Dynamic Web Project with a
minimal
- structure, i.e. with just required facets. Thus this section will perform you all
- necessary steps on how to do this.</para>
- <itemizedlist>
- <listitem>
- <para>Go to the menu bar and select <emphasis>
- <property moreinfo="none">File > New >
Other...</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">Web > Dynamic Web
Project</property>
- </emphasis> in the New Project dialog box</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis>
- </para>
- </listitem>
- <listitem>
- <para>Enter "jspHello" as a project name</para>
- </listitem>
- <listitem>
- <para>Then select <emphasis>
- <property moreinfo="none">Minimal Configuration</property>
- </emphasis> from the list of possible configurations and click
<emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Create New Web Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <emphasis>
- <property moreinfo="none">jspHello</property>
- </emphasis> node should appear in the upper-left <property
moreinfo="none">Package Explorer</property>
- view.</para>
- <figure float="0">
- <title>New Web Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="CreatingJSPPage">
- <?dbhtml filename="CreatingJSPPage.html"?>
- <title>Creating JSP Page</title>
- <para>This section covers all the points how to create, edit and then preview JSP
page.</para>
- <para>In our simple application we need to create only one JSP page which
displays a
- <emphasis>"Hello World!"</emphasis> message.</para>
- <itemizedlist>
- <listitem>
- <para>Right click <emphasis><property
moreinfo="none">WebContent > New >
- JSP</property>. </emphasis></para>
- </listitem>
- <listitem>
- <para>Type "hello.jsp" for a file name and click the
<emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> button.</para>
- </listitem>
- </itemizedlist>
- <para>In the next window you can choose a template for your jsp page and see its
preview.</para>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">New JSP File (xhtml)</property>
- </emphasis> template and click <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Create JSP Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Our <emphasis><property
moreinfo="none">hello.jsp</property></emphasis> page will now
appear in
- <property moreinfo="none">Project Explorer</property>.
- </para>
- <section id="EditingJSPPage">
- <?dbhtml filename="EditingJSPPage.html"?>
- <title>Editing a JSP Page</title>
- <para>Let's now make a little change so that a jsp page displays
- <emphasis>"Hello World!"</emphasis> message.</para>
- <itemizedlist>
- <listitem>
- <para>Insert this line inside the <emphasis role="bold">
- <property moreinfo="none"><body></property>
- </emphasis><emphasis role="bold">
- <property moreinfo="none"></body></property>
- </emphasis> tag: </para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<% System.out.println("Hello World!");
%>]]>
-</programlisting>
-
- <para>Notice that content assist functionality is always available when you are
typing:</para>
- <figure float="0">
- <title>Content Assist in JSP Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>After changes made your <emphasis>
- <property moreinfo="none">hello.jsp</property>
- </emphasis> page should look like this:</para>
- <figure float="0">
- <title>Hello.jsp Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>This line will actually output <emphasis>"Hello
- World!"</emphasis> message in the <property
moreinfo="none">Console</property>. To make the
- message displayed in the Browser, just replace this line with the simple
- <emphasis>Hello World!</emphasis>.</para>
- </section>
-
- <section id="WebXML">
- <?dbhtml filename="WebXML.html"?>
- <title>web.xml file</title>
- <para>When you are creating web project the wizard creates the <emphasis>
- <property moreinfo="none">web.xml</property>
- </emphasis> for you automatically. The <property
moreinfo="none">web.xml file editor</property>
- provided by <property moreinfo="none">JBoss Developer
Studio</property> is available in two modes:
- <property moreinfo="none">Tree</property> and <property
moreinfo="none">Source</property>.</para>
- <figure float="0">
- <title>Web.xml in Design and Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jsp_application/jsp_application_6.png"
scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Both modes are fully synchronized. Let's add mapping to our
<emphasis>
- <property moreinfo="none">hello.jsp</property>
- </emphasis> page in <emphasis>
- <property moreinfo="none">web.xml</property>
- </emphasis> file.</para>
- <itemizedlist>
- <listitem>
- <para>Switch to <property
moreinfo="none">Source</property> tab.</para>
- </listitem>
- <listitem>
- <para>Add the next code into <emphasis role="bold">
- <property
moreinfo="none"><welcome-file-list></property>
- </emphasis>:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<welcome-file>hello.jsp</welcome-file>
-]]></programlisting>
- <para>If you come back to <property
moreinfo="none">Tree</property> mode you will see that the changes
- made are automatically reflected in that mode.</para>
- <para>Actually you don't really need to do any configurations right
now.</para>
- </section>
-
- <section id="DeployTheProject">
- <?dbhtml filename="DeployTheProject.html"?>
- <title>Deploying the project</title>
- <para>While creating any web project you could experience a pain writing ant
scripts and
- managing the packaging even when writing the most trivial web applications. With
- <property moreinfo="none">JBoss Developer Studio</property>
you are saved from such a pain. All
- you need is to start <property moreinfo="none">JBoss
Server</property> and launch your application
- in your favorite browser.</para>
- <para>You can also create a war archive with <ulink
url="../../as/html_single/index.html#Project_archivesView">JBDS's Archive
Tools</ulink>
- and export it to any web server.</para>
- <section id="WarConfig">
- <?dbhtml filename="WarConfig.html"?>
- <title>WAR Config</title>
- <para>Project archives managing is available through <ulink
url="../../as/html_single/index.html#Project_archivesView">Project Archives
view</ulink>.</para>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">Window > Show view >
Other > JBoss
- Tools > Project archives</property>
- </emphasis> from menu bar</para>
- </listitem>
- <listitem>
- <para>Select a project in Package Explorer you want to be
archived</para>
- </listitem>
- </itemizedlist>
- <para>In <property moreinfo="none">Project
Archives</property> you will see available archive types
- for the project:</para>
- <figure float="0">
- <title>Project Archives</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click, for example, <emphasis>
- <property moreinfo="none">WAR</property>
- </emphasis> option to create war archive</para>
- </listitem>
- </itemizedlist>
- <para>In the <property moreinfo="none">New WAR</property>
dialog you can see automatically selected
- default values.</para>
- <figure float="0">
- <title>New WAR Archive</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> to see a stub archive configuration for your project: <figure
float="0">
- <title>Stub Archive Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Finish</property>.
</emphasis> The
- <emphasis>.war</emphasis> file will appear in <property
moreinfo="none">Package
- Explorer</property> and also in <property
moreinfo="none">Project Archives</property>
- view as structure tree: <figure float="0">
- <title>Archive is Created</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <figure float="0">
- <title>Archive in Project Archives View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- </itemizedlist>
- <para>Via <property moreinfo="none">Project
Archives</property> view you could now edit your
- archive, add new folders, publish to server, and so on:</para>
- <figure float="0">
- <title>Configure Archive</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="AutoRedeploy">
- <?dbhtml filename="AutoRedeploy.html"?>
- <title>Auto redeploy</title>
- <para>When you are creating a web application and register it on <property
moreinfo="none">JBoss
- Server</property> it is automatically deployed into
- <emphasis>/deploy</emphasis> directory of the server. JBDS comes with
the
- feature of auto-redeploy. It means that you don't need to restart
- <property moreinfo="none">JBoss Server</property>. Any
changes made in the application in
- exploded format will trigger a redeployment on the server.</para>
- </section>
- </section>
-
- <section id="Previewtab">
- <?dbhtml filename="Previewtab.html"?>
- <title>JSP Page Preview</title>
- <para><property moreinfo="none">JBDS</property> comes with
JSP design-time preview features. When
- designing JSP pages you can easily preview how they will look during runtime. You
- can even <ulink
url="../../jsf/html_single/index.html#el_exp_para">attach your stylesheet to
the
- Preview</ulink>.</para>
- <itemizedlist>
- <listitem>
- <para>Make a little change to <emphasis>
- <property moreinfo="none">hello.jsp</property>
- </emphasis> page, e.g. put this code snippet:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<%= new java.util.Date() %>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Save</property>
- </emphasis> button.</para>
- </listitem>
- <listitem>
- <para>Switch to Preview page by clicking <property
moreinfo="none">Preview</property> tab at the
- bottom of the page. You will see how the page will look at runtime.</para>
- </listitem>
- </itemizedlist>
- <!-- <figure>
- <title>Preview Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_14.png"/>
- </imageobject>
- </mediaobject>
- </figure>
--->
- </section>
- <section id="LaunchingTheProject">
- <?dbhtml filename="LaunchingTheProject.html"?>
- <title>Launch JSP Project</title>
- <para>Let's now launch our project on server. We'll use
- <property moreinfo="none">JBoss Server</property> that is
shipped with <property moreinfo="none">JBoss Developer
- Studio</property>. You can do it by performing one of the following
actions:</para>
- <itemizedlist>
- <listitem>
- <para>Start JBoss Server from <ulink
url="../../as/html_single/index.html#JBossServerView">JBoss
- Server view</ulink> by clicking the Start icon.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Starting Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click the Run icon or right click your project folder and select
<emphasis>
- <property moreinfo="none">Run As > Run on
Server</property>. </emphasis> If you
- haven't made any changes in <emphasis>
- <property moreinfo="none">web.xml</property>
- </emphasis> file or cleared it out you can launch the application by right
- clicking the <emphasis>
- <property moreinfo="none">hello.jsp</property>
- </emphasis> page and selecting <emphasis>
- <property moreinfo="none">Run on the Server</property>.
</emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Run Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You should see the next page in a Browser :</para>
- <figure float="0">
- <title>Running Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsp_application/jsp_application_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Thus with the help of this chapter you've learnt how to organize a
Dynamic
- Web Project with a minimal configuration, add any staff to it (in our case it's
- just one jsp page) and deploy and run it on the <property
moreinfo="none">JBoss Server</property>
- shipped with <property moreinfo="none">JBDS</property>.
- </para>
- </section>
-
- </section>
-</chapter>
-
-
-<chapter id="rad_jsf_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/rad_jsf_application.xml"
xreflabel="rad_jsf_application">
- <?dbhtml filename="rad_jsf_application.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JSF</keyword>
- <keyword>JBoss</keyword>
- <keyword>RAD</keyword>
- </keywordset>
- </chapterinfo>
- <title>RAD development of a simple JSF application</title>
-
- <note>
- <title>Note:</title>
- <para>We highly recommend developing in <property
moreinfo="none">Seam</property>. This chapter is for users
- who for some reason cannot use <property
moreinfo="none">Seam</property>.</para>
- </note>
-
- <para>In this chapter you will see how to create a simple JSF application being
based on
- <property moreinfo="none">"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>
- <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
- the application from inside JBoss Developer Studio using the bundled JBoss
server.</para>
-
- <section id="SettingUpTheProject12">
- <?dbhtml filename="SettingUpTheProject12.html"?>
- <title>Setting up the project</title>
- <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 moreinfo="none">Window > Show
View > Others > JBoss Tools Web
- > Web Projects View</property>)
</emphasis> click <emphasis>
- <property moreinfo="none">Create New JSF
Project</property>
- </emphasis> button. <figure float="0">
- <title>Create New JSF Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure></para>
- </listitem>
-
- <listitem>
- <para>Put <property
moreinfo="none">GuessNumber</property> as a project name, in JSF
Environment
- drop down list choose <property moreinfo="none">JSF
1.2</property></para>
- </listitem>
- <listitem>
- <para>Leave everything else as it is and click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <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 float="0">
- <title>New JSF Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_2.png"></imagedata>
- </imageobject>
- </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>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>
- <property
moreinfo="none">faces-config.xml</property>
- </emphasis> file</para>
- </listitem>
- <listitem>
- <para>Right click anywhere on the diagram mode</para>
- </listitem>
- <listitem>
- <para>From the context menu select <emphasis>
- <property moreinfo="none">New
View</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Create New View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
-
- <listitem>
- <para>Type <emphasis>
- <property
moreinfo="none">pages/inputnumber</property>
- </emphasis> as the value for <emphasis>
- <property
moreinfo="none">From-view-id</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Leave everything else as is and click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>In the same way create another jsf view. Type
<emphasis>
- <property
moreinfo="none">pages/success</property>
- </emphasis> as the value for <emphasis>
- <property
moreinfo="none">From-view-id</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">File >
Save</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>On the diagram you will see two created views.</para>
- <figure float="0">
- <title>New Views</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="CreatingTransition">
- <?dbhtml filename="CreatingTransition.html"?>
- <title>Creating Transition between two views</title>
- <para>Then, we should create connection between jsp pages.</para>
- <itemizedlist>
- <listitem>
- <para>In the diagram, select the <emphasis>
- <property moreinfo="none">Create New
Connection</property>
- </emphasis> icon third from the top along the upper left side
of the diagram to
- get an arrow cursor with a two-pronged plug at the arrow's bottom
<figure float="0">
- <title>Create Connection</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">pages/inputnumber</property>
- </emphasis> page icon and then click on the <emphasis>
- <property
moreinfo="none">pages/success</property>
- </emphasis> page icon</para>
- </listitem>
- </itemizedlist>
- <para>A transition should appear between the two icons of
views.</para>
- <figure float="0">
- <title>Created Connection</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">File >
Save</property>
- </emphasis> from the menu bar</para>
- </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.
- 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>
- <para>It is a good idea to keep your resources inside the <emphasis>
- <property moreinfo="none">JavaSource</property>
- </emphasis> folder, where you keep your .java files. Every time you
build the project,
- all <emphasis>.properties</emphasis> files will then be copied to
the
- <emphasis>classes</emphasis> folder by default.</para>
- <itemizedlist>
- <listitem>
- <para>Right click <emphasis>
- <property
moreinfo="none">JavaSource</property>
- </emphasis> folder and select <emphasis>
- <property moreinfo="none">New >
Folder</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Type <emphasis>
- <property moreinfo="none">game</property>
- </emphasis> for Folder name and click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>Your resource file and java bean will be stored in this
folder.</para>
- <itemizedlist>
- <listitem>
- <para>Right click on <emphasis>
- <property moreinfo="none">game
folder</property>
- </emphasis> and select <emphasis>
- <property moreinfo="none">New > Properties
File</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Type <emphasis>
- <property
moreinfo="none">messages</property>
- </emphasis> as the value for "name" attribute and
click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>JBoss Developer Studio will automatically open
- <property
moreinfo="none">messages.properties</property> file for
editing.</para>
- <figure float="0">
- <title>Messages.properties File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Add</property>
- </emphasis> button for adding new attribute to your resource
file</para>
- </listitem>
- <listitem>
- <para>Type <emphasis role="italic">
- <property
moreinfo="none">how_to_play</property>
- </emphasis> for "name" and <emphasis
role="italic">
- <property moreinfo="none">Please pick a number
between 0 and 100.</property>
- </emphasis> for value</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>In such a way add the next properties:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[makeguess_button=Make Guess
-trayagain_button=Play Again?
-success_text=How cool.. You have guessed the number, {0} is correct!
-tryagain_smaller=Oops..incorrect guess. Please try a smaller number.
-tryagain_bigger=Oops..incorrect guess. Please try a bigger number.
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">File >
Save</property>
- </emphasis> from the menu bar</para>
- </listitem>
- </itemizedlist>
- <para>Your .properties file should now look like follows:</para>
- <figure float="0">
- <title>Properties are Added</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><emphasis>
- <property
moreinfo="none">Up</property></emphasis>
- and <emphasis>
- <property moreinfo="none">Down</property>
- </emphasis> buttons allow you to move you attribute on the list. For
delete the attribute, choose it and press <emphasis>
- <property
moreinfo="none">Delete</property></emphasis>
button.</para>
- <para>If you want to change a value or a name of your attribute, click on
it and than on <emphasis>
- <property
moreinfo="none">Edit</property></emphasis> button.</para>
- </section>
-
- <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>
- <itemizedlist>
- <listitem>
- <para>Right click <emphasis>
- <property moreinfo="none">game
folder</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">New >
Class</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Type <emphasis>
- <property
moreinfo="none">NumberBean</property>
- </emphasis> for bean name</para>
- </listitem>
- </itemizedlist>
- <para>A java bean is created.</para>
- <itemizedlist>
- <listitem>
- <para>Declare the variable of your entered number:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[Integer userNumber;
-]]></programlisting>
- <para>JBDS allows to quickly generate getters and setters for java
bean.</para>
- <itemizedlist>
- <listitem>
- <para>Right click <emphasis>
- <property
moreinfo="none">NumberBean.java</property>
- </emphasis> in Package Explorer</para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">Source >
Generate Getters and Setters...</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Check <emphasis>
- <property
moreinfo="none">userNumber</property>
- </emphasis> box and click <emphasis>
- <property moreinfo="none">OK</property>
- </emphasis>
- <figure float="0">
- <title>Generate Getters and Setters</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- <listitem>
- <para>Add the declaration of the second variable</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[int randomNumber;
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>.. other bean methods:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[public NumberBean ()
-{
- randomNumber = (int)(Math.random()*100);
- System.out.println ( "Random number: "+randomNumber);
- }
- public String playagain ()
- {
- FacesContext context = FacesContext.getCurrentInstance();
- HttpSession session =
- (HttpSession) context.getExternalContext().getSession(false);
- session.invalidate();
- return "playagain";
- }
- public String checkGuess ()
- {
-
- // if guessed, return 'success' for navigation
- if ( userNumber.intValue() == randomNumber )
- {
- return "success";
- }
-else
- {
- FacesContext context = FacesContext.getCurrentInstance();
- ResourceBundle bundle = ResourceBundle.getBundle("game.messages",
- context.getViewRoot().getLocale());
- String msg = "";
- // if number bigger, get appropriate message
- if ( userNumber.intValue() > randomNumber )
- msg = bundle.getString("tryagain_smaller");
- else // if number smaller, get appropriate message
- msg = bundle.getString("tryagain_bigger");
- // add message to be displayed on the page via <h:messages> tag
- context.addMessage (null, new FacesMessage(msg));
- // return 'tryagain' for navigation
- return "tryagain";
- }
- }
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>And the import declarations:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpSession;
-import javax.faces.application.FacesMessage;
-import java.util.Locale;
-import java.util.ResourceBundle;
-]]></programlisting>
- <para>The whole java bean should look as follows:</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpSession;
-import javax.faces.application.FacesMessage;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-public class NumberBean
-{
- Integer userNumber;
- int randomNumber; // random number generated by application
-public Integer getUserNumber ()
- {
- return userNumber;
- }
- public void setUserNumber (Integer value)
- {
- this.userNumber = value;
- }
-
- // constructor, generates random number
- public NumberBean ()
- {
- randomNumber = (int)(Math.random()*100);
- System.out.println (
- "Random number: " + randomNumber);
- }
-
- public String playagain ()
- {
- FacesContext context = FacesContext.getCurrentInstance();
- HttpSession session =
- (HttpSession) context.getExternalContext().getSession(false);
- session.invalidate();
- return "playagain";
- }
-
- // check if user guessed the number
- public String checkGuess ()
- {
- // if guessed, return 'success' for navigation
- if ( userNumber.intValue() == randomNumber )
- {
- return "success";
- }
- // incorrect guess
- else
- {
- // get a reference to properties file to retrieve messages
- FacesContext context = FacesContext.getCurrentInstance();
- ResourceBundle bundle =
- ResourceBundle.getBundle("game.messages",
- context.getViewRoot().getLocale());
- String msg = "";
- // if number is bigger, get appropriate message
- if ( userNumber.intValue() > randomNumber )
- msg = bundle.getString("tryagain_smaller");
- else // if number smaller, get appropriate message
- msg = bundle.getString("tryagain_bigger");
-
- // add message to be displayed on the page via <h:messages> tag
- context.addMessage (null, new FacesMessage(msg));
- // return 'tryagain' for navigation
- return "tryagain";
- }
- }
-}
-]]></programlisting>
- </section>
-
- <section id="EditingFacesConfig">
- <?dbhtml filename="EditingFacesConfig.html"?>
- <title>Editing faces-config.xml File</title>
- <para>In this section you know about faces-config.xml file.</para>
- <para>This file holds two navigation rules and defines the backing bean
used.</para>
- <itemizedlist>
- <listitem>
- <para>Open faces-config.xml file in a source mode</para>
- </listitem>
- <listitem>
- <para>Add here one more navigation rule and a managed bean
declarations that the
- content of the file looks like this:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<?xml version="1.0"
encoding="UTF-8"?>
-<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee
-xmlns:xi="http://www.w3.org/2001/XInclude"
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2_.xsd">
-
- <navigation-rule>
- <from-view-id>*</from-view-id>
- <navigation-case>
- <from-outcome>playagain</from-outcome>
- <to-view-id>/pages/inputnumber.jsp</to-view-id>
- </navigation-case>
- </navigation-rule>
-
- <navigation-rule>
- <from-view-id>/pages/inputnumber.jsp</from-view-id>
- <navigation-case>
- <from-outcome>success</from-outcome>
- <to-view-id>/pages/success.jsp</to-view-id>
- </navigation-case>
- </navigation-rule>
-
- <managed-bean>
- <managed-bean-name>NumberBean</managed-bean-name>
- <managed-bean-class>game.NumberBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
-</faces-config>
-]]></programlisting>
- <para>The first navigation rule states that from any page (<property
moreinfo="none">*</property> stands for
- any page) an outcome of playagain will take you to <emphasis>
- <property
moreinfo="none">/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
moreinfo="none">/pages/inputnumber.jsp</property>
- </emphasis>, and the outcome is success, then navigate to the
<emphasis>
- <property
moreinfo="none">/pages/success.jsp</property>
- </emphasis> page. </para>
- </section>
- <section id="EditingTheJSPViewFiles2">
- <?dbhtml filename="EditingTheJSPViewFiles2.html"?>
- <title>Editing the JSP View Files</title>
- <para>Now, we will continue editing the JSP files for our two
"views" using
- Visual Page Editor.</para>
- <section id="EditingInputjsp">
- <?dbhtml filename="EditingInputjsp.html"?>
- <title>Editing inputnumber.jsp page</title>
- <para>First, let's dwell on how to edit
inputnumber.jsp.</para>
- <para>On this page we will have an output text component displaying a
message, a text
- field for user's number entering and a button for input
submission.</para>
- <itemizedlist>
- <listitem>
- <para>Open inputnumber.jsp by double-clicking on the
<emphasis>
- <property moreinfo="none">/pages/inputnumber.
jsp</property>
- </emphasis> icon</para>
- </listitem>
- </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. You can see that some JSF code
will be
- already generated as we choose a template when creating the
page.</para>
- <para>At the beginning it's necessary to create a <emphasis
role="bold">
- <property
moreinfo="none"><h:form></property>
- </emphasis> component where all others components are
put.</para>
- <itemizedlist>
- <listitem>
- <para>Place the mouse cursor inside <emphasis
role="bold">
- <property
moreinfo="none"><f:view></property>
- </emphasis><emphasis role="bold">
- <property
moreinfo="none"></f:view></property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Go to JBoss Tools Palette and expand JSF HTML folder by
selecting
- it</para>
- </listitem>
- <listitem>
- <para>Click on <emphasis role="bold">
- <property
moreinfo="none"><h:form></property>
- </emphasis> tag <figure float="0">
- <title>Insert h:form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- <listitem>
- <para>In the dialog Insert Tag select <emphasis>
- <property
moreinfo="none">id</property>
- </emphasis> and click on this line below the value header.
A blinking cursor
- will appear in a input text field inviting to enter a value of id
<figure float="0">
- <title>Define Id of Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- <listitem>
- <para>Type <emphasis>
- <property
moreinfo="none">inputNumbers</property>
- </emphasis> and click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>In source view you can see the declaration of a
form.</para>
- <figure float="0">
- <title>Created Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>First let's declare the properties file in inputnumber.jsp
page using the
- loadBundle JSF tag.</para>
- <itemizedlist>
- <listitem>
- <para>Put this declaration on the top of a page, right after
the first two
- lines:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<f:loadBundle basename="game.messages"
var="msg"/>
-]]></programlisting>
- <para>As always JBDS provides code assist:</para>
- <figure float="0">
- <title>Code Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Switch to Visual tab, so it could be possible to work
with the editor
- completely in its WYSIWYG mode</para>
- </listitem>
- <listitem>
- <para>Click on <emphasis>
- <property
moreinfo="none">outputText</property>, </emphasis> drag the
cursor over to the
- editor, and drop it inside the blue box in the
editor</para>
- </listitem>
-
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">value</property>
- </emphasis> and click on this line below "value"
- header</para>
- </listitem>
- <listitem>
- <para>Click <property
moreinfo="none">...</property> button next to the value
field</para>
- </listitem>
- </itemizedlist>
- <para>JBDS will nicely propose you to choose within available
values:</para>
- <figure float="0">
- <title>Choose Value</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Expand <emphasis>
- <property moreinfo="none">Resource Bundles
> msg</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">how_to_play</property>
- </emphasis> value and click <emphasis>
- <property
moreinfo="none">Ok</property>. </emphasis> Then click
<emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis>
- <figure float="0">
- <title>Selecting Value</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- </listitem>
- </itemizedlist>
- <para>The text will appear on the page:</para>
- <figure float="0">
- <title>Created OutputText Component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Switch to Source mode and insert <emphasis
role="bold">
- <property
moreinfo="none"><br/></property>
- </emphasis> tag after <emphasis
role="bold">
- <property
moreinfo="none"><h:outputText></property>
- </emphasis> component to make a new line.</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Save</property>
- </emphasis> button.</para>
- </listitem>
- <listitem>
- <para>On the Palette click on <emphasis>
- <property
moreinfo="none">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">
- <property
moreinfo="none"><br/></property>
- </emphasis> tag after <emphasis
role="bold">
- <property
moreinfo="none"><h:outputText></property>
- </emphasis> component to make a new line</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Save</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>On the Palette click on <emphasis>
- <property
moreinfo="none">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>
- <property
moreinfo="none">value</property>
- </emphasis> and click on this line below "value"
- header</para>
- </listitem>
- <listitem>
- <para>Click <property
moreinfo="none">...</property> button next to the value
field</para>
- </listitem>
- <listitem>
- <para>Expand <emphasis>
- <property moreinfo="none">Managed Beans
> NumberBean</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">userNumber</property>
- </emphasis> value and click <emphasis>
- <property
moreinfo="none">Ok</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Switch <emphasis>
- <property
moreinfo="none">Advanced</property>
- </emphasis> tab</para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">id</property>
- </emphasis> and click on this line below "value"
- header</para>
- </listitem>
- <listitem>
- <para>Type <emphasis>
- <property
moreinfo="none">userNumber</property>
- </emphasis> in text field</para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">required</property>
- </emphasis> and click on this line below "value"
- header</para>
- </listitem>
- <listitem>
- <para>Click <property
moreinfo="none">...</property> button next to the value
field</para>
- </listitem>
- <listitem>
- <para>Expand <emphasis>
- <property
moreinfo="none">Enumeration</property>
- </emphasis> and select <emphasis>
- <property
moreinfo="none">true</property>
- </emphasis> as a value</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Add "required" Attribute</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Ok</property>, </emphasis> then click
<emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Go to Source mode</para>
- </listitem>
- <listitem>
- <para>Add the validation attribute to <emphasis
role="bold">
- <property
moreinfo="none"><f:validateLongRange></property>
- </emphasis> for user input validation</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<h:inputText id="userNumber"
value="#{NumberBean.userNumber}" required="true">
- <f:validateLongRange minimum="0" maximum="100"/>
-</h:inputText>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Save</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>Again select <emphasis>
- <property
moreinfo="none">Visual</property>
- </emphasis> mode</para>
- </listitem>
- <listitem>
- <para>On the Palette, click on <emphasis>
- <property
moreinfo="none">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>
- <property
moreinfo="none">value</property>
- </emphasis> and click on this line below "value"
- header</para>
- </listitem>
- <listitem>
- <para>Click <property
moreinfo="none">...</property> button next to the value
field</para>
- </listitem>
- <listitem>
- <para>Expand <emphasis>
- <property moreinfo="none">Resource Bundles
> msg</property>
- </emphasis> and select <emphasis>
- <property
moreinfo="none">makeguess_button</property>
- </emphasis> as a value</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Ok</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">action</property>
- </emphasis> and click on this line below "value"
- header</para>
- </listitem>
- <listitem>
- <para>Type <emphasis>
- <property
moreinfo="none">NumberBean.checkGuess</property>
- </emphasis> in text field</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>In Source mode add <emphasis
role="bold">
- <property
moreinfo="none"><br/></property>
- </emphasis> tags between <emphasis
role="bold">
- <property
moreinfo="none"><outputText></property>
- </emphasis>, <emphasis role="bold">
- <property
moreinfo="none"><inputText></property>
- </emphasis> and <emphasis role="bold">
- <property
moreinfo="none"><commandButton></property>
- </emphasis> components to place them on different
lines</para>
- </listitem>
- </itemizedlist>
- <para>inputnumber.jsp page should look like this:</para>
- <programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
-<f:loadBundle basename="game.messages" var="msg"/>
-
-<html>
- <f:view>
- <h:form id="inputNumbers">
- <h:outputText value="#{msg.how_to_play}"/>
- <br/>
- <h:messages style="color: blue"/>
- <br/>
- <h:inputText id="userNumber"
value="#{NumberBean.userNumber}" required="true">
- <f:validateLongRange minimum="0" maximum="100"/>
- </h:inputText>
- <br/><br/>
- <h:commandButton value=
- "#{msg.makeguess_button}"
action="#{NumberBean.checkGuess}"/>
- </h:form>
- </f:view>
-</html>
-]]></programlisting>
- </section>
- <section id="EditingSuccessJsp">
- <?dbhtml filename="EditingSuccessJsp.html"?>
- <title>Editing success.jsp page</title>
- <para>In the same way like inputnumber.jsp, edit success.jsp page. Its
whole source
- should be the next:</para>
- <programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
-<f:loadBundle basename="game.messages" var="msg"/>
-
-<html>
- <f:view>
- <h:form id="result">
- <h:outputFormat value="#{msg.success_text}">
- <f:param value="#{NumberBean.userNumber}"/>
- </h:outputFormat>
- <br/><br/>
- <h:commandButton value=
- "#{msg.trayagain_button}"
action="#{NumberBean.playagain}"/>
- </h:form>
- </f:view>
-</html>
-]]></programlisting>
- <para>Again you can use code assist provided by JBDS when editing jsp
page:</para>
- <figure float="0">
- <title>Code Assist for <f:param></title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_18.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>This page, success.jsp, is shown if you correctly guessed the
number. The
- <emphasis role="bold">
- <property
moreinfo="none"><h:outputFormat></property>
- </emphasis> tag will get the value of success_text from the
properties file. The {0}
- in success_text will be substituted for by the value of the value
attribute within
- the <emphasis role="bold">
- <property
moreinfo="none"><f:param></property>
- </emphasis> tag during runtime.</para>
- <para>At the end, you have a button which allows you to replay the
game. The action
- value references a backing bean method. In this case, the method only
terminates the
- current session so that when you are shown the first page, the input text
box is
- clear and a new random number is generated.</para>
- <itemizedlist>
- <listitem>
- <para>Switch to Preview mode to see how this page will look in
a browser:</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Success.jsp in Preview Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_19.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
- <section id="CreatingIndexjsp">
- <?dbhtml filename="CreatingIndexjsp.html"?>
- <title>Creating index.jsp page</title>
- <para>Now you know how to create index.jsp page.</para>
- <para>The index.jsp page is the entry point of our application. It's
just
- forwarding to inputnumber.jsp page.</para>
- <itemizedlist>
- <listitem>
- <para>Right click <emphasis>
- <property moreinfo="none">WebContent > New
> JSP File</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Type <emphasis>
- <property moreinfo="none">index</property>
- </emphasis> for name field and choose <emphasis>
- <property
moreinfo="none">JSPRedirect</property>
- </emphasis> as a template</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>The source for this page should be like the
following:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0
transitional//en">
-<html>
- <body>
- <jsp:forward page="/pages/inputnumber.jsf" />
- </body>
-</html>
-
-]]></programlisting>
- <para>Note the <emphasis>.jsf</emphasis> extension of a page.
It means that we trigger the
- JSF controller servlet to handle the page according the servlet mapping in
the
- faces-config.xml file.</para>
- </section>
- <section id="RunningTheApplication33">
- <?dbhtml filename="RunningTheApplication33.html"?>
- <title>Running the Application</title>
- <para>Finally, we have all the pieces needed to run the
application.</para>
- <itemizedlist>
- <listitem>
- <para>Start up JBoss server by clicking on the <emphasis>
- <property moreinfo="none">Start</property>
- </emphasis> icon in JBoss Server view. (If JBoss is already
running, stop it by
- clicking on the red icon and then start it again. After the messages
in the
- Console tabbed view stop scrolling, JBoss is available)</para>
- </listitem>
- <listitem>
- <para>Right-click on project <emphasis>
- <property moreinfo="none">Run AS > Run on
Server</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Play with the application by entering correct as well as
incorrect
- values</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>You are Asked to Enter a Number Between 0 and 100</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_20.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <figure float="0">
- <title>Your Input is Validated and an Error Message is Displayed if
Invalid Input was
- Entered</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_21.png"
scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure float="0">
- <title>After You Enter a Guess, the Application Tells You Whether a
Smaller or a Larger
- Number Should be Tried</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_22.png"
scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure float="0">
- <title>Your Guess is Correct</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_23.png"
scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-</chapter>
-
-
-
-<chapter id="project_examples" role="new"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/project_examples.xml"
xreflabel="project_examples">
- <?dbhtml filename="project_examples.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Project Examples</title>
-
- <para><emphasis><property moreinfo="none">JBoss Developer
Studio</property></emphasis> provides an option to download and import a
ready-made
- project that you can explore and derive some useful technology implementation
lessons. </para>
-
-
- <section id="DownloadingProjectExample">
- <title>Downloading a Project Example</title>
-
- <para>To download a project example and start working with it you need to
take a few steps:</para>
- <itemizedlist>
- <listitem>
- <para>Go to the menu bar and select <emphasis><property
moreinfo="none">File > New >
Other...</property></emphasis>
- </para></listitem>
-
- <listitem><para>Select <emphasis><property
moreinfo="none">Jboss Tools > Project
Examples</property></emphasis>(You can also call the
<emphasis><property moreinfo="none">Project
Examples</property></emphasis> from menu bar: <emphasis><property
moreinfo="none">Help > Project
Examples...</property></emphasis>)</para></listitem>
-
-
- </itemizedlist>
-
- <figure float="0">
- <title>Project Examples</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/project_examples/pr_example_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem><para>Now in the New Project Example dialog you can
select a project you would like to explore</para>
- <para>Project Examples Wizard provides a filter field to more
easily locate the project examples you want, so you can type in the project you would like
to explore in the field.</para></listitem>
-
- </itemizedlist>
-
-
- <figure float="0">
- <title>Selecting a Project Example</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/project_examples/pr_example_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <note>
- <title>Note:</title>
- <para>
- The <emphasis><property moreinfo="none">Show the
Quick Fix Dialog</property></emphasis> option is described in the <link
linkend="QuickFixes">Quick Fixes</link> section.
- </para>
- </note>
-
- <itemizedlist>
- <listitem><para>Press <emphasis><property
moreinfo="none">Finish</property></emphasis> to start downloading
the project from the repository
- </para></listitem>
-
- </itemizedlist>
-
- <para>When downloading is finished the project will be imported
automatically and you will be able to see it in the Package Explorer.</para>
-
- <para>Now you can run the application on the server.</para>
-
- <figure float="0">
- <title>Seam Demo Application run on the Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/project_examples/pr_example_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="QuickFixes">
- <title>Quick Fixes</title>
- <para>
- Project Examples Wizard has an option for making quick fixes
- for the imported project to easily fix possible issues like missing servers,
Seam runtimes etc.
- </para>
- <para>To enable quick fixing option you need to check the
- <emphasis><property moreinfo="none">Show the Quick Fix
dialog</property></emphasis> while choosing the <link
linkend="DownloadingProjectExample">Project
Example</link>.</para>
-
- <para>When the project you selected is downloaded it will be checked for
missing dependences and if there are some you will see a dialog listing the
problems.</para>
- <figure float="0">
- <title>Quick Fix Dialog box</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/project_examples/pr_example_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>To fix the problem you need to:</para>
-
- <itemizedlist>
- <listitem><para>Select the problem from the
list</para></listitem>
- <listitem><para>Click <emphasis><property
moreinfo="none">Quick Fix</property></emphasis>
button</para></listitem>
- </itemizedlist>
-
- <para>You will be offered a solution or a number of solutions to the
problem.</para>
-
- <figure float="0">
- <title>Quick Fix Dialog box: Selecting a Fix</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/project_examples/pr_example_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>In this case(see the image above), when the
<emphasis><property
moreinfo="none">Finish</property></emphasis> button is pressed,
Seam Settings dialog box will be displayed where you need to provide a path to the Seam
environment to fix the issue.</para>
-
- <para>When the problem is fixed you will be returned to the Quick Fix
dialog box with the remaining problems to be fixed.</para>
-
- </section>
-
-
-</chapter>
-
-
-
-<chapter id="gsg_faq" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml"
xreflabel="gsg_faq">
- <?dbhtml filename="gsg_faq.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>FAQ</title>
-
- <para>For more information on <property moreinfo="none">JBoss
Developer Studio</property> features, refer to the
- following FAQ to get the answers on the most "popular"
questions.</para>
-
- <section id="question_1">
- <title>What should I do if Visual Page Editor does not start under
Linux</title>
-
- <para>Linux users may need to do the following to get the <property
moreinfo="none">Visual Page
- Editor</property> to work correctly on their
machines.</para>
-
- <orderedlist continuation="restarts"
inheritnum="ignore">
- <listitem>
- <para>On Red Hat based Linux distributions install the xpLib.i386
package</para>
- </listitem>
- <listitem>
- <para>Type</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
-]]></programlisting>
- </listitem>
- <listitem>
- <para>and/or use</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[yum install libXp
-]]></programlisting>
- </listitem>
- <listitem>
- <para>Open the JBDS perspective. If you see the Help view open,
close it and restart
- JBDS</para>
- </listitem>
- <listitem>
- <para>If none of these work, do the following:</para>
- <itemizedlist>
- <listitem>
- <para>Clear the Eclipse log file,
-
<emphasis><workspace>\.metadata\.log</emphasis></para>
- </listitem>
- <listitem>
- <para>Start Eclipse with the -debug option:</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[eclipse -debug
-]]></programlisting>
- </listitem>
- <listitem>
- <para>Post the Eclipse log file
-
(<emphasis><workspace>\.metadata\.log</emphasis>) on
- the forums.</para>
- </listitem>
- </itemizedlist>
- </listitem>
- </orderedlist>
- </section>
-
- <section id="question_2">
- <title>Do I need to have JBoss Server installed to run JBoss Developer
Studio?</title>
-
- <para>No. <property moreinfo="none">JBoss Developer
Studio</property> already comes bundled with JBoss
- Server. We bundle it together so that you don't need to download any
additional
- software and can test your application in a Web browser right
away.</para>
- <para>If you want to use a different JBoss server installation, after
<property moreinfo="none">JBoss
- Developer Studio</property> is installed open Servers View (select
- <emphasis><property moreinfo="none">Window
> Show View > Others > Server
- > Servers</property>),</emphasis> then right click
on this <emphasis>
- <property moreinfo="none">view > New >
Server</property>
- </emphasis> and follow the wizards steps to point to another Jboss
Server
- installation.</para>
- <para><property moreinfo="none">JBoss Developer
Studio</property> works with any servlet container, not just
- JBoss. For more information on deployment, please see the Deploying Your
Application
- section.</para>
- </section>
-
- <section id="question_3">
- <title>I have an existing Seam 1.2.1 project. Can I migrate/import the
project to a JBDS
- Seam project?</title>
-
- <para>We highly recommend you to create Seam 1.2.1 project using the
- <property moreinfo="none">JBDS</property>. In other
case try to do manually:</para>
-
- <itemizedlist>
- <listitem>
- <para>Create a Seam Web project to get the JBoss tools
structure</para>
- </listitem>
- </itemizedlist>
- <para>Then from your Seam 1.2.1 seam-gen project start doing the
following:</para>
- <itemizedlist>
- <listitem>
- <para>Copy <property
moreinfo="none">src</property> to <property
moreinfo="none">src</property></para>
- </listitem>
- <listitem>
- <para>Copy <property
moreinfo="none">view</property> to <property
moreinfo="none">Web content</property></para>
- </listitem>
- <listitem>
- <para>Copy resources individual files to where they are in the seam
web project
- etc.</para>
- </listitem>
- </itemizedlist>
-
- </section>
- <section id="questio_4">
- <title>I have an existing Struts or JSF project. Can I open the project in
JBDS?</title>
-
- <para>Yes. From main menu select <emphasis>
- <property moreinfo="none">File > Import >
Other > JSF Project (or Struts
- Project)</property>
- </emphasis> and follow wizards steps.</para>
-
- </section>
-
- <section id="question_5">
- <title>Can I import a .war file?</title>
-
- <para>Yes. Select <emphasis><property
moreinfo="none">File > Import > Web > WAR
- file</property>, </emphasis> then follow importing
steps.</para>
- </section>
-
- <section id="question_6">
- <title>Is it possible to increase the performance of Eclipse after
installing your
- product?</title>
-
- <para><property moreinfo="none">JBoss Developer
Studio</property> preconfigures eclipse via the eclipse.ini
- file to allocate extra memory, but if you for some reason need more memory
then by
- default, you can manually make adjustments in this file. For
example:</para>
- <programlisting format="linespecific" role="XML">
- <![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
-]]></programlisting>
- </section>
-
- <section id="question_7">
- <title>How can I add my own tag library to the JBoss Tools
Palette?</title>
-
- <para>See <ulink
url="../../jsf/html_single/index.html#AddingCustomJSFTagsToTheRedHatPalette7433">Adding
Tag
- Libraries</ulink> in Visual Web Tools Guide.</para>
- </section>
-
- <section id="question_8">
- <title>How to get Code Assist for Seam specific resources in an externally
generated
- project?</title>
-
- <para>To get Code Assist for Seam specific resources in an externally
generated project, you
- should enable Seam features in Project Preferences. Right click an imported
project and
- navigate <emphasis>
- <property moreinfo="none">Properties > Seam
Settings</property>.</emphasis> Check <emphasis>
- <property moreinfo="none">Seam support</property>
- </emphasis> box to enable all available <ulink
url="../../seam/html_single/index.html#project_pref">Seam
- Settings</ulink>.</para>
- </section>
-
- <section id="question_9">
- <title>How to import an example Seam project from jboss-eap
directory?</title>
-
- <para>To import an example Seam project from <emphasis>
- <property moreinfo="none">jboss-eap</property>
- </emphasis> into your working directory, you should perform the
following steps:</para>
-
- <itemizedlist>
- <listitem>
- <para>Go to <emphasis>
- <property moreinfo="none">New > Other
> Java Project from Existing Buildfile</property>
- </emphasis></para>
- </listitem>
-
- <listitem>
- <para>Point to the <emphasis>
- <property
moreinfo="none">build.xml</property>
- </emphasis> of any chosen project by pressing <emphasis>
- <property
moreinfo="none">Browse</property>
- </emphasis> button</para>
- </listitem>
-
- <listitem>
- <para>Hit <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> to open the project</para>
- </listitem>
- </itemizedlist>
-
- <para>As these seam examples are non WTP projects, next you should enable
Seam support for
- them. To do that, right click the project and go to <emphasis>
- <property moreinfo="none">Properties > Seam
Settings</property>.</emphasis></para>
- </section>
-
- <section id="question_10">
- <title>Is a cross-platform project import possible for JBDS?</title>
-
- <para>Yes. You can easily import created in Linux JSF, Struts or Seam
project to Windows and
- vice versa.</para>
-
- <para>To do the transferring JSF, Struts or Seam project, go to
<emphasis>
- <property moreinfo="none">Menu > Import >
General > Existing Projects into Workspace</property>,</emphasis>
- select the folder where your project stored and press <emphasis>
- <property
moreinfo="none">Finish</property>.</emphasis></para>
- </section>
-</chapter>
-
-
-<chapter id="further_reading"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml"
xreflabel="further_reading">
- <?dbhtml filename="further_reading.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Deploy</keyword>
- <keyword>Deployment</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Further Reading</title>
-
- <para>
- <emphasis role="bold">JSF Tools Reference Guide</emphasis>
- <ulink
url="../../jsf_tools_ref_guide/html_single/index.html">(html)</ulink>
-
- </para>
- <para> From this guide you'll discover all peculiarities of work at a JSF
project. You'll
- learn all shades that cover the process of project creation and take a closer look at
the JSF
- configuration file. Also you'll get to know managed beans and how to work with
them and
- find out, how to create and register a custom converter, custom validator and
referenced beans
- in a JSF project. </para>
-
-<itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">JSF Tools Tutorial</emphasis>
- <ulink
url="../../jsf_tools_tutorial/html_single/index.html">(html)</ulink>
- </para>
- <para> This tutorial will describe how to deal with classic/old style of JSF
development and how
- to create a simple JSF application using the JBoss Developer Studio. </para>
- </listitem>
-
- <listitem> <para>
- <emphasis role="bold">Struts Tools Reference Guide</emphasis>
- <ulink
url="../../struts_tools_ref_guide/html_single/index.html">(html)</ulink>
- </para>
- <para> In Struts Tools Reference Guide you will learn how to create and work with
a new struts
- project. This guide also provides information about graphical editor for struts
configuration
- files, tiles files, and struts validation files. </para>
- </listitem>
-
-<listitem>
- <para>
- <emphasis role="bold">Struts Tools Tutorial</emphasis>
- <ulink
url="../../struts_tools_tutorial/html_single/index.html">(html)</ulink>
- </para>
- <para> This tutorial will describe the classical style of Struts development, and
will
- step-by-step show you how to create a simple Struts application in JBoss Developer
Studio.</para>
-</listitem>
-
-<listitem>
- <para>
- <emphasis role="bold">Seam Dev Tools Reference
Guide</emphasis>
- <ulink url="../../seam/html_single/index.html">(html)</ulink>
- </para>
- <para> This guide helps you to understand what Seam is and how to install Seam
plug-in into
- Eclipse. It tells you the necessary steps to start working with Seam Framework and
assists in a
- simple Seam Project creation. Also you will learn how to create and run the CRUD
Database
- Application with Seam as well as find out what Seam Editors Features and Seam
Components are. </para>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">Visual Web Tools Reference
Guide</emphasis>
- <ulink url="../../jsf/html_single/index.html">(html)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">JBoss Server Manager Reference
Guide</emphasis>
- <ulink url="../../as/html_single/index.html">(html)</ulink>
- </para>
- <para> This guide covers the basics of working with the JBoss server manager. You
will read how to
- install runtimes and servers and quickly learn how to configure, start, stop the
server and know
- how deployment and archiving process. You will find out how to manage installed JBoss
Servers
- via JBoss AS Perspective. You will also read how to deploy modules onto the server.
</para>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">jBPM Tools Reference Guide</emphasis>
- <ulink url="../../jbpm/html_single/index.html">(html)</ulink>
- </para>
- <para>With jBPM Tools Reference Guide we'll help you to facilitate a
cross-product
- learning and know how you can speed your development using special editors and visual
designers.
- We'll also guide you through the steps on how to create a simple process and test
it
- within jBPM jPDL perspective.</para>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">Hibernate Tools Reference
Guide</emphasis>
- <ulink
url="../../hibernatetools/html_single/index.html">(html)</ulink>
- </para>
- <para>Throughout this guide you will learn how to install and use Hibernate Tools
bath via Ant and
- through Eclipse. We'll supply you with the information on how to create mapping
files,
- configuration file as well as a file for controlling reverse engineering by using
specific
- wizards that Hibernate tooling provides. Also you will know about Code Generation
and
- peculiarities of work within Hibernate Console Perspective.</para>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">ESB Editor Reference Guide</emphasis>
- <ulink
url="../../esb_ref_guide/html_single/index.html">(html)</ulink>
- </para>
- <para>This guide provides you with the information on ESB Editor which allows you
to develop ESB
- file.</para>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">JBoss Portal Tools Reference
Guide</emphasis>
- <ulink
url="../../jboss_portal_tools_ref_guide/html_single/index.html">(html)</ulink>
- </para>
- <para>The guide gives a detail look at how you can easily build a Portlet Web
Application with
- JBoss Tools and deploy it onto JBoss Portal.</para>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">JBoss WS User Guide</emphasis>
- <ulink
url="../../ws_ref_guide/html_single/index.html">(html)</ulink>
- </para>
- <para>This guide gives you practical help on JBossWS usage.</para>
- </listitem>
-
- <listitem>
- <para>
- <emphasis role="bold">Exadel Studio Migration Guide</emphasis>
- <ulink
url="../../Exadel-migration/html_single/index.html">(html)</ulink>
- </para>
- <para>This document is intended to help you to migrate an existing Exadel JSF or
Struts projects
- from Exadel Studio into JBoss Developer Studio. </para>
- </listitem>
-
-</itemizedlist>
-</chapter>
-
-
-</book>
+]>
+<book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Getting Started with JBoss Developer Studio</title>
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <releaseinfo>Version: 2.0.0.GA</releaseinfo>
+ <abstract>
+ <title></title>
+ <para>
+ <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/GettingSta...
version</ulink>
+ </para>
+</abstract>
+
+
+</bookinfo>
+ <toc></toc>
+
+
+
+
+<chapter id="getting_started"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml"
xreflabel="getting_started">
+ <?dbhtml filename="getting_started.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Getting Started with JBoss Developer Studio</title>
+
+ <section id="intro1">
+ <title>What is JBDS?</title>
+ <para><property moreinfo="none">JBoss Developer
Studio</property> is a set of eclipse-based development tools that
+ are pre-configured for JBoss Enterprise Middleware Platforms and Red Hat Enterprise
Linux.
+ Developers are not required to use <property moreinfo="none">JBoss
Developer Studio</property> to develop on
+ JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these pre-configured
tools offer
+ significant time-savings and value, making them more productive and speeding time to
deployment.</para>
+ <para>This guide covers the first steps to get started working with <property
moreinfo="none">JBoss Developer
+ Studio</property>. You will learn how to install and configure necessary
software for your OS
+ (currently Linux, Microsoft Windows or Mac OSX).</para>
+ <para>Thus this guide will provide you with detailed info on how to start JDK,
JBDS and JBoss
+ Tools.</para>
+ </section>
+
+ <section id="ConfigJavaEnvironment">
+ <?dbhtml filename="ConfigJavaEnvironment.html"?>
+ <title>Configuring Your Java Environment</title>
+ <para>You must have a working installation of JDK 5 before you install
<property moreinfo="none">JBoss Developer
+ Studio</property>. Currently it will only fully work with a 32-bit JVM, not a
64-bit JVM. On a
+ 64-bit JVM the visual editor fails to launch because of feature of OS architecture.
Thus in this
+ guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux Platform and
Microsoft
+ Windows Platform.</para>
+
+ <section id="InstallJDK50onLinux">
+ <title>Installing and Configuring 32-bit Sun JDK 5.0 on Linux</title>
+ <para>To install 32-bit Sun JDK 5.0 on Linux and configure it, you should follow
the next steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Download the <ulink
url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0
+ (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK
5.0 Update
+ <x>" (where "x" is the latest update number) for
+ download and then select "Red Hat Package Manager in self-extracting"
file
+ for Linux. Read the instructions on Sun's website for installing the
JDK.</para>
+ </listitem>
+ <listitem>
+ <para>If you don't want to use SysV service scripts you can install the
+ "self-extracting file" for Linux instead of choosing the "RPM in
+ self-extracting" file. In that case you can skip the next step mentioned here.
But it
+ is recommended to use the SysV service scripts for production
servers.</para>
+ </listitem>
+ <listitem>
+ <para>Download and install the appropriate -compat RPM from JPackage <ulink
url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-f...;.
+ Please ensure you choose a matching version of the -compat package to the JDK
you've
+ installed.</para>
+ </listitem>
+ <listitem>
+ <para>Create an environment variable that points to the JDK installation
directory and call it
+ JAVA_HOME. Add <emphasis>
+ <property moreinfo="none">$JAVA_HOME/bin</property>
+ </emphasis> to the system path to be able to run java from the command line.
You can do this
+ by adding the following lines to the .bashrc file in your home
directory.</para>
+ <programlisting format="linespecific"><![CDATA[#In this example
/usr/java/jdk1.5.0_11 is the JDK installation directory.
+export JAVA_HOME=/usr/java/jdk1.5.0_11
+export PATH=$PATH:$JAVA_HOME/bin]]></programlisting>
+ </listitem>
+ </itemizedlist>
+
+ <note>
+ <title>Note:</title>
+
+ <para>If you have JDK already installed and added in your system path, you
should add
+ <emphasis>$JAVA_HOME/bin</emphasis> before the old
<emphasis>$PATH</emphasis> (not after it)
+ so that the new version of JDK can be found first, i. e. <emphasis>
+ <emphasis>export PATH=$JAVA_HOME/bin:$PATH</emphasis>
+ </emphasis> This way, the machine will pick up the new JVM first. You only
need to run
+ "alternative" as a safe guard for the right JVM. </para>
+ </note>
+
+ <para>Set this variable for your account doing the installation and also for the
user account
+ that will run the server.</para>
+ <itemizedlist>
+ <listitem>
+ <para>If you have more than one version of JVM installed on your machine, make
sure you are
+ using the JDK 1.5 installation as the default java and javac. You can do this using
the
+ alternatives system. The alternatives system allows different versions of Java from
different
+ sources to co-exist on your system.</para>
+ </listitem>
+ </itemizedlist>
+ <section id="SelectAlternativesforJava">
+ <title>Select alternatives for java, javac and java_sdk_1.5.0</title>
+ <itemizedlist>
+ <listitem>
+ <para>As a root user, type the following command at the shell prompt and you
should see
+ something like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"><![CDATA[[root@vsr ~]$
/usr/sbin/alternatives --config java
+There are 2 programs that provide 'java'.
+Selection Command
+-----------------------------------------------
+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
+*+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java
+Enter to keep the current selection[+], or type selection
number:]]></programlisting>
+ <para>Make sure the Sun version [jre-1.5.0-sun in this case] is selected
(marked with a
+ '+' in the output), or select it by entering its number as
prompted.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Repeat the same for javac and java_sdk_1.5.0.</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"><![CDATA[[root@vsr ~]$
/usr/sbin/alternatives --config javac
+There is 1 program that provides 'javac'.
+ Selection Command
+-----------------------------------------------
+*+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
+Enter to keep the current selection[+], or type selection number:
+
+[root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
+There is 1 program that provide 'java_sdk_1.5.0'.
+ Selection Command
+-----------------------------------------------
+*+ 1 /usr/lib/jvm/java-1.5.0-sun
+Enter to keep the current selection[+], or type selection
number:]]></programlisting>
+ <para>You should verify that java, javac and java_sdk_1.5.0 all point to the
same manufacturer
+ and version.</para>
+ <note>
+ <title>Note:</title>
+ <para>You can always override this step by setting the JAVA_HOME environment
variable as
+ explained in the previous step.</para>
+ </note>
+ <itemizedlist>
+ <listitem>
+ <para>Make sure that the java executable is in your path and that you are
using an appropriate
+ version. To verify your Java environment, type "java -version" at the
shell
+ prompt and you should see something like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"><![CDATA[[root@vsr ~]$ java
-version
+java version "1.5.0_11"
+Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
+Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode,
sharing)]]></programlisting>
+ </section>
+
+ </section>
+ <section id="InstallJDK50onWindows">
+ <title>Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft
Windows</title>
+
+ <para>To install and configure 32-bit Sun JDK 5.0 on Microsoft Windows, follow
these steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Download the <ulink
url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0
+ (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK
5.0 Update
+ <x>" (where "x" is the latest update number) for
+ download and then select your Windows Platform options to perform the
installation.</para>
+ </listitem>
+ <listitem>
+ <para>Create an environment variable called JAVA_HOME that points to the JDK
installation
+ directory, for example:
+ <literallayout class="normal" format="linespecific">
+ <emphasis>C:\Program Files\Java\jdk1.5.0_11\</emphasis>
+ </literallayout></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>In order to run java from the command line, add the
<emphasis>jre\bin</emphasis> directory
+ to your path, for example:</para>
+ <para>
+ <emphasis>C:\Program Files\Java\jdk1.5.0_11\jre\bin</emphasis>
+ </para>
+ <para>To do this, open the <emphasis>
+ <property moreinfo="none">Control Panel</property>
+ </emphasis> from the <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis> menu, switch to Classic View if necessary, open the System Control
Panel applet (<emphasis>
+ <property moreinfo="none">System</property>
+ </emphasis>), select the <emphasis>
+ <property moreinfo="none">Advanced</property>
+ </emphasis> Tab, and click on the <emphasis>
+ <property moreinfo="none">Environment Variables</property>
+ </emphasis> button.</para>
+ <para>Now, when 32-bit Sun JDK 5.0 has been successfully installed, we can pass
on to the next
+ step.</para>
+ </section>
+
+ </section>
+
+ <section id="InstallingJBDS">
+ <?dbhtml filename="InstallingRHDS.html"?>
+ <title>JBoss Developer Studio Installation</title>
+
+ <para>This chapter will provide you with detailed information on how to install
<property moreinfo="none">JBoss
+ Developer Studio</property>.</para>
+
+ <para>JBDS comes with a simple installer, bundled with tested/pre-configured
versions of Eclipse,
+ WTP, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next
steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>First of all you need the appropriate installation file for your platform
from
+ <ulink
url="https://www.redhat.com/apps/store/developers/jboss_developer_st...
Hat
+ website</ulink>.</para>
+ </listitem>
+ <listitem>
+ <para>Then run in console:</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-2.0.0.GA.jar
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>Follow the instructions presented by the installation
wizard:</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JBoss Developer Studio Installation Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Provide the installation path</para>
+ </listitem>
+ <listitem>
+ <para>Select Java VM</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Select Java VM</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>By selecting <emphasis>
+ <property moreinfo="none">Default Java VM</property>
+ </emphasis> you set default Java VM of your system (to verify your Java
environment, type
+ "java -version" in console).</para>
+ </tip>
+
+ <para>Selecting <emphasis>
+ <property moreinfo="none">Specific Java VM</property>
+ </emphasis> you can provide the path to non-default Java VM.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>JBoss Developer Studio needs Java 5 and "gij" isn't
available on
+ every platform.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>Installation process includes <ulink
url="http://www.jboss.com/products/platforms/application">JBoss Enterprise
Application
+ Platform</ulink>. Select <emphasis>
+ <property moreinfo="none">Yes</property>
+ </emphasis> to use it in JBoss Developer Studio. This step lets you
configure locally available JBoss Application Servers: </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JBoss Enterprise Application Platform Installing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+<itemizedlist>
+ <listitem><para>You can fill the list automatically using the
<emphasis><property
moreinfo="none">Find</property></emphasis> button: click
<emphasis><property
moreinfo="none">Find</property></emphasis>, select a folder where
search of available JBoss Application Servers should be started and click on
<emphasis><property
moreinfo="none">Ok</property></emphasis>: </para>
</listitem>
+</itemizedlist>
+
+ <figure float="0">
+ <title>Finding Servers in the Selected Directory</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_3_3_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para></para>
+
+ <itemizedlist>
+ <listitem><para> All available servers in the selected directory will be
added to the list with the following information specified: Name, Type, Version and
Location.
+ </para></listitem>
+ </itemizedlist>
+
+
+ <figure float="0">
+ <title>List of Servers Added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_3_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para></para>
+
+ <itemizedlist>
+ <listitem> <para>You can also add servers one by one using the
<emphasis><property
moreinfo="none">Add</property></emphasis> button:</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Add Server to be Configured</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_3_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para></para>
+
+<para>Click on <emphasis><property
moreinfo="none">Browse</property></emphasis> and select the
server location. Fields Name, Type and Version will be filled in
automatically:</para>
+
+ <figure float="0">
+ <title>Specify Server Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_3_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para></para>
+
+
+ <para>Click on <emphasis><property
moreinfo="none">Ok</property></emphasis>. The server is added to
the list with the details on its type, version and location.</para>
+
+
+
+ <para>The <emphasis><property
moreinfo="none">Remove</property></emphasis> button will the
remove the selected server from the list. If necessary, you can edit the server details
clicking on the <emphasis><property
moreinfo="none">Edit</property></emphasis> button:</para>
+
+ <figure float="0">
+ <title>Edit Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_3_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para></para>
+
+
+
+ <!-- <note>
+ <title>Note:</title>
+ <para>The installer installs JBoss Enterprise Application Platform for running
your applications
+ if you select this option during the installation process. If you want to use a
different server
+ than ours, you can change the setting in JBoss Developer Studio.</para>
+ </note>-->
+
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis><property
moreinfo="none">Next</property></emphasis>. Check your
installation paths and see the components to install. If you'd like to change
+ something, press the <emphasis>
+ <property moreinfo="none">Previous</property>
+ </emphasis> button. Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to start installation. </para>
+ </listitem>
+ </itemizedlist>
+
+ <para></para>
+
+ <figure float="0">
+ <title>Summary Information</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="jbds_jbosstools">
+
+ <title>JBoss Developer Studio and JBoss Tools</title>
+
+ <para>This section uncovers the points on the differences between <property
moreinfo="none">JBoss Developer
+ Studio</property> and <property moreinfo="none">JBoss
Tools</property> and provides the steps on <property
moreinfo="none">JBoss
+ Tools</property> installation as well.</para>
+
+ <section id="WhatDifferenceBetweenJBDSAndJBossTools">
+ <title>What is the difference?</title>
+
+ <para><property moreinfo="none">JBoss Tools</property> is
what went into our <property moreinfo="none">JBoss Developer
+ Studio</property> which comes as an easy-to-install Eclipse based IDE fully
configured and ready
+ to run with the bundled <property moreinfo="none">JBoss Enterprise
Application Platform</property>.</para>
+
+ <para>In short <property moreinfo="none">JBoss
Tools</property> are just a set of Eclipse plugins and
+ <property moreinfo="none">JBoss Developer Studio</property>
adds:</para>
+ <itemizedlist>
+ <listitem>
+ <para>An installer</para>
+ </listitem>
+ <listitem>
+ <para>Eclipse and Web Tools preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>JBoss EAP with JBoss AS and Seam preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>3rd party plugins bundled and configured</para>
+ </listitem>
+ <listitem>
+ <para>Access to RHEL and Red Hat Network</para>
+ </listitem>
+ <listitem>
+ <para>Access to the JBoss/Red Hat supported software</para>
+ </listitem>
+ </itemizedlist>
+ <para> For additional information see <ulink
url="http://www.jboss.com/products/devstudio">JBoss.com</...
+ </section>
+
+ <section id="JBossToolsInstall">
+ <title>JBoss Tools Installation</title>
+ <para>Here, let's consider the installation of the <property
moreinfo="none">JBoss Tools</property>
+ modules.</para>
+ <para><property moreinfo="none">JBoss Tools</property> is
an umbrella project for the JBoss developed plugins
+ that will make it into <property moreinfo="none">JBoss Developer
Studio</property>. The JBoss Tools modules are:</para>
+ <itemizedlist>
+ <listitem>
+ <para>JBoss AS Tools</para>
+ </listitem>
+ <listitem>
+ <para>Seam Tools</para>
+ </listitem>
+ <listitem>
+ <para>Hibernate Tools</para>
+ </listitem>
+ <listitem>
+ <para>Visual Page Editor</para>
+ </listitem>
+ <listitem>
+ <para>JST Tools</para>
+ </listitem>
+ <listitem>
+ <para>JBPM Tools</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>To install the JBoss Tools plugins for Eclipse, you need the
following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Get Eclipse and Web Tools</para>
+ </listitem>
+ </itemizedlist>
+ <para>The current version of JBoss Tools (3.0.0.GA) targets at Eclipse
3.4.2/Ganymede SR2 and WTP
+ 3.0.3+</para>
+
+ <tip>
+ <title>Tip:</title>
+ <para>We recommend you do not use
Eclipse.org update site to go from Eclipse
3.3 to Eclipse 3.4.
+ Instead we suggest that you download the full binary from <ulink
url="http://www.eclipse.org/downloads/">here</ulink>.&...
+ </tip>
+
+ <para>If you can only use Eclipse 3.3 use <ulink
url="http://www.jboss.org/tools/download/index.html#stable">... Tools
2.1.2</ulink>, but
+ JBoss Tools 2.x will not have any of the new features.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Remember to choose the download that matches your OS and use Java 5 when
you run
+ it.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>Get the <ulink
url="http://download.jboss.org/jbosstools/builds/nightly/latestBuild...
JBoss Tools build</ulink></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Some of our newer plugins, like TPTP and BIRT, need additional drivers. On
the left side of
+ the download page you can find all of the required drivers for chosen build and their
versions.</para>
+ <para>Instead of downloading the nightly build version manually, it's also
possible to
+ get the latest release of <property moreinfo="none">JBoss
Tools</property> from one of our update sites: <itemizedlist>
+ <listitem>
+ <para>Stable Updates: <ulink
url="http://download.jboss.org/jbosstools/updates/stable">ht...
+ </listitem>
+ <listitem>
+ <para> Development Updates: <ulink
url="http://download.jboss.org/jbosstools/updates/development"&...
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Finally, install the build</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Unzip the file(s) directly into your Eclipse <emphasis>
+ <property moreinfo="none">plugins/features</property>
+ </emphasis> directory and it will be readily available. It might be necessary
to start Eclipse
+ with eclipse -clean to make sure it starts clean and rereads the new list of
plugins.</para>
+
+ <para>If you need to install any standalone plug-in from JBoss Tools visit a
<ulink
url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools
Wiki</ulink> page to read
+ about dependencies between standalone plug-ins.</para>
+ </section>
+
+ </section>
+
+ <section id="Welcome">
+ <title>Welcome to JBoss Developer Studio</title>
+ <para>In this section we'll show you how to work with the welcome page of the
<property moreinfo="none">JBoss
+ Developer Studio</property>.</para>
+ <para>The welcome page is the first page you see when you first launch
<property moreinfo="none">JBoss Developer
+ Studio</property>. </para>
+
+ <figure float="0">
+ <title>Welcome to JBoss Developer Studio</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>With the help of its page you will be able:</para>
+ <itemizedlist>
+ <listitem>
+ <para>to get quick access to Getting Started Documentation (guides, tutorials
and
+ viewlets)</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Getting Started Documentation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to create new Seam projects, jBPM Process, JSF or Struts projects using
JBDS
+ wizards</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Create New...</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to get short description of perspectives that JBDS offers for more
productive
+ development</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Perspectives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/getting_started/getting_started_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to visit JBoss Developer Studio web resources.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Web Resources</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_9.png"
scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Start work with <property moreinfo="none">JBoss Developer
Studio</property> by clicking on <emphasis>
+ <property moreinfo="none">Workbench</property>
+ </emphasis> button or simply close the Welcome page.</para>
+
+ </section>
+
+ <section id="Upgrading">
+ <?dbhtml filename="Upgrading.html"?>
+ <title>Upgrading</title>
+ <para>To upgrade, just uninstall your current version and install the new
one.</para>
+ </section>
+
+ <section id="Uninstalling">
+ <?dbhtml filename="Uninstalling.html"?>
+ <title>Uninstalling</title>
+ <itemizedlist>
+ <listitem>
+ <para>Make sure <property moreinfo="none">JBoss Developer
Studio</property> is not running</para>
+ </listitem>
+ <listitem>
+ <para>Uninstall your current version of <property
moreinfo="none">JBoss Developer Studio</property> by running
+ Uninstaller</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="Support">
+ <?dbhtml filename="Support.html"?>
+ <title>Support</title>
+ <para>If you have comments or questions, you can discuss them at our <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
+ Developer Studio Forum</ulink>.</para>
+ <para>When writing to the forum for questions, please include the following
information:</para>
+ <orderedlist continuation="restarts" inheritnum="ignore">
+ <listitem>
+ <para>JBoss Developer Studio version</para>
+ </listitem>
+ <listitem>
+ <para>Exact error message</para>
+ </listitem>
+ <listitem>
+ <para>Steps to reproduce the issue</para>
+ </listitem>
+ </orderedlist>
+
+ <para><property moreinfo="none">JBDS</property> subscribers
can get necessary support on our <ulink
url="https://network.jboss.com/jbossnetwork/login.html">Support
Portal</ulink>.</para>
+ </section>
+
+
+ <section id="OtherRelevantResourcesOnTheTopic33">
+ <?dbhtml filename="OtherRelevantResourcesOnTheTopic33.html"?>
+ <title>Other relevant resources on the topic</title>
+ <para>JBDS on JBoss: <ulink
url="http://labs.jboss.com/rhdevstudio/">JBoss Developer
+ Studio</ulink></para>
+ <para>Forum: <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
+ Forum</ulink></para>
+ <para>Subscription: <ulink
url="https://www.redhat.com/apps/store/developers/jboss_developer_st...
+ Subscription</ulink></para>
+
+ <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
+ </section>
+
+</chapter>
+
+
+<chapter id="manage"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml"
xreflabel="manage">
+ <?dbhtml filename="manage.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Manage JBoss AS from JBoss Developer Studio</title>
+
+ <para>In this chapter we'll focus more on how to operate the <property
moreinfo="none">JBoss
+ AS</property> from <property moreinfo="none">JBoss
Developer Studio</property>.</para>
+ <para><property moreinfo="none">JBoss Developer
Studio</property> ships with <property moreinfo="none">JBoss EAP
+ v.4.2</property> bundled. When you followed the default installation of
<property moreinfo="none">JBoss
+ Developer Studio</property>, you should already have a JBoss EAP 4.3
Server installed and
+ defined. To run JBoss AS you need JDK 1.5, JDK 6 is not formally supported yet,
although
+ you may be able to start the server with it.</para>
+
+ <section id="JBossbundled">
+ <?dbhtml filename="JBossbundled.html"?>
+ <title>How to Manage the JBoss AS Bundled in JBDS</title>
+ <para>This section covers the basics of working with the <property
moreinfo="none">JBoss Server</property>
+ supported directly by <property
moreinfo="none">JBDS</property> via bundled AS plug-in. To read more
+ about AS plug-in, refer to the <ulink
url="../../as/html_single/index.html">Server Manager
+ guide</ulink>.</para>
+
+ <section id="StartingServer">
+ <?dbhtml filename="StartingServer.html"?>
+ <title>Starting JBoss Server</title>
+ <para>Starting <property moreinfo="none">JBoss
Server</property> is quite simple. <property moreinfo="none">JBoss
+ Developer Studio</property> allows you to control its behaviour
with the help of
+ a special toolbar, where you could start it in a regular or debug mode,
stop it or
+ restart it.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>To launch the server click the green-with-white-arrow
icon on the
+ <property moreinfo="none">JBoss Server View
</property>or right click server name in
+ this view and select <emphasis>
+ <property
moreinfo="none">Start</property>
+ </emphasis>. If this view is not open, select
<emphasis>
+ <property moreinfo="none">Window >
Show View > Other > Server
+ > JBoss Server View</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Starting from Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>While launching, server output is written to the <property
moreinfo="none">Console
+ view</property>:</para>
+
+ <figure float="0">
+ <title>Console Output</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is started you should see <emphasis>
+ <property moreinfo="none">Started</property>
+ </emphasis> in the square brackets right next its name in
<property moreinfo="none">JBoss Server
+ View</property>.</para>
+
+ <figure float="0">
+ <title>Server is Started</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <!--para>To see event log after the server is started, expand
<property>Event
+ Log</property> branch beneath <property>JBoss Server
View</property>:</para>
+ <figure>
+ <title>Event Log</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure-->
+ </section>
+
+ <section id="StoppingJBoss">
+ <?dbhtml filename="StoppingJBoss.html"?>
+ <title>Stopping JBoss Server</title>
+ <para>To stop the server, click the <emphasis>
+ <property moreinfo="none">Stop</property>
+ </emphasis> icon in <property moreinfo="none">JBoss
Server View</property> or right click the server
+ name and press <emphasis>
+ <property moreinfo="none">Stop</property>.
</emphasis></para>
+
+ <figure float="0">
+ <title>Stopping Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is stopped you will see <emphasis>
+ <property moreinfo="none">Stopped</property>
+ </emphasis> in the square brackets next to its name.</para>
+ </section>
+ <section id="ServerPreferences">
+ <?dbhtml filename="ServerPreferences.html"?>
+ <title>Server Container Preferences</title>
+ <para>You can control how <property
moreinfo="none">JBoss Developer Studio</property> interacts with
+ server containers in the <property moreinfo="none">Server
editor</property>. Double-click the server
+ to open it in the editor.</para>
+
+ <figure float="0">
+ <title>Server Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here you can specify some common settings: host name, server
name, runtime as well
+ as settings related to the publishing, timeouts and server
ports.</para>
+
+ </section>
+ </section>
+
+ <section id="JBossInstances">
+ <?dbhtml filename="JBossInstances.html"?>
+ <title>How to Use Your Own JBoss AS Instance with JBDS</title>
+ <para>Although <property moreinfo="none">JBoss Developer
Studio</property> works closely with
+ <property moreinfo="none">JBoss EAP 4.2</property>
we do not ultimately tie you to any particular
+ server for deployment. There are some servers that Studio supports directly
(via the
+ bundled Eclipse WTP plug-ins). In this section we discuss how to manage
self-installed
+ JBoss AS. Suppose you want to deploy the application to <property
moreinfo="none">JBoss 4.2.3
+ server</property>. First of all you need to install
it.</para>
+ <section id="JBossInstalling">
+ <?dbhtml filename="JBossInstalling.html"?>
+ <title>JBoss AS Installation</title>
+ <itemizedlist>
+ <listitem>
+ <para>Download the binary package of <property
moreinfo="none">JBoss 4.2.3</property> and save
+ it on your computer: <ulink
url="http://labs.jboss.com/jbossas/downloads">http://labs.jb...
+ </listitem>
+ </itemizedlist>
+ <para>It does not matter where on your system you install JBoss
server.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>The installation of JBoss server into a directory that has a
name containing
+ spaces provokes problems in some situations with Sun-based VMs. Try
to avoid
+ using installation folders that have spaces in their
names.</para>
+ </note>
+
+ <para>There is no requirement for root access to run JBoss Server on
UNIX/Linux systems
+ because none of the default ports are within the 0-1023 privileged port
+ range.</para>
+ <itemizedlist>
+ <listitem>
+ <para>After you have the binary archive you want to install,
use the JDK jar
+ tool (or any other ZIP extraction tool) to extract the
jboss-4.2.3.GA.zip
+ archive contents into a location of your choice. The
jboss-4.2.3.GA.tgz
+ archive is a gzipped tar file that requires a gnutar compatible
tar which
+ can handle the long pathnames in the archive. The extraction
process will
+ create a jboss-4.2.3.GA directory. </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="AddingJBossServer">
+ <?dbhtml filename="AddingJBossServer.html"?>
+ <title>Adding and Configuring JBoss Server</title>
+ <para>Now we should add just installed server into server manager in
<property moreinfo="none">JBoss
+ Developer Studio</property>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the <property moreinfo="none">JBoss
Server View</property> by selecting <emphasis>
+ <property moreinfo="none">Window >
Show View > Other > Server
+ > JBoss Server View</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Right click anywhere in this view and select
<emphasis>
+ <property moreinfo="none">New
Server</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss Community
> JBoss 4.2 Server</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Selecting Server Type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+
+ <para>Now in the <property moreinfo="none">New
Server wizard</property> there is a separation
+ between the .org servers (the <emphasis>
+ <property moreinfo="none">JBoss
Community</property>
+ </emphasis> category) and product server that comes bundled
with JBoss EAP (the
+ <emphasis>
+ <property moreinfo="none">JBoss Enterprise
Middleware</property></emphasis> category).</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>To create a new runtime, which Jboss AS 4.2 matches to,
click <emphasis>
+ <property
moreinfo="none">Next</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the next step make <property
moreinfo="none">JBoss Developer Studio</property> to know
+ where you have installed the Server and define JRE.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Defining JBoss Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>When adding a new server you will need to specify what JRE to
use. It is
+ important to set this value to a full JDK, not JRE. Again, you need a
full JDK
+ to run Web applications, JRE will not be enough.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the next dialog verify the specified information and
if something is
+ unfair go back and correct it</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Configuring Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the last wizard's dialog modify the projects that
are
+ configured on the server and click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Configuring Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>A new <property moreinfo="none">JBoss
Server</property> should now appear in the <property
moreinfo="none">JBoss
+ Server view</property>.</para>
+ <figure float="0">
+ <title>New JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/manage/manage_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now, we are ready to create the first web
application.</para>
+ </section>
+
+ </section>
+</chapter>
+
+
+<chapter id="first_seam"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml"
xreflabel="first_seam">
+ <?dbhtml filename="first_seam.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Write Your First Project with JBoss Developer Studio</title>
+
+ <para>This chapter is a set of hands-on labs. You get step-by-step information
about how the JBoss
+ Developer Studio can be used during the development process.</para>
+
+ <section id="create_seam_application">
+ <title>Create a Seam Application</title>
+
+ <para>In this section you get to know how to create a Seam project in JBDS, how
to start the
+ server and what a structure your project has after creating.</para>
+
+ <section id="start_dev_db">
+ <title>Start Development Database</title>
+
+ <para>Before opening the JBoss Developer studio you need to <ulink
url="http://anonsvn.jboss.org/repos/jbosstools/trunk/documentation/g...
and start a Workshop Database.</para>
+ <para>To start the database just run <property
moreinfo="none">./runDBServer.sh</property> or
+ <property moreinfo="none">runDBServer.bat</property> from
the database directory.</para>
+ <para>The end result should be a console window that looks
like:</para>
+
+ <figure float="0">
+ <title>Starting DataBase</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="create_deploy_seam">
+ <title>Create and deploy Seam Web Project</title>
+
+ <para>Minimize the terminal window and run the <property
moreinfo="none">JBoss Developer Studio</property>
+ from Applications Menu or from the desktop icon.</para>
+ <para>First of all you get the Workspace Launcher. Change the default
workspace location if
+ it's needed. Click on <property
moreinfo="none">Ok</property>. </para>
+
+ <figure float="0">
+ <title>Workspace Launcher Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After startup, you see the welcome page. You could read how to work
with welcome pages
+ in <link linkend="Welcome">previous</link> chapter. Now
select <property moreinfo="none">Create
+ New...</property> icon and then press on <property
moreinfo="none">Create Seam Project</property>
+ link.</para>
+
+ <para>The <property moreinfo="none">New Seam Project
wizard</property> is started. You need to enter a name
+ (e.g., "workshop") and a location directory for your new project. The
+ wizard has an option for selecting the actual Server (and not just WTP runtime)
that will be
+ used for the project. This allows the wizard to correctly identify where the
needed
+ datasource and driver libraries need to go.</para>
+
+ <figure float="0">
+ <title>New Seam Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>All settings are already specified here, you can just modify the
Configuration. Click on
+ the <emphasis>
+ <property moreinfo="none">Modify...</property>
+ </emphasis> button to configure your custom facets pattern:</para>
+
+
+ <figure float="0" id="ProjectFacetsSpecifyingScreen">
+ <title>Project Facets Specifying</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the whole the dialog allows to select the "features" you
want to use in your project.
+ Doing this <property moreinfo="none">JBoss Developer
Studio</property> setups the appropriate tooling for
+ your project. Since JBoss Seam integrates all popular Java EE frameworks, you can
select any
+ combination of technologies from the list. Here, for the default configuration,
Dynamic Web
+ Module, Java, JavaServer Faces (JSF), and Seam Facet are already selected for a
typical
+ database-driven web application. The default project facets should
suffice.</para>
+
+ <para>In the <property moreinfo="none">Project
Facets</property> form you can also bring up server runtimes
+ panel by clicking <property moreinfo="none">
Runtimes</property> tab on the right corner. This panel shows
+ available server runtimes.</para>
+
+ <figure float="0">
+ <title>Runtimes Selecting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to proceed further.</para>
+
+ <para>A dynamic web application contains both web pages and Java code. The
wizard will ask you
+ where you want to put those files. You can just leave the default values or
choose another
+ folder.</para>
+
+ <figure float="0">
+ <title>Web Module Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next form, you will be able to select where those library JARs
come from. The
+ easiest is just to select the JARs provided by the JBoss AS runtime associated
with this
+ project. That is why it is important to chose the right JBoss AS 4.2 runtime in
the project
+ setup window.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Check <emphasis>
+ <property moreinfo="none">Server Supplied JSF
Implementation</property>
+ </emphasis>. We will use <ulink
url="../../seam/html_single/index.html#addJSFCapab">JSF
+ implementation</ulink> that comes with JBoss server</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JSF Capabilities Adding</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Next wizard step needs more settings that previous. Let's start
with
+ <property moreinfo="none">General</property>
section.</para>
+ <para>Leave the default Seam runtime and check a WAR
deployment.</para>
+
+ <figure float="0">
+ <title>Seam Facet Setting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Next <property
moreinfo="none">Database</property> section is a little tricky. The
<property moreinfo="none">Connection
+ Profile</property> needs to be edited so that the new project works
properly with the
+ external HSQLDB server. By default the project wizard tries to use the JBoss
embedded
+ HSQLDB, but the tutorial uses an external database to replicate a more real
world
+ development scenario. Click on <property
moreinfo="none">Edit</property> to modify the Connection
+ Profile.</para>
+
+ <figure float="0">
+ <title>DataBase Setting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam8_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select <property moreinfo="none">JDBC Connection
Properties</property>. Make sure the URL is set to <emphasis>
+ <property
moreinfo="none">jdbc:hsqldb:hsql://localhost:1701</property>
+ </emphasis></para>
+
+ <figure float="0">
+ <title>JDBC Connection Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Try click on <property moreinfo="none">Test
Connection</property> button. It probably won’t work. This
+ happens if the hsql jdbc driver is not exactly the same. This can be worked
around by
+ modifying the HSQLDB database driver settings. To modify the settings, click the
+ <property moreinfo="none">“...”</property> next to the
drop-down box.</para>
+
+ <para>The proper Driver JAR File should be listed under <property
moreinfo="none">Driver File(s)</property>.
+ Select the hsqldb.jar file found in the database/lib directory and click on
+ <property moreinfo="none">Ok</property>.</para>
+
+ <figure float="0">
+ <title>Driver Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select <property moreinfo="none">Hypersonic
DB</property> and click on <property
moreinfo="none">Ok</property>. Again,
+ this only happens if the selected hsqldb.jar is different from the running
database.</para>
+
+ <figure float="0">
+ <title>Hypersonic DB Selecting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, the <property moreinfo="none">Test
Connection</property> should succeed. After testing the
+ connection, click on Ok.</para>
+
+ <figure float="0">
+ <title>Connection Testing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can leave the <property moreinfo="none">Code
Generation</property> section as is. It refers to Java
+ packages in which the generated code will be placed.</para>
+
+ <figure float="0">
+ <title>Code Generation Setting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on <property
moreinfo="none">Finish</property> button. Now, there should be a new
Seam project
+ called “workshop” listed in Package Explorer view.</para>
+
+ <figure float="0">
+ <title>"worskhop" Project in the Package Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="start_JBossAS">
+ <title>Start JBoss Application Server</title>
+
+ <para>The complete information on how to manage JBoss AS from JBoss Developer
Studio you can
+ read in a <link linkend="manage">corresponding
chapter</link>.</para>
+ <para>Now you just need to start the server by clicking on green
circle/triangle icon in the
+ JBoss Server View.</para>
+
+ <figure float="0">
+ <title>Starting the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Then run the project by selecting the project and use
<emphasis><property moreinfo="none">Run As... >
+ Run on Server</property>.</emphasis></para>
+
+ <note>
+ <title>Note:</title>
+ <para>If the project does not show up, then you can use a normal browser
and use <emphasis>
+ <property
moreinfo="none">http://localhost:8080/workshop/home.seam</property>
+ </emphasis> as the url.</para>
+ </note>
+
+ <para>Your project looks like this:</para>
+
+ <figure float="0">
+ <title>"workshop" Project Started</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="workshop_code_overview">
+ <title>Workshop Project Code Overview</title>
+
+ <para>Now let's examine the project and its structure. Go back to the
Package Explorer view in
+ JBoss Developer Studio.</para>
+
+ <para>It seems like it's not much for project but this shell application
contains a login
+ screen with default login logic, a menu template that can be further modified,
and other
+ layout templates.</para>
+
+ <para>It's important to note that the business logic will reside in the
<emphasis>
+ <property moreinfo="none">src/hot</property>
+ </emphasis> folder, by default. And, the package naming conventions that
were used in <property moreinfo="none">New Seam
+ project wizard</property> could have been changed to something different
from <emphasis>
+ <property
moreinfo="none">org.domain.workshop.session</property>.
+ </emphasis> Also, notice that there is a default <property
moreinfo="none">Authenticator. java</property>
+ file. This is where custom security logic can be added. Seam has a nice
declarative security
+ model that we will explore in a bit more detail later on. The <emphasis>
+ <property moreinfo="none">src/main</property>
+ </emphasis> folder is a model directory. It stores the project's JPA
entity beans.</para>
+
+ <figure float="0">
+ <title>Project Structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The view tier of the
+ application is also important. Seam uses facelets and there is a built-in
facelets GUI
+ editor that has some nice WYSIWYG and component drag/drop functionality. Try this
out by
+ opening <property moreinfo="none">home.xhtml</property>
from <property moreinfo="none">WebContent</property>
folder.</para>
+
+ <figure float="0">
+ <title>Facelets GUI Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam18.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Notice that the templates reside in the <emphasis>
+ <property moreinfo="none">WebContent/layout</property>
+ </emphasis> folder. There is a stylesheet in the <emphasis>
+ <property
moreinfo="none">WebContent/stylesheet</property>
+ </emphasis> folder. There is also a login and default error page. The
Facelet editor will be
+ explored in more detail later in the lab.</para>
+
+ <para>The project already has a datasource that was created per the Seam
project wizard
+ database settings. And, obviously all of the Seam specific configuration files
and JAR
+ dependencies are included and placed in the proper locations. On last noteworthy
line item
+ is related to the build script. There isn’t a build script because the Eclipse
WTP(Web Tools
+ Project) plugin is used to publish web application changes. As you can see, JBoss
Developer
+ Studio is removing a great deal of complexity from the enterprise Java project
+ setup/deployment process. The end result is a developer that is writing code, not
spending
+ days/weeks trying to figure out how to get a decent development environment and
project
+ build process.</para>
+
+ </section>
+
+ </section>
+
+
+ <section id="seam_action_dev">
+ <title>Seam Action Development</title>
+
+ <para>Now, it’s time to write some code. The good news is that JBoss Developer
Studio can also
+ help out in this respect. In this section, we will create a new Seam Action POJO
and facelet
+ with some custom business logic and some GUI changes.</para>
+
+ <section id="create_seam_action">
+ <title>Create a New Seam Action</title>
+
+ <para>Go to main menu bar and click on <emphasis>
+ <property moreinfo="none">File > New > New Seam
Action</property>
+ </emphasis> to start the New Seam Action wizard.</para>
+
+ <para>Specify a <property moreinfo="none">Seam component
name</property> (e.g., "myAction").
+ The other properties will be auto-completed for you so there is no need to change
them.
+ Click on <property
moreinfo="none">Finish</property>.</para>
+
+ <figure float="0">
+ <title>New Seam Action Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, open the <property
moreinfo="none">MyAction.java</property> file and replace the
+ "myAction" method with this logic:</para>
+
+ <programlisting format="linespecific"><![CDATA[public void
myAction() {
+Calendar cal = Calendar.getInstance();
+log.info("myAction.myAction() action called");
+facesMessages.add("MyAction Executed on:" + cal.getTime());
+}]]></programlisting>
+
+ <para>You also need to import the <property
moreinfo="none">java.util.Calendar</property> class by clicking
+ <emphasis><property moreinfo="none">CTRL + Shift +
O</property>.</emphasis></para>
+
+ </section>
+
+ <section id="test_seam_action">
+ <title>Test Seam Action</title>
+
+ <para>The new action can be tested by browsing the workshop-test project.
JBoss Developer
+ Studio has already created a TestNG test case for you.</para>
+
+ <figure float="0">
+ <title>"workshop-test" Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam20.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The test case simulates a Seam component/method execution for the
+ <property moreinfo="none">MyAction.myAction()</property>
logic.</para>
+ <para>To run the test case, right click on <property
moreinfo="none">MyActionTest.xml</property> and click <emphasis>
+ <property moreinfo="none">Run As > TestNG
Suite</property>
+ </emphasis> or use the <property moreinfo="none">Run
As...</property> toolbar shortcut as shown
+ below.</para>
+
+ <figure float="0">
+ <title>TestNG Running</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>With any luck, the test case will pass. Look at the TestNG
view.</para>
+
+ <figure float="0">
+ <title>TestNG Results</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, it’s safe to test the new Seam Action in a web browser. The
fastest way to do that
+ is to right click on <property
moreinfo="none">myAction.xhtml</property> and use <emphasis>
+ <property moreinfo="none">Run As... > Run On
Server</property>
+ </emphasis> which will show the appropriate url in the browser.
Alternatively you can
+ manually enter <emphasis>
+ <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> into a browser.</para>
+
+ <figure float="0">
+ <title>Seam Action in a Web Browser</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam23.png"
scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="modify_seam_action">
+ <title>Modify Seam Action User Interface</title>
+
+ <para>Browse to <emphasis>
+ <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> and click on <property
moreinfo="none">myAction</property>. This executes the “myAction”
method.
+ This looks pretty good, but we could make this page look a little
better.</para>
+
+ <para>Open <emphasis>
+ <property
moreinfo="none">WebContent/myAction.xhtml</property>
+ </emphasis> in JBoss Developer Studio to use the nice facelets
editor.</para>
+
+ <figure float="0">
+ <title>Open Seam Action with Editor </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Right click on the "myAction!" button in the visual part of
editor and
+ select <property moreinfo="none"><h:commandButton>
Attributes</property>.</para>
+
+ <figure float="0">
+ <title>Seam Action Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Change the <property
moreinfo="none">value</property> of the button to something different.
If desired,
+ you can change any other text on the page. Then, type <emphasis>
+ <property moreinfo="none">CTRL + S</property>
+ </emphasis> to save the facelet.</para>
+
+ <figure float="0">
+ <title>Attributes Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Refresh <emphasis>
+ <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> and now you should see your changes.</para>
+
+ <para>Notice that you did not have to publish the application. JBoss
Developer Studio
+ auto-published it for you.</para>
+
+ <figure float="0">
+ <title>Seam Action Is Modified</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam27.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+
+ </section>
+
+ <section id="declarative_security">
+ <title>Declarative Security</title>
+
+ <para>In this section you will see how it’s easy to secure the facelets and
facelet components
+ in Seam. Let’s go ahead and secure the action button, then we will secure the
entire
+ page.</para>
+
+ <section id="edit_login">
+ <title>Edit Login Authentication Logic</title>
+
+ <para>There is a class called <property
moreinfo="none">Authenticator.java</property>. The login page will
+ execute the <property
moreinfo="none">Authenticator.authenticate()</property> method by
default, so we’ll
+ start by adding some custom login logic.</para>
+ <para>Open <property
moreinfo="none">Authenticator.java</property> in JBoss Developer Studio
and replace the
+ <property moreinfo="none">authenticate()</property>
method with this code:</para>
+
+ <programlisting format="linespecific"><![CDATA[public boolean
authenticate() {
+if (identity.getUsername().equals("admin")
+&& identity.getPassword().equals("password")) {
+identity.addRole("admin");
+return true;
+}
+else
+return true;
+}]]></programlisting>
+
+ </section>
+ <section id="secure_seam_page">
+ <title>Secure Seam Page Component</title>
+
+ <para>Open <property
moreinfo="none">myAction.xhtml</property> and add a new secured command
button:</para>
+ <programlisting
format="linespecific"><![CDATA[<h:commandButton
id="myActionSecured"
+value="Secured Action Button"
+action="#{myAction.myAction}"
+rendered="#{s:hasRole('admin')}"/>]]></programlisting>
+
+ <para>Refresh <emphasis>
+ <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> If you are not logged in you will only see one button. If you
are logged in,
+ there will be two buttons.</para>
+
+
+ <figure float="0">
+ <title>One Button on a Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam28.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The secured button is not visible because the user isn’t logged in as
+ <property
moreinfo="none">"admin"</property>.</para>
+
+ <figure float="0">
+ <title>Secured Button is Visible</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam29.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The user is logged in as <property
moreinfo="none">"admin"</property>. Securing
+ components is easy but securing pages is pretty simple as well. </para>
+ <para>Open <emphasis>
+ <property
moreinfo="none">WebContent/WEB-INF/pages.xml</property>
+ </emphasis>. Then add this markup directly underneath the
<pages>
+ element:</para>
+
+ <programlisting format="linespecific"><![CDATA[<page
view-id="/myAction.xhtml"
login-required="true"/>]]></programlisting>
+
+ <para>Refresh <emphasis>
+ <property
moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> If you are not logged in you will get bounced back to the login
page.</para>
+
+ <figure float="0">
+ <title>Login Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam30.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Thus, if you enter login credentials for the
+ <property moreinfo="none">"admin"</property>
user, you will be re-directed to the
+ secured page and secured component. If you enter different login credentials,
page access
+ will be granted, but the secured component will not be displayed.</para>
+
+ <para>Congratulations! You have secured your new action both at the facelet
component and page
+ level. You also added custom authentication logic to the login
action.</para>
+
+ </section>
+
+ </section>
+
+ <section id="browsing_workshop_db">
+ <title>Browsing Workshop Database</title>
+
+ <para>In this section you get to know how to use the workshop database that was
started at the
+ beginning of the lab.</para>
+
+ <section id="database_connectivity">
+ <title>Database Connectivity Setup</title>
+
+ <para>The workshop data can be browsed inside of JBoss Developer
Studio.</para>
+
+ <para>To open the Data Source Explorer, click on <emphasis><property
moreinfo="none">Window > Open Perspective
+ > Other > Database
Development</property>.</emphasis></para>
+ <para>In the Data Source Explorer, expand a <property
moreinfo="none">Databases</property> node and select a
+ <property moreinfo="none">Default</property> database.
Right click on it, select
+ <property moreinfo="none">Connect</property> from the
context menu.</para>
+
+ <figure float="0">
+ <title>Data Source Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam31.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="browsing_workshop_db2">
+ <title>Browse Workshop Database</title>
+
+ <para>Then in the current view, drill down to the <property
moreinfo="none">CUSTOMERS</property> table.</para>
+
+ <figure float="0">
+ <title>"CUSTOMERS" Table</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam32.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Right click on <property
moreinfo="none">CUSTOMERS</property>, select <emphasis>
+ <property moreinfo="none">Data > Sample
Contents</property>
+ </emphasis> to view the data in the table.</para>
+
+ <para>There should be a SQL Results view on the workbench, but it could be
hidden. Click on
+ the <property
moreinfo="none">"Result1"</property> tab in the right side
and you should
+ see the data in the CUSTOMERS table.</para>
+
+
+ <figure float="0">
+ <title>SQL Results View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam33.png"
scale="92"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>If you can’t find the SQL Results view tab, click on
<emphasis><property moreinfo="none">Window > Show
+ View > Other > SQL Development > SQL
Results</property>.</emphasis></para>
+ </note>
+
+ <para>Congratulations! You just connected to the workshop database and
queried the content
+ using Database Explorer tools.</para>
+
+ </section>
+
+ </section>
+
+ <section id="db_programming">
+ <title>Database Programming</title>
+
+ <para>Now, it’s time to reverse engineer the workshop database into a fully
functioning Seam
+ CRUD(Create Read Update Delete) application.</para>
+
+ <section id="reverse_engineer_crud">
+ <title>Reverse Engineer CRUD from a Running Database</title>
+
+ <para>In <property moreinfo="none">JBoss Developer
Studio</property>, switch to <property moreinfo="none">Seam
+ perspective</property>, and then right-click the project and select
+ <emphasis><property moreinfo="none">New > Seam
Generate Entities</property>.</emphasis></para>
+
+ <para>"workshop" project in the <property
moreinfo="none">Seam Generate Entities
+ wizard</property> will be selected automatically. There is no need to
change something
+ more, click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to proceed further.</para>
+
+ <figure float="0">
+ <title>Generate Seam Entities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam34.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next page use the <emphasis>
+ <property moreinfo="none">Include</property>
+ </emphasis> button to include all the tables from the database and click
<emphasis>
+ <property
moreinfo="none">Finish</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Selecting Tables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam34a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After running the Generate Entities action, you will see new
<emphasis>
+ <property
moreinfo="none">org.domain.workshop.entity</property>
+ </emphasis> classes. These classes represent insert/update/delete/query
logic.</para>
+
+ <figure float="0">
+ <title>org.domain.workshop.entity Classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam35.png"
scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>There are also <emphasis>
+ <property
moreinfo="none">org.domain.workshop.entity</property>
+ </emphasis> package that contains the JPA classes. These are the entity
beans that are
+ mapped to database tables.</para>
+
+ <para>Last, but not least, there are facelets for all of the CRUD screens.
The best way to get
+ a feel for the generated code is to open a browser and play around with the
application. Go
+ to <emphasis>
+ <property
moreinfo="none">http://localhost:8080/workshop</property>
+ </emphasis> and insert/update/delete/query a few records. There is quite a
bit of AJAX in
+ this application, but which we will explore further later on in the lab. For now,
take note
+ of the page tabs, required field logic and data table sorting in the list pages.
</para>
+
+ <figure float="0">
+ <title>CustomersList.xhtml in the Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam36.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Congratulations! You now have a fully functioning CRUD application that
is already AJAX
+ enabled.</para>
+
+ </section>
+
+ <section id="use_hibernate_tools">
+ <title>Use Hibernate Tools to Query Data via JPA</title>
+
+ <para>Now, it's time to write some JPA queries using the Hibernate
perspective in
+ <property moreinfo="none">JBoss Developer
Studio</property>.</para>
+ <para>In the upper right corner of the workbench there is a small icon (see
the figure below),
+ click on it and choose <property
moreinfo="none">Hibernate</property>.</para>
+
+ <figure float="0">
+ <title>Hibernate Perspective</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam37.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Look at the Hibernate Configurations view. In the "workshop"
project,
+ drill down on the <property moreinfo="none">Session
Factory</property> and notice that the JPA
+ entities/attributes are listed in a nice tree view.</para>
+
+ <figure float="0">
+ <title>Hibernate Configurations View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam38.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Right click on the <property moreinfo="none">Session
Factory</property> and select <property moreinfo="none">HQL
+ Editor</property>. This will open a JPA query scratch pad
window.</para>
+
+ <para>Write your query and click on the "Hibernate Dynamic SQL
Preview" tab.
+ You should see the SQL that will be executed if this JPA query is
run.</para>
+
+ <figure float="0">
+ <title>JPA Query Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam39.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Run the query by clicking on the green run icon.</para>
+
+ <para>The results are listed in the "Hibernate Query Result" tab.
There is a
+ "Properties" tab in the workbench that can be used to see a specific
JPA
+ result. These results represent the JPA objects because our query did not specify
column
+ names.</para>
+
+ <figure float="0">
+ <title>Hibernate Query Result View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam40.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The query can be refined, and take note that there is nice code
completion in the JPA
+ query editor.</para>
+
+ <figure float="0">
+ <title>Code Completion</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam41.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>A refined query will return results that are more ResultSet oriented.
Notice the join
+ logic that JPA supports.</para>
+
+ <figure float="0">
+ <title>The Results</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam42.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>There was no need to specify an <property
moreinfo="none">Employees</property> table in the
+ <property moreinfo="none">from</property> part of the JPA
query because JPA supports reference traversal
+ via Java class attribute references. Not only are JPA and HQL queries fully
supported, but
+ Criteria based queries can also be written in the Criteria Editor. You should
spend some
+ time tinkering with different queries and possibly Criteria based queries, even
though the
+ instructions are not provided in this lab.</para>
+
+ <figure float="0">
+ <title>Criteria Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam43.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="use_hibernate_to_vizualize">
+ <title>Use Hibernate Tools to visualize the Data Model</title>
+
+ <para>Now, it’s time to view the data model for the workshop
database.</para>
+
+ <para>In the Hibernate Configurations view, select "workshop"
project and
+ expand the <property
moreinfo="none">Configuration</property> node. Select the
+ <property moreinfo="none">Customers</property> entity,
right click on it, choose <property moreinfo="none">Open Mapping
+ Diagram</property>.</para>
+
+ <figure float="0">
+ <title>Mapping Diagram Opening</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam44.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You see a Diagram tab for the CUSTOMERS table and any tables that have
FK references.
+ This is a handy way to view the data model and JPA mappings. Now, you’ve got
access to
+ something that the Erwin Data Modeler can’t do.</para>
+
+
+ <figure float="0">
+ <title>Diagram Tab</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam45.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+
+ <section id="rich_components">
+ <title>Rich Components</title>
+
+ <para>This lab will conclude with one last AJAX twist. In this section we add a
RichFaces
+ <property moreinfo="none">inputNumberSlider</property> to
the Order Details edit screen.</para>
+
+ <section id="add_richfaces">
+ <title>Add a Richfaces component to the CRUD Application</title>
+
+ <para>Switch to Seam perspective, open <emphasis>
+ <property
moreinfo="none">WebContent/OrderdetailsEdit.xhtml</property>
+ </emphasis> in JBoss Developer Studio.</para>
+ <para>Change the form field values using the visual editor. Seam has
generated the form field
+ names that match the database column names. This is not ideal for business
users.</para>
+
+ <figure float="0">
+ <title>Form Fields Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam46.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Also, replace the QTY Ordered input field with a <property
moreinfo="none">inputNumberSlider</property>.
+ You can use the JBoss Developer Studio palette or right click on the form and
insert the
+ RichFaces component.</para>
+
+ <figure float="0">
+ <title>RichFaces Component Inserting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam47.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>One the last option is to use the source view and manually copy the
inputNumberSlider
+ markup listed below:</para>
+
+ <programlisting
format="linespecific"><![CDATA[<rich:inputNumberSlider
id="quantityOrdered" required="true"
+
value="#{orderdetailsHome.instance.quantityordered}"/>]]></programlisting>
+
+ <figure float="0">
+ <title>Adding the Source</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/first_seam/first_seam48.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The end result is an edit page that has better form labels and a new
RichFaces
+ control.</para>
+
+ <figure float="0">
+ <title>The Result Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam49.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Congratulations! You have completed the JBoss Developer Studio
lab.</para>
+
+ </section>
+
+ </section>
+</chapter>
+
+
+<chapter id="jsp_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml"
xreflabel="jsp_application">
+ <?dbhtml filename="jsp_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSP</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Developing a simple JSP web application</title>
+
+ <note>
+ <title>Note:</title>
+ <para>We highly recommend developing in <property
moreinfo="none">Seam</property>. This chapter is for users
+ who for some reason cannot use Seam.</para>
+ </note>
+
+ <para>In this chapter you'll find out how to create a simple <ulink
url="http://java.sun.com/products/jsp/">JSP</ulink> application using
the
+ <property moreinfo="none">JBoss Developer Studio</property>. The
application will show a classic
+ "Hello World!" on the page.</para>
+ <para>We'll assume that you have already launched <property
moreinfo="none">JBoss Developer
+ Studio</property> and also that the <property moreinfo="none">Web
Development</property> perspective is the
+ current perspective. If not, make it active by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective >
Web Development</property>
+ </emphasis> from the menu bar or by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective >
Other...</property>
+ </emphasis> from the menu bar and then selecting Web Development from the Select
Perspective
+ dialog box.</para>
+
+ <section id="SettingUpTheProject">
+ <?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para>We are going to start with the creating a Dynamic Web Project with a
minimal
+ structure, i.e. with just required facets. Thus this section will perform you all
+ necessary steps on how to do this.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Go to the menu bar and select <emphasis>
+ <property moreinfo="none">File > New >
Other...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Web > Dynamic Web
Project</property>
+ </emphasis> in the New Project dialog box</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Enter "jspHello" as a project name</para>
+ </listitem>
+ <listitem>
+ <para>Then select <emphasis>
+ <property moreinfo="none">Minimal Configuration</property>
+ </emphasis> from the list of possible configurations and click
<emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create New Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">jspHello</property>
+ </emphasis> node should appear in the upper-left <property
moreinfo="none">Package Explorer</property>
+ view.</para>
+ <figure float="0">
+ <title>New Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="CreatingJSPPage">
+ <?dbhtml filename="CreatingJSPPage.html"?>
+ <title>Creating JSP Page</title>
+ <para>This section covers all the points how to create, edit and then preview JSP
page.</para>
+ <para>In our simple application we need to create only one JSP page which
displays a
+ <emphasis>"Hello World!"</emphasis> message.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis><property
moreinfo="none">WebContent > New >
+ JSP</property>. </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type "hello.jsp" for a file name and click the
<emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>In the next window you can choose a template for your jsp page and see its
preview.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">New JSP File (xhtml)</property>
+ </emphasis> template and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create JSP Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Our <emphasis><property
moreinfo="none">hello.jsp</property></emphasis> page will now
appear in
+ <property moreinfo="none">Project Explorer</property>.
+ </para>
+ <section id="EditingJSPPage">
+ <?dbhtml filename="EditingJSPPage.html"?>
+ <title>Editing a JSP Page</title>
+ <para>Let's now make a little change so that a jsp page displays
+ <emphasis>"Hello World!"</emphasis> message.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Insert this line inside the <emphasis role="bold">
+ <property moreinfo="none"><body></property>
+ </emphasis><emphasis role="bold">
+ <property moreinfo="none"></body></property>
+ </emphasis> tag: </para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<% System.out.println("Hello World!");
%>]]>
+</programlisting>
+
+ <para>Notice that content assist functionality is always available when you are
typing:</para>
+ <figure float="0">
+ <title>Content Assist in JSP Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After changes made your <emphasis>
+ <property moreinfo="none">hello.jsp</property>
+ </emphasis> page should look like this:</para>
+ <figure float="0">
+ <title>Hello.jsp Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>This line will actually output <emphasis>"Hello
+ World!"</emphasis> message in the <property
moreinfo="none">Console</property>. To make the
+ message displayed in the Browser, just replace this line with the simple
+ <emphasis>Hello World!</emphasis>.</para>
+ </section>
+
+ <section id="WebXML">
+ <?dbhtml filename="WebXML.html"?>
+ <title>web.xml file</title>
+ <para>When you are creating web project the wizard creates the <emphasis>
+ <property moreinfo="none">web.xml</property>
+ </emphasis> for you automatically. The <property
moreinfo="none">web.xml file editor</property>
+ provided by <property moreinfo="none">JBoss Developer
Studio</property> is available in two modes:
+ <property moreinfo="none">Tree</property> and <property
moreinfo="none">Source</property>.</para>
+ <figure float="0">
+ <title>Web.xml in Design and Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_6.png"
scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Both modes are fully synchronized. Let's add mapping to our
<emphasis>
+ <property moreinfo="none">hello.jsp</property>
+ </emphasis> page in <emphasis>
+ <property moreinfo="none">web.xml</property>
+ </emphasis> file.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to <property
moreinfo="none">Source</property> tab.</para>
+ </listitem>
+ <listitem>
+ <para>Add the next code into <emphasis role="bold">
+ <property
moreinfo="none"><welcome-file-list></property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<welcome-file>hello.jsp</welcome-file>
+]]></programlisting>
+ <para>If you come back to <property
moreinfo="none">Tree</property> mode you will see that the changes
+ made are automatically reflected in that mode.</para>
+ <para>Actually you don't really need to do any configurations right
now.</para>
+ </section>
+
+ <section id="DeployTheProject">
+ <?dbhtml filename="DeployTheProject.html"?>
+ <title>Deploying the project</title>
+ <para>While creating any web project you could experience a pain writing ant
scripts and
+ managing the packaging even when writing the most trivial web applications. With
+ <property moreinfo="none">JBoss Developer Studio</property>
you are saved from such a pain. All
+ you need is to start <property moreinfo="none">JBoss
Server</property> and launch your application
+ in your favorite browser.</para>
+ <para>You can also create a war archive with <ulink
url="../../as/html_single/index.html#Project_archivesView">JBDS's Archive
Tools</ulink>
+ and export it to any web server.</para>
+ <section id="WarConfig">
+ <?dbhtml filename="WarConfig.html"?>
+ <title>WAR Config</title>
+ <para>Project archives managing is available through <ulink
url="../../as/html_single/index.html#Project_archivesView">Project Archives
view</ulink>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Window > Show view >
Other > JBoss
+ Tools > Project archives</property>
+ </emphasis> from menu bar</para>
+ </listitem>
+ <listitem>
+ <para>Select a project in Package Explorer you want to be
archived</para>
+ </listitem>
+ </itemizedlist>
+ <para>In <property moreinfo="none">Project
Archives</property> you will see available archive types
+ for the project:</para>
+ <figure float="0">
+ <title>Project Archives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click, for example, <emphasis>
+ <property moreinfo="none">WAR</property>
+ </emphasis> option to create war archive</para>
+ </listitem>
+ </itemizedlist>
+ <para>In the <property moreinfo="none">New WAR</property>
dialog you can see automatically selected
+ default values.</para>
+ <figure float="0">
+ <title>New WAR Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to see a stub archive configuration for your project: <figure
float="0">
+ <title>Stub Archive Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>.
</emphasis> The
+ <emphasis>.war</emphasis> file will appear in <property
moreinfo="none">Package
+ Explorer</property> and also in <property
moreinfo="none">Project Archives</property>
+ view as structure tree: <figure float="0">
+ <title>Archive is Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Archive in Project Archives View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>Via <property moreinfo="none">Project
Archives</property> view you could now edit your
+ archive, add new folders, publish to server, and so on:</para>
+ <figure float="0">
+ <title>Configure Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="AutoRedeploy">
+ <?dbhtml filename="AutoRedeploy.html"?>
+ <title>Auto redeploy</title>
+ <para>When you are creating a web application and register it on <property
moreinfo="none">JBoss
+ Server</property> it is automatically deployed into
+ <emphasis>/deploy</emphasis> directory of the server. JBDS comes with
the
+ feature of auto-redeploy. It means that you don't need to restart
+ <property moreinfo="none">JBoss Server</property>. Any
changes made in the application in
+ exploded format will trigger a redeployment on the server.</para>
+ </section>
+ </section>
+
+ <section id="Previewtab">
+ <?dbhtml filename="Previewtab.html"?>
+ <title>JSP Page Preview</title>
+ <para><property moreinfo="none">JBDS</property> comes with
JSP design-time preview features. When
+ designing JSP pages you can easily preview how they will look during runtime. You
+ can even <ulink
url="../../jsf/html_single/index.html#el_exp_para">attach your stylesheet to
the
+ Preview</ulink>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Make a little change to <emphasis>
+ <property moreinfo="none">hello.jsp</property>
+ </emphasis> page, e.g. put this code snippet:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<%= new java.util.Date() %>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>Switch to Preview page by clicking <property
moreinfo="none">Preview</property> tab at the
+ bottom of the page. You will see how the page will look at runtime.</para>
+ </listitem>
+ </itemizedlist>
+ <!-- <figure>
+ <title>Preview Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+-->
+ </section>
+ <section id="LaunchingTheProject">
+ <?dbhtml filename="LaunchingTheProject.html"?>
+ <title>Launch JSP Project</title>
+ <para>Let's now launch our project on server. We'll use
+ <property moreinfo="none">JBoss Server</property> that is
shipped with <property moreinfo="none">JBoss Developer
+ Studio</property>. You can do it by performing one of the following
actions:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Start JBoss Server from <ulink
url="../../as/html_single/index.html#JBossServerView">JBoss
+ Server view</ulink> by clicking the Start icon.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Starting Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click the Run icon or right click your project folder and select
<emphasis>
+ <property moreinfo="none">Run As > Run on
Server</property>. </emphasis> If you
+ haven't made any changes in <emphasis>
+ <property moreinfo="none">web.xml</property>
+ </emphasis> file or cleared it out you can launch the application by right
+ clicking the <emphasis>
+ <property moreinfo="none">hello.jsp</property>
+ </emphasis> page and selecting <emphasis>
+ <property moreinfo="none">Run on the Server</property>.
</emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Run Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You should see the next page in a Browser :</para>
+ <figure float="0">
+ <title>Running Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsp_application/jsp_application_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus with the help of this chapter you've learnt how to organize a
Dynamic
+ Web Project with a minimal configuration, add any staff to it (in our case it's
+ just one jsp page) and deploy and run it on the <property
moreinfo="none">JBoss Server</property>
+ shipped with <property moreinfo="none">JBDS</property>.
+ </para>
+ </section>
+
+ </section>
+</chapter>
+
+
+<chapter id="rad_jsf_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/rad_jsf_application.xml"
xreflabel="rad_jsf_application">
+ <?dbhtml filename="rad_jsf_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>RAD</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>RAD development of a simple JSF application</title>
+
+ <note>
+ <title>Note:</title>
+ <para>We highly recommend developing in <property
moreinfo="none">Seam</property>. This chapter is for users
+ who for some reason cannot use <property
moreinfo="none">Seam</property>.</para>
+ </note>
+
+ <para>In this chapter you will see how to create a simple JSF application being
based on
+ <property moreinfo="none">"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>
+ <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
+ the application from inside JBoss Developer Studio using the bundled JBoss
server.</para>
+
+ <section id="SettingUpTheProject12">
+ <?dbhtml filename="SettingUpTheProject12.html"?>
+ <title>Setting up the project</title>
+ <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 moreinfo="none">Window > Show
View > Others > JBoss Tools Web
+ > Web Projects View</property>)
</emphasis> click <emphasis>
+ <property moreinfo="none">Create New JSF
Project</property>
+ </emphasis> button. <figure float="0">
+ <title>Create New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure></para>
+ </listitem>
+
+ <listitem>
+ <para>Put <property
moreinfo="none">GuessNumber</property> as a project name, in JSF
Environment
+ drop down list choose <property moreinfo="none">JSF
1.2</property></para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as it is and click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <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 float="0">
+ <title>New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_2.png"></imagedata>
+ </imageobject>
+ </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>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>
+ <property
moreinfo="none">faces-config.xml</property>
+ </emphasis> file</para>
+ </listitem>
+ <listitem>
+ <para>Right click anywhere on the diagram mode</para>
+ </listitem>
+ <listitem>
+ <para>From the context menu select <emphasis>
+ <property moreinfo="none">New
View</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+
+ <listitem>
+ <para>Type <emphasis>
+ <property
moreinfo="none">pages/inputnumber</property>
+ </emphasis> as the value for <emphasis>
+ <property
moreinfo="none">From-view-id</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is and click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In the same way create another jsf view. Type
<emphasis>
+ <property
moreinfo="none">pages/success</property>
+ </emphasis> as the value for <emphasis>
+ <property
moreinfo="none">From-view-id</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File >
Save</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>On the diagram you will see two created views.</para>
+ <figure float="0">
+ <title>New Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="CreatingTransition">
+ <?dbhtml filename="CreatingTransition.html"?>
+ <title>Creating Transition between two views</title>
+ <para>Then, we should create connection between jsp pages.</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the diagram, select the <emphasis>
+ <property moreinfo="none">Create New
Connection</property>
+ </emphasis> icon third from the top along the upper left side
of the diagram to
+ get an arrow cursor with a two-pronged plug at the arrow's bottom
<figure float="0">
+ <title>Create Connection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">pages/inputnumber</property>
+ </emphasis> page icon and then click on the <emphasis>
+ <property
moreinfo="none">pages/success</property>
+ </emphasis> page icon</para>
+ </listitem>
+ </itemizedlist>
+ <para>A transition should appear between the two icons of
views.</para>
+ <figure float="0">
+ <title>Created Connection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File >
Save</property>
+ </emphasis> from the menu bar</para>
+ </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.
+ 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>
+ <para>It is a good idea to keep your resources inside the <emphasis>
+ <property moreinfo="none">JavaSource</property>
+ </emphasis> folder, where you keep your .java files. Every time you
build the project,
+ all <emphasis>.properties</emphasis> files will then be copied to
the
+ <emphasis>classes</emphasis> folder by default.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property
moreinfo="none">JavaSource</property>
+ </emphasis> folder and select <emphasis>
+ <property moreinfo="none">New >
Folder</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">game</property>
+ </emphasis> for Folder name and click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>Your resource file and java bean will be stored in this
folder.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click on <emphasis>
+ <property moreinfo="none">game
folder</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">New > Properties
File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property
moreinfo="none">messages</property>
+ </emphasis> as the value for "name" attribute and
click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>JBoss Developer Studio will automatically open
+ <property
moreinfo="none">messages.properties</property> file for
editing.</para>
+ <figure float="0">
+ <title>Messages.properties File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button for adding new attribute to your resource
file</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis role="italic">
+ <property
moreinfo="none">how_to_play</property>
+ </emphasis> for "name" and <emphasis
role="italic">
+ <property moreinfo="none">Please pick a number
between 0 and 100.</property>
+ </emphasis> for value</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In such a way add the next properties:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[makeguess_button=Make Guess
+trayagain_button=Play Again?
+success_text=How cool.. You have guessed the number, {0} is correct!
+tryagain_smaller=Oops..incorrect guess. Please try a smaller number.
+tryagain_bigger=Oops..incorrect guess. Please try a bigger number.
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">File >
Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ <para>Your .properties file should now look like follows:</para>
+ <figure float="0">
+ <title>Properties are Added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><emphasis>
+ <property
moreinfo="none">Up</property></emphasis>
+ and <emphasis>
+ <property moreinfo="none">Down</property>
+ </emphasis> buttons allow you to move you attribute on the list. For
delete the attribute, choose it and press <emphasis>
+ <property
moreinfo="none">Delete</property></emphasis>
button.</para>
+ <para>If you want to change a value or a name of your attribute, click on
it and than on <emphasis>
+ <property
moreinfo="none">Edit</property></emphasis> button.</para>
+ </section>
+
+ <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>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">game
folder</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">New >
Class</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property
moreinfo="none">NumberBean</property>
+ </emphasis> for bean name</para>
+ </listitem>
+ </itemizedlist>
+ <para>A java bean is created.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Declare the variable of your entered number:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[Integer userNumber;
+]]></programlisting>
+ <para>JBDS allows to quickly generate getters and setters for java
bean.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property
moreinfo="none">NumberBean.java</property>
+ </emphasis> in Package Explorer</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Source >
Generate Getters and Setters...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Check <emphasis>
+ <property
moreinfo="none">userNumber</property>
+ </emphasis> box and click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis>
+ <figure float="0">
+ <title>Generate Getters and Setters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Add the declaration of the second variable</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[int randomNumber;
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>.. other bean methods:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[public NumberBean ()
+{
+ randomNumber = (int)(Math.random()*100);
+ System.out.println ( "Random number: "+randomNumber);
+ }
+ public String playagain ()
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ HttpSession session =
+ (HttpSession) context.getExternalContext().getSession(false);
+ session.invalidate();
+ return "playagain";
+ }
+ public String checkGuess ()
+ {
+
+ // if guessed, return 'success' for navigation
+ if ( userNumber.intValue() == randomNumber )
+ {
+ return "success";
+ }
+else
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResourceBundle bundle = ResourceBundle.getBundle("game.messages",
+ context.getViewRoot().getLocale());
+ String msg = "";
+ // if number bigger, get appropriate message
+ if ( userNumber.intValue() > randomNumber )
+ msg = bundle.getString("tryagain_smaller");
+ else // if number smaller, get appropriate message
+ msg = bundle.getString("tryagain_bigger");
+ // add message to be displayed on the page via <h:messages> tag
+ context.addMessage (null, new FacesMessage(msg));
+ // return 'tryagain' for navigation
+ return "tryagain";
+ }
+ }
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>And the import declarations:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+import javax.faces.application.FacesMessage;
+import java.util.Locale;
+import java.util.ResourceBundle;
+]]></programlisting>
+ <para>The whole java bean should look as follows:</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+import javax.faces.application.FacesMessage;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+public class NumberBean
+{
+ Integer userNumber;
+ int randomNumber; // random number generated by application
+public Integer getUserNumber ()
+ {
+ return userNumber;
+ }
+ public void setUserNumber (Integer value)
+ {
+ this.userNumber = value;
+ }
+
+ // constructor, generates random number
+ public NumberBean ()
+ {
+ randomNumber = (int)(Math.random()*100);
+ System.out.println (
+ "Random number: " + randomNumber);
+ }
+
+ public String playagain ()
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ HttpSession session =
+ (HttpSession) context.getExternalContext().getSession(false);
+ session.invalidate();
+ return "playagain";
+ }
+
+ // check if user guessed the number
+ public String checkGuess ()
+ {
+ // if guessed, return 'success' for navigation
+ if ( userNumber.intValue() == randomNumber )
+ {
+ return "success";
+ }
+ // incorrect guess
+ else
+ {
+ // get a reference to properties file to retrieve messages
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResourceBundle bundle =
+ ResourceBundle.getBundle("game.messages",
+ context.getViewRoot().getLocale());
+ String msg = "";
+ // if number is bigger, get appropriate message
+ if ( userNumber.intValue() > randomNumber )
+ msg = bundle.getString("tryagain_smaller");
+ else // if number smaller, get appropriate message
+ msg = bundle.getString("tryagain_bigger");
+
+ // add message to be displayed on the page via <h:messages> tag
+ context.addMessage (null, new FacesMessage(msg));
+ // return 'tryagain' for navigation
+ return "tryagain";
+ }
+ }
+}
+]]></programlisting>
+ </section>
+
+ <section id="EditingFacesConfig">
+ <?dbhtml filename="EditingFacesConfig.html"?>
+ <title>Editing faces-config.xml File</title>
+ <para>In this section you know about faces-config.xml file.</para>
+ <para>This file holds two navigation rules and defines the backing bean
used.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open faces-config.xml file in a source mode</para>
+ </listitem>
+ <listitem>
+ <para>Add here one more navigation rule and a managed bean
declarations that the
+ content of the file looks like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<?xml version="1.0"
encoding="UTF-8"?>
+<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee
+xmlns:xi="http://www.w3.org/2001/XInclude"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2_.xsd">
+
+ <navigation-rule>
+ <from-view-id>*</from-view-id>
+ <navigation-case>
+ <from-outcome>playagain</from-outcome>
+ <to-view-id>/pages/inputnumber.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/pages/inputnumber.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/pages/success.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <managed-bean>
+ <managed-bean-name>NumberBean</managed-bean-name>
+ <managed-bean-class>game.NumberBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+</faces-config>
+]]></programlisting>
+ <para>The first navigation rule states that from any page (<property
moreinfo="none">*</property> stands for
+ any page) an outcome of playagain will take you to <emphasis>
+ <property
moreinfo="none">/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
moreinfo="none">/pages/inputnumber.jsp</property>
+ </emphasis>, and the outcome is success, then navigate to the
<emphasis>
+ <property
moreinfo="none">/pages/success.jsp</property>
+ </emphasis> page. </para>
+ </section>
+ <section id="EditingTheJSPViewFiles2">
+ <?dbhtml filename="EditingTheJSPViewFiles2.html"?>
+ <title>Editing the JSP View Files</title>
+ <para>Now, we will continue editing the JSP files for our two
"views" using
+ Visual Page Editor.</para>
+ <section id="EditingInputjsp">
+ <?dbhtml filename="EditingInputjsp.html"?>
+ <title>Editing inputnumber.jsp page</title>
+ <para>First, let's dwell on how to edit
inputnumber.jsp.</para>
+ <para>On this page we will have an output text component displaying a
message, a text
+ field for user's number entering and a button for input
submission.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open inputnumber.jsp by double-clicking on the
<emphasis>
+ <property moreinfo="none">/pages/inputnumber.
jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ </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. You can see that some JSF code
will be
+ already generated as we choose a template when creating the
page.</para>
+ <para>At the beginning it's necessary to create a <emphasis
role="bold">
+ <property
moreinfo="none"><h:form></property>
+ </emphasis> component where all others components are
put.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Place the mouse cursor inside <emphasis
role="bold">
+ <property
moreinfo="none"><f:view></property>
+ </emphasis><emphasis role="bold">
+ <property
moreinfo="none"></f:view></property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Go to JBoss Tools Palette and expand JSF HTML folder by
selecting
+ it</para>
+ </listitem>
+ <listitem>
+ <para>Click on <emphasis role="bold">
+ <property
moreinfo="none"><h:form></property>
+ </emphasis> tag <figure float="0">
+ <title>Insert h:form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>In the dialog Insert Tag select <emphasis>
+ <property
moreinfo="none">id</property>
+ </emphasis> and click on this line below the value header.
A blinking cursor
+ will appear in a input text field inviting to enter a value of id
<figure float="0">
+ <title>Define Id of Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property
moreinfo="none">inputNumbers</property>
+ </emphasis> and click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>In source view you can see the declaration of a
form.</para>
+ <figure float="0">
+ <title>Created Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>First let's declare the properties file in inputnumber.jsp
page using the
+ loadBundle JSF tag.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Put this declaration on the top of a page, right after
the first two
+ lines:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<f:loadBundle basename="game.messages"
var="msg"/>
+]]></programlisting>
+ <para>As always JBDS provides code assist:</para>
+ <figure float="0">
+ <title>Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Visual tab, so it could be possible to work
with the editor
+ completely in its WYSIWYG mode</para>
+ </listitem>
+ <listitem>
+ <para>Click on <emphasis>
+ <property
moreinfo="none">outputText</property>, </emphasis> drag the
cursor over to the
+ editor, and drop it inside the blue box in the
editor</para>
+ </listitem>
+
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property
moreinfo="none">...</property> button next to the value
field</para>
+ </listitem>
+ </itemizedlist>
+ <para>JBDS will nicely propose you to choose within available
values:</para>
+ <figure float="0">
+ <title>Choose Value</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Resource Bundles
> msg</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">how_to_play</property>
+ </emphasis> value and click <emphasis>
+ <property
moreinfo="none">Ok</property>. </emphasis> Then click
<emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis>
+ <figure float="0">
+ <title>Selecting Value</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>The text will appear on the page:</para>
+ <figure float="0">
+ <title>Created OutputText Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Source mode and insert <emphasis
role="bold">
+ <property
moreinfo="none"><br/></property>
+ </emphasis> tag after <emphasis
role="bold">
+ <property
moreinfo="none"><h:outputText></property>
+ </emphasis> component to make a new line.</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Save</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette click on <emphasis>
+ <property
moreinfo="none">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">
+ <property
moreinfo="none"><br/></property>
+ </emphasis> tag after <emphasis
role="bold">
+ <property
moreinfo="none"><h:outputText></property>
+ </emphasis> component to make a new line</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Save</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette click on <emphasis>
+ <property
moreinfo="none">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>
+ <property
moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property
moreinfo="none">...</property> button next to the value
field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Managed Beans
> NumberBean</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">userNumber</property>
+ </emphasis> value and click <emphasis>
+ <property
moreinfo="none">Ok</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Switch <emphasis>
+ <property
moreinfo="none">Advanced</property>
+ </emphasis> tab</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">id</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property
moreinfo="none">userNumber</property>
+ </emphasis> in text field</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">required</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property
moreinfo="none">...</property> button next to the value
field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property
moreinfo="none">Enumeration</property>
+ </emphasis> and select <emphasis>
+ <property
moreinfo="none">true</property>
+ </emphasis> as a value</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Add "required" Attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Ok</property>, </emphasis> then click
<emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Go to Source mode</para>
+ </listitem>
+ <listitem>
+ <para>Add the validation attribute to <emphasis
role="bold">
+ <property
moreinfo="none"><f:validateLongRange></property>
+ </emphasis> for user input validation</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<h:inputText id="userNumber"
value="#{NumberBean.userNumber}" required="true">
+ <f:validateLongRange minimum="0" maximum="100"/>
+</h:inputText>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Save</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Again select <emphasis>
+ <property
moreinfo="none">Visual</property>
+ </emphasis> mode</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette, click on <emphasis>
+ <property
moreinfo="none">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>
+ <property
moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property
moreinfo="none">...</property> button next to the value
field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Resource Bundles
> msg</property>
+ </emphasis> and select <emphasis>
+ <property
moreinfo="none">makeguess_button</property>
+ </emphasis> as a value</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Ok</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">action</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property
moreinfo="none">NumberBean.checkGuess</property>
+ </emphasis> in text field</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In Source mode add <emphasis
role="bold">
+ <property
moreinfo="none"><br/></property>
+ </emphasis> tags between <emphasis
role="bold">
+ <property
moreinfo="none"><outputText></property>
+ </emphasis>, <emphasis role="bold">
+ <property
moreinfo="none"><inputText></property>
+ </emphasis> and <emphasis role="bold">
+ <property
moreinfo="none"><commandButton></property>
+ </emphasis> components to place them on different
lines</para>
+ </listitem>
+ </itemizedlist>
+ <para>inputnumber.jsp page should look like this:</para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<f:loadBundle basename="game.messages" var="msg"/>
+
+<html>
+ <f:view>
+ <h:form id="inputNumbers">
+ <h:outputText value="#{msg.how_to_play}"/>
+ <br/>
+ <h:messages style="color: blue"/>
+ <br/>
+ <h:inputText id="userNumber"
value="#{NumberBean.userNumber}" required="true">
+ <f:validateLongRange minimum="0" maximum="100"/>
+ </h:inputText>
+ <br/><br/>
+ <h:commandButton value=
+ "#{msg.makeguess_button}"
action="#{NumberBean.checkGuess}"/>
+ </h:form>
+ </f:view>
+</html>
+]]></programlisting>
+ </section>
+ <section id="EditingSuccessJsp">
+ <?dbhtml filename="EditingSuccessJsp.html"?>
+ <title>Editing success.jsp page</title>
+ <para>In the same way like inputnumber.jsp, edit success.jsp page. Its
whole source
+ should be the next:</para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<f:loadBundle basename="game.messages" var="msg"/>
+
+<html>
+ <f:view>
+ <h:form id="result">
+ <h:outputFormat value="#{msg.success_text}">
+ <f:param value="#{NumberBean.userNumber}"/>
+ </h:outputFormat>
+ <br/><br/>
+ <h:commandButton value=
+ "#{msg.trayagain_button}"
action="#{NumberBean.playagain}"/>
+ </h:form>
+ </f:view>
+</html>
+]]></programlisting>
+ <para>Again you can use code assist provided by JBDS when editing jsp
page:</para>
+ <figure float="0">
+ <title>Code Assist for <f:param></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_18.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This page, success.jsp, is shown if you correctly guessed the
number. The
+ <emphasis role="bold">
+ <property
moreinfo="none"><h:outputFormat></property>
+ </emphasis> tag will get the value of success_text from the
properties file. The {0}
+ in success_text will be substituted for by the value of the value
attribute within
+ the <emphasis role="bold">
+ <property
moreinfo="none"><f:param></property>
+ </emphasis> tag during runtime.</para>
+ <para>At the end, you have a button which allows you to replay the
game. The action
+ value references a backing bean method. In this case, the method only
terminates the
+ current session so that when you are shown the first page, the input text
box is
+ clear and a new random number is generated.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Preview mode to see how this page will look in
a browser:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Success.jsp in Preview Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ <section id="CreatingIndexjsp">
+ <?dbhtml filename="CreatingIndexjsp.html"?>
+ <title>Creating index.jsp page</title>
+ <para>Now you know how to create index.jsp page.</para>
+ <para>The index.jsp page is the entry point of our application. It's
just
+ forwarding to inputnumber.jsp page.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">WebContent > New
> JSP File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">index</property>
+ </emphasis> for name field and choose <emphasis>
+ <property
moreinfo="none">JSPRedirect</property>
+ </emphasis> as a template</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>The source for this page should be like the
following:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0
transitional//en">
+<html>
+ <body>
+ <jsp:forward page="/pages/inputnumber.jsf" />
+ </body>
+</html>
+
+]]></programlisting>
+ <para>Note the <emphasis>.jsf</emphasis> extension of a page.
It means that we trigger the
+ JSF controller servlet to handle the page according the servlet mapping in
the
+ faces-config.xml file.</para>
+ </section>
+ <section id="RunningTheApplication33">
+ <?dbhtml filename="RunningTheApplication33.html"?>
+ <title>Running the Application</title>
+ <para>Finally, we have all the pieces needed to run the
application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Start up JBoss server by clicking on the <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis> icon in JBoss Server view. (If JBoss is already
running, stop it by
+ clicking on the red icon and then start it again. After the messages
in the
+ Console tabbed view stop scrolling, JBoss is available)</para>
+ </listitem>
+ <listitem>
+ <para>Right-click on project <emphasis>
+ <property moreinfo="none">Run AS > Run on
Server</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Play with the application by entering correct as well as
incorrect
+ values</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>You are Asked to Enter a Number Between 0 and 100</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Your Input is Validated and an Error Message is Displayed if
Invalid Input was
+ Entered</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_21.png"
scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>After You Enter a Guess, the Application Tells You Whether a
Smaller or a Larger
+ Number Should be Tried</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_22.png"
scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Your Guess is Correct</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/rad_jsf_application/rad_jsf_application_23.png"
scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+
+
+<chapter id="project_examples" role="new"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/project_examples.xml"
xreflabel="project_examples">
+ <?dbhtml filename="project_examples.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Project Examples</title>
+
+ <para><emphasis><property moreinfo="none">JBoss Developer
Studio</property></emphasis> provides an option to download and import a
ready-made
+ project that you can explore and derive some useful technology implementation
lessons. </para>
+
+
+ <section id="DownloadingProjectExample">
+ <title>Downloading a Project Example</title>
+
+ <para>To download a project example and start working with it you need to
take a few steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Go to the menu bar and select <emphasis><property
moreinfo="none">File > New >
Other...</property></emphasis>
+ </para></listitem>
+
+ <listitem><para>Select <emphasis><property
moreinfo="none">Jboss Tools > Project
Examples</property></emphasis>(You can also call the
<emphasis><property moreinfo="none">Project
Examples</property></emphasis> from menu bar: <emphasis><property
moreinfo="none">Help > Project
Examples...</property></emphasis>)</para></listitem>
+
+
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/project_examples/pr_example_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Now in the New Project Example dialog you can
select a project you would like to explore</para>
+ <para>Project Examples Wizard provides a filter field to more
easily locate the project examples you want, so you can type in the project you would like
to explore in the field.</para></listitem>
+
+ </itemizedlist>
+
+
+ <figure float="0">
+ <title>Selecting a Project Example</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/project_examples/pr_example_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>
+ The <emphasis><property moreinfo="none">Show the
Quick Fix Dialog</property></emphasis> option is described in the <link
linkend="QuickFixes">Quick Fixes</link> section.
+ </para>
+ </note>
+
+ <itemizedlist>
+ <listitem><para>Press <emphasis><property
moreinfo="none">Finish</property></emphasis> to start downloading
the project from the repository
+ </para></listitem>
+
+ </itemizedlist>
+
+ <para>When downloading is finished the project will be imported
automatically and you will be able to see it in the Package Explorer.</para>
+
+ <para>Now you can run the application on the server.</para>
+
+ <figure float="0">
+ <title>Seam Demo Application run on the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/project_examples/pr_example_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="QuickFixes">
+ <title>Quick Fixes</title>
+ <para>
+ Project Examples Wizard has an option for making quick fixes
+ for the imported project to easily fix possible issues like missing servers,
Seam runtimes etc.
+ </para>
+ <para>To enable quick fixing option you need to check the
+ <emphasis><property moreinfo="none">Show the Quick Fix
dialog</property></emphasis> while choosing the <link
linkend="DownloadingProjectExample">Project
Example</link>.</para>
+
+ <para>When the project you selected is downloaded it will be checked for
missing dependences and if there are some you will see a dialog listing the
problems.</para>
+ <figure float="0">
+ <title>Quick Fix Dialog box</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/project_examples/pr_example_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>To fix the problem you need to:</para>
+
+ <itemizedlist>
+ <listitem><para>Select the problem from the
list</para></listitem>
+ <listitem><para>Click <emphasis><property
moreinfo="none">Quick Fix</property></emphasis>
button</para></listitem>
+ </itemizedlist>
+
+ <para>You will be offered a solution or a number of solutions to the
problem.</para>
+
+ <figure float="0">
+ <title>Quick Fix Dialog box: Selecting a Fix</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/project_examples/pr_example_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In this case(see the image above), when the
<emphasis><property
moreinfo="none">Finish</property></emphasis> button is pressed,
Seam Settings dialog box will be displayed where you need to provide a path to the Seam
environment to fix the issue.</para>
+
+ <para>When the problem is fixed you will be returned to the Quick Fix
dialog box with the remaining problems to be fixed.</para>
+
+ </section>
+
+
+</chapter>
+
+
+
+<chapter id="gsg_faq" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml"
xreflabel="gsg_faq">
+ <?dbhtml filename="gsg_faq.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>FAQ</title>
+
+ <para>For more information on <property moreinfo="none">JBoss
Developer Studio</property> features, refer to the
+ following FAQ to get the answers on the most "popular"
questions.</para>
+
+ <section id="question_1">
+ <title>What should I do if Visual Page Editor does not start under
Linux</title>
+
+ <para>Linux users may need to do the following to get the <property
moreinfo="none">Visual Page
+ Editor</property> to work correctly on their
machines.</para>
+
+ <orderedlist continuation="restarts"
inheritnum="ignore">
+ <listitem>
+ <para>On Red Hat based Linux distributions install the xpLib.i386
package</para>
+ </listitem>
+ <listitem>
+ <para>Type</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>and/or use</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[yum install libXp
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>Open the JBDS perspective. If you see the Help view open,
close it and restart
+ JBDS</para>
+ </listitem>
+ <listitem>
+ <para>If none of these work, do the following:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Clear the Eclipse log file,
+
<emphasis><workspace>\.metadata\.log</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Start Eclipse with the -debug option:</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[eclipse -debug
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>Post the Eclipse log file
+
(<emphasis><workspace>\.metadata\.log</emphasis>) on
+ the forums.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section id="question_2">
+ <title>Do I need to have JBoss Server installed to run JBoss Developer
Studio?</title>
+
+ <para>No. <property moreinfo="none">JBoss Developer
Studio</property> already comes bundled with JBoss
+ Server. We bundle it together so that you don't need to download any
additional
+ software and can test your application in a Web browser right
away.</para>
+ <para>If you want to use a different JBoss server installation, after
<property moreinfo="none">JBoss
+ Developer Studio</property> is installed open Servers View (select
+ <emphasis><property moreinfo="none">Window
> Show View > Others > Server
+ > Servers</property>),</emphasis> then right click
on this <emphasis>
+ <property moreinfo="none">view > New >
Server</property>
+ </emphasis> and follow the wizards steps to point to another Jboss
Server
+ installation.</para>
+ <para><property moreinfo="none">JBoss Developer
Studio</property> works with any servlet container, not just
+ JBoss. For more information on deployment, please see the Deploying Your
Application
+ section.</para>
+ </section>
+
+ <section id="question_3">
+ <title>I have an existing Seam 1.2.1 project. Can I migrate/import the
project to a JBDS
+ Seam project?</title>
+
+ <para>We highly recommend you to create Seam 1.2.1 project using the
+ <property moreinfo="none">JBDS</property>. In other
case try to do manually:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create a Seam Web project to get the JBoss tools
structure</para>
+ </listitem>
+ </itemizedlist>
+ <para>Then from your Seam 1.2.1 seam-gen project start doing the
following:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Copy <property
moreinfo="none">src</property> to <property
moreinfo="none">src</property></para>
+ </listitem>
+ <listitem>
+ <para>Copy <property
moreinfo="none">view</property> to <property
moreinfo="none">Web content</property></para>
+ </listitem>
+ <listitem>
+ <para>Copy resources individual files to where they are in the seam
web project
+ etc.</para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section id="questio_4">
+ <title>I have an existing Struts or JSF project. Can I open the project in
JBDS?</title>
+
+ <para>Yes. From main menu select <emphasis>
+ <property moreinfo="none">File > Import >
Other > JSF Project (or Struts
+ Project)</property>
+ </emphasis> and follow wizards steps.</para>
+
+ </section>
+
+ <section id="question_5">
+ <title>Can I import a .war file?</title>
+
+ <para>Yes. Select <emphasis><property
moreinfo="none">File > Import > Web > WAR
+ file</property>, </emphasis> then follow importing
steps.</para>
+ </section>
+
+ <section id="question_6">
+ <title>Is it possible to increase the performance of Eclipse after
installing your
+ product?</title>
+
+ <para><property moreinfo="none">JBoss Developer
Studio</property> preconfigures eclipse via the eclipse.ini
+ file to allocate extra memory, but if you for some reason need more memory
then by
+ default, you can manually make adjustments in this file. For
example:</para>
+ <programlisting format="linespecific" role="XML">
+ <![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
+]]></programlisting>
+ </section>
+
+ <section id="question_7">
+ <title>How can I add my own tag library to the JBoss Tools
Palette?</title>
+
+ <para>See <ulink
url="../../jsf/html_single/index.html#AddingCustomJSFTagsToTheRedHatPalette7433">Adding
Tag
+ Libraries</ulink> in Visual Web Tools Guide.</para>
+ </section>
+
+ <section id="question_8">
+ <title>How to get Code Assist for Seam specific resources in an externally
generated
+ project?</title>
+
+ <para>To get Code Assist for Seam specific resources in an externally
generated project, you
+ should enable Seam features in Project Preferences. Right click an imported
project and
+ navigate <emphasis>
+ <property moreinfo="none">Properties > Seam
Settings</property>.</emphasis> Check <emphasis>
+ <property moreinfo="none">Seam support</property>
+ </emphasis> box to enable all available <ulink
url="../../seam/html_single/index.html#project_pref">Seam
+ Settings</ulink>.</para>
+ </section>
+
+ <section id="question_9">
+ <title>How to import an example Seam project from jboss-eap
directory?</title>
+
+ <para>To import an example Seam project from <emphasis>
+ <property moreinfo="none">jboss-eap</property>
+ </emphasis> into your working directory, you should perform the
following steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Go to <emphasis>
+ <property moreinfo="none">New > Other
> Java Project from Existing Buildfile</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>Point to the <emphasis>
+ <property
moreinfo="none">build.xml</property>
+ </emphasis> of any chosen project by pressing <emphasis>
+ <property
moreinfo="none">Browse</property>
+ </emphasis> button</para>
+ </listitem>
+
+ <listitem>
+ <para>Hit <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> to open the project</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>As these seam examples are non WTP projects, next you should enable
Seam support for
+ them. To do that, right click the project and go to <emphasis>
+ <property moreinfo="none">Properties > Seam
Settings</property>.</emphasis></para>
+ </section>
+
+ <section id="question_10">
+ <title>Is a cross-platform project import possible for JBDS?</title>
+
+ <para>Yes. You can easily import created in Linux JSF, Struts or Seam
project to Windows and
+ vice versa.</para>
+
+ <para>To do the transferring JSF, Struts or Seam project, go to
<emphasis>
+ <property moreinfo="none">Menu > Import >
General > Existing Projects into Workspace</property>,</emphasis>
+ select the folder where your project stored and press <emphasis>
+ <property
moreinfo="none">Finish</property>.</emphasis></para>
+ </section>
+</chapter>
+
+
+<chapter id="further_reading"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml"
xreflabel="further_reading">
+ <?dbhtml filename="further_reading.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Further Reading</title>
+
+ <para>
+ <emphasis role="bold">JSF Tools Reference Guide</emphasis>
+ <ulink
url="../../jsf_tools_ref_guide/html_single/index.html">(html)</ulink>
+
+ </para>
+ <para> From this guide you'll discover all peculiarities of work at a JSF
project. You'll
+ learn all shades that cover the process of project creation and take a closer look at
the JSF
+ configuration file. Also you'll get to know managed beans and how to work with
them and
+ find out, how to create and register a custom converter, custom validator and
referenced beans
+ in a JSF project. </para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">JSF Tools Tutorial</emphasis>
+ <ulink
url="../../jsf_tools_tutorial/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This tutorial will describe how to deal with classic/old style of JSF
development and how
+ to create a simple JSF application using the JBoss Developer Studio. </para>
+ </listitem>
+
+ <listitem> <para>
+ <emphasis role="bold">Struts Tools Reference Guide</emphasis>
+ <ulink
url="../../struts_tools_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para> In Struts Tools Reference Guide you will learn how to create and work with
a new struts
+ project. This guide also provides information about graphical editor for struts
configuration
+ files, tiles files, and struts validation files. </para>
+ </listitem>
+
+<listitem>
+ <para>
+ <emphasis role="bold">Struts Tools Tutorial</emphasis>
+ <ulink
url="../../struts_tools_tutorial/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This tutorial will describe the classical style of Struts development, and
will
+ step-by-step show you how to create a simple Struts application in JBoss Developer
Studio.</para>
+</listitem>
+
+<listitem>
+ <para>
+ <emphasis role="bold">Seam Dev Tools Reference
Guide</emphasis>
+ <ulink url="../../seam/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This guide helps you to understand what Seam is and how to install Seam
plug-in into
+ Eclipse. It tells you the necessary steps to start working with Seam Framework and
assists in a
+ simple Seam Project creation. Also you will learn how to create and run the CRUD
Database
+ Application with Seam as well as find out what Seam Editors Features and Seam
Components are. </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">Visual Web Tools Reference
Guide</emphasis>
+ <ulink url="../../jsf/html_single/index.html">(html)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">JBoss Server Manager Reference
Guide</emphasis>
+ <ulink url="../../as/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This guide covers the basics of working with the JBoss server manager. You
will read how to
+ install runtimes and servers and quickly learn how to configure, start, stop the
server and know
+ how deployment and archiving process. You will find out how to manage installed JBoss
Servers
+ via JBoss AS Perspective. You will also read how to deploy modules onto the server.
</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">jBPM Tools Reference Guide</emphasis>
+ <ulink url="../../jbpm/html_single/index.html">(html)</ulink>
+ </para>
+ <para>With jBPM Tools Reference Guide we'll help you to facilitate a
cross-product
+ learning and know how you can speed your development using special editors and visual
designers.
+ We'll also guide you through the steps on how to create a simple process and test
it
+ within jBPM jPDL perspective.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">Hibernate Tools Reference
Guide</emphasis>
+ <ulink
url="../../hibernatetools/html_single/index.html">(html)</ulink>
+ </para>
+ <para>Throughout this guide you will learn how to install and use Hibernate Tools
bath via Ant and
+ through Eclipse. We'll supply you with the information on how to create mapping
files,
+ configuration file as well as a file for controlling reverse engineering by using
specific
+ wizards that Hibernate tooling provides. Also you will know about Code Generation
and
+ peculiarities of work within Hibernate Console Perspective.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">ESB Editor Reference Guide</emphasis>
+ <ulink
url="../../esb_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para>This guide provides you with the information on ESB Editor which allows you
to develop ESB
+ file.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">JBoss Portal Tools Reference
Guide</emphasis>
+ <ulink
url="../../jboss_portal_tools_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para>The guide gives a detail look at how you can easily build a Portlet Web
Application with
+ JBoss Tools and deploy it onto JBoss Portal.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">JBoss WS User Guide</emphasis>
+ <ulink
url="../../ws_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para>This guide gives you practical help on JBossWS usage.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">Exadel Studio Migration Guide</emphasis>
+ <ulink
url="../../Exadel-migration/html_single/index.html">(html)</ulink>
+ </para>
+ <para>This document is intended to help you to migrate an existing Exadel JSF or
Struts projects
+ from Exadel Studio into JBoss Developer Studio. </para>
+ </listitem>
+
+</itemizedlist>
+</chapter>
+
+
+</book>
Modified: trunk/documentation/jbds-docs/all-guides.xml
===================================================================
--- trunk/documentation/jbds-docs/all-guides.xml 2009-03-05 18:34:07 UTC (rev 14042)
+++ trunk/documentation/jbds-docs/all-guides.xml 2009-03-05 18:54:45 UTC (rev 14043)
@@ -63,7 +63,7 @@
<fileSet>
<directory>../../jbpm/docs/reference/target/docbook/publish/en-US</directory>
- <outputDirectory>/jboss_jbpm_ref_guide</outputDirectory>
+ <outputDirectory>/jbpm</outputDirectory>
<filtered>false</filtered>
<lineEnding>keep</lineEnding>
<includes>
Modified: trunk/hibernatetools/docs/reference/en/master_output.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/master_output.xml 2009-03-05 18:34:07 UTC (rev
14042)
+++ trunk/hibernatetools/docs/reference/en/master_output.xml 2009-03-05 18:54:45 UTC (rev
14043)
@@ -442,7 +442,7 @@
</emphasis>, Hibernate Tools provide a basic wizard which you can bring up by
navigating <emphasis>
<property moreinfo="none">New > Hibernate XML mapping
file</property>.</emphasis></para>
- <figure float="0">p
+ <figure float="0">
<title>Hibernate XML Mapping File Wizard</title>
<mediaobject>
@@ -5176,7 +5176,7 @@
<para>The rest chapters have shown the aspects of using the <property
moreinfo="none">Hibernate
Tools</property> via Ant tasks.</para>
- <para>Please, visit <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
+ <para>Please, visit <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Tools Users Forum</ulink> to leave questions or/and suggestions on the
topic. Your
feedback is always appreciated.</para>
</section>
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2009-03-05 18:34:07 UTC
(rev 14042)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2009-03-05 18:54:45 UTC
(rev 14043)
@@ -12,8 +12,7 @@
<para>Hibernate Eclipse Tools include wizards for creating Hibernate mapping
files,
configuration files (.cfg.xml), revenge.xml as well as wizards for adjusting
Console
Configuration and Code Generation. Special structured and XML editors, editors for
executing
- HQL and Criteria queries are also provided in Hibernate Console. Refer to <link
- linkend="hibernate_key_features">Key Features</link> section
to find all benefits that you
+ HQL and Criteria queries are also provided in Hibernate Console. Refer to <link
linkend="hibernate_key_features">Key Features</link> section to find
all benefits that you
can take advantage of while using the tools within Eclipse.</para>
<note>
@@ -38,7 +37,7 @@
</emphasis>, Hibernate Tools provide a basic wizard which you can bring up by
navigating <emphasis>
<property>New > Hibernate XML mapping
file</property>.</emphasis></para>
- <figure>p
+ <figure>
<title>Hibernate XML Mapping File Wizard</title>
<mediaobject>
@@ -1526,8 +1525,7 @@
(including usertypes) if the default rules are not applicable. Here again to see
the database
tables press <emphasis>
<property>Refresh</property>
- </emphasis> button underneath. More about type mappings you can find further
in the <link
- linkend="type_map">Type Mappings</link> section.</para>
+ </emphasis> button underneath. More about type mappings you can find further
in the <link linkend="type_map">Type Mappings</link>
section.</para>
<figure>
<title>Type Mappings Page</title>
Modified: trunk/jbpm/docs/reference/en/master_output.xml
===================================================================
--- trunk/jbpm/docs/reference/en/master_output.xml 2009-03-05 18:34:07 UTC (rev 14042)
+++ trunk/jbpm/docs/reference/en/master_output.xml 2009-03-05 18:54:45 UTC (rev 14043)
@@ -23,1266 +23,1266 @@
<!ENTITY strutsreflink
"../../struts_tools_ref_guide/html_single/index.html">
<!ENTITY strutstutoriallink
"../../struts_tools_tutorial/html_single/index.html">
- ]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
- <bookinfo>
- <title>jBPM Tools Reference Guide</title>
-
- <author>
- <firstname>Anatoly</firstname>
- <surname>Fedosik</surname>
- </author>
- <author>
- <firstname>Koen</firstname>
- <surname>Aers</surname>
- <email>koen.aers(a)jboss.com</email>
- </author>
- <author>
- <firstname>Olga</firstname>
- <surname>Chikvina</surname>
- </author>
- <author>
- <firstname>Svetlana</firstname>
- <surname>Mukhina</surname>
- <email>smukhina(a)exadel.com</email>
- </author>
- <author>
- <firstname>Tom</firstname>
- <surname>Baeyens</surname>
- <email>tom.baeyens(a)jboss.com</email>
- </author>
-
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
- <releaseinfo> Version: 3.1.5.GA</releaseinfo>
-
-<abstract>
- <title></title>
- <para>
- <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/jbpm/pdf/J...
version</ulink>
- </para>
-</abstract>
-
- </bookinfo>
-
- <toc></toc>
-
-<chapter id="Introduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Introduction.xml"
xreflabel="Introduction">
- <?dbhtml filename="TargetAudience.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword>Target</keyword>
- <keyword>developers</keyword>
- <keyword>Audience</keyword>
- </keywordset>
- </chapterinfo>
- <title>Introduction</title>
- <para>All developers and process analysts who are beginning to use JBoss jBPM
should read this
- Getting Started guide. It will give them a jumpstart showing how to create a process
definition.</para>
- <section id="Preface">
- <?dbhtml filename="Preface.html"?>
- <title>Preface</title>
- <para>This document introduces the use of the JBoss jBPM Graphical Process
Designer (GPD) to
- create workflow processes. It will help first time users with the following tasks
:</para>
- <itemizedlist>
- <listitem>
- <para>Install the JBoss jBPM GPD Eclipse plugin available from the JBoss jBPM
download
- area</para>
- </listitem>
- <listitem>
- <para>Set up a Java project in Eclipse and prepare it to do test driven
process
- development</para>
- </listitem>
- <listitem>
- <para>Using the creation wizard to create an empty process
definition</para>
- </listitem>
- <listitem>
- <para>Use the designer palette to draw the first
processdefinition</para>
- </listitem>
- <listitem>
- <para>Show how the xml processdefinition can be inspected as an xml
file</para>
- </listitem>
- <listitem>
- <para>Set up a Java project in Eclipse and prepare it to do test driven
process
- development</para>
- </listitem>
- <listitem>
- <para>Write an example process test case</para>
- </listitem>
- </itemizedlist>
- <para>If you have questions, please feel free to contact <ulink
url="mailto:koen.aers@jboss.com">Koen Aers</ulink> or <ulink
url="mailto:tom.baeyens@jboss.com">Tom Baeyens</ulink> for more
- information.</para>
- </section>
-
- <section id="feature_list">
-
- <title>Feature list</title>
-
- <para> JBoss jBPM is a workflow that enables creating and automatization business
processes. Look
- at the list of features below to understand its main functionality.</para>
- <table>
- <title>Key Functionality for JBoss jBPM</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Feature</entry>
- <entry>Benefit</entry>
- </row>
- </thead>
- <tbody>
-
- <row>
- <entry>
- <link linkend="minimal_process_definition">jBDL
support</link>
- </entry>
- <entry>Enables managing workflow processes as well as human tasks and
interactions between
- them. jBDL combines the best both Java and declarative process
techniques.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="GuidedTourJBossjBPMGPD">Support of Graphical
Process Designer (GPD)</link>
- </entry>
- <entry>Is used for simplifying declarative process development and
visualizations of all
- actions.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="CreatingjBPMProject">Project Creation
wizard</link>
- </entry>
- <entry>Allows to create a new jBPM template project that already includes all
advanced
- artifacts and core jBPM libraries.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="minimal_process_definition">Rich palette of
pre-build process nodes</link>
- </entry>
- <entry>Provides process-building functionality and gives opportunity even
non-programmers to
- develop processes.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="source_mode">Support of XML code view</link>
- </entry>
- <entry>Shows the corresponding XML that's generated automatically in the
Source view
- of the process definition editor when developing the process.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="the_properties_view">Properties view</link>
- </entry>
- <entry>Facilitates configuring and editing of all nodes
properties.</entry>
- </row>
-
- <row>
- <entry>Interaction with all of the J2EE based integration technologies
including Web Services,
- Java Messaging, J2EE Connectors, JBDC, EJBs.</entry>
- <entry>Enables implementation, provides better functionality and
flexibility.</entry>
- </row>
-
- <row>
- <entry>Integration with jBoss Seam</entry>
- <entry>Allows to write applications with complex workflows and provides
easier interactions
- between them.</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
- </section>
-
- <section>
- <title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink
url="http://docs.jboss.org/tools/2.1.0.GA/">here</ulink&g...
- <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
- </section>
-
-</chapter>
-
-
-<chapter id="jboss_jbpm_runtime_installation"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/jboss_jbpm_runtime_installation.xml"
xreflabel="jboss_jbpm_runtime_installation">
- <?dbhtml filename="jboss_jbpm_runtime_installation.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword>designer</keyword>
- <keyword>process</keyword>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>jBPM runtime</keyword>
- </keywordset>
- </chapterinfo>
- <title>JBoss jBPM Runtime Installation</title>
- <para>The main purpose of this chapter is to let you know how to launch the
<property moreinfo="none">JBoss
- jBPM</property> (business process management).</para>
- <para>The jBPM plugin (jBPM Designer) is already included in the <property
moreinfo="none">JBoss Tools</property>.
- To make it work, you should only download the jBPM runtime (<ulink
url="http://sourceforge.net/project/showfiles.php?group_id=70542&...
currently) and specify the directory where you extracted the runtime
- either when you create a jBPM project or by using the jBPM preference
pages.</para>
-
- <note>
- <title>Note:</title>
- <para>Try to avoid using spaces in the names of installation folders. It can
provoke problems in
- some situations with Sun-based VMs.</para>
- </note>
-
- <para>Navigate to <emphasis>
- <property moreinfo="none">Window > Preferences > JBoss
jBPM > Runtime Locations</property>.
- </emphasis> Here you can add, edit and remove JBoss jBPM installation locations.
Click <emphasis>
- <property moreinfo="none">Add</property>
- </emphasis> button. In the dialog that appeared enter a name for a newly added
jBPM runtime and
- point to the correct location of this package on your harddrive. Click
<emphasis>
- <property moreinfo="none">OK</property>
- </emphasis> then click <emphasis>
- <property moreinfo="none">OK</property>
- </emphasis> again.</para>
-
- <figure float="0">
- <title>Adding jBPM Location</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/runtime_installation/runtime_installation_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Now, when you have a runtime installed, we are going to demonstrate some
powerful features of
- the jBPM.</para>
-</chapter>
-
-
-<chapter id="GuidedTourJBossjBPMGPD"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml"
xreflabel="GuidedTourJBossjBPMGPD">
- <?dbhtml filename="GuidedTourJBossjBPMGPD.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword>JBoss</keyword>
- <keyword>Process</keyword>
- <keyword>Definition</keyword>
- </keywordset>
- </chapterinfo>
- <title>A Guided Tour of JBoss jBPM GPD</title>
- <para>In this chapter we suggest a step-by-step walk-through of creating and
configuring your
- own simple process. Let's try to organize a new jBPM project.</para>
- <para>A wizard for creating a jBPM project is included in the GPD plugin. We have
opted to
- create a project based on a template already containing a number of advanced artifacts
that
- we will ignore for this section. In the future we will elaborate this wizard and offer
the
- possibility to create an empty jBPM project as well as projects based on templates
taken
- from the jBPM tutorial.</para>
- <section id="CreatingjBPMProject">
- <?dbhtml filename="CreatingjBPMProject.html"?>
- <title>Creating a jBPM Project</title>
- <para>This section will show you how to use the Creation wizard for creating a
new jBPM
- project with already included source folders.</para>
- <para>At first you should select <emphasis>
- <property moreinfo="none">File >New
Project...</property>
- </emphasis> and then <emphasis>
- <property moreinfo="none">JBoss jBPM > Process
Project</property>
- </emphasis> in the New Project dialog:</para>
- <figure float="0">
- <title>New Project Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para> Clicking <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> brings us to the wizard page where it's necessary to specify
the
- name and location for the project. We choose, for example, <emphasis>
- <property moreinfo="none">HellojBPM</property>
- </emphasis> as the name and accept the default location. </para>
- <figure float="0">
- <title>Process Name and Location</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Thus, our project will be created in the workspace root directory by
default. If you
- want to change the directory for your future project, deselect <emphasis>
- <property moreinfo="none">Use default location</property>
- </emphasis> and click <emphasis>
- <property moreinfo="none">Browse...</property>
- </emphasis> button to set needed location or simply type it.</para>
- <para>On the next screen you'll be prompted to select the core jBPM location
that
- we have defined in the previous chapter.</para>
- <figure float="0">
- <title>Core jBPM Location Specifying</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Clicking on <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> results in the project being generated. The wizard creates four
source
- folders: one for the processes (<emphasis>
- <property moreinfo="none">src/main/jpdl</property>
- </emphasis>), one for the java sources (<emphasis>
- <property moreinfo="none">src/main/java</property>
- </emphasis>), one for the unit tests (<emphasis>
- <property moreinfo="none">src/test/java</property>
- </emphasis>) and one for the resources such as the jbpm.properties and the
- hibernate.properties files (<emphasis>
- <property moreinfo="none">src/main/config</property>
- </emphasis>). In addition a classpath container with all the core jBPM libraries
is
- added to the project</para>
- <figure float="0">
- <title>Layout of the Process Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Looking inside the different source folders will reveal a number of other
artifacts
- that were generated, but we will leave these untouched for the moment. Instead, we
will
- look at another wizard that enables us to create an empty process
definition.</para>
- </section>
- <section id="creating_an_empty_process_definition">
- <?dbhtml filename="creating_an_empty_process_definition.html"?>
- <title>Creating an Empty Process Definition</title>
- <para>Now when the project is set up, we can use a Creation wizard to create an
empty
- process definition. Bring up the <emphasis>
- <property moreinfo="none">New</property>
- </emphasis> wizard by clicking the <emphasis>
- <property moreinfo="none">File > New >
Other...</property>
- </emphasis> menu item. The wizard opens on the <emphasis>
- <property moreinfo="none">Select Wizard</property>
- </emphasis> page.</para>
- <figure float="0">
- <title>The Select Wizard Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Selecting the <emphasis>
- <property moreinfo="none">JBoss jBPM</property>
- </emphasis> category, then the <emphasis>
- <property moreinfo="none">Process Definition</property>
- </emphasis> item and clicking on the <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> button brings us to the <emphasis>
- <property moreinfo="none">Create Process Definition</property>
- </emphasis> page.</para>
- <figure float="0">
- <title>The Create New Process Definion Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>We choose <emphasis>
- <property moreinfo="none">hello</property>
- </emphasis> as the name of the process archive file. Click on the
<emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button to end the wizard and open the process definition
editor.</para>
- <figure float="0">
- <title>The Process Definition Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_6.png"
scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>You can see in the Package Explorer that creating a process definition
involves
- creating a folder with the name of the process definition and populating this folder
- with two .xml files : <emphasis>
- <property moreinfo="none">gpd.xml</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">processdefinition.xml</property>.
</emphasis></para>
- <para>The <emphasis>
- <property moreinfo="none">gpd.xml</property>
- </emphasis> contains the graphical information used by the process definition
editor.
- The <emphasis>
- <property moreinfo="none">processdefinition.xml</property>
- </emphasis> file contains the actual process definition info without the
graphical
- rendering info. At present, the GPD assumes that these two files are siblings. More
- sophisticated configuration will be supported later.</para>
-
- <section id="minimal_process_definition">
- <?dbhtml filename="minimal_process_definition.html"?>
- <title>A Minimal Process Definition</title>
- <para>Now we are ready to create a very simple process definition consisting of
a begin
- state, an intermediate state and an end state.</para>
- <para>To make the configuration of actions much easier it's better to use
the
- jPDL perspective. It provides the tabbed Properties Editor which allows to configure
- all the relevant properties of the current selected item. </para>
-
- <section id="adding_the_nodes">
- <?dbhtml filename="adding_the_nodes.html"?>
- <title>Adding the Nodes</title>
- <para>At first select respectively <emphasis>
- <property moreinfo="none">Start</property>,
</emphasis>
- <emphasis>
- <property moreinfo="none">State</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">End</property>
- </emphasis> on the tools palette and click on the canvas to add these nodes
to
- the process definition. The result should look similar to this:</para>
- <figure float="0">
- <title>A Simple Process With Three Nodes</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_7.png"
scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="adding_transitions">
- <?dbhtml filename="adding_transitions.html"?>
- <title>Adding Transitions</title>
- <para>Then, we will connect the nodes with transitions. To do that select the
<emphasis>
- <property moreinfo="none">Transition</property>
- </emphasis> tool in the tools palette and click on the <emphasis>
- <property moreinfo="none">Start</property>
- </emphasis> node, then move to the <emphasis>
- <property moreinfo="none">State</property>
- </emphasis> node and click again to see the transition being drawn. Perform
the
- same steps to create a transition from the <emphasis>
- <property moreinfo="none">State</property>
- </emphasis> node to the <emphasis>
- <property moreinfo="none">End</property>
- </emphasis> node. The result will look like:</para>
- <figure float="0">
- <title>A Simple Process With Transitions</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_8.png"
scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Now, when you've got background knowledge of simple project
creation,
- let's move to more advanced tools.</para>
- </section>
- </section>
- </section>
-
-</chapter>
-
-
-<chapter id="the_views"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/the_views.xml"
xreflabel="the_views">
- <?dbhtml filename="the_views.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>The views</title>
-
- <para>Here, it will be explained how to work with views and editors provided by
JBDS.</para>
- <para>The views are used for representation and navigation the resources you
are working on at
- the moment. One of the advantages of all the views is that all modifications made
in the
- current active file are immediately displayed in them. Let’s get acquainted more
closely
- with those that the <property moreinfo="none">jPDL
perspective</property> provides. </para>
-
- <figure float="0">
- <title>The jPDL Perspective Views and Editors</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_0.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see in the picture above, the <property
moreinfo="none">jPDL perspective</property> contains a
- complete set of functionality that's necessary for working on the jBPM
project.</para>
-
- <section id="the_outline_view">
- <?dbhtml filename="the_outline_view.html"?>
- <title>The Outline View</title>
- <para>To have a way to quickly see an outline of the process use the
<emphasis>
- <property moreinfo="none">Outline view</property>
- </emphasis> that is presented as the classical tree. If it is not
visible select <emphasis>
- <property moreinfo="none">Window > Show view
> Outline</property>. </emphasis></para>
-
- <figure float="0">
- <title>The Overview View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="the_overview">
- <?dbhtml filename="the_outline_view.html"?>
- <title>The Overview</title>
- <para>The main advantage of this view is that it gives visual
representation of the whole
- current developing process. Besides, the <emphasis>
- <property moreinfo="none">Overview</property>
- </emphasis> comes as a scrollable thumbnail which enables a better
navigation of the
- process structure if it's too large.</para>
-
- <figure float="0">
- <title>The Overview</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="the_properties_view">
- <?dbhtml filename="the_properties_view.html"?>
- <title>The Properties View</title>
- <para> Here, we dwell on the JBDS <property
moreinfo="none">Properties view</property>.</para>
- <para>Notice if it's not visible you can access it by navigating
<emphasis>
- <property moreinfo="none">Window > Show view
> Properties</property>. </emphasis></para>
- <para>The view shows the relevant properties of the selected item in the
tabbed form. Every
- item has its own set of properties, which can be directly editable in the
Properties
- view or by brining up the context menu.</para>
-
- <figure float="0">
- <title>The Properties View of selected Transition</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For example, on the picture above the Properties view displays all
the properties for
- a selected transition. Its name has been changed to <emphasis>
- <property moreinfo="none">to_auction</property>.
</emphasis> We've done it directly in
- active General tab of the view. The same way let's change the name for
the
- second transition to <emphasis>
- <property moreinfo="none">to_end</property>.
</emphasis></para>
- <para>If no one item is selected, the view represents the properties of the
whole process
- definition. </para>
-
- <figure float="0">
- <title>The Properties View of Process Definition</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In this case, it contains six tabs. The first one is the
<emphasis>
- <property
moreinfo="none">General</property>.</emphasis> It allows to
specify a process name and add
- necessary description. To illustrate let's change the process definition
name
- to <emphasis>
- <property moreinfo="none">jbay</property>.
</emphasis></para>
- </section>
-
- <section id="jbpm_gpd_editor">
- <?dbhtml filename="direct_editing.html"?>
- <title>The jBPM Graphical Process Designer editor.</title>
- <para>The <property moreinfo="none">jBPM GPD
editor</property> includes four modes: Diagram, Deployment,
- Design and Source, which are available as switchable tabs at the bottom of
the editor.
- Let's dwell on each of them.</para>
-
- <section id="the_diagram_mode">
- <title>The Diagram mode</title>
- <para> In this mode we define the process in the form of a diagram by
means of tools
- provided on the left-hand side of the jBPM GPD. </para>
-
- <figure float="0">
- <title>The Diagram mode</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Besides, some properties can be directly edited in the
<property moreinfo="none">Diagram
- mode</property> of the graphical editor. One example of this is the
<emphasis>
- <property moreinfo="none">name</property>
- </emphasis> property of nodes. You can edit this directly by
selecting the node of
- which you want to change the name and then click once inside this node.
This enables
- an editor in the node. We change the name of the node to
<emphasis>
- <property moreinfo="none">auction</property>.
</emphasis></para>
- </section>
-
- <section id="source_mode">
- <?dbhtml filename="the_source_view.html"?>
- <title>The Source Mode</title>
- <para>Now, that we have defined a simple process definition, we can
have a look at the
- XML that is being generated under the covers. To see this XML click on
the Source
- tab of the graphical process designer editor.</para>
-
- <figure float="0">
- <title>The Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The <property moreinfo="none">Source
mode</property> enables to easily manipulate our XML. That is
- manually inserting and editing necessary elements or attributes. In
addition, here
- you can take advantage of content assist.</para>
- </section>
-
- <section id="design_mode">
- <?dbhtml filename="the_design_view.html"?>
- <title>The Design Mode</title>
- <para>One more way to edit your file is to use <property
moreinfo="none">Design mode</property>. You can
- see it in the next picture:</para>
- <figure float="0">
- <title>The Design Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see above, this mode looks like a table in the first
column of which
- the process structure is performed. Here, you can also insert, remove and
edit
- elements or attributes, moreover add comments and instructions. Their
values can be
- directly edited in the second column of the Design mode
table.</para>
- <para>For instance, let’s add a comment on the second transition. For
that, you should
- bring up the context menu for it and choose <emphasis>
- <property moreinfo="none">Add Before >
Comment</property>. </emphasis></para>
-
- <figure float="0">
- <title>Adding a Comment</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Then, we can put the text <emphasis>This transition leads
to the end
- state</emphasis> in the right column as its value.</para>
-
- <figure float="0">
- <title>Comment is added</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="deployment_mode">
- <?dbhtml filename="the_deployment_view.html"?>
- <title>The Deployment Mode</title>
- <para>Finally, to adjust the deployment settings of the project you
should switch on to
- the tab that opens the <property
moreinfo="none">Deployment mode</property>. On the picture below
- the <property moreinfo="none">Deployment
mode</property> is performed with default settings. Here,
- you can easily modify them or, if the settings won't match your
needs, to
- reset defaults. </para>
- <figure float="0">
- <title>The Deployment Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/the_views/the_views_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The button <emphasis>
- <property moreinfo="none">Test
Connections</property>
- </emphasis> is necessary to make sure whether all your settings are
valid before
- deploying the process.</para>
- <para>Now that we've seen how to work with <property
moreinfo="none">jPDL
- perspective</property>, let's pass on to the project
testing.</para>
- </section>
- </section>
-</chapter>
-
-<chapter id="Test_Drive_Proc_Development"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml"
xreflabel="Test_Drive_Proc_Development">
- <?dbhtml filename="Test_Drive_Proc_Development.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- </keywordset>
- </chapterinfo>
- <title>Test Driven Process Development</title>
-
- <para> One of the most important advantages of JBoss jBPM's lightweight
approach to BPM
- and workflow management is that developers can easily leverage their usual
programming
- skills and techniques. One of these well-known techniques is Unit Testing and
Test Driven
- Development. </para>
- <para>In this chapter we will show how developers, making use of the JBoss jBPM
GPD, can use a
- technique we have baptized <property moreinfo="none">Test Driven
Process Development</property> to create
- process definitions and test their correctness. </para>
-
- <para> When creating the <emphasis>
- <property moreinfo="none">HellojBPM</property>
- </emphasis> project the Project Creation wizard has already put in place
all the library
- requirements we need to start writing the jBPM unit tests. They are contained in
the jBPM
- Library container and the most important of them is the <emphasis>
- <property moreinfo="none">.jar</property>
- </emphasis> file containing the core jBPM classes. While working on the
project you could
- find them all in the <property moreinfo="none">Package
Explorer</property>.</para>
-
- <figure float="0">
- <title>The jBPM Libraries</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>It must be noted that it is possible to change the location of the core
jBPM installation
- by changing the preference settings. More on this <link
linkend="change_core_jbpm_inst">see
- later</link> in this book.</para>
-
- <para> With that extra knowledge on the project settings, you can create your
first test. To do
- this, we create the <emphasis>
- <property moreinfo="none">com.jbay</property>
- </emphasis> package in the <emphasis>
- <property moreinfo="none">test/java</property>
- </emphasis> source folder. Then we bring up the context menu on this
package and select <emphasis>
- <property moreinfo="none">New >
Other...</property>
- </emphasis></para>
-
- <figure float="0">
- <title>Call the JUnit Test Case Creation wizard</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> And then <emphasis>
- <property moreinfo="none">Java > JUnit > JUnit
Test Case</property>
- </emphasis> to call the specialized JUnite Test case creation
wizard.</para>
- <figure float="0">
- <title>Call the JUnit Test Case Creation wizard</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The wizard looks as follows:</para>
-
- <figure float="0">
- <title>Create Test Dialog</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>By default JUnite 3 version of testing framework is selected. Of course,
you can choose
- new advanced JUnit 4 version. In this case you'll be prompted to add new
JUnit
- Library to your build path. To add it automatically just click on the appropriate
link. In
- the <emphasis>
- <property moreinfo="none">Class under test</property>
- </emphasis> section you can specify the class to test.</para>
-
- <figure float="0">
- <title>A First Test Scenario</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Then, we call the test class <emphasis>
- <property moreinfo="none">HelloTest</property>
- </emphasis> and press <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button to complete.</para>
-
- <para> Next, we should write a simple test scenario as shown on the next
figure. Let's
- study the code of this test case. </para>
-
- <figure float="0" id="hello_test">
- <title>A First Test Scenario</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_6.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the first line of the method, a jBPM process archive object is
created. We use a
- constructor accepting the filename of the archive. In our case it is the
<emphasis>
- <property moreinfo="none">hello</property>
- </emphasis> file we created earlier and which lives in the
<emphasis>
- <property moreinfo="none">src/main/jpdl</property>
- </emphasis> folder of our project. After asserting that this object is
really created, we
- extract a process definition object from it. This object is fed to the
constructor of a
- process instance object. We have a process instance object, but this process is
not yet
- started, so we can safely assert that its root token still resides in the start
node. After
- signalling the token will move to the next state and the process will be in the
<emphasis>
- <property moreinfo="none">auction</property>
- </emphasis> state. Finally another signal will end the process.
</para>
-
-
- <para> After writing this test we can check whether it works as expected by
running it .</para>
-
- <figure float="0">
- <title>Running the Process Test</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_7.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>All went well as we have a green light:</para>
-
- <figure float="0">
- <title>Successful Test Run</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_8.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Of course, this simple scenario was not very interesting, but the
purpose of it was to
- show how you can reuse your development skills in a very straightforward way when
doing
- process development. To see how more interesting processes and process test
- scenario's can be developed, we suggest you to read the <ulink
url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User
Guide</ulink> and to
- study the API reference. You can find it in the jBPM download folder. (To get
started we
- downloaded jbpm-jpdl-3.2.2 in <link
linkend="jboss_jbpm_runtime_installation">the second
- chapter</link>. You should just remember where you extracted it.) All
we've mentioned are in the 'javadoc- *' subfolders of the 'doc'
folder.
- Moreover, some more examples will be given later in this book.</para>
-
-</chapter>
-
-
-<chapter id="The_JBoss_jBPM_Int_Mech"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/The_JBoss_jBPM_Int_Mech.xml"
xreflabel="The_JBoss_jBPM_Int_Mech">
- <?dbhtml filename="The_JBoss_jBPM_Int_Mech.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- </keywordset>
- </chapterinfo>
- <title>Actions : The JBoss jBPM Integration Mechanism</title>
-
- <para> In this chapter we will show how to do software integration with
<property moreinfo="none">JBoss
- jBPM</property>. The standard mechanism to implement this is to wrap the
functionality you
- want to integrate in a class that implements the <emphasis>
- <property moreinfo="none">ActionHandler</property>
- </emphasis> interface. In order to demonstrate it let's specify Hello
World action for our
- process.</para>
-
- <section>
- <title>Creating a Hello World Action</title>
-
- <para>Each Hello World process should integrate one or more Hello World
actions, so this is
- what we will be doing. We can integrate custom code at different points in
the process
- definition. To do this we have to specify an action handler, represented by
an
- implementation of the <emphasis>
- <property moreinfo="none">ActionHandler</property>
- </emphasis> interface, and attach this piece of code to a particular
event. These events
- are amongst others, going over a transition, leaving or entering nodes, after
and before
- signalling. </para>
-
- <para> To make things a little bit more concrete, let's create a new
class called <emphasis>
- <property
moreinfo="none">HelloActionHandler</property>.
- </emphasis> For that firstly we'll create a new package
<emphasis>
- <property
moreinfo="none">com.jbay.action</property>
- </emphasis> in the <emphasis>
- <property moreinfo="none">src/java/main</property>
- </emphasis> folder of our project. Then, we should call New Class
Creation wizard as
- usual by right-clicking and navigating <emphasis>
- <property moreinfo="none">New >
Class</property>.
- </emphasis> </para>
-
- <figure float="0">
- <title>Creating HelloActionHendler Class</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Notice that two first gaps have been filled automatically. Here,
instead of <emphasis>
- <property moreinfo="none">Package</property>
- </emphasis> option <emphasis>
- <property moreinfo="none">Enclose type</property>
- </emphasis> option can be selected where a type in which to enclose a
new class should
- be specified.</para>
-
- <para>In our case, we leave everything as it is, just type
<emphasis>
- <property
moreinfo="none">HelloActionHandler</property>
- </emphasis> as a name of new class and add <emphasis>
- <property
moreinfo="none">org.jbpm.graph.ActionHendler</property>
- </emphasis> interface as it's shown in the picture
above.</para>
-
- <para>Thus, our <emphasis>
- <property
moreinfo="none">HelloActionHandler</property>
- </emphasis> implements the <emphasis>
- <property moreinfo="none">ActionHandler</property>
- </emphasis> interface including the <emphasis>
- <property moreinfo="none">execute</property>
- </emphasis> method as shown in the next figure. Here, we add a variable
named <emphasis>
- <property moreinfo="none">greeting</property>
- </emphasis> to the collection of process variables and put a
message in it :
- <emphasis>"Hello from ActionHandler"</emphasis>.
</para>
-
- <figure float="0">
- <title>A Simple Hello Action</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_2.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now, as we have <emphasis>
- <property
moreinfo="none">HelloActionHandler</property>
- </emphasis> class defined, let's explore how we can handle
it.</para>
- </section>
-
- <section>
- <title>Integrating the Hello World Action</title>
-
- <para>The main purpose of this chapter is to provide you with the steps
associating our
- Hello World action with a particular event and test the correctness of our
actions as
- well.</para>
-
- <para> As good Testcity citizens we will first create a Unit Test that
proves the behaviour
- we want to achieve by adding the <emphasis>
- <property moreinfo="none">ActionHandler</property>
- </emphasis> to the process. So we implement another test.</para>
-
- <para>At first, let's return to the
- code we already saw <link linkend="hello_test">in the
previous chapter</link> and add new test method <emphasis>
- <property
moreinfo="none">testActionHendler</property></emphasis> to it.
</para>
-
- <figure float="0">
- <title>Create the Hello Action Test</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_3.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>We assert
- that no variable called <emphasis>
- <property moreinfo="none">greeting</property>
- </emphasis> exist. Then we give the process a signal to move it to the
auction state. We
- want to associate the execution of the action with the event of going over
the
- transition from the start state to the auction state. So after the signal,
the process
- should be in the auction state as in the previous scenario. But moreover, the
<emphasis>
- <property moreinfo="none">greeting</property>
- </emphasis> variable should exist and contain the string
<emphasis>"Hello from
- ActionHandler"</emphasis>. That's what we assert in the last
lines of the test
- method.</para>
-
-
-
- <para> Running the tests now results in a failure. The point is that we did
not associate
- the action with any particular event in the process definition, so the
process variable
- did not get set. </para>
-
- <figure float="0">
- <title>Test Results Before Integration</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_4.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Let's do something about it and add an action to the first
transition of our
- sample process. To do this you can use the Actions tab in the Properties
Editor that is
- under the graphical canvas. Bring up the popup menu of the action element
container and
- chose New Action as it's shown on the figure below. The other way to add
an action
- to the transition is simply to use the dropdown menu that is available under
the action
- icon in the right upper corner of the Properties View.</para>
-
- <figure float="0">
- <title>Adding an Action to a Transition</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_5.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After adding the action a tabbed view with three pages will
appear.</para>
-
- <figure float="0">
- <title>Configuration Dialog for an Action</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_6.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The first of these three pages allows you to give the Action a name.
The last page
- contains some advanced attributes such as whether the Action is asynchronous.
The
- Details page is the most important. It allows to choose and configure the
actual action
- handler implementation. </para>
-
- <figure float="0">
- <title>The Details page of an Action Configuration
Dialog</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_7.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>Clicking on the <emphasis>
- <property moreinfo="none">Search...</property>
- </emphasis> button brings us to a Choose Class dialog.</para>
-
-
- <figure float="0">
- <title>The Choose Action Handler Dialog</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para> We choose our previously created 'HelloActionHandler' class
and
- push the <property moreinfo="none">OK</property>
button. After the selection of the action handler for
- the action, we can run the test and observe it gives us a green
light.</para>
-
- <figure float="0">
- <title>Test Results</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_9.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Tere we are. The above objective has been achieved.</para>
- </section>
-
- <section>
- <title> Integration Points</title>
-
- <para> The different integration points in a process definition are
thoroughly documented in
- the <ulink
url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User
Guide</ulink>. Instance nodes can contain many action
- elements. Each of these will appear in the Action element list of the Actions
tab. But
- each Action also has a properties view of itself. You can navigate to this
view by
- selecting the added Action in the outline view. </para>
-
- </section>
-
-</chapter>
-
-
-<chapter id="Quick_Howto_Guide"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml"
xreflabel="Quick_Howto_Guide">
- <?dbhtml filename="Quick_Howto_Guide.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- </keywordset>
- </chapterinfo>
- <title>Quick Howto Guide</title>
-
- <para>This chapter contains additional information related to the <property
moreinfo="none">JBoss
- jBPM</property>.</para>
-
- <section id="change_core_jbpm_inst">
- <title>Change the Default Core jBPM Installation</title>
-
- <para> You can change the default <property
moreinfo="none">jBPM</property> installation by means of the
- Eclipse preference mechanism. Open the Preferences dialog by selecting
<emphasis>
- <property moreinfo="none">Window >
Preferences</property>
- </emphasis> and select the <emphasis>
- <property moreinfo="none">JBoss jBPM > Runtime
Location</property>
- </emphasis> category. Using this page you can add multiple <property
moreinfo="none">jBPM</property>
- installation locations and change the default one. The default installation
is used for
- the classpath settings when creating a new Process Project. Changing the
preferences has
- no influence on already created projects. Getting rid of a <property
moreinfo="none">jBPM</property>
- installation that's being referenced by a project however will cause the
- classpath to contain errors. </para>
-
-
- <figure float="0">
- <title>The jBPM Preferences Page</title>
-
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section>
- <title>Configuring Task Nodes</title>
-
- <para>Here, we'll examine how you can configure the Task nodes in jBPM
jPDL GPD.</para>
-
- <para> You can add Tasks to Task nodes and then configure them in a similar
manner as the
- Action configuration mechanism. Let's consider the process definition
similar
- to the previous one that contains three nodes: Start state, Task node and End
state. The
- <property moreinfo="none">Properties view</property>
for selected Task node includes several tabs. </para>
-
- <figure float="0">
- <title>The Properties View of the selected Task Node</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_2.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>We should choose the Task tab and then bring up the context menu or
click the button
- in the top right corner of the view to add a Task to our Task
node.</para>
-
- <figure float="0">
- <title>Adding a Task to the Task Node</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_3.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Every added Task has its own configuration possibilities. You can
access them through
- the <property moreinfo="none">Properties
view</property> as well.</para>
-
- <figure float="0">
- <title>The Task properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_4.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <property moreinfo="none">General
page</property> is a place where you can specify the name of a
- Task and its description. For instance, let it be <emphasis>
- <property moreinfo="none">approve oder</property>
- </emphasis> with appropriate description that you can see in the figure
below.</para>
-
- <figure float="0">
- <title>The Task General Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_5.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now, look at <property moreinfo="none">Details
page</property>. First, you should specify the due date
- that is a mandatory property for the Task. The due date is the date on which
the task
- should be accomplished. Here you can also set a Task priority as well as
signalling,
- notifying or blocking. The <emphasis>
- <property moreinfo="none">Blocking</property>
- </emphasis> attribute indicates that the process will not be able to
continue if this
- task is still unaccomplished. The <emphasis>
- <property moreinfo="none">Generate
Form...</property>
- </emphasis> button is for creating a simple task form that can be
rendered by the jBPM
- console.</para>
-
- <figure float="0">
- <title>The Task Details Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_6.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For our example, we specify the due date as 2 business days, choose
the high priority
- and also check the <emphasis>
- <property moreinfo="none">Signalling</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">Notify</property>
- </emphasis> attributes. It means that the Task should be accomplished
in 2 business days
- and the assignee will be notified by email when the task is assigned. To
specify how the
- Task should be assigned switch on to the <property
moreinfo="none">Assignment page</property>.</para>
-
- <figure float="0">
- <title>The Task Assignment Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_7.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the <property moreinfo="none">Reminder
page</property> you can specify whether the assignee will be reminded of the task
- that awaits him.</para>
-
- <figure float="0">
- <title>The Task Reminder Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_8.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In our case, the assignee will be reminded by email after two
business hours and
- continue to get reminding every business hour after that.</para>
- <para>In the next figure you can see our configuring generated into
XML.</para>
- <figure float="0">
- <title>The Task Reminder Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_9.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>We hope, our guide will help you to get started with the jPDL process
language and jBPM
- workflow on the whole. Besides, for additional information you are welcome on
<ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
forum</ulink>.</para>
- </section>
-</chapter>
-
-
- <!-- TODO: drools used in this section is not available for eclipse .3.3
&AddBusinessProcess; -->
-</book>
+ ]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>jBPM Tools Reference Guide</title>
+
+ <author>
+ <firstname>Anatoly</firstname>
+ <surname>Fedosik</surname>
+ </author>
+ <author>
+ <firstname>Koen</firstname>
+ <surname>Aers</surname>
+ <email>koen.aers(a)jboss.com</email>
+ </author>
+ <author>
+ <firstname>Olga</firstname>
+ <surname>Chikvina</surname>
+ </author>
+ <author>
+ <firstname>Svetlana</firstname>
+ <surname>Mukhina</surname>
+ <email>smukhina(a)exadel.com</email>
+ </author>
+ <author>
+ <firstname>Tom</firstname>
+ <surname>Baeyens</surname>
+ <email>tom.baeyens(a)jboss.com</email>
+ </author>
+
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <releaseinfo> Version: 3.1.5.GA</releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/jbpm/pdf/J...
version</ulink>
+ </para>
+</abstract>
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="Introduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Introduction.xml"
xreflabel="Introduction">
+ <?dbhtml filename="TargetAudience.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>Target</keyword>
+ <keyword>developers</keyword>
+ <keyword>Audience</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Introduction</title>
+ <para>All developers and process analysts who are beginning to use JBoss jBPM
should read this
+ Getting Started guide. It will give them a jumpstart showing how to create a process
definition.</para>
+ <section id="Preface">
+ <?dbhtml filename="Preface.html"?>
+ <title>Preface</title>
+ <para>This document introduces the use of the JBoss jBPM Graphical Process
Designer (GPD) to
+ create workflow processes. It will help first time users with the following tasks
:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Install the JBoss jBPM GPD Eclipse plugin available from the JBoss jBPM
download
+ area</para>
+ </listitem>
+ <listitem>
+ <para>Set up a Java project in Eclipse and prepare it to do test driven
process
+ development</para>
+ </listitem>
+ <listitem>
+ <para>Using the creation wizard to create an empty process
definition</para>
+ </listitem>
+ <listitem>
+ <para>Use the designer palette to draw the first
processdefinition</para>
+ </listitem>
+ <listitem>
+ <para>Show how the xml processdefinition can be inspected as an xml
file</para>
+ </listitem>
+ <listitem>
+ <para>Set up a Java project in Eclipse and prepare it to do test driven
process
+ development</para>
+ </listitem>
+ <listitem>
+ <para>Write an example process test case</para>
+ </listitem>
+ </itemizedlist>
+ <para>If you have questions, please feel free to contact <ulink
url="mailto:koen.aers@jboss.com">Koen Aers</ulink> or <ulink
url="mailto:tom.baeyens@jboss.com">Tom Baeyens</ulink> for more
+ information.</para>
+ </section>
+
+ <section id="feature_list">
+
+ <title>Feature list</title>
+
+ <para> JBoss jBPM is a workflow that enables creating and automatization business
processes. Look
+ at the list of features below to understand its main functionality.</para>
+ <table>
+ <title>Key Functionality for JBoss jBPM</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>
+ <link linkend="minimal_process_definition">jBDL
support</link>
+ </entry>
+ <entry>Enables managing workflow processes as well as human tasks and
interactions between
+ them. jBDL combines the best both Java and declarative process
techniques.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="GuidedTourJBossjBPMGPD">Support of Graphical
Process Designer (GPD)</link>
+ </entry>
+ <entry>Is used for simplifying declarative process development and
visualizations of all
+ actions.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="CreatingjBPMProject">Project Creation
wizard</link>
+ </entry>
+ <entry>Allows to create a new jBPM template project that already includes all
advanced
+ artifacts and core jBPM libraries.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="minimal_process_definition">Rich palette of
pre-build process nodes</link>
+ </entry>
+ <entry>Provides process-building functionality and gives opportunity even
non-programmers to
+ develop processes.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="source_mode">Support of XML code view</link>
+ </entry>
+ <entry>Shows the corresponding XML that's generated automatically in the
Source view
+ of the process definition editor when developing the process.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="the_properties_view">Properties view</link>
+ </entry>
+ <entry>Facilitates configuring and editing of all nodes
properties.</entry>
+ </row>
+
+ <row>
+ <entry>Interaction with all of the J2EE based integration technologies
including Web Services,
+ Java Messaging, J2EE Connectors, JBDC, EJBs.</entry>
+ <entry>Enables implementation, provides better functionality and
flexibility.</entry>
+ </row>
+
+ <row>
+ <entry>Integration with jBoss Seam</entry>
+ <entry>Allows to write applications with complex workflows and provides
easier interactions
+ between them.</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink
url="http://docs.jboss.org/tools/2.1.0.GA/">here</ulink&g...
+ <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
+ </section>
+
+</chapter>
+
+
+<chapter id="jboss_jbpm_runtime_installation"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/jboss_jbpm_runtime_installation.xml"
xreflabel="jboss_jbpm_runtime_installation">
+ <?dbhtml filename="jboss_jbpm_runtime_installation.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>designer</keyword>
+ <keyword>process</keyword>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>jBPM runtime</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>JBoss jBPM Runtime Installation</title>
+ <para>The main purpose of this chapter is to let you know how to launch the
<property moreinfo="none">JBoss
+ jBPM</property> (business process management).</para>
+ <para>The jBPM plugin (jBPM Designer) is already included in the <property
moreinfo="none">JBoss Tools</property>.
+ To make it work, you should only download the jBPM runtime (<ulink
url="http://sourceforge.net/project/showfiles.php?group_id=70542&...
currently) and specify the directory where you extracted the runtime
+ either when you create a jBPM project or by using the jBPM preference
pages.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Try to avoid using spaces in the names of installation folders. It can
provoke problems in
+ some situations with Sun-based VMs.</para>
+ </note>
+
+ <para>Navigate to <emphasis>
+ <property moreinfo="none">Window > Preferences > JBoss
jBPM > Runtime Locations</property>.
+ </emphasis> Here you can add, edit and remove JBoss jBPM installation locations.
Click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button. In the dialog that appeared enter a name for a newly added
jBPM runtime and
+ point to the correct location of this package on your harddrive. Click
<emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> then click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> again.</para>
+
+ <figure float="0">
+ <title>Adding jBPM Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/runtime_installation/runtime_installation_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now, when you have a runtime installed, we are going to demonstrate some
powerful features of
+ the jBPM.</para>
+</chapter>
+
+
+<chapter id="GuidedTourJBossjBPMGPD"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml"
xreflabel="GuidedTourJBossjBPMGPD">
+ <?dbhtml filename="GuidedTourJBossjBPMGPD.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>Process</keyword>
+ <keyword>Definition</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>A Guided Tour of JBoss jBPM GPD</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating and
configuring your
+ own simple process. Let's try to organize a new jBPM project.</para>
+ <para>A wizard for creating a jBPM project is included in the GPD plugin. We have
opted to
+ create a project based on a template already containing a number of advanced artifacts
that
+ we will ignore for this section. In the future we will elaborate this wizard and offer
the
+ possibility to create an empty jBPM project as well as projects based on templates
taken
+ from the jBPM tutorial.</para>
+ <section id="CreatingjBPMProject">
+ <?dbhtml filename="CreatingjBPMProject.html"?>
+ <title>Creating a jBPM Project</title>
+ <para>This section will show you how to use the Creation wizard for creating a
new jBPM
+ project with already included source folders.</para>
+ <para>At first you should select <emphasis>
+ <property moreinfo="none">File >New
Project...</property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">JBoss jBPM > Process
Project</property>
+ </emphasis> in the New Project dialog:</para>
+ <figure float="0">
+ <title>New Project Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings us to the wizard page where it's necessary to specify
the
+ name and location for the project. We choose, for example, <emphasis>
+ <property moreinfo="none">HellojBPM</property>
+ </emphasis> as the name and accept the default location. </para>
+ <figure float="0">
+ <title>Process Name and Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus, our project will be created in the workspace root directory by
default. If you
+ want to change the directory for your future project, deselect <emphasis>
+ <property moreinfo="none">Use default location</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis> button to set needed location or simply type it.</para>
+ <para>On the next screen you'll be prompted to select the core jBPM location
that
+ we have defined in the previous chapter.</para>
+ <figure float="0">
+ <title>Core jBPM Location Specifying</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Clicking on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> results in the project being generated. The wizard creates four
source
+ folders: one for the processes (<emphasis>
+ <property moreinfo="none">src/main/jpdl</property>
+ </emphasis>), one for the java sources (<emphasis>
+ <property moreinfo="none">src/main/java</property>
+ </emphasis>), one for the unit tests (<emphasis>
+ <property moreinfo="none">src/test/java</property>
+ </emphasis>) and one for the resources such as the jbpm.properties and the
+ hibernate.properties files (<emphasis>
+ <property moreinfo="none">src/main/config</property>
+ </emphasis>). In addition a classpath container with all the core jBPM libraries
is
+ added to the project</para>
+ <figure float="0">
+ <title>Layout of the Process Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Looking inside the different source folders will reveal a number of other
artifacts
+ that were generated, but we will leave these untouched for the moment. Instead, we
will
+ look at another wizard that enables us to create an empty process
definition.</para>
+ </section>
+ <section id="creating_an_empty_process_definition">
+ <?dbhtml filename="creating_an_empty_process_definition.html"?>
+ <title>Creating an Empty Process Definition</title>
+ <para>Now when the project is set up, we can use a Creation wizard to create an
empty
+ process definition. Bring up the <emphasis>
+ <property moreinfo="none">New</property>
+ </emphasis> wizard by clicking the <emphasis>
+ <property moreinfo="none">File > New >
Other...</property>
+ </emphasis> menu item. The wizard opens on the <emphasis>
+ <property moreinfo="none">Select Wizard</property>
+ </emphasis> page.</para>
+ <figure float="0">
+ <title>The Select Wizard Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Selecting the <emphasis>
+ <property moreinfo="none">JBoss jBPM</property>
+ </emphasis> category, then the <emphasis>
+ <property moreinfo="none">Process Definition</property>
+ </emphasis> item and clicking on the <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button brings us to the <emphasis>
+ <property moreinfo="none">Create Process Definition</property>
+ </emphasis> page.</para>
+ <figure float="0">
+ <title>The Create New Process Definion Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>We choose <emphasis>
+ <property moreinfo="none">hello</property>
+ </emphasis> as the name of the process archive file. Click on the
<emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to end the wizard and open the process definition
editor.</para>
+ <figure float="0">
+ <title>The Process Definition Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_6.png"
scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You can see in the Package Explorer that creating a process definition
involves
+ creating a folder with the name of the process definition and populating this folder
+ with two .xml files : <emphasis>
+ <property moreinfo="none">gpd.xml</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">processdefinition.xml</property>.
</emphasis></para>
+ <para>The <emphasis>
+ <property moreinfo="none">gpd.xml</property>
+ </emphasis> contains the graphical information used by the process definition
editor.
+ The <emphasis>
+ <property moreinfo="none">processdefinition.xml</property>
+ </emphasis> file contains the actual process definition info without the
graphical
+ rendering info. At present, the GPD assumes that these two files are siblings. More
+ sophisticated configuration will be supported later.</para>
+
+ <section id="minimal_process_definition">
+ <?dbhtml filename="minimal_process_definition.html"?>
+ <title>A Minimal Process Definition</title>
+ <para>Now we are ready to create a very simple process definition consisting of
a begin
+ state, an intermediate state and an end state.</para>
+ <para>To make the configuration of actions much easier it's better to use
the
+ jPDL perspective. It provides the tabbed Properties Editor which allows to configure
+ all the relevant properties of the current selected item. </para>
+
+ <section id="adding_the_nodes">
+ <?dbhtml filename="adding_the_nodes.html"?>
+ <title>Adding the Nodes</title>
+ <para>At first select respectively <emphasis>
+ <property moreinfo="none">Start</property>,
</emphasis>
+ <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">End</property>
+ </emphasis> on the tools palette and click on the canvas to add these nodes
to
+ the process definition. The result should look similar to this:</para>
+ <figure float="0">
+ <title>A Simple Process With Three Nodes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_7.png"
scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="adding_transitions">
+ <?dbhtml filename="adding_transitions.html"?>
+ <title>Adding Transitions</title>
+ <para>Then, we will connect the nodes with transitions. To do that select the
<emphasis>
+ <property moreinfo="none">Transition</property>
+ </emphasis> tool in the tools palette and click on the <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis> node, then move to the <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> node and click again to see the transition being drawn. Perform
the
+ same steps to create a transition from the <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> node to the <emphasis>
+ <property moreinfo="none">End</property>
+ </emphasis> node. The result will look like:</para>
+ <figure float="0">
+ <title>A Simple Process With Transitions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_8.png"
scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now, when you've got background knowledge of simple project
creation,
+ let's move to more advanced tools.</para>
+ </section>
+ </section>
+ </section>
+
+</chapter>
+
+
+<chapter id="the_views"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/the_views.xml"
xreflabel="the_views">
+ <?dbhtml filename="the_views.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>The views</title>
+
+ <para>Here, it will be explained how to work with views and editors provided by
JBDS.</para>
+ <para>The views are used for representation and navigation the resources you
are working on at
+ the moment. One of the advantages of all the views is that all modifications made
in the
+ current active file are immediately displayed in them. Let’s get acquainted more
closely
+ with those that the <property moreinfo="none">jPDL
perspective</property> provides. </para>
+
+ <figure float="0">
+ <title>The jPDL Perspective Views and Editors</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_0.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see in the picture above, the <property
moreinfo="none">jPDL perspective</property> contains a
+ complete set of functionality that's necessary for working on the jBPM
project.</para>
+
+ <section id="the_outline_view">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Outline View</title>
+ <para>To have a way to quickly see an outline of the process use the
<emphasis>
+ <property moreinfo="none">Outline view</property>
+ </emphasis> that is presented as the classical tree. If it is not
visible select <emphasis>
+ <property moreinfo="none">Window > Show view
> Outline</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>The Overview View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_overview">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Overview</title>
+ <para>The main advantage of this view is that it gives visual
representation of the whole
+ current developing process. Besides, the <emphasis>
+ <property moreinfo="none">Overview</property>
+ </emphasis> comes as a scrollable thumbnail which enables a better
navigation of the
+ process structure if it's too large.</para>
+
+ <figure float="0">
+ <title>The Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_properties_view">
+ <?dbhtml filename="the_properties_view.html"?>
+ <title>The Properties View</title>
+ <para> Here, we dwell on the JBDS <property
moreinfo="none">Properties view</property>.</para>
+ <para>Notice if it's not visible you can access it by navigating
<emphasis>
+ <property moreinfo="none">Window > Show view
> Properties</property>. </emphasis></para>
+ <para>The view shows the relevant properties of the selected item in the
tabbed form. Every
+ item has its own set of properties, which can be directly editable in the
Properties
+ view or by brining up the context menu.</para>
+
+ <figure float="0">
+ <title>The Properties View of selected Transition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For example, on the picture above the Properties view displays all
the properties for
+ a selected transition. Its name has been changed to <emphasis>
+ <property moreinfo="none">to_auction</property>.
</emphasis> We've done it directly in
+ active General tab of the view. The same way let's change the name for
the
+ second transition to <emphasis>
+ <property moreinfo="none">to_end</property>.
</emphasis></para>
+ <para>If no one item is selected, the view represents the properties of the
whole process
+ definition. </para>
+
+ <figure float="0">
+ <title>The Properties View of Process Definition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In this case, it contains six tabs. The first one is the
<emphasis>
+ <property
moreinfo="none">General</property>.</emphasis> It allows to
specify a process name and add
+ necessary description. To illustrate let's change the process definition
name
+ to <emphasis>
+ <property moreinfo="none">jbay</property>.
</emphasis></para>
+ </section>
+
+ <section id="jbpm_gpd_editor">
+ <?dbhtml filename="direct_editing.html"?>
+ <title>The jBPM Graphical Process Designer editor.</title>
+ <para>The <property moreinfo="none">jBPM GPD
editor</property> includes four modes: Diagram, Deployment,
+ Design and Source, which are available as switchable tabs at the bottom of
the editor.
+ Let's dwell on each of them.</para>
+
+ <section id="the_diagram_mode">
+ <title>The Diagram mode</title>
+ <para> In this mode we define the process in the form of a diagram by
means of tools
+ provided on the left-hand side of the jBPM GPD. </para>
+
+ <figure float="0">
+ <title>The Diagram mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Besides, some properties can be directly edited in the
<property moreinfo="none">Diagram
+ mode</property> of the graphical editor. One example of this is the
<emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> property of nodes. You can edit this directly by
selecting the node of
+ which you want to change the name and then click once inside this node.
This enables
+ an editor in the node. We change the name of the node to
<emphasis>
+ <property moreinfo="none">auction</property>.
</emphasis></para>
+ </section>
+
+ <section id="source_mode">
+ <?dbhtml filename="the_source_view.html"?>
+ <title>The Source Mode</title>
+ <para>Now, that we have defined a simple process definition, we can
have a look at the
+ XML that is being generated under the covers. To see this XML click on
the Source
+ tab of the graphical process designer editor.</para>
+
+ <figure float="0">
+ <title>The Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The <property moreinfo="none">Source
mode</property> enables to easily manipulate our XML. That is
+ manually inserting and editing necessary elements or attributes. In
addition, here
+ you can take advantage of content assist.</para>
+ </section>
+
+ <section id="design_mode">
+ <?dbhtml filename="the_design_view.html"?>
+ <title>The Design Mode</title>
+ <para>One more way to edit your file is to use <property
moreinfo="none">Design mode</property>. You can
+ see it in the next picture:</para>
+ <figure float="0">
+ <title>The Design Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see above, this mode looks like a table in the first
column of which
+ the process structure is performed. Here, you can also insert, remove and
edit
+ elements or attributes, moreover add comments and instructions. Their
values can be
+ directly edited in the second column of the Design mode
table.</para>
+ <para>For instance, let’s add a comment on the second transition. For
that, you should
+ bring up the context menu for it and choose <emphasis>
+ <property moreinfo="none">Add Before >
Comment</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>Adding a Comment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then, we can put the text <emphasis>This transition leads
to the end
+ state</emphasis> in the right column as its value.</para>
+
+ <figure float="0">
+ <title>Comment is added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="deployment_mode">
+ <?dbhtml filename="the_deployment_view.html"?>
+ <title>The Deployment Mode</title>
+ <para>Finally, to adjust the deployment settings of the project you
should switch on to
+ the tab that opens the <property
moreinfo="none">Deployment mode</property>. On the picture below
+ the <property moreinfo="none">Deployment
mode</property> is performed with default settings. Here,
+ you can easily modify them or, if the settings won't match your
needs, to
+ reset defaults. </para>
+ <figure float="0">
+ <title>The Deployment Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/the_views/the_views_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The button <emphasis>
+ <property moreinfo="none">Test
Connections</property>
+ </emphasis> is necessary to make sure whether all your settings are
valid before
+ deploying the process.</para>
+ <para>Now that we've seen how to work with <property
moreinfo="none">jPDL
+ perspective</property>, let's pass on to the project
testing.</para>
+ </section>
+ </section>
+</chapter>
+
+<chapter id="Test_Drive_Proc_Development"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml"
xreflabel="Test_Drive_Proc_Development">
+ <?dbhtml filename="Test_Drive_Proc_Development.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Test Driven Process Development</title>
+
+ <para> One of the most important advantages of JBoss jBPM's lightweight
approach to BPM
+ and workflow management is that developers can easily leverage their usual
programming
+ skills and techniques. One of these well-known techniques is Unit Testing and
Test Driven
+ Development. </para>
+ <para>In this chapter we will show how developers, making use of the JBoss jBPM
GPD, can use a
+ technique we have baptized <property moreinfo="none">Test Driven
Process Development</property> to create
+ process definitions and test their correctness. </para>
+
+ <para> When creating the <emphasis>
+ <property moreinfo="none">HellojBPM</property>
+ </emphasis> project the Project Creation wizard has already put in place
all the library
+ requirements we need to start writing the jBPM unit tests. They are contained in
the jBPM
+ Library container and the most important of them is the <emphasis>
+ <property moreinfo="none">.jar</property>
+ </emphasis> file containing the core jBPM classes. While working on the
project you could
+ find them all in the <property moreinfo="none">Package
Explorer</property>.</para>
+
+ <figure float="0">
+ <title>The jBPM Libraries</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It must be noted that it is possible to change the location of the core
jBPM installation
+ by changing the preference settings. More on this <link
linkend="change_core_jbpm_inst">see
+ later</link> in this book.</para>
+
+ <para> With that extra knowledge on the project settings, you can create your
first test. To do
+ this, we create the <emphasis>
+ <property moreinfo="none">com.jbay</property>
+ </emphasis> package in the <emphasis>
+ <property moreinfo="none">test/java</property>
+ </emphasis> source folder. Then we bring up the context menu on this
package and select <emphasis>
+ <property moreinfo="none">New >
Other...</property>
+ </emphasis></para>
+
+ <figure float="0">
+ <title>Call the JUnit Test Case Creation wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> And then <emphasis>
+ <property moreinfo="none">Java > JUnit > JUnit
Test Case</property>
+ </emphasis> to call the specialized JUnite Test case creation
wizard.</para>
+ <figure float="0">
+ <title>Call the JUnit Test Case Creation wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The wizard looks as follows:</para>
+
+ <figure float="0">
+ <title>Create Test Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>By default JUnite 3 version of testing framework is selected. Of course,
you can choose
+ new advanced JUnit 4 version. In this case you'll be prompted to add new
JUnit
+ Library to your build path. To add it automatically just click on the appropriate
link. In
+ the <emphasis>
+ <property moreinfo="none">Class under test</property>
+ </emphasis> section you can specify the class to test.</para>
+
+ <figure float="0">
+ <title>A First Test Scenario</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Then, we call the test class <emphasis>
+ <property moreinfo="none">HelloTest</property>
+ </emphasis> and press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to complete.</para>
+
+ <para> Next, we should write a simple test scenario as shown on the next
figure. Let's
+ study the code of this test case. </para>
+
+ <figure float="0" id="hello_test">
+ <title>A First Test Scenario</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_6.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the first line of the method, a jBPM process archive object is
created. We use a
+ constructor accepting the filename of the archive. In our case it is the
<emphasis>
+ <property moreinfo="none">hello</property>
+ </emphasis> file we created earlier and which lives in the
<emphasis>
+ <property moreinfo="none">src/main/jpdl</property>
+ </emphasis> folder of our project. After asserting that this object is
really created, we
+ extract a process definition object from it. This object is fed to the
constructor of a
+ process instance object. We have a process instance object, but this process is
not yet
+ started, so we can safely assert that its root token still resides in the start
node. After
+ signalling the token will move to the next state and the process will be in the
<emphasis>
+ <property moreinfo="none">auction</property>
+ </emphasis> state. Finally another signal will end the process.
</para>
+
+
+ <para> After writing this test we can check whether it works as expected by
running it .</para>
+
+ <figure float="0">
+ <title>Running the Process Test</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_7.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>All went well as we have a green light:</para>
+
+ <figure float="0">
+ <title>Successful Test Run</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Test_Drive_Proc/test_driv_proc_8.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Of course, this simple scenario was not very interesting, but the
purpose of it was to
+ show how you can reuse your development skills in a very straightforward way when
doing
+ process development. To see how more interesting processes and process test
+ scenario's can be developed, we suggest you to read the <ulink
url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User
Guide</ulink> and to
+ study the API reference. You can find it in the jBPM download folder. (To get
started we
+ downloaded jbpm-jpdl-3.2.2 in <link
linkend="jboss_jbpm_runtime_installation">the second
+ chapter</link>. You should just remember where you extracted it.) All
we've mentioned are in the 'javadoc- *' subfolders of the 'doc'
folder.
+ Moreover, some more examples will be given later in this book.</para>
+
+</chapter>
+
+
+<chapter id="The_JBoss_jBPM_Int_Mech"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/The_JBoss_jBPM_Int_Mech.xml"
xreflabel="The_JBoss_jBPM_Int_Mech">
+ <?dbhtml filename="The_JBoss_jBPM_Int_Mech.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Actions : The JBoss jBPM Integration Mechanism</title>
+
+ <para> In this chapter we will show how to do software integration with
<property moreinfo="none">JBoss
+ jBPM</property>. The standard mechanism to implement this is to wrap the
functionality you
+ want to integrate in a class that implements the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface. In order to demonstrate it let's specify Hello
World action for our
+ process.</para>
+
+ <section>
+ <title>Creating a Hello World Action</title>
+
+ <para>Each Hello World process should integrate one or more Hello World
actions, so this is
+ what we will be doing. We can integrate custom code at different points in
the process
+ definition. To do this we have to specify an action handler, represented by
an
+ implementation of the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface, and attach this piece of code to a particular
event. These events
+ are amongst others, going over a transition, leaving or entering nodes, after
and before
+ signalling. </para>
+
+ <para> To make things a little bit more concrete, let's create a new
class called <emphasis>
+ <property
moreinfo="none">HelloActionHandler</property>.
+ </emphasis> For that firstly we'll create a new package
<emphasis>
+ <property
moreinfo="none">com.jbay.action</property>
+ </emphasis> in the <emphasis>
+ <property moreinfo="none">src/java/main</property>
+ </emphasis> folder of our project. Then, we should call New Class
Creation wizard as
+ usual by right-clicking and navigating <emphasis>
+ <property moreinfo="none">New >
Class</property>.
+ </emphasis> </para>
+
+ <figure float="0">
+ <title>Creating HelloActionHendler Class</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Notice that two first gaps have been filled automatically. Here,
instead of <emphasis>
+ <property moreinfo="none">Package</property>
+ </emphasis> option <emphasis>
+ <property moreinfo="none">Enclose type</property>
+ </emphasis> option can be selected where a type in which to enclose a
new class should
+ be specified.</para>
+
+ <para>In our case, we leave everything as it is, just type
<emphasis>
+ <property
moreinfo="none">HelloActionHandler</property>
+ </emphasis> as a name of new class and add <emphasis>
+ <property
moreinfo="none">org.jbpm.graph.ActionHendler</property>
+ </emphasis> interface as it's shown in the picture
above.</para>
+
+ <para>Thus, our <emphasis>
+ <property
moreinfo="none">HelloActionHandler</property>
+ </emphasis> implements the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface including the <emphasis>
+ <property moreinfo="none">execute</property>
+ </emphasis> method as shown in the next figure. Here, we add a variable
named <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> to the collection of process variables and put a
message in it :
+ <emphasis>"Hello from ActionHandler"</emphasis>.
</para>
+
+ <figure float="0">
+ <title>A Simple Hello Action</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_2.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, as we have <emphasis>
+ <property
moreinfo="none">HelloActionHandler</property>
+ </emphasis> class defined, let's explore how we can handle
it.</para>
+ </section>
+
+ <section>
+ <title>Integrating the Hello World Action</title>
+
+ <para>The main purpose of this chapter is to provide you with the steps
associating our
+ Hello World action with a particular event and test the correctness of our
actions as
+ well.</para>
+
+ <para> As good Testcity citizens we will first create a Unit Test that
proves the behaviour
+ we want to achieve by adding the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> to the process. So we implement another test.</para>
+
+ <para>At first, let's return to the
+ code we already saw <link linkend="hello_test">in the
previous chapter</link> and add new test method <emphasis>
+ <property
moreinfo="none">testActionHendler</property></emphasis> to it.
</para>
+
+ <figure float="0">
+ <title>Create the Hello Action Test</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_3.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We assert
+ that no variable called <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> exist. Then we give the process a signal to move it to the
auction state. We
+ want to associate the execution of the action with the event of going over
the
+ transition from the start state to the auction state. So after the signal,
the process
+ should be in the auction state as in the previous scenario. But moreover, the
<emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> variable should exist and contain the string
<emphasis>"Hello from
+ ActionHandler"</emphasis>. That's what we assert in the last
lines of the test
+ method.</para>
+
+
+
+ <para> Running the tests now results in a failure. The point is that we did
not associate
+ the action with any particular event in the process definition, so the
process variable
+ did not get set. </para>
+
+ <figure float="0">
+ <title>Test Results Before Integration</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_4.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Let's do something about it and add an action to the first
transition of our
+ sample process. To do this you can use the Actions tab in the Properties
Editor that is
+ under the graphical canvas. Bring up the popup menu of the action element
container and
+ chose New Action as it's shown on the figure below. The other way to add
an action
+ to the transition is simply to use the dropdown menu that is available under
the action
+ icon in the right upper corner of the Properties View.</para>
+
+ <figure float="0">
+ <title>Adding an Action to a Transition</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_5.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After adding the action a tabbed view with three pages will
appear.</para>
+
+ <figure float="0">
+ <title>Configuration Dialog for an Action</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_6.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first of these three pages allows you to give the Action a name.
The last page
+ contains some advanced attributes such as whether the Action is asynchronous.
The
+ Details page is the most important. It allows to choose and configure the
actual action
+ handler implementation. </para>
+
+ <figure float="0">
+ <title>The Details page of an Action Configuration
Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_7.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>Clicking on the <emphasis>
+ <property moreinfo="none">Search...</property>
+ </emphasis> button brings us to a Choose Class dialog.</para>
+
+
+ <figure float="0">
+ <title>The Choose Action Handler Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para> We choose our previously created 'HelloActionHandler' class
and
+ push the <property moreinfo="none">OK</property>
button. After the selection of the action handler for
+ the action, we can run the test and observe it gives us a green
light.</para>
+
+ <figure float="0">
+ <title>Test Results</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_9.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Tere we are. The above objective has been achieved.</para>
+ </section>
+
+ <section>
+ <title> Integration Points</title>
+
+ <para> The different integration points in a process definition are
thoroughly documented in
+ the <ulink
url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User
Guide</ulink>. Instance nodes can contain many action
+ elements. Each of these will appear in the Action element list of the Actions
tab. But
+ each Action also has a properties view of itself. You can navigate to this
view by
+ selecting the added Action in the outline view. </para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="Quick_Howto_Guide"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml"
xreflabel="Quick_Howto_Guide">
+ <?dbhtml filename="Quick_Howto_Guide.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Quick Howto Guide</title>
+
+ <para>This chapter contains additional information related to the <property
moreinfo="none">JBoss
+ jBPM</property>.</para>
+
+ <section id="change_core_jbpm_inst">
+ <title>Change the Default Core jBPM Installation</title>
+
+ <para> You can change the default <property
moreinfo="none">jBPM</property> installation by means of the
+ Eclipse preference mechanism. Open the Preferences dialog by selecting
<emphasis>
+ <property moreinfo="none">Window >
Preferences</property>
+ </emphasis> and select the <emphasis>
+ <property moreinfo="none">JBoss jBPM > Runtime
Location</property>
+ </emphasis> category. Using this page you can add multiple <property
moreinfo="none">jBPM</property>
+ installation locations and change the default one. The default installation
is used for
+ the classpath settings when creating a new Process Project. Changing the
preferences has
+ no influence on already created projects. Getting rid of a <property
moreinfo="none">jBPM</property>
+ installation that's being referenced by a project however will cause the
+ classpath to contain errors. </para>
+
+
+ <figure float="0">
+ <title>The jBPM Preferences Page</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Configuring Task Nodes</title>
+
+ <para>Here, we'll examine how you can configure the Task nodes in jBPM
jPDL GPD.</para>
+
+ <para> You can add Tasks to Task nodes and then configure them in a similar
manner as the
+ Action configuration mechanism. Let's consider the process definition
similar
+ to the previous one that contains three nodes: Start state, Task node and End
state. The
+ <property moreinfo="none">Properties view</property>
for selected Task node includes several tabs. </para>
+
+ <figure float="0">
+ <title>The Properties View of the selected Task Node</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_2.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We should choose the Task tab and then bring up the context menu or
click the button
+ in the top right corner of the view to add a Task to our Task
node.</para>
+
+ <figure float="0">
+ <title>Adding a Task to the Task Node</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_3.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Every added Task has its own configuration possibilities. You can
access them through
+ the <property moreinfo="none">Properties
view</property> as well.</para>
+
+ <figure float="0">
+ <title>The Task properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_4.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property moreinfo="none">General
page</property> is a place where you can specify the name of a
+ Task and its description. For instance, let it be <emphasis>
+ <property moreinfo="none">approve oder</property>
+ </emphasis> with appropriate description that you can see in the figure
below.</para>
+
+ <figure float="0">
+ <title>The Task General Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_5.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, look at <property moreinfo="none">Details
page</property>. First, you should specify the due date
+ that is a mandatory property for the Task. The due date is the date on which
the task
+ should be accomplished. Here you can also set a Task priority as well as
signalling,
+ notifying or blocking. The <emphasis>
+ <property moreinfo="none">Blocking</property>
+ </emphasis> attribute indicates that the process will not be able to
continue if this
+ task is still unaccomplished. The <emphasis>
+ <property moreinfo="none">Generate
Form...</property>
+ </emphasis> button is for creating a simple task form that can be
rendered by the jBPM
+ console.</para>
+
+ <figure float="0">
+ <title>The Task Details Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_6.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For our example, we specify the due date as 2 business days, choose
the high priority
+ and also check the <emphasis>
+ <property moreinfo="none">Signalling</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Notify</property>
+ </emphasis> attributes. It means that the Task should be accomplished
in 2 business days
+ and the assignee will be notified by email when the task is assigned. To
specify how the
+ Task should be assigned switch on to the <property
moreinfo="none">Assignment page</property>.</para>
+
+ <figure float="0">
+ <title>The Task Assignment Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_7.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the <property moreinfo="none">Reminder
page</property> you can specify whether the assignee will be reminded of the task
+ that awaits him.</para>
+
+ <figure float="0">
+ <title>The Task Reminder Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_8.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In our case, the assignee will be reminded by email after two
business hours and
+ continue to get reminding every business hour after that.</para>
+ <para>In the next figure you can see our configuring generated into
XML.</para>
+ <figure float="0">
+ <title>The Task Reminder Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/Quick_Howto_Guide/quick_howto_guide_9.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>We hope, our guide will help you to get started with the jPDL process
language and jBPM
+ workflow on the whole. Besides, for additional information you are welcome on
<ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
forum</ulink>.</para>
+ </section>
+</chapter>
+
+
+ <!-- TODO: drools used in this section is not available for eclipse .3.3
&AddBusinessProcess; -->
+</book>
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/master_output.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/master_output.xml 2009-03-05 18:34:07 UTC (rev
14042)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/master_output.xml 2009-03-05 18:54:45 UTC (rev
14043)
@@ -25,1963 +25,1963 @@
<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
-]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
- <bookinfo>
- <title>JSF Tools Reference Guide</title>
-
-
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
-
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
-
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
- <releaseinfo>
- Version: 3.0.0.GA
- </releaseinfo>
-
-<abstract>
- <title></title>
- <para>
- <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf_tools_...
version</ulink>
- </para>
-</abstract>
-
- </bookinfo>
-
- <toc></toc>
-
-
-<chapter id="introduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml">
- <?dbhtml filename="introduction.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- <keyword>JSF Tools</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Introduction</title>
-
- <para>JSF Tools are especially designed for supporting JSF and JSF-related
technologies. JSF
- Tools provide extensible and exemplary tools for building JSF-based applications
as well as
- adding JSF capabilities to existing web projects, importing JSF projects and
choosing any
- JSF implementation while developing JSF application.</para>
-
- <para>In this guide we provide you with the information on JSF tooling which
allows you to
- develop JSF applications much faster and with far fewer errors so sparing your
time.</para>
-
- <section id="jsf_key_features">
- <title>Key Features of JSF Tools</title>
-
- <para>Here, we provide you with a key functionality which is integrated in
JSF tooling.</para>
-
- <table>
- <title>Key Functionality for JSF Tools</title>
- <tgroup cols="3">
-
- <colspec align="left" colnum="1"
colwidth="2*"></colspec>
- <colspec colnum="2"
colwidth="4*"></colspec>
- <colspec colnum="3"
colwidth="2*"></colspec>
-
- <thead>
- <row>
- <entry>Feature</entry>
- <entry>Benefit</entry>
- <entry>Chapter</entry>
- </row>
- </thead>
- <tbody>
-
- <row>
- <entry>JSF and Facelets support</entry>
- <entry>Step-by-step wizards for creating new JSF and
Facelets projects with a number of predefined templates, importing existing ones and
adding JSF capabilities to non-jsf web projects.</entry>
- <entry><link linkend="jsf_support">jsf
support</link></entry>
- </row>
-
- <row>
- <entry>Flexible and customizable project template
management</entry>
- <entry>Jump-start development with out-of-the-box templates
or easily
- customized templates for re-use.</entry>
- <entry>
- <link
linkend="projects">projects</link>
- </entry>
- </row>
-
- <row>
- <entry>Support for JSF Configuration File</entry>
- <entry>Working on file using three modes: diagram, tree and
source.
- Synchronization between the modes and full control over the
code. Easy
- moving around the diagram using the Diagram
Navigator.</entry>
- <entry>
- <link linkend="jsf_config_file">graphical
editor for jsf</link>
- </entry>
- </row>
-
- <row>
- <entry>Support for Managed Beans</entry>
- <entry>Adding new managed beans, generating code for
attributes, properties
- and getter/setter methods.</entry>
- <entry>
- <link linkend="managed_beans">managed
beans</link>
- </entry>
- </row>
-
- <row>
- <entry>Support for Custom Converters and
Validators</entry>
- <entry>Fast creating of custom converters and validators
with tree view of
- faces-config.xml file.</entry>
- <entry>
- <link
linkend="creation_and_registration">converters and validators</link>
- </entry>
- </row>
-
- <row>
- <entry>Verification and Validation</entry>
- <entry>All occuring errors will be immediately reported by
verification
- feature, no matter in what view you are working. Constant
validation and
- errors checking allows to catch many of the errors during
development
- process that significantly reduces development
time.</entry>
- <entry>
- <link
linkend="jsf_project_verification">verification and
- validation</link>
- </entry>
-
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
- <section>
- <title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find
<ulink
url="http://docs.jboss.org/tools/">here</ulink>.</p...
- <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
- </section>
-</chapter>
-
-
-<chapter id="jsf_support"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_support.xml">
- <?dbhtml filename="jsf_support.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>JSF Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>JavaServer Faces Support</title>
-
- <para>We don't lock you into any one <property
moreinfo="none">JavaServer
- Faces</property> implementation. You can always select the
one which is
- necessary for you while <link
linkend="new_jsf_project">creating a new JSF
- project</link>, <link
linkend="add_jsf_capability">adding JSF capability</link> to
- any existing Eclipse project or <link
linkend="ImportingExsJSFProjWithAnyStr74447">importing existing JSF
projects</link> as well.</para>
- <para>At this point the special wizard will prompt you to specify a proper
JSF environment.
- It may be JSF 1.1.02 RI or JSF 1.2 which integrates a number of new
features and
- changes. The wizard also lets you select JSF implementation with a
component
- orientation such as JSF 1.2 with Facelets or MyFaces 1.1.4.</para>
-
- <figure float="0">
- <title>Choosing JSF Environment</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After specifying a proper JSF environment all the required libraries
for the selected
- version will be added to your project.</para>
-
- <section id="FaceletsSupport865">
-
- <title>Facelets Support</title>
- <para>In this section we will focus more on all concepts that are
integrated for
- working with Facelets.</para>
-
- <para>The Facelets extends JavaServer Faces by providing a
lightweight framework
- that radically simplifies the design of presentation pages for
JSF. Facelets can be used in a variety of ways that we
- will consider further in this section.</para>
-
- <section>
- <title>Facelets templates</title>
- <para>If you want to build an application using Facelets,
just create a
- project with Facelets based on version 1.2 of the JSF
Reference
- Implementation, i. e. select the <emphasis>
- <property moreinfo="none">JSF 1.2
with Facelets</property>
- </emphasis> in the JSF Environment section of the
New JSF Project
- wizard.</para>
-
- <figure float="0">
- <title>Choosing Facelets Environment</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Once you've selected the environment, it's
possible
- to specify the one of three available
templates:</para>
- <figure float="0">
- <title>Choosing Facelets Template</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The following table lists possible templates with
Facelets for any JSF
- project and gives a proper description for each
one.</para>
- <table>
- <title>Facelets Templates</title>
- <tgroup cols="2">
- <colspec align="left"
colnum="1" colwidth="2*"></colspec>
- <colspec colnum="2"
colwidth="3*"></colspec>
-
-
- <thead>
- <row>
- <entry align="center">
- <para>Template</para>
- </entry>
-
- <entry align="center">
- <para>Description</para>
- </entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>
- <para>
- <emphasis>
- <property
moreinfo="none">FaceletsBlankWithoutLibs</property>
- </emphasis>
- </para>
- </entry>
-
- <entry>
- <para>Some servers already
provide
- jsf libs and you take risk
- of getting conflicting
- libraries while deploying
- your project. To avoid such
- conflicts, use a template
- without libs if you have a
- server with its own jsf
- libraries</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>
- <emphasis>
- <property
moreinfo="none">FaceletsKickStartWithRILibs</property>
- </emphasis>
- </para>
- </entry>
-
- <entry>
- <para>A sample application with
- Facelets that is ready to
- run</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>
- <emphasis>
- <property
moreinfo="none">FaceletsKickStartWithoutLibs</property>
- </emphasis>
- </para>
- </entry>
-
- <entry>
- <para>A sample application
without
- libraries</para>
- </entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
- </section>
- <section>
- <title>Facelets components</title>
-
- <para>The <ulink
url="../../jsf/html_single/index.html#palette">JBoss Tools
- Palette</ulink> comes with the Facelets
components ready to
- use. A useful tip appears when you hover the mouse cursor
over the
- tag, the tip includes a detailed description of the tag
component,
- the syntax and available attributes.</para>
-
- <!-- JBoss Developer Studio does not provide templates for
MyFaces right out of the box, but you can easily do it
- yourself with the "Save As Template" feature (available on the File
submenu). Just create a small project
- with MyFaces and Facelets and then save it as a template for future use.
-
- How can I add Facelets support to an existing project?</para>
- <para>A: Right-click on the folder of existing project and select
<emphasis>JBoss Tools > Add Custom Capabilities.. >
Facelets</emphasis>. </para>
- -->
- <figure float="0">
- <title>Facelets Components</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_4.png"
scale="65"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section>
- <title>Code assist for Facelets</title>
-
- <para>One more feature which comes with Facelets support is
code assist
- (Ctrl + Space). It is available for <property
moreinfo="none">Facelets
- tags</property> while editing <emphasis>
- <property
moreinfo="none">.xhtml</property>
- </emphasis> files.</para>
-
- <figure float="0">
- <title>XHTML File Code Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_5.png"
scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>What's more, code assist is also available for
<emphasis role="italic">
- <property
moreinfo="none">"jsfc"</property>
- </emphasis> attribute in any HTML
tag.</para>
-
- <figure float="0">
- <title>Code Assist for JSFC
Attribute</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_6.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After selecting <emphasis
role="italic">
- <property
moreinfo="none">"jsfc"</property>
- </emphasis> you get the code assist for JSF
components available on
- a page.</para>
-
- <figure float="0">
- <title>Code Assist for JSF
Components</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_7.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>When a component is chosen you will see all available
attributes for
- it.</para>
-
- <figure float="0">
- <title>Available Attributes for the
Component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_8.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section>
- <title>Open On feature</title>
- <para>Finally, Eclipse's <emphasis>
- <property
moreinfo="none">OpenOn</property>
- </emphasis> feature for editing Facelets files is
supported. Using this feature,
- you can easily navigate between the <property
moreinfo="none">Facelets
- templates</property> and other parts of your
projects. Just by
- holding down the Control key while hovering the mouse
cursor over a
- reference to a template, the reference becomes a
hyperlink to open
- that template.</para>
-
-
- <figure float="0">
- <title>Template Hyperlink</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_9.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <!-- <para>Additionally, when hovering the mouse
cursor over <emphasis role="italic"><property>"Facelets
tag"</property></emphasis> attributes, JBoss Developer Studio
provides a pop-up help tip:</para>
- <figure>
-<title>Pop-up Help Tip for Facelets Tag Attributes</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/defaultImage.png"/>
- </imageobject>
-</mediaobject>
- </figure>
-
- -->
- <!-- <para>See <link
linkend="faq_facelets">FAQ</link> concerning Facelets
- support.</para>
- -->
- </section>
-
- <!--section>
- <title>Relevant Resources Links</title>
- <para>Necessary information and support for
Facelets find out <ulink
-
url="https://facelets.dev.java.net/"
- >here</ulink>.</para>
- </section-->
- </section>
-
-
-
-
-
-
-
-
-
-
- <!--section>
- <title>Relevant Resources Links</title>
- <para>If you don't familiar with <ulink
-
url="http://java.sun.com/javaee/javaserverfaces/">JSF
- technology</ulink>, we suggest that you
walk through the
- information on the topic.</para>
- </section-->
-</chapter>
-
-
-<chapter id="projects"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml">
- <?dbhtml filename="projects.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>JSF Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Projects</title>
- <para>To take an advantage of JSF firstly you should
perform one of the next
- steps:</para>
-
- <itemizedlist>
- <listitem>
- <para>Create new JSF projects</para>
- </listitem>
- <listitem>
- <para>Import (open) existing JSF
projects</para>
- </listitem>
- <listitem>
- <para>Add JSF capability to any existing
Eclipse
- project</para>
- </listitem>
- <listitem>
- <para>Import and add JSF capability to any
existing project
- created outside Eclipse.</para>
- </listitem>
- </itemizedlist>
- <para>In this section we're going to stop on each of
them in
- detail.</para>
-
- <section id="new_jsf_project">
-
- <title>Creating a New JSF Project</title>
-
- <para>If you want your project to already contain
all JSF
- libraries, tag libraries and JSF configuration
file, just
- organize a new brand JSF project. It is possible
to do this easily with the
- help of the special wizard. To get it,
select<emphasis>
- <property
moreinfo="none"> File > New > Project
- > JBoos Tools Web > JSF
- > JSF Project</property>
- </emphasis> and click <emphasis>
- <property
moreinfo="none">Next</property>.</emphasis></para>
-
- <figure float="0">
- <title>Choosing a JSF
Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the next form you'll be prompted to
enter
- <property
moreinfo="none">Project Name</property> and select a
- location for the project or just leave a default
path.</para>
- <para>Here, JSF Version also allows you to select
which JSF
- implementation to use.</para>
- <figure float="0">
- <title>Creating a New JSF
Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>There is a number of predefined project
templates that are flexible and
- easily customizable. Thus you can pick a
different template
- on which the projects Importing Existing should
be based on. Almost all
- templates come in two variations: with jsf
libraries and
- without ones.</para>
- <figure float="0">
- <title>Choosing JSF
Templates</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_12.png "></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The table below provides description for each
possible JSF
- template.</para>
- <table>
- <title>JSF Project Templates</title>
- <tgroup cols="2">
- <colspec align="left"
colnum="1" colwidth="1*"></colspec>
- <colspec colnum="2"
colwidth="3*"></colspec>
-
-
- <thead>
- <row>
- <entry align="center">
- <para>Template</para>
- </entry>
-
- <entry align="center">
- <para>Description</para>
- </entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>
- <para>
- <emphasis>
- <property
moreinfo="none">JSFBlankWithLibs</property>
- </emphasis>
- </para>
- </entry>
-
- <entry>
- <para>This template will
- create a standard
- Web project
- structure with all
- JSF
- capabilities</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>
- <emphasis>
- <property
moreinfo="none">JSFKickStartWithLibs</property>
- </emphasis>
- </para>
- </entry>
-
- <entry>
- <para>This template will
- create a standard
- Web project
- structure but will
- also include a
- sample application
- that is ready to
- run</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>
- <emphasis>
- <property
moreinfo="none">JSFKickStartWithoutLibs</property>
- </emphasis>
- </para>
- </entry>
-
- <entry>
- <para>Some servers already
- provide jsf libs and
- you take risk of
- getting conflicting
- libraries while
- deploying your
- project. To avoid
- such conflicts, use
- a template without
- libs if you have a
- server with its own
- jsf libraries</para>
- </entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
-
-
- <!-- <para>You can of course
create your own custom templates. More information
- on templates creation could be found in <link
-
linkend="CreatingCustomJSPTemplates">Chapter 5</link>.</para>
- -->
-
- <para>On the next screen select what
<emphasis>
- <property
moreinfo="none">Servlet version</property>
- </emphasis> to use and whether to register
this application
- with JBoss AS (or other server) for running and
testing your application.</para>
-
- <para>The <emphasis>
- <property
moreinfo="none">Context Path</property>
- </emphasis> is the name under which the
application will be
- deployed.</para>
-
- <para>The <emphasis>
- <property
moreinfo="none">Runtime</property>
- </emphasis> value tells Eclipse where to
find Web libraries
- in order to build (compile) the project. It is
not possible
- to finish project creation without selecting
Runtime. If you
- don't have any values, select
<emphasis>
- <property
moreinfo="none">New...</property>
- </emphasis> to add new
Runtime.</para>
-
- <para>The <emphasis>
- <property
moreinfo="none">Target Server</property>
- </emphasis> allows you specifying whether
to deploy the
- application. The Target Server corresponds to the
Runtime
- value selected above. If you don't want to
deploy
- the application, uncheck this
value.</para>
- <figure float="0">
- <title>Registering the Project on
Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>When you are all done, you should have the
project that has
- been appeared in the Package Explorer
view:</para>
- <figure float="0">
- <title>A New Project in the Package
Explorer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>At this point you can open <emphasis>
- <property
moreinfo="none">faces-config.xml</property>
- </emphasis> and start working on your
application.
- There are a lot of features
- to develop JSF applications. We will describe the
features
- further.</para>
- </section>
-
- <section
id="ImportingExsJSFProjWithAnyStr74447">
-
- <title>Importing Existing JSF Projects with Any
Structure</title>
-
- <para>For detailed information on migration of JSF
projects into a workspace see <ulink
url="../../Exadel-migration/html_single/index.html#jsf_struts">Migration
Guide</ulink>.</para>
-
- </section>
- <section id="add_jsf_capability">
-
- <title>Adding JSF Capability to Any Existing
Eclipse Project</title>
-
- <para>It's also possible to add <property
moreinfo="none">JSF capability</property>
- (JSF libraries, tag libraries) to any existing
Eclipse
- project in your workspace. After that you'll
be
- able to make use of such editors as JSF
configuration editor, JBoss
- Tools JSP editor and any others.</para>
- <para>Right click the project and select
<emphasis>
- <property
moreinfo="none">JBoss Tools > Add JSF
- Capabilities</property>.
</emphasis> This will start
- the process of adding all necessary libraries,
files to make
- this a Web JSF project.</para>
- <figure float="0">
- <title>Adding JSF
Capabilities</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The wizard will first ask you to show the
<emphasis>
- <property
moreinfo="none">web.xml</property>
- </emphasis> file location and the project
name.</para>
- <figure float="0">
- <title>Project Location</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>On the last form you can set the different
folders for your
- project as well as register this application with
a servlet
- container.</para>
-
- <para>Make sure to select <emphasis>
- <property
moreinfo="none">Add Libraries</property>
- </emphasis> to add all required JSF related
libraries to this project.</para>
-
- <para>The <emphasis>
- <property
moreinfo="none">Context Path</property>
- </emphasis> is the name under which the
application will be
- deployed.</para>
-
- <para>The <emphasis>
- <property
moreinfo="none">Runtime</property>
- </emphasis> value tells Eclipse where to
find Web libraries
- in order to build (compile) the project. It is
not possible
- to finish project import without selecting
Runtime. If you
- don't have any values, select
<emphasis>
- <property
moreinfo="none">New...</property>
- </emphasis> to add new
Runtime.</para>
-
- <para>The <emphasis>
- <property
moreinfo="none">Target Server</property>
- </emphasis> allows you to specify whether
to deploy the
- application. The Target Server corresponds to the
Runtime
- value selected above. If you don't want to
deploy
- the application, uncheck this
value.</para>
- <figure float="0">
- <title>Project Folders</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_18.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Once your project is imported you can see
that JSF related
- libraries have been added to your project:
<emphasis>
- <property
moreinfo="none">jsf-api.jar</property>
- </emphasis> and <emphasis>
- <property
moreinfo="none">jsf-impl.jar</property>
- </emphasis>.</para>
- <note>
- <title>Note:</title>
- <para>Some application servers provide
their own jsf
- implementation libraries. Thus, to avoid
conflicts you
- should not add jsf libraries while adding
jsf
- capabilities.</para>
- </note>
- <para>You are now ready to work with JSF by
creating a new JSF
- configuration file:</para>
-
-
- <figure float="0">
- <title>Creating a New JSF Configuration
File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_19.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Once the file has been created, it should be
opened in a
- special <link
linkend="jsf_config_file">Faces Config Editor</link>.</para>
- </section>
- <section id="AddingYourOwnProjectTemplates853">
-
- <title>Adding Your Own Project
Templates</title>
- <para>Template is a set of files that is served as
a basis to facilitate
- the creation of a new project. Project templates
provide
- content and structure for a
project.</para>
- <para>There is a powerful
- templating capability for creating new and
importing
- existing Struts and JSF projects. This templating
facility
- has a variety of aspects to consider. But,
let's
- start with the most straightforward case and
consider the
- process of creating a template from your existing
JSF
- project.</para>
-
- <para>Let's say you have a project that you
want to use as
- the basis for a new <property
moreinfo="none">template</property>. Follow
- these steps to make a template out of
it:</para>
- <itemizedlist>
- <listitem>
- <para>In the Web Projects view,
right-click the
- project and select <emphasis>
- <property
moreinfo="none">JBoss Tools JSF > Save As
- Template</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Saving Your Project as
Template</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_20.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>In the first dialog box, you
can choose a name
- for the template (defaults to the
project
- name) and confirm what run-time
- implementation of the project
- technology will be used</para>
- </listitem>
-
- </itemizedlist>
- <figure float="0">
- <title>Define Template
Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_20_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">Next</property>
- </emphasis> and you will be sent
to a dialog
- box with your project structure
displayed
- with check boxes. Here you can check
only
- those parts and files in your project
- directory that should be part of the
- template</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Define Template
Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_20_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>At this point, unless you
want to designate
- some extra files as having Velocity
template
- coding inside them, you should click
<emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis>.</para>
- </listitem>
- </itemizedlist>
- <para>That's it. Now, you can use this template
with any
- new or imported project that uses the same
run-time
- implementation as the project you turned into a
- template.</para>
- <para>At this point, you have a fully configured
project and now you can
- bring some new logic to it starting from JSF
configuration
- file.</para>
- </section>
-</chapter>
-
-<chapter id="jsf_config_file" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_config_file.xml">
- <?dbhtml filename="jsf_config_file.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>JSF Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>JSF Configuration File Editor</title>
-
- <para>First, we should mention that JSF configuration file (<emphasis>
- <property moreinfo="none">faces-config.xml</property>
- </emphasis>) is intended for registering JSF application resources such as
Converters,
- Validators, Managed Beans and page-to-page navigation rules.</para>
- <para>Now, let's look at how you can easily configure this file by means of
a special
- graphical editor for JSF configuration file. The editor has three main
views:</para>
-
- <itemizedlist>
- <listitem>
- <para>Diagram</para>
- </listitem>
- <listitem>
- <para>Tree</para>
- </listitem>
- <listitem>
- <para>Source</para>
- </listitem>
- </itemizedlist>
-
- <para>They can be selected via the tabs at the bottom of the
editor.</para>
-
- <section id="Diagram9553">
-
- <title>Diagram view</title>
-
- <para>Here, we will show you how to work with JSF configuration file
through the Diagram
- view of the editor.</para>
- <para>As you can see on the figure below, the Diagram view displays the
navigation rules in
- the faces-config.xml:</para>
- <figure float="0">
- <title>Diagram View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_21.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If your diagram is large, make use of the Outline view. Within it you
can switch to a <emphasis>
- <property moreinfo="none">Diagram
Navigator</property>
- </emphasis> mode by selecting the middle icon at the top of the view
window. It allows
- you to easily move around the diagram. Just move the blue area in any
direction, and the
- diagram on the left will also move:</para>
- <figure float="0">
- <title>Outline View for Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_32.png"
scale="50"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To create a new page here, you should click the page icon (View
Template) on the
- toolbar from the left and then click anywhere on the diagram. A New Page
Wizard will
- appear.</para>
-
- <para>To create a transition for connecting pages:</para>
-
- <itemizedlist>
- <listitem>
- <para>Select the transition icon from the toolbar (New
Connection).</para>
- </listitem>
- <listitem>
- <para>Click the source page.</para>
- </listitem>
- <listitem>
- <para>Click the target page.</para>
- </listitem>
- </itemizedlist>
-
- <para>A transition will appear between the two pages:</para>
- <figure float="0">
- <title>Transition between JSP Pages</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_22.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>It is also possible to create a new page with context menu by
right-clicking anywhere
- on the diagram and selecting <emphasis>
- <property moreinfo="none">New View</property>.
</emphasis></para>
- <figure float="0">
- <title>Creating a New View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_23.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To edit an existing transition, first select the transition line.
Then, place the
- mouse cursor over the last black dot (on the target page). The mouse cursor
will change
- to a big +. At this point, drag the line to a new target page:</para>
- <figure float="0">
- <title>Editing Transition between Views</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_24.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="TreeView11123" role="updated">
-
- <title>Tree View</title>
-
- <para>You can find it more convenient to edit your JSF Configuration file
in the Tree view of
- the <property
moreinfo="none">VPE</property>.</para>
-
- <para>The view displays all JSF application artifacts referenced in the
configuration file
- in a tree format. By selecting any node on the left, you can see and edit its
properties
- which will appear in the right-hand area. Let's look at the structure of
this
- tree more closely.</para>
-
- <itemizedlist>
- <listitem>
- <para>Under the <emphasis>
- <property
moreinfo="none">Application</property>
- </emphasis> node you can adjust JSF application specific
settings such as
- internationalization, possibility to set extensions, add property and
variable
- resolvers, etc.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>JSF Application Specific Settings</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_24a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>The <emphasis>
- <property
moreinfo="none">Components</property>
- </emphasis> node is for registering custom JSF components.
Right-click and
- choose <emphasis>
- <property moreinfo="none">New >
Component</property>
- </emphasis> or just press the <emphasis>
- <property moreinfo="none">Add</property>
- </emphasis> button in the right-hand area to add a new
component to the JSF
- Configuration file.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Registering a New JSF Component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_24b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the <property moreinfo="none">Add
Component wizard</property> you should set a component
- type and point to a component class by using the <emphasis>
- <property
moreinfo="none">Browse</property>
- </emphasis> button or create a new class for this component by
using the <emphasis>
- <property
moreinfo="none">Component-Class</property>
- </emphasis> link.</para>
-
- <figure float="0">
- <title>Adding a New JSF Component to the JSF Configuration
File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_24c.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Use the <emphasis>
- <property moreinfo="none">Render
Kit</property>
- </emphasis> node to create and register a set of related
renderers for custom
- JSF components.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Adding a New JSF Component to the JSF Configuration
File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_24d.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Under the <emphasis>
- <property
moreinfo="none">Converters</property>
- </emphasis> node you can create a converter class for your JSF
application
- either with id or for a proper class. How to do that see the <link
linkend="CreateAndRegisterACustomConverter94230">Create and Register a
- Custom Converter</link> section.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Creating a New Custom Converter</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_59.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>The <emphasis>
- <property moreinfo="none">Managed
Bean</property>
- </emphasis> node is meant for creating and registering Bean
classes in your JSF
- application. Read more on the topic in the <link
linkend="managed_beans">Managed
- Beans</link> chapter.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Managed Beans</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_26.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Use the <emphasis>
- <property moreinfo="none">Navigation
Rules</property>
- </emphasis> node to configure a navigation between the pages in
your
- application: create a new navigation rule and adjust necessary
properties for it
- in the right-hand area.</para>
- </listitem>
- </itemizedlist>
- <tip>
- <title>Tip:</title>
- <para>The same you can do in the <link
linkend="Diagram9553">Diagram view</link> of the
- JSF Configuration file editor.</para>
- </tip>
-
- <figure float="0">
- <title>Configuring Navigation Rules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_26a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Under the <emphasis>
- <property moreinfo="none">Referenced
Beans</property>
- </emphasis> node you can add a new Referenced Bean and
configure various
- properties for it. To learn more on this refer to the <link
linkend="referenced_beans">Create and Register Referenced Beans</link>
- section.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Referenced Beans</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_26b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>The <emphasis>
- <property
moreinfo="none">Validators</property>
- </emphasis> node is needed to create validator classes for
organizing the
- validation of your application data. You can read more on the topic
in the <link linkend="CreateAndRegisterACustomValidator5632">Create and
Register a Custom
- Validator</link> section.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Validators</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_26c.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>The <emphasis>
- <property
moreinfo="none">Extensions</property>
- </emphasis> node is for setting extensions for your
<emphasis>
- <property
moreinfo="none">faces-config.xml</property>.</emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Adding Extensions</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_26d.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the <property moreinfo="none">Tree
view</property> you can also edit the properties of the selected
- element with the help of the <property
moreinfo="none">Properties view</property> as shown
below:</para>
-
- <figure float="0">
- <title>Properties View </title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_33.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- <section id="SourceView4643">
-
- <title>Source View</title>
-
- <para>Here, we'll discuss how you can configure your faces-config.xml
with the help
- of Source View.</para>
- <para>The Source view for the editor displays a text content of the JSF
configuration file.
- It is always synchronized with other two views, so any changes made in one of
the views
- will immediately appear in the other:</para>
- <figure float="0">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_27.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>You can also work in the Source view with the help of the
<emphasis>
- <property moreinfo="none">Outline
view</property>.</emphasis> The Outline view shows a tree
- structure of the JSF configuration file. Simply select any element in the
Outline view,
- and it will jump to the same place in the Source editor, so you can navigate
through the
- source code with Outline view.</para>
- <figure float="0">
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_31.png"
scale="50"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="jsf_editor_features">
- <title>Editor Features</title>
- <para>Here we'll discuss a very important features that JSF
configuration file
- editor provides for work with JSF resources.</para>
-
- <section id="jsf_openOn">
- <title>Open On</title>
- <para>The JSF configuration file editor comes with a very useful OpenOn
navigating
- feature. More fully you can read about it in our <ulink
url="../../jsf/html_single/index.html#OpenOnSelection4Hyperlinknavigation">Visual
Web Tools
- Guide</ulink>.</para>
- </section>
-
- <section id="ContentAssist976">
-
- <title>Code Assist</title>
- <para>Code Assist provides pop-up tip to help you complete your code
statements. It
- allows you to write your code faster and with more
accuracy.</para>
- <para>Code assist is always available in the Source mode:</para>
- <figure float="0">
- <title>Code Assist in Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_28.png"
scale="65"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="ErrorReporting3324">
-
- <title>Error Reporting</title>
- <para>When you are developing your project, error checking is
constantly provided. This
- greatly reduces your development time as it allows you to catch many of
the errors
- during development.</para>
- <para>Errors will be reported by <link
linkend="jsf_project_verification">
- verification</link> facility:</para>
- <figure float="0">
- <title>Error Reporting in Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_29.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Other errors are also reported.</para>
- <figure float="0">
- <title>Other Errors Reporting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_30.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- </section>
-
-</chapter>
-
-
-<chapter id="managed_beans"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/managed_beans.xml">
- <?dbhtml filename="managed_beans.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>JSF Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Managed Beans</title>
-
- <para>There is lots of power to work with <property
moreinfo="none">managed beans</property>.</para>
- <itemizedlist>
- <listitem>
- <para>Add and generate code for new managed beans</para>
- <itemizedlist>
- <listitem>
- <para>Generate code for attributes and getter/setter
methods</para>
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- <para>Add existing managed beans to JSF configuration
file</para>
- </listitem>
- </itemizedlist>
-
- <para>Thus, in this section we will guides you through all this
possibilities.</para>
-
- <section id="CodeGenerationForManagedBeans421">
-
- <title>Code Generation for Managed Beans</title>
-
- <para>To start, create a new managed bean in JSF configuration file editor,
in the Tree
- view.</para>
- <figure float="0">
- <title>Creation of New Managed Bean</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_34.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <note>
- <title>Note:</title>
- <para>When you define a new managed bean, make sure that
<emphasis>
- <property moreinfo="none">Generate Source
Code</property>
- </emphasis> is checked as shown in the figure below.</para>
- </note>
- <figure float="0">
- <title>New Managed Bean</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_35.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>After the <emphasis role="italic">
- <property
moreinfo="none">"Java"</property>
- </emphasis> class has been generated you can open it for additional
editing. There are
- two ways to open the <emphasis role="italic">
- <property
moreinfo="none">"Java"</property>
- </emphasis> class:</para>
-
- <itemizedlist>
- <listitem>
- <para>click on <emphasis>
- <property
moreinfo="none">Managed-Bean-Class</property>
- </emphasis> link in the editor</para>
- </listitem>
- </itemizedlist>
- <para>or</para>
- <itemizedlist>
- <listitem>
- <para>right click the <emphasis>
- <property moreinfo="none">managed
bean</property>
- </emphasis> and select <emphasis>
- <property moreinfo="none">Open
Source</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Opening of Created Managed Bean</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_36.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The generated Java source should look as follows:</para>
-
- <figure float="0">
- <title>Java Source Code</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_37.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also generate source code for properties, also includes
<emphasis role="italic">
- <property
moreinfo="none">"getter"</property>
- </emphasis> and <emphasis role="italic">
- <property
moreinfo="none">"setter"</property>
- </emphasis> methods. Right click on the bean and select
<emphasis>
- <property moreinfo="none">New >
Property</property>
- </emphasis>. You will see <property moreinfo="none">Add
Property</property> dialog.</para>
- <figure float="0">
- <title>Generation of Source Code for Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_38.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>When the form is open make sure that all the check boxes are
selected:</para>
- <itemizedlist>
- <listitem>
- <para>Add Java property</para>
- </listitem>
- <listitem>
- <para>Generate Getter</para>
- </listitem>
- <listitem>
- <para>Generate Setter</para>
- </listitem>
- </itemizedlist>
- <para></para>
- <figure float="0">
- <title>"Add Property" Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_39.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Once the generation is complete, you can open the file and see the
added property with
- <emphasis role="italic">
- <property
moreinfo="none">"get"</property>
- </emphasis> and <emphasis role="italic">
- <property
moreinfo="none">"set"</property>
- </emphasis> methods:</para>
- <figure float="0">
- <title>Generated Java Source Code for Property</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_40.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Thus, we've discussed everything which comes to creating a new
Managed Bean.
- The next section will show you how to add an existing Bean into a JSF
configuration
- file.</para>
- </section>
- <section id="AddExistingJavaBeansToAJSFConfigurationFile74332">
-
- <title>Add Existing Java Beans to a JSF Configuration File</title>
- <para>If you already have a Java bean you can easily add it to a
<property moreinfo="none">JSF configuration
- file</property>.</para>
- <para>You should start the same way you create a new managed bean. Use the
<emphasis>
- <property moreinfo="none">Browse...</property>
- </emphasis> button to add your existing Java class.</para>
- <figure float="0">
- <title>New Managed Bean Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_42.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Once the class is set, its <emphasis>
- <property moreinfo="none">Name</property>
- </emphasis> will be set as well. But you can easily substitute it for
the other one.
- Notice that <emphasis>
- <property moreinfo="none">Generate Source
Code</property>
- </emphasis> option is not available as the <emphasis
role="italic">
- <property
moreinfo="none">"Java"</property>
- </emphasis> class already exists. </para>
- <para>After adding your class <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> button will be activated. Pressing it you'll get
<emphasis>
- <property moreinfo="none">Managed
Properties</property>
- </emphasis> dialog where all corresponding properties are displayed.
Check the necessary
- ones to add them into your <property moreinfo="none">JSF
Configuration File</property>.</para>
-
- <figure float="0">
- <title>Selection of Bean's Properties.</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_43.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you don't want to add any, just click <emphasis>
- <property moreinfo="none">Finish</property>.
</emphasis></para>
- <para>Above-listed steps have demonstrated how you can specify an existing
Bean in the JSF
- configuration file, i.e. <emphasis>
- <property
moreinfo="none">faces-config.xml</property>. </emphasis> In the
next chapter
- you'll know how to organize and register another kind of
artifacts.</para>
- </section>
-</chapter>
-
-
-<chapter id="creation_and_registration"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/creation_and_registration.xml">
- <?dbhtml filename="creation_and_registration.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>JSF Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Creation and Registration</title>
-
- <section id="CreateAndRegisterACustomConverter94230">
-
- <title>Create and Register a Custom Converter</title>
-
- <para>It's also possible to create a
- custom Converter in order to specify your own converting rules. Let's
look at how you can do this.</para>
-
- <para>To create and register a custom converter it's necessary to
- go through the following steps:</para>
-
- <itemizedlist>
- <listitem>
- <para>In the Project Explorer view open <emphasis>
- <property
moreinfo="none">faces-config.xml</property>
- </emphasis> and select <emphasis>
- <property moreinfo="none">Tree</property>
- </emphasis> tab.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Converters</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_44.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">Converters</property>
- </emphasis> and click on<emphasis>
- <property moreinfo="none"> Add</property>
- </emphasis> button.</para>
- </listitem>
- <listitem>
- <para>On the form type the name of your converter in the
<emphasis>
- <property
moreinfo="none">Converter-id</property>
- </emphasis> field and name of the class for
- converters. After clicking <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button your custom converter is
- registered under the entered name.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Add Converter Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_45.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Now you can create <emphasis role="italic">
- <property
moreinfo="none">"converter"</property>
- </emphasis> class. In the Converter section you
- should see your <emphasis>
- <property
moreinfo="none">Converter-id</property>
- </emphasis> and
- <emphasis><property
moreinfo="none">Converter-class</property>.</emphasis>
- Click on <emphasis>
- <property
moreinfo="none">Converter-class</property>
- </emphasis> to generate the source code.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Generation of Source Code for Converter Class</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_46.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>A usual wizard for creating a Java class will appear.
- All needed fields here will be adjusted
- automatically. Just leave everything without changes
- and click <emphasis>
- <property
moreinfo="none">Finish</property>.
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>New Java Class Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_47.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>To open a converter class click again on <emphasis>
- <property
moreinfo="none">Converter-class</property>
- </emphasis> link in the Converter section.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Converter Class</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_48.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Now you
- are able to add a business logic of converter in the
- Java editor.</para>
- </section>
-
- <section id="CreateAndRegisterACustomValidator5632">
-
- <title>Create and Register a Custom Validator</title>
-
- <para>It's also quite easy to develop your
- own custom Validators. You should perform the actions similar to the
- previous one. Go through the following steps:</para>
- <itemizedlist>
- <listitem>
- <para>In the Project Explorer view open<emphasis>
- <property moreinfo="none">
faces-config.xml</property>
- </emphasis> and select <emphasis>
- <property moreinfo="none">Tree </property>
- </emphasis>tab.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Validator in Faces Config Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_49.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">Validators</property>
- </emphasis> and click on <emphasis>
- <property moreinfo="none">Add </property>
- </emphasis>button.</para>
- </listitem>
- <listitem>
- <para>Type the name of your validator in the <emphasis>
- <property
moreinfo="none">Validator-id</property>
- </emphasis> field and name of the class for
- validators. After clicking <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button your custom validator is
- registered under the entered name.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Adding Validator</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_50.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now you can create the "validator" class. </para>
- <itemizedlist>
- <listitem>
- <para>In the Validator section you can see your <emphasis>
- <property
moreinfo="none">Validator-id</property>
- </emphasis> and <emphasis>
- <property
moreinfo="none">Validator-class</property></emphasis>. To
generate the source code click on <emphasis>
- <property
moreinfo="none">Validator-class</property>.
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Creating Validator Class</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_51.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Java class will be created automatically. Leave
- everything without changes and click <emphasis>
- <property
moreinfo="none">Finish</property>.
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>New Java Class Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_52.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>To open validator class click again on <emphasis>
- <property
moreinfo="none">Validator-Class</property>
- </emphasis> link in the Validator section. Now you
- are able to write a business logic of validator in
- the Java editor.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Converter Class Editing</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_53.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="referenced_beans">
- <title>Create and Register Referenced Beans</title>
-
- <para>Creation of Referenced Beans is similar to creation of Custom
- Validator as well. To perform this, let's walk through the necessary
steps.</para>
-
- <itemizedlist>
- <listitem>
- <para>In the Project Explorer view open<emphasis>
- <property moreinfo="none">
faces-config.xml</property>
- </emphasis> and select <emphasis>
- <property moreinfo="none">Tree </property>
- </emphasis>tab.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Referenced Beans in Faces Config Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_54.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">Referenced
Beans</property>
- </emphasis> and click on <emphasis>
- <property moreinfo="none">Add</property>
- </emphasis> button.</para>
- </listitem>
- <listitem>
- <para>Type in the name of your Referenced Bean and type in
- or select <emphasis>
- <property
moreinfo="none">Referenced-Bean-Class</property>
- </emphasis> by using <emphasis>
- <property
moreinfo="none">Browse</property>
- </emphasis> button.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Add Referenced Bean</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_55.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>In the Referenced Bean section you should see your
<emphasis>
- <property
moreinfo="none">Referenced-Bean-Name</property>
- </emphasis> and
- <emphasis><property
moreinfo="none">Referenced-Bean-Class</property>.</emphasis>
- Click on the link to open the Java creation
- wizard.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Create Referenced Bean Class</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_56.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Java class will be created automatically. Leave
- everything without changes and click <emphasis>
- <property
moreinfo="none">Finish</property>.
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>New Java Class Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_57.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>To open Referenced Bean class click again on
<emphasis>
- <property
moreinfo="none">Referenced-Bean-Class</property>
- </emphasis> in the Referenced Bean section. Now you
- are able to write business logic of Referenced Bean
- in the Java editor.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Referenced Bean Class Editing</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_support/jsf_support_58.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-</chapter>
-
-<chapter id="jsf_project_verification"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_project_verification.xml">
- <?dbhtml filename="struts_project_verification.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>JSF Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>JSF Project Verification</title>
-
- <para>In this chapter we'll discuss a possible verification that you can
take advantage
- of.</para>
- <!-- JBoss Developer Studio checks for many different rules for a JSF project
-->
- <para>Many different rules are checked for a JSF project that can be configured
by selecting <emphasis>
- <property moreinfo="none">Window >
Preferences</property>
- </emphasis> from the menu bar, selecting <emphasis>
- <property moreinfo="none">JBoss Tools > Web >
Verification</property>
- </emphasis> from the Preferences dialog box and then expanding the JSF
Rules node.</para>
- <figure float="0">
- <title>JSF Rules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Suppose you are working in the Source viewer for a JSF configuration file
as shown below:</para>
- <figure float="0">
- <title>Faces-config.xml File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>While typing a class name, you might make a minor typo (like <emphasis
role="italic">
- <property
moreinfo="none">"jsfHello.PersonBean9"</property>
- </emphasis> instead of <emphasis role="italic">
- <property
moreinfo="none">"jsfHello.PersonBean"</property>
- </emphasis>). After saving the file, verification checks to make sure
everything is correct
- and finds the error below:</para>
- <figure float="0">
- <title>Error in Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/verif_valid/verif_valid_3.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Notice that the Package Explorer View shows a marked folder and a marked
file where the
- error is.</para>
- <para>You can place the cursor over the line with an error message and get a
detailed error
- message:</para>
- <figure float="0">
- <title>Error Message</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Verification also checks navigation rules:</para>
- <figure float="0">
- <title>Checking Navigation Rules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>If you provide a page name that does not exist, verification will let you
know about that:</para>
- <figure float="0">
- <title>Page Name Verification</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/verif_valid/verif_valid_6.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You can always call up verification explicitly by right-clicking any
element in the tree
- and selecting Verify from the context menu. This works from both the Tree and
Diagram
- viewers for the JSF configuration file editor. You can also invoke verification
from the Web
- Projects view. Below we are checking all of the elements in the configuration
file.</para>
- <figure float="0">
- <title>Verify Command</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In summary, this document highlights all the JSF-specific features of
<property moreinfo="none">JBoss Tools</property>
- meant for enhancing the development of rich Web applications based on JSF
technology. The
- reference introduces you to wizards for creating and importing JSF projects, JSF
- Configuration File editor features, functionality for enabling JSF capabilities
and etc.</para>
-
- <para>If you have questions or good suggestions, please refer to <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
- Tools Forum</ulink>.</para>
-</chapter>
-
-</book>
+]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>JSF Tools Reference Guide</title>
+
+
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 3.0.0.GA
+ </releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf_tools_...
version</ulink>
+ </para>
+</abstract>
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+<chapter id="introduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml">
+ <?dbhtml filename="introduction.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>JSF Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <para>JSF Tools are especially designed for supporting JSF and JSF-related
technologies. JSF
+ Tools provide extensible and exemplary tools for building JSF-based applications
as well as
+ adding JSF capabilities to existing web projects, importing JSF projects and
choosing any
+ JSF implementation while developing JSF application.</para>
+
+ <para>In this guide we provide you with the information on JSF tooling which
allows you to
+ develop JSF applications much faster and with far fewer errors so sparing your
time.</para>
+
+ <section id="jsf_key_features">
+ <title>Key Features of JSF Tools</title>
+
+ <para>Here, we provide you with a key functionality which is integrated in
JSF tooling.</para>
+
+ <table>
+ <title>Key Functionality for JSF Tools</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1"
colwidth="2*"></colspec>
+ <colspec colnum="2"
colwidth="4*"></colspec>
+ <colspec colnum="3"
colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>JSF and Facelets support</entry>
+ <entry>Step-by-step wizards for creating new JSF and
Facelets projects with a number of predefined templates, importing existing ones and
adding JSF capabilities to non-jsf web projects.</entry>
+ <entry><link linkend="jsf_support">jsf
support</link></entry>
+ </row>
+
+ <row>
+ <entry>Flexible and customizable project template
management</entry>
+ <entry>Jump-start development with out-of-the-box templates
or easily
+ customized templates for re-use.</entry>
+ <entry>
+ <link
linkend="projects">projects</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for JSF Configuration File</entry>
+ <entry>Working on file using three modes: diagram, tree and
source.
+ Synchronization between the modes and full control over the
code. Easy
+ moving around the diagram using the Diagram
Navigator.</entry>
+ <entry>
+ <link linkend="jsf_config_file">graphical
editor for jsf</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for Managed Beans</entry>
+ <entry>Adding new managed beans, generating code for
attributes, properties
+ and getter/setter methods.</entry>
+ <entry>
+ <link linkend="managed_beans">managed
beans</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for Custom Converters and
Validators</entry>
+ <entry>Fast creating of custom converters and validators
with tree view of
+ faces-config.xml file.</entry>
+ <entry>
+ <link
linkend="creation_and_registration">converters and validators</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Verification and Validation</entry>
+ <entry>All occuring errors will be immediately reported by
verification
+ feature, no matter in what view you are working. Constant
validation and
+ errors checking allows to catch many of the errors during
development
+ process that significantly reduces development
time.</entry>
+ <entry>
+ <link
linkend="jsf_project_verification">verification and
+ validation</link>
+ </entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find
<ulink
url="http://docs.jboss.org/tools/">here</ulink>.</p...
+ <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
+ </section>
+</chapter>
+
+
+<chapter id="jsf_support"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_support.xml">
+ <?dbhtml filename="jsf_support.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JavaServer Faces Support</title>
+
+ <para>We don't lock you into any one <property
moreinfo="none">JavaServer
+ Faces</property> implementation. You can always select the
one which is
+ necessary for you while <link
linkend="new_jsf_project">creating a new JSF
+ project</link>, <link
linkend="add_jsf_capability">adding JSF capability</link> to
+ any existing Eclipse project or <link
linkend="ImportingExsJSFProjWithAnyStr74447">importing existing JSF
projects</link> as well.</para>
+ <para>At this point the special wizard will prompt you to specify a proper
JSF environment.
+ It may be JSF 1.1.02 RI or JSF 1.2 which integrates a number of new
features and
+ changes. The wizard also lets you select JSF implementation with a
component
+ orientation such as JSF 1.2 with Facelets or MyFaces 1.1.4.</para>
+
+ <figure float="0">
+ <title>Choosing JSF Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After specifying a proper JSF environment all the required libraries
for the selected
+ version will be added to your project.</para>
+
+ <section id="FaceletsSupport865">
+
+ <title>Facelets Support</title>
+ <para>In this section we will focus more on all concepts that are
integrated for
+ working with Facelets.</para>
+
+ <para>The Facelets extends JavaServer Faces by providing a
lightweight framework
+ that radically simplifies the design of presentation pages for
JSF. Facelets can be used in a variety of ways that we
+ will consider further in this section.</para>
+
+ <section>
+ <title>Facelets templates</title>
+ <para>If you want to build an application using Facelets,
just create a
+ project with Facelets based on version 1.2 of the JSF
Reference
+ Implementation, i. e. select the <emphasis>
+ <property moreinfo="none">JSF 1.2
with Facelets</property>
+ </emphasis> in the JSF Environment section of the
New JSF Project
+ wizard.</para>
+
+ <figure float="0">
+ <title>Choosing Facelets Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once you've selected the environment, it's
possible
+ to specify the one of three available
templates:</para>
+ <figure float="0">
+ <title>Choosing Facelets Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The following table lists possible templates with
Facelets for any JSF
+ project and gives a proper description for each
one.</para>
+ <table>
+ <title>Facelets Templates</title>
+ <tgroup cols="2">
+ <colspec align="left"
colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2"
colwidth="3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Template</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property
moreinfo="none">FaceletsBlankWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>Some servers already
provide
+ jsf libs and you take risk
+ of getting conflicting
+ libraries while deploying
+ your project. To avoid such
+ conflicts, use a template
+ without libs if you have a
+ server with its own jsf
+ libraries</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property
moreinfo="none">FaceletsKickStartWithRILibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>A sample application with
+ Facelets that is ready to
+ run</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property
moreinfo="none">FaceletsKickStartWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>A sample application
without
+ libraries</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Facelets components</title>
+
+ <para>The <ulink
url="../../jsf/html_single/index.html#palette">JBoss Tools
+ Palette</ulink> comes with the Facelets
components ready to
+ use. A useful tip appears when you hover the mouse cursor
over the
+ tag, the tip includes a detailed description of the tag
component,
+ the syntax and available attributes.</para>
+
+ <!-- JBoss Developer Studio does not provide templates for
MyFaces right out of the box, but you can easily do it
+ yourself with the "Save As Template" feature (available on the File
submenu). Just create a small project
+ with MyFaces and Facelets and then save it as a template for future use.
+
+ How can I add Facelets support to an existing project?</para>
+ <para>A: Right-click on the folder of existing project and select
<emphasis>JBoss Tools > Add Custom Capabilities.. >
Facelets</emphasis>. </para>
+ -->
+ <figure float="0">
+ <title>Facelets Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_4.png"
scale="65"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Code assist for Facelets</title>
+
+ <para>One more feature which comes with Facelets support is
code assist
+ (Ctrl + Space). It is available for <property
moreinfo="none">Facelets
+ tags</property> while editing <emphasis>
+ <property
moreinfo="none">.xhtml</property>
+ </emphasis> files.</para>
+
+ <figure float="0">
+ <title>XHTML File Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_5.png"
scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>What's more, code assist is also available for
<emphasis role="italic">
+ <property
moreinfo="none">"jsfc"</property>
+ </emphasis> attribute in any HTML
tag.</para>
+
+ <figure float="0">
+ <title>Code Assist for JSFC
Attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_6.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After selecting <emphasis
role="italic">
+ <property
moreinfo="none">"jsfc"</property>
+ </emphasis> you get the code assist for JSF
components available on
+ a page.</para>
+
+ <figure float="0">
+ <title>Code Assist for JSF
Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_7.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When a component is chosen you will see all available
attributes for
+ it.</para>
+
+ <figure float="0">
+ <title>Available Attributes for the
Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_8.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Open On feature</title>
+ <para>Finally, Eclipse's <emphasis>
+ <property
moreinfo="none">OpenOn</property>
+ </emphasis> feature for editing Facelets files is
supported. Using this feature,
+ you can easily navigate between the <property
moreinfo="none">Facelets
+ templates</property> and other parts of your
projects. Just by
+ holding down the Control key while hovering the mouse
cursor over a
+ reference to a template, the reference becomes a
hyperlink to open
+ that template.</para>
+
+
+ <figure float="0">
+ <title>Template Hyperlink</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_9.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!-- <para>Additionally, when hovering the mouse
cursor over <emphasis role="italic"><property>"Facelets
tag"</property></emphasis> attributes, JBoss Developer Studio
provides a pop-up help tip:</para>
+ <figure>
+<title>Pop-up Help Tip for Facelets Tag Attributes</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/defaultImage.png"/>
+ </imageobject>
+</mediaobject>
+ </figure>
+
+ -->
+ <!-- <para>See <link
linkend="faq_facelets">FAQ</link> concerning Facelets
+ support.</para>
+ -->
+ </section>
+
+ <!--section>
+ <title>Relevant Resources Links</title>
+ <para>Necessary information and support for
Facelets find out <ulink
+
url="https://facelets.dev.java.net/"
+ >here</ulink>.</para>
+ </section-->
+ </section>
+
+
+
+
+
+
+
+
+
+
+ <!--section>
+ <title>Relevant Resources Links</title>
+ <para>If you don't familiar with <ulink
+
url="http://java.sun.com/javaee/javaserverfaces/">JSF
+ technology</ulink>, we suggest that you
walk through the
+ information on the topic.</para>
+ </section-->
+</chapter>
+
+
+<chapter id="projects"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml">
+ <?dbhtml filename="projects.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Projects</title>
+ <para>To take an advantage of JSF firstly you should
perform one of the next
+ steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create new JSF projects</para>
+ </listitem>
+ <listitem>
+ <para>Import (open) existing JSF
projects</para>
+ </listitem>
+ <listitem>
+ <para>Add JSF capability to any existing
Eclipse
+ project</para>
+ </listitem>
+ <listitem>
+ <para>Import and add JSF capability to any
existing project
+ created outside Eclipse.</para>
+ </listitem>
+ </itemizedlist>
+ <para>In this section we're going to stop on each of
them in
+ detail.</para>
+
+ <section id="new_jsf_project">
+
+ <title>Creating a New JSF Project</title>
+
+ <para>If you want your project to already contain
all JSF
+ libraries, tag libraries and JSF configuration
file, just
+ organize a new brand JSF project. It is possible
to do this easily with the
+ help of the special wizard. To get it,
select<emphasis>
+ <property
moreinfo="none"> File > New > Project
+ > JBoos Tools Web > JSF
+ > JSF Project</property>
+ </emphasis> and click <emphasis>
+ <property
moreinfo="none">Next</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Choosing a JSF
Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next form you'll be prompted to
enter
+ <property
moreinfo="none">Project Name</property> and select a
+ location for the project or just leave a default
path.</para>
+ <para>Here, JSF Version also allows you to select
which JSF
+ implementation to use.</para>
+ <figure float="0">
+ <title>Creating a New JSF
Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>There is a number of predefined project
templates that are flexible and
+ easily customizable. Thus you can pick a
different template
+ on which the projects Importing Existing should
be based on. Almost all
+ templates come in two variations: with jsf
libraries and
+ without ones.</para>
+ <figure float="0">
+ <title>Choosing JSF
Templates</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_12.png "></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The table below provides description for each
possible JSF
+ template.</para>
+ <table>
+ <title>JSF Project Templates</title>
+ <tgroup cols="2">
+ <colspec align="left"
colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2"
colwidth="3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Template</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property
moreinfo="none">JSFBlankWithLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>This template will
+ create a standard
+ Web project
+ structure with all
+ JSF
+ capabilities</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property
moreinfo="none">JSFKickStartWithLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>This template will
+ create a standard
+ Web project
+ structure but will
+ also include a
+ sample application
+ that is ready to
+ run</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property
moreinfo="none">JSFKickStartWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>Some servers already
+ provide jsf libs and
+ you take risk of
+ getting conflicting
+ libraries while
+ deploying your
+ project. To avoid
+ such conflicts, use
+ a template without
+ libs if you have a
+ server with its own
+ jsf libraries</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <!-- <para>You can of course
create your own custom templates. More information
+ on templates creation could be found in <link
+
linkend="CreatingCustomJSPTemplates">Chapter 5</link>.</para>
+ -->
+
+ <para>On the next screen select what
<emphasis>
+ <property
moreinfo="none">Servlet version</property>
+ </emphasis> to use and whether to register
this application
+ with JBoss AS (or other server) for running and
testing your application.</para>
+
+ <para>The <emphasis>
+ <property
moreinfo="none">Context Path</property>
+ </emphasis> is the name under which the
application will be
+ deployed.</para>
+
+ <para>The <emphasis>
+ <property
moreinfo="none">Runtime</property>
+ </emphasis> value tells Eclipse where to
find Web libraries
+ in order to build (compile) the project. It is
not possible
+ to finish project creation without selecting
Runtime. If you
+ don't have any values, select
<emphasis>
+ <property
moreinfo="none">New...</property>
+ </emphasis> to add new
Runtime.</para>
+
+ <para>The <emphasis>
+ <property
moreinfo="none">Target Server</property>
+ </emphasis> allows you specifying whether
to deploy the
+ application. The Target Server corresponds to the
Runtime
+ value selected above. If you don't want to
deploy
+ the application, uncheck this
value.</para>
+ <figure float="0">
+ <title>Registering the Project on
Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When you are all done, you should have the
project that has
+ been appeared in the Package Explorer
view:</para>
+ <figure float="0">
+ <title>A New Project in the Package
Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>At this point you can open <emphasis>
+ <property
moreinfo="none">faces-config.xml</property>
+ </emphasis> and start working on your
application.
+ There are a lot of features
+ to develop JSF applications. We will describe the
features
+ further.</para>
+ </section>
+
+ <section
id="ImportingExsJSFProjWithAnyStr74447">
+
+ <title>Importing Existing JSF Projects with Any
Structure</title>
+
+ <para>For detailed information on migration of JSF
projects into a workspace see <ulink
url="../../Exadel-migration/html_single/index.html#jsf_struts">Migration
Guide</ulink>.</para>
+
+ </section>
+ <section id="add_jsf_capability">
+
+ <title>Adding JSF Capability to Any Existing
Eclipse Project</title>
+
+ <para>It's also possible to add <property
moreinfo="none">JSF capability</property>
+ (JSF libraries, tag libraries) to any existing
Eclipse
+ project in your workspace. After that you'll
be
+ able to make use of such editors as JSF
configuration editor, JBoss
+ Tools JSP editor and any others.</para>
+ <para>Right click the project and select
<emphasis>
+ <property
moreinfo="none">JBoss Tools > Add JSF
+ Capabilities</property>.
</emphasis> This will start
+ the process of adding all necessary libraries,
files to make
+ this a Web JSF project.</para>
+ <figure float="0">
+ <title>Adding JSF
Capabilities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The wizard will first ask you to show the
<emphasis>
+ <property
moreinfo="none">web.xml</property>
+ </emphasis> file location and the project
name.</para>
+ <figure float="0">
+ <title>Project Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On the last form you can set the different
folders for your
+ project as well as register this application with
a servlet
+ container.</para>
+
+ <para>Make sure to select <emphasis>
+ <property
moreinfo="none">Add Libraries</property>
+ </emphasis> to add all required JSF related
libraries to this project.</para>
+
+ <para>The <emphasis>
+ <property
moreinfo="none">Context Path</property>
+ </emphasis> is the name under which the
application will be
+ deployed.</para>
+
+ <para>The <emphasis>
+ <property
moreinfo="none">Runtime</property>
+ </emphasis> value tells Eclipse where to
find Web libraries
+ in order to build (compile) the project. It is
not possible
+ to finish project import without selecting
Runtime. If you
+ don't have any values, select
<emphasis>
+ <property
moreinfo="none">New...</property>
+ </emphasis> to add new
Runtime.</para>
+
+ <para>The <emphasis>
+ <property
moreinfo="none">Target Server</property>
+ </emphasis> allows you to specify whether
to deploy the
+ application. The Target Server corresponds to the
Runtime
+ value selected above. If you don't want to
deploy
+ the application, uncheck this
value.</para>
+ <figure float="0">
+ <title>Project Folders</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once your project is imported you can see
that JSF related
+ libraries have been added to your project:
<emphasis>
+ <property
moreinfo="none">jsf-api.jar</property>
+ </emphasis> and <emphasis>
+ <property
moreinfo="none">jsf-impl.jar</property>
+ </emphasis>.</para>
+ <note>
+ <title>Note:</title>
+ <para>Some application servers provide
their own jsf
+ implementation libraries. Thus, to avoid
conflicts you
+ should not add jsf libraries while adding
jsf
+ capabilities.</para>
+ </note>
+ <para>You are now ready to work with JSF by
creating a new JSF
+ configuration file:</para>
+
+
+ <figure float="0">
+ <title>Creating a New JSF Configuration
File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once the file has been created, it should be
opened in a
+ special <link
linkend="jsf_config_file">Faces Config Editor</link>.</para>
+ </section>
+ <section id="AddingYourOwnProjectTemplates853">
+
+ <title>Adding Your Own Project
Templates</title>
+ <para>Template is a set of files that is served as
a basis to facilitate
+ the creation of a new project. Project templates
provide
+ content and structure for a
project.</para>
+ <para>There is a powerful
+ templating capability for creating new and
importing
+ existing Struts and JSF projects. This templating
facility
+ has a variety of aspects to consider. But,
let's
+ start with the most straightforward case and
consider the
+ process of creating a template from your existing
JSF
+ project.</para>
+
+ <para>Let's say you have a project that you
want to use as
+ the basis for a new <property
moreinfo="none">template</property>. Follow
+ these steps to make a template out of
it:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Web Projects view,
right-click the
+ project and select <emphasis>
+ <property
moreinfo="none">JBoss Tools JSF > Save As
+ Template</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Saving Your Project as
Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the first dialog box, you
can choose a name
+ for the template (defaults to the
project
+ name) and confirm what run-time
+ implementation of the project
+ technology will be used</para>
+ </listitem>
+
+ </itemizedlist>
+ <figure float="0">
+ <title>Define Template
Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_20_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">Next</property>
+ </emphasis> and you will be sent
to a dialog
+ box with your project structure
displayed
+ with check boxes. Here you can check
only
+ those parts and files in your project
+ directory that should be part of the
+ template</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Define Template
Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_20_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>At this point, unless you
want to designate
+ some extra files as having Velocity
template
+ coding inside them, you should click
<emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <para>That's it. Now, you can use this template
with any
+ new or imported project that uses the same
run-time
+ implementation as the project you turned into a
+ template.</para>
+ <para>At this point, you have a fully configured
project and now you can
+ bring some new logic to it starting from JSF
configuration
+ file.</para>
+ </section>
+</chapter>
+
+<chapter id="jsf_config_file" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_config_file.xml">
+ <?dbhtml filename="jsf_config_file.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JSF Configuration File Editor</title>
+
+ <para>First, we should mention that JSF configuration file (<emphasis>
+ <property moreinfo="none">faces-config.xml</property>
+ </emphasis>) is intended for registering JSF application resources such as
Converters,
+ Validators, Managed Beans and page-to-page navigation rules.</para>
+ <para>Now, let's look at how you can easily configure this file by means of
a special
+ graphical editor for JSF configuration file. The editor has three main
views:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Diagram</para>
+ </listitem>
+ <listitem>
+ <para>Tree</para>
+ </listitem>
+ <listitem>
+ <para>Source</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>They can be selected via the tabs at the bottom of the
editor.</para>
+
+ <section id="Diagram9553">
+
+ <title>Diagram view</title>
+
+ <para>Here, we will show you how to work with JSF configuration file
through the Diagram
+ view of the editor.</para>
+ <para>As you can see on the figure below, the Diagram view displays the
navigation rules in
+ the faces-config.xml:</para>
+ <figure float="0">
+ <title>Diagram View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If your diagram is large, make use of the Outline view. Within it you
can switch to a <emphasis>
+ <property moreinfo="none">Diagram
Navigator</property>
+ </emphasis> mode by selecting the middle icon at the top of the view
window. It allows
+ you to easily move around the diagram. Just move the blue area in any
direction, and the
+ diagram on the left will also move:</para>
+ <figure float="0">
+ <title>Outline View for Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_32.png"
scale="50"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To create a new page here, you should click the page icon (View
Template) on the
+ toolbar from the left and then click anywhere on the diagram. A New Page
Wizard will
+ appear.</para>
+
+ <para>To create a transition for connecting pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select the transition icon from the toolbar (New
Connection).</para>
+ </listitem>
+ <listitem>
+ <para>Click the source page.</para>
+ </listitem>
+ <listitem>
+ <para>Click the target page.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>A transition will appear between the two pages:</para>
+ <figure float="0">
+ <title>Transition between JSP Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It is also possible to create a new page with context menu by
right-clicking anywhere
+ on the diagram and selecting <emphasis>
+ <property moreinfo="none">New View</property>.
</emphasis></para>
+ <figure float="0">
+ <title>Creating a New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To edit an existing transition, first select the transition line.
Then, place the
+ mouse cursor over the last black dot (on the target page). The mouse cursor
will change
+ to a big +. At this point, drag the line to a new target page:</para>
+ <figure float="0">
+ <title>Editing Transition between Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="TreeView11123" role="updated">
+
+ <title>Tree View</title>
+
+ <para>You can find it more convenient to edit your JSF Configuration file
in the Tree view of
+ the <property
moreinfo="none">VPE</property>.</para>
+
+ <para>The view displays all JSF application artifacts referenced in the
configuration file
+ in a tree format. By selecting any node on the left, you can see and edit its
properties
+ which will appear in the right-hand area. Let's look at the structure of
this
+ tree more closely.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property
moreinfo="none">Application</property>
+ </emphasis> node you can adjust JSF application specific
settings such as
+ internationalization, possibility to set extensions, add property and
variable
+ resolvers, etc.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JSF Application Specific Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_24a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property
moreinfo="none">Components</property>
+ </emphasis> node is for registering custom JSF components.
Right-click and
+ choose <emphasis>
+ <property moreinfo="none">New >
Component</property>
+ </emphasis> or just press the <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button in the right-hand area to add a new
component to the JSF
+ Configuration file.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Registering a New JSF Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_24b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the <property moreinfo="none">Add
Component wizard</property> you should set a component
+ type and point to a component class by using the <emphasis>
+ <property
moreinfo="none">Browse</property>
+ </emphasis> button or create a new class for this component by
using the <emphasis>
+ <property
moreinfo="none">Component-Class</property>
+ </emphasis> link.</para>
+
+ <figure float="0">
+ <title>Adding a New JSF Component to the JSF Configuration
File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_24c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Use the <emphasis>
+ <property moreinfo="none">Render
Kit</property>
+ </emphasis> node to create and register a set of related
renderers for custom
+ JSF components.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Adding a New JSF Component to the JSF Configuration
File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_24d.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property
moreinfo="none">Converters</property>
+ </emphasis> node you can create a converter class for your JSF
application
+ either with id or for a proper class. How to do that see the <link
linkend="CreateAndRegisterACustomConverter94230">Create and Register a
+ Custom Converter</link> section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Creating a New Custom Converter</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_59.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property moreinfo="none">Managed
Bean</property>
+ </emphasis> node is meant for creating and registering Bean
classes in your JSF
+ application. Read more on the topic in the <link
linkend="managed_beans">Managed
+ Beans</link> chapter.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Managed Beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Use the <emphasis>
+ <property moreinfo="none">Navigation
Rules</property>
+ </emphasis> node to configure a navigation between the pages in
your
+ application: create a new navigation rule and adjust necessary
properties for it
+ in the right-hand area.</para>
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <title>Tip:</title>
+ <para>The same you can do in the <link
linkend="Diagram9553">Diagram view</link> of the
+ JSF Configuration file editor.</para>
+ </tip>
+
+ <figure float="0">
+ <title>Configuring Navigation Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_26a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property moreinfo="none">Referenced
Beans</property>
+ </emphasis> node you can add a new Referenced Bean and
configure various
+ properties for it. To learn more on this refer to the <link
linkend="referenced_beans">Create and Register Referenced Beans</link>
+ section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Referenced Beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_26b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property
moreinfo="none">Validators</property>
+ </emphasis> node is needed to create validator classes for
organizing the
+ validation of your application data. You can read more on the topic
in the <link linkend="CreateAndRegisterACustomValidator5632">Create and
Register a Custom
+ Validator</link> section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Validators</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_26c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property
moreinfo="none">Extensions</property>
+ </emphasis> node is for setting extensions for your
<emphasis>
+ <property
moreinfo="none">faces-config.xml</property>.</emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Adding Extensions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_26d.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the <property moreinfo="none">Tree
view</property> you can also edit the properties of the selected
+ element with the help of the <property
moreinfo="none">Properties view</property> as shown
below:</para>
+
+ <figure float="0">
+ <title>Properties View </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_33.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="SourceView4643">
+
+ <title>Source View</title>
+
+ <para>Here, we'll discuss how you can configure your faces-config.xml
with the help
+ of Source View.</para>
+ <para>The Source view for the editor displays a text content of the JSF
configuration file.
+ It is always synchronized with other two views, so any changes made in one of
the views
+ will immediately appear in the other:</para>
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_27.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You can also work in the Source view with the help of the
<emphasis>
+ <property moreinfo="none">Outline
view</property>.</emphasis> The Outline view shows a tree
+ structure of the JSF configuration file. Simply select any element in the
Outline view,
+ and it will jump to the same place in the Source editor, so you can navigate
through the
+ source code with Outline view.</para>
+ <figure float="0">
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_31.png"
scale="50"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="jsf_editor_features">
+ <title>Editor Features</title>
+ <para>Here we'll discuss a very important features that JSF
configuration file
+ editor provides for work with JSF resources.</para>
+
+ <section id="jsf_openOn">
+ <title>Open On</title>
+ <para>The JSF configuration file editor comes with a very useful OpenOn
navigating
+ feature. More fully you can read about it in our <ulink
url="../../jsf/html_single/index.html#OpenOnSelection4Hyperlinknavigation">Visual
Web Tools
+ Guide</ulink>.</para>
+ </section>
+
+ <section id="ContentAssist976">
+
+ <title>Code Assist</title>
+ <para>Code Assist provides pop-up tip to help you complete your code
statements. It
+ allows you to write your code faster and with more
accuracy.</para>
+ <para>Code assist is always available in the Source mode:</para>
+ <figure float="0">
+ <title>Code Assist in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_28.png"
scale="65"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="ErrorReporting3324">
+
+ <title>Error Reporting</title>
+ <para>When you are developing your project, error checking is
constantly provided. This
+ greatly reduces your development time as it allows you to catch many of
the errors
+ during development.</para>
+ <para>Errors will be reported by <link
linkend="jsf_project_verification">
+ verification</link> facility:</para>
+ <figure float="0">
+ <title>Error Reporting in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_29.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Other errors are also reported.</para>
+ <figure float="0">
+ <title>Other Errors Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_30.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+</chapter>
+
+
+<chapter id="managed_beans"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/managed_beans.xml">
+ <?dbhtml filename="managed_beans.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Managed Beans</title>
+
+ <para>There is lots of power to work with <property
moreinfo="none">managed beans</property>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add and generate code for new managed beans</para>
+ <itemizedlist>
+ <listitem>
+ <para>Generate code for attributes and getter/setter
methods</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Add existing managed beans to JSF configuration
file</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Thus, in this section we will guides you through all this
possibilities.</para>
+
+ <section id="CodeGenerationForManagedBeans421">
+
+ <title>Code Generation for Managed Beans</title>
+
+ <para>To start, create a new managed bean in JSF configuration file editor,
in the Tree
+ view.</para>
+ <figure float="0">
+ <title>Creation of New Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_34.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>When you define a new managed bean, make sure that
<emphasis>
+ <property moreinfo="none">Generate Source
Code</property>
+ </emphasis> is checked as shown in the figure below.</para>
+ </note>
+ <figure float="0">
+ <title>New Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_35.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After the <emphasis role="italic">
+ <property
moreinfo="none">"Java"</property>
+ </emphasis> class has been generated you can open it for additional
editing. There are
+ two ways to open the <emphasis role="italic">
+ <property
moreinfo="none">"Java"</property>
+ </emphasis> class:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>click on <emphasis>
+ <property
moreinfo="none">Managed-Bean-Class</property>
+ </emphasis> link in the editor</para>
+ </listitem>
+ </itemizedlist>
+ <para>or</para>
+ <itemizedlist>
+ <listitem>
+ <para>right click the <emphasis>
+ <property moreinfo="none">managed
bean</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">Open
Source</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Opening of Created Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_36.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The generated Java source should look as follows:</para>
+
+ <figure float="0">
+ <title>Java Source Code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_37.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also generate source code for properties, also includes
<emphasis role="italic">
+ <property
moreinfo="none">"getter"</property>
+ </emphasis> and <emphasis role="italic">
+ <property
moreinfo="none">"setter"</property>
+ </emphasis> methods. Right click on the bean and select
<emphasis>
+ <property moreinfo="none">New >
Property</property>
+ </emphasis>. You will see <property moreinfo="none">Add
Property</property> dialog.</para>
+ <figure float="0">
+ <title>Generation of Source Code for Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_38.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the form is open make sure that all the check boxes are
selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add Java property</para>
+ </listitem>
+ <listitem>
+ <para>Generate Getter</para>
+ </listitem>
+ <listitem>
+ <para>Generate Setter</para>
+ </listitem>
+ </itemizedlist>
+ <para></para>
+ <figure float="0">
+ <title>"Add Property" Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_39.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once the generation is complete, you can open the file and see the
added property with
+ <emphasis role="italic">
+ <property
moreinfo="none">"get"</property>
+ </emphasis> and <emphasis role="italic">
+ <property
moreinfo="none">"set"</property>
+ </emphasis> methods:</para>
+ <figure float="0">
+ <title>Generated Java Source Code for Property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_40.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus, we've discussed everything which comes to creating a new
Managed Bean.
+ The next section will show you how to add an existing Bean into a JSF
configuration
+ file.</para>
+ </section>
+ <section id="AddExistingJavaBeansToAJSFConfigurationFile74332">
+
+ <title>Add Existing Java Beans to a JSF Configuration File</title>
+ <para>If you already have a Java bean you can easily add it to a
<property moreinfo="none">JSF configuration
+ file</property>.</para>
+ <para>You should start the same way you create a new managed bean. Use the
<emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis> button to add your existing Java class.</para>
+ <figure float="0">
+ <title>New Managed Bean Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_42.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once the class is set, its <emphasis>
+ <property moreinfo="none">Name</property>
+ </emphasis> will be set as well. But you can easily substitute it for
the other one.
+ Notice that <emphasis>
+ <property moreinfo="none">Generate Source
Code</property>
+ </emphasis> option is not available as the <emphasis
role="italic">
+ <property
moreinfo="none">"Java"</property>
+ </emphasis> class already exists. </para>
+ <para>After adding your class <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button will be activated. Pressing it you'll get
<emphasis>
+ <property moreinfo="none">Managed
Properties</property>
+ </emphasis> dialog where all corresponding properties are displayed.
Check the necessary
+ ones to add them into your <property moreinfo="none">JSF
Configuration File</property>.</para>
+
+ <figure float="0">
+ <title>Selection of Bean's Properties.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_43.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you don't want to add any, just click <emphasis>
+ <property moreinfo="none">Finish</property>.
</emphasis></para>
+ <para>Above-listed steps have demonstrated how you can specify an existing
Bean in the JSF
+ configuration file, i.e. <emphasis>
+ <property
moreinfo="none">faces-config.xml</property>. </emphasis> In the
next chapter
+ you'll know how to organize and register another kind of
artifacts.</para>
+ </section>
+</chapter>
+
+
+<chapter id="creation_and_registration"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/creation_and_registration.xml">
+ <?dbhtml filename="creation_and_registration.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Creation and Registration</title>
+
+ <section id="CreateAndRegisterACustomConverter94230">
+
+ <title>Create and Register a Custom Converter</title>
+
+ <para>It's also possible to create a
+ custom Converter in order to specify your own converting rules. Let's
look at how you can do this.</para>
+
+ <para>To create and register a custom converter it's necessary to
+ go through the following steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open <emphasis>
+ <property
moreinfo="none">faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">Tree</property>
+ </emphasis> tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Converters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_44.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">Converters</property>
+ </emphasis> and click on<emphasis>
+ <property moreinfo="none"> Add</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the form type the name of your converter in the
<emphasis>
+ <property
moreinfo="none">Converter-id</property>
+ </emphasis> field and name of the class for
+ converters. After clicking <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button your custom converter is
+ registered under the entered name.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Add Converter Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_45.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Now you can create <emphasis role="italic">
+ <property
moreinfo="none">"converter"</property>
+ </emphasis> class. In the Converter section you
+ should see your <emphasis>
+ <property
moreinfo="none">Converter-id</property>
+ </emphasis> and
+ <emphasis><property
moreinfo="none">Converter-class</property>.</emphasis>
+ Click on <emphasis>
+ <property
moreinfo="none">Converter-class</property>
+ </emphasis> to generate the source code.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Generation of Source Code for Converter Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_46.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>A usual wizard for creating a Java class will appear.
+ All needed fields here will be adjusted
+ automatically. Just leave everything without changes
+ and click <emphasis>
+ <property
moreinfo="none">Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_47.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open a converter class click again on <emphasis>
+ <property
moreinfo="none">Converter-class</property>
+ </emphasis> link in the Converter section.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Converter Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_48.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now you
+ are able to add a business logic of converter in the
+ Java editor.</para>
+ </section>
+
+ <section id="CreateAndRegisterACustomValidator5632">
+
+ <title>Create and Register a Custom Validator</title>
+
+ <para>It's also quite easy to develop your
+ own custom Validators. You should perform the actions similar to the
+ previous one. Go through the following steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open<emphasis>
+ <property moreinfo="none">
faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">Tree </property>
+ </emphasis>tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Validator in Faces Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_49.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">Validators</property>
+ </emphasis> and click on <emphasis>
+ <property moreinfo="none">Add </property>
+ </emphasis>button.</para>
+ </listitem>
+ <listitem>
+ <para>Type the name of your validator in the <emphasis>
+ <property
moreinfo="none">Validator-id</property>
+ </emphasis> field and name of the class for
+ validators. After clicking <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button your custom validator is
+ registered under the entered name.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Adding Validator</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_50.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now you can create the "validator" class. </para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Validator section you can see your <emphasis>
+ <property
moreinfo="none">Validator-id</property>
+ </emphasis> and <emphasis>
+ <property
moreinfo="none">Validator-class</property></emphasis>. To
generate the source code click on <emphasis>
+ <property
moreinfo="none">Validator-class</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Creating Validator Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_51.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Java class will be created automatically. Leave
+ everything without changes and click <emphasis>
+ <property
moreinfo="none">Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_52.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open validator class click again on <emphasis>
+ <property
moreinfo="none">Validator-Class</property>
+ </emphasis> link in the Validator section. Now you
+ are able to write a business logic of validator in
+ the Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Converter Class Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_53.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="referenced_beans">
+ <title>Create and Register Referenced Beans</title>
+
+ <para>Creation of Referenced Beans is similar to creation of Custom
+ Validator as well. To perform this, let's walk through the necessary
steps.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open<emphasis>
+ <property moreinfo="none">
faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">Tree </property>
+ </emphasis>tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Referenced Beans in Faces Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_54.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Referenced
Beans</property>
+ </emphasis> and click on <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>Type in the name of your Referenced Bean and type in
+ or select <emphasis>
+ <property
moreinfo="none">Referenced-Bean-Class</property>
+ </emphasis> by using <emphasis>
+ <property
moreinfo="none">Browse</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Add Referenced Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_55.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the Referenced Bean section you should see your
<emphasis>
+ <property
moreinfo="none">Referenced-Bean-Name</property>
+ </emphasis> and
+ <emphasis><property
moreinfo="none">Referenced-Bean-Class</property>.</emphasis>
+ Click on the link to open the Java creation
+ wizard.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create Referenced Bean Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_56.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Java class will be created automatically. Leave
+ everything without changes and click <emphasis>
+ <property
moreinfo="none">Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_57.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open Referenced Bean class click again on
<emphasis>
+ <property
moreinfo="none">Referenced-Bean-Class</property>
+ </emphasis> in the Referenced Bean section. Now you
+ are able to write business logic of Referenced Bean
+ in the Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Referenced Bean Class Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_support/jsf_support_58.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+<chapter id="jsf_project_verification"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_project_verification.xml">
+ <?dbhtml filename="struts_project_verification.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JSF Project Verification</title>
+
+ <para>In this chapter we'll discuss a possible verification that you can
take advantage
+ of.</para>
+ <!-- JBoss Developer Studio checks for many different rules for a JSF project
-->
+ <para>Many different rules are checked for a JSF project that can be configured
by selecting <emphasis>
+ <property moreinfo="none">Window >
Preferences</property>
+ </emphasis> from the menu bar, selecting <emphasis>
+ <property moreinfo="none">JBoss Tools > Web >
Verification</property>
+ </emphasis> from the Preferences dialog box and then expanding the JSF
Rules node.</para>
+ <figure float="0">
+ <title>JSF Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Suppose you are working in the Source viewer for a JSF configuration file
as shown below:</para>
+ <figure float="0">
+ <title>Faces-config.xml File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>While typing a class name, you might make a minor typo (like <emphasis
role="italic">
+ <property
moreinfo="none">"jsfHello.PersonBean9"</property>
+ </emphasis> instead of <emphasis role="italic">
+ <property
moreinfo="none">"jsfHello.PersonBean"</property>
+ </emphasis>). After saving the file, verification checks to make sure
everything is correct
+ and finds the error below:</para>
+ <figure float="0">
+ <title>Error in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_3.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Notice that the Package Explorer View shows a marked folder and a marked
file where the
+ error is.</para>
+ <para>You can place the cursor over the line with an error message and get a
detailed error
+ message:</para>
+ <figure float="0">
+ <title>Error Message</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Verification also checks navigation rules:</para>
+ <figure float="0">
+ <title>Checking Navigation Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If you provide a page name that does not exist, verification will let you
know about that:</para>
+ <figure float="0">
+ <title>Page Name Verification</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_6.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can always call up verification explicitly by right-clicking any
element in the tree
+ and selecting Verify from the context menu. This works from both the Tree and
Diagram
+ viewers for the JSF configuration file editor. You can also invoke verification
from the Web
+ Projects view. Below we are checking all of the elements in the configuration
file.</para>
+ <figure float="0">
+ <title>Verify Command</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In summary, this document highlights all the JSF-specific features of
<property moreinfo="none">JBoss Tools</property>
+ meant for enhancing the development of rich Web applications based on JSF
technology. The
+ reference introduces you to wizards for creating and importing JSF projects, JSF
+ Configuration File editor features, functionality for enabling JSF capabilities
and etc.</para>
+
+ <para>If you have questions or good suggestions, please refer to <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
+ Tools Forum</ulink>.</para>
+</chapter>
+
+</book>
Modified: trunk/jsf/docs/jsf_tools_tutorial/en/master_output.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en/master_output.xml 2009-03-05 18:34:07 UTC (rev
14042)
+++ trunk/jsf/docs/jsf_tools_tutorial/en/master_output.xml 2009-03-05 18:54:45 UTC (rev
14043)
@@ -23,776 +23,776 @@
<!ENTITY strutsreflink
"../../struts_tools_ref_guide/html_single/index.html">
<!ENTITY strutstutoriallink
"../../struts_tools_tutorial/html_single/index.html">
-]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
-
- <bookinfo>
- <title>JSF Tools Tutorial</title>
-
-
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
-
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
-
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
-
- <releaseinfo>
- Version: 3.0.0.GA
- </releaseinfo>
-
-
-<abstract>
- <title></title>
- <para>
- <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_too...
version</ulink>
- </para>
-</abstract>
-
-
- </bookinfo>
-
- <toc></toc>
-
-
-
-<chapter id="introduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/introduction.xml"
xreflabel="introduction">
- <?dbhtml filename="introduction.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Introduction</title>
- <para>The following chapters describe how to deal with classic/old style of JSF
development. We
- recommend users to use <ulink
url="../../seam/html_single/index.html">JBoss
- Seam</ulink> to simplify development, but until then you can read about
classical JSF
- usage here.</para>
-
- <para>Thus, in this document we are going to show you how to create a simple
<property moreinfo="none">JSF application
- </property>using <property moreinfo="none">JBoss
Tools</property> plugins for Eclipse. The completed
- application will ask a user to enter a name and click a button. The resulting new
page
- will display the familiar message, "Hello <name>!" This
- tutorial will show you how to create and run such an application from the beginning
along the
- way demonstrating some of the powerful features of <property
moreinfo="none">JBoss Tools</property>.</para>
-
- <section>
- <title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find
<ulink
url="http://www.jboss.com/products/devstudio/docs">here</...
- <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
- </section>
-
-</chapter>
-
-
-<chapter id="jsf_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/jsf_application.xml"
xreflabel="jsf_application">
- <?dbhtml filename="jsf_application.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JSF application</keyword>
- <keyword>Java</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Creating a Simple JSF Application</title>
-
- <para>Firstly, we assume that you have already launched Eclipse with
<property moreinfo="none">JBoss Tools</property>
- plug-ins installed and also that the <property
moreinfo="none">Web Development perspective</property> is the current
- one. (If not, make it active by selecting <emphasis>
- <property moreinfo="none">Window > Open Perspective
> Web Development</property>
- </emphasis> from the menu bar or by selecting <emphasis>
- <property moreinfo="none">Window > Open Perspective
> Other...</property>
- </emphasis> from the menu bar and then selecting <emphasis>
- <property moreinfo="none">Web Development</property>
- </emphasis> from the Select Perspective dialog box.)</para>
-
- <section id="setting_up_the_project">
- <?dbhtml filename="SettingUpTheProject.html"?>
- <title>Setting Up the Project</title>
- <para>Now we are going to create a new project for the
application.</para>
- <itemizedlist>
- <listitem>
- <para>For that go to the menu bar and select <emphasis>
- <property moreinfo="none">File > New
> Project...</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">JBoss Tools Web
> JSF > JSF Project</property>
- </emphasis> in the New Project dialog box</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Enter "jsfHello" as the project name.</para>
- </listitem>
- <listitem>
- <para>Leave everything else as is, and click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
-
- </itemizedlist>
- </section>
-
- <section id="TheJSFApplicationConfigurationFile">
- <?dbhtml filename="TheJSFApplicationConfigurationFile.html"?>
- <title>JSF Configuration File</title>
- <para>A jsfHello node should appear in the upper-left Package Explorer
view.</para>
- <figure float="0">
- <title>Package Explorer View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click the plus sign next to <emphasis>
- <property
moreinfo="none">jsfHello</property>
- </emphasis> to reveal the child nodes</para>
- </listitem>
- <listitem>
- <para>Click the plus sign next to <emphasis>
- <property
moreinfo="none">WebContent</property>
- </emphasis> under jsfHello</para>
- </listitem>
- <listitem>
- <para>Click the plus sign next to <emphasis>
- <property
moreinfo="none">WEB-INF</property>
- </emphasis> under WebContent</para>
- </listitem>
-
- <listitem>
- <para>Then double-click on the <property
moreinfo="none">faces-config.xml</property> node to display
- the JSF application configuration file editor</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Configuration File Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-</chapter>
-
-
-<chapter id="adding_navigation"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/adding_navigation.xml"
xreflabel="adding_navigation">
- <?dbhtml filename="adding_navigation.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>JSF application</keyword>
- <keyword>Java</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Adding Navigation to the Application</title>
-
- <para>In our simple application, the flow is defined as a single navigation
rule connecting
- two views (presentation files). At this point, we will create the
placeholders for the
- two JSP presentation files and then the navigation rule to connect them as
views. Later,
- we will complete the coding for the JSP presentation files. We can do all of
this in the
- Diagram mode of the configuration file editor.</para>
- <section id="AddingTwoViewsJSPPages">
- <?dbhtml filename="AddingTwoViewsJSPPages.html"?>
- <title>Adding Two Views (JSP Pages)</title>
- <itemizedlist>
- <listitem>
- <para>Right-click anywhere on the diagram and select
<emphasis>
- <property moreinfo="none">New
View...</property>
- </emphasis> from the pop-up menu</para>
- </listitem>
- <listitem>
- <para>In the dialog box, type <emphasis>
- <property
moreinfo="none">pages/inputname</property>
- </emphasis> as the value for From-view-id</para>
- </listitem>
- <listitem>
- <para>Leave everything else as is</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- <para>If you look in the Package Explorer view you should see a
<emphasis>
- <property moreinfo="none">pages</property>
- </emphasis> folder under WebContent. Opening it will reveal the
JSP file you
- just created</para>
- </listitem>
- <listitem>
- <para>Back on the diagram, right-click anywhere and select
<emphasis>
- <property moreinfo="none">New
View...</property>
- </emphasis> from the pop-up menu</para>
- </listitem>
- <listitem>
- <para>In the dialog box, type <emphasis>
- <property
moreinfo="none">pages/greeting</property>
- </emphasis> as the value for From-view-id</para>
- </listitem>
- <listitem>
- <para>Leave everything else as is</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
-
- </section>
- <section id="CreatingTheTransitionNavigationRule">
- <?dbhtml filename="CreatingTheTransitionNavigationRule.html"?>
- <title>Creating the Transition (Navigation Rule)</title>
- <itemizedlist>
- <listitem>
- <para>In the diagram, select the connection icon third from the top
along
- the upper left side of the diagram</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Connection Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>to get an arrow cursor with a two-pronged plug at the arrow's
bottom.</para>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">pages/inputname</property>
- </emphasis> page icon and then click on the <emphasis>
- <property
moreinfo="none">pages/greeting</property>
- </emphasis> page icon</para>
- </listitem>
-
- </itemizedlist>
- <para>A transition should appear between the two icons.</para>
- <figure float="0">
- <title>Transition Between Two Icons</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">File >
Save</property>
- </emphasis> from the menu bar</para>
- </listitem>
- </itemizedlist>
- </section>
-
-</chapter>
-
-<chapter id="adding_managed_bean"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/adding_managed_bean.xml"
xreflabel="adding_managed_bean">
- <?dbhtml filename="adding_managed_bean.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JSF application</keyword>
- <keyword>Java</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Adding a Managed Bean to the Application</title>
- <para>To store data in the application, we will use a managed
bean.</para>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property moreinfo="none">Tree</property>
- </emphasis> tab at the bottom of the editing window</para>
- </listitem>
- <listitem>
- <para>Select the <emphasis>
- <property moreinfo="none">Managed
Beans</property>
- </emphasis> node and then click the <emphasis>
- <property moreinfo="none">Add...</property>
- </emphasis> button displayed along the right side of the editor
window</para>
- </listitem>
- <listitem>
- <para>Type in <emphasis>
- <property
moreinfo="none">jsfHello.PersonBean</property>
- </emphasis> for Class and <emphasis>
- <property
moreinfo="none">personBean</property>
- </emphasis> for Name. Leave Scope as is and Generate Source Code as
is
- (checked)</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>personBean will now be selected and three sections of
information: <emphasis>
- <property moreinfo="none">Managed
Bean</property>
- </emphasis>, <emphasis>
- <property
moreinfo="none">Properties</property>
- </emphasis>, and <emphasis>
- <property moreinfo="none">Advanced</property>
- </emphasis>, will be displayed about it. Under the Properties
section, click the <emphasis>
- <property moreinfo="none">Add...</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>Type in <emphasis>
- <property moreinfo="none">name</property>
- </emphasis> for Property-Name. Leave everything else as is. (When
Property-
- Class is not filled in, String is the assumed type)</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Select the <emphasis>
- <property
moreinfo="none">personBean</property>
- </emphasis> node in the tree</para>
- </listitem>
- </itemizedlist>
- <para>You should see this now:</para>
- <figure float="0">
- <title>Tree View in Config Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">File >
Save</property>
- </emphasis> from the menu bar</para>
- </listitem>
- </itemizedlist>
- <para>You have now registered the <emphasis>
- <property moreinfo="none">managed bean</property>
- </emphasis> and created a <emphasis>
- <property moreinfo="none">stub-coded class</property>
- </emphasis> file for it.</para>
-
- </chapter>
-
-<chapter id="jsp_view_files"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/jsp_view_files.xml"
xreflabel="jsp_view_files">
- <?dbhtml filename="jsp_view_files.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>JSF application</keyword>
- <keyword>Java</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Editing the JSP View Files</title>
-
- <para>Now we will finish editing the JSP files for our two
"views" using
- JSP Visual Page.</para>
- <section id="Inputname.jsp">
- <title>inputname.jsp</title>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">Diagram</property>
- </emphasis> tab for the configuration file editor</para>
- </listitem>
- <listitem>
- <para>Open the editor for this first JSP file by
double-clicking on the <emphasis>
- <property moreinfo="none">/pages/inputname.
jsp</property>
- </emphasis> icon</para>
- </listitem>
- </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>
- <figure float="0">
- <title>Visual Page Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Some JSF code is already in the file, because we have chosen a
template to create
- a page.</para>
- <itemizedlist>
- <listitem>
- <para>Select the <emphasis>
- <property
moreinfo="none">Visual</property>
- </emphasis> 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 JBoss Tools Palette,
expand the <emphasis>
- <property moreinfo="none">JSF
HTML</property>
- </emphasis> palette folder by selecting it</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>JBoss Tools Palette</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click on <emphasis>
- <property moreinfo="none">form</property>
- </emphasis> within this folder, drag the cursor over to the
editor, and drop
- it inside the red box in the editor</para>
- </listitem>
- <listitem>
- <para>Another red box will appear inside the first red
box</para>
- </listitem>
- <listitem>
- <para>Right-click on the innermost box and select <emphasis
role="bold">
- <property
moreinfo="none"><h:form></property>
- </emphasis> Attributes from the menu</para>
- </listitem>
- <listitem>
- <para>In the value field next to id, type <emphasis>
- <property
moreinfo="none">greeting</property>
- </emphasis> and click on the <emphasis>
- <property moreinfo="none">Close</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>Type "Please enter name:" inside the
boxes</para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">inputText</property>
- </emphasis> within the JSF HTML palette folder and drag it into
the
- innermost box in the editor after "Please enter
- name:"</para>
- </listitem>
- <listitem>
- <para>In the attributes dialog, click in the <emphasis>
- <property moreinfo="none">value</property>
- </emphasis> field next to the value attribute and click on the
<property moreinfo="none">...
- </property>button</para>
- </listitem>
- <listitem>
- <para>Then, select the <emphasis>
- <property moreinfo="none">Managed Beans >
personBean > name</property>
- </emphasis> node and click on the <emphasis>
- <property moreinfo="none">Ok</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>Back in the attributes dialog, select the
<emphasis>
- <property
moreinfo="none">Advanced</property>
- </emphasis> tab, type in <emphasis>
- <property moreinfo="none">name</property>
- </emphasis> as the value for the <emphasis
role="italic">
- <property
moreinfo="none">"id"</property>
- </emphasis> attribute, and then click on the <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">commandButton</property>
- </emphasis> within the JSF HTML palette folder and drag it into
the
- innermost box in the editor after the input box</para>
- </listitem>
- <listitem>
- <para>In the attributes dialog, click in the value field next
to the <emphasis role="italic">
- <property
moreinfo="none">"action"</property>
- </emphasis> attribute and click on the <property
moreinfo="none">...
- </property>button</para>
- </listitem>
- <listitem>
- <para>Then, select the <emphasis>
- <property moreinfo="none">View Actions >
greeting</property>
- </emphasis> node and click on the <emphasis>
- <property moreinfo="none">OK</property>
- </emphasis> 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 <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button</para>
- </listitem>
- </itemizedlist>
- <para>The source coding should be something like this
now:</para>
- <programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
-<html>
-<head>
-<title></title>
-</head>
-<body>
-<f:view>
-<h:form id="greeting">
-<para>Please enter a name:</para>
-<h:inputText id="name" value="#{personBean.name}"/>
-<h:commandButton value=" Say Hello " action="greeting"/>
-</h:form>
-</f:view>
-</body>
-</html>
-]]></programlisting>
- <para>The editor should look like this:</para>
- <figure float="0">
- <title>Visual Page Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Save the file by selecting <emphasis>
- <property moreinfo="none">File >
Save</property>
- </emphasis> from the menu bar</para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="Greeting.jsp">
- <title>greeting.jsp</title>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">faces-config.xml</property>
- </emphasis> tab to bring the diagram back</para>
- </listitem>
- <listitem>
- <para>Open the editor for the second file by double-clicking on
the <emphasis>
- <property
moreinfo="none">/pages/greeting.jsp</property>
- </emphasis> icon</para>
- </listitem>
- <listitem>
- <para>Select the <emphasis>
- <property
moreinfo="none">Visual</property>
- </emphasis> tab, so we can work with the editor completely in
its WYSIWYG
- mode</para>
- </listitem>
- <listitem>
- <para>Type "Hello "(note space after Hello) into the
- box</para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property
moreinfo="none">outputText</property>
- </emphasis> within the JSF HTML palette folder and drag it into
the
- innermost box in the editor after "Hello"</para>
- </listitem>
- <listitem>
- <para>In the attributes dialog, click in <emphasis>
- <property moreinfo="none">value</property>
- </emphasis> field next to the value attribute and click on the
- <property moreinfo="none">...</property>
(Browse) button</para>
- </listitem>
- <listitem>
- <para>Then, select the <emphasis>
- <property moreinfo="none">Managed Beans >
personBean > name</property>
- </emphasis> node, click on the <emphasis>
- <property moreinfo="none">Ok</property>
- </emphasis> button, and then click on the <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>Right after the output field, type an <emphasis>
- <property moreinfo="none">exclamation
point</property>
- </emphasis> (<emphasis>
- <property moreinfo="none">!</property>
- </emphasis>)</para>
- </listitem>
- </itemizedlist>
- <para>The source coding should be something like this
now:</para>
- <programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
-<html>
-<head>
-<title></title>
-</head>
-<body>
-<f:view>
-Hello <h:outputText value="#{personBean.name}"/>!
-</f:view>
-</body>
-</html>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Save the file</para>
- </listitem>
- </itemizedlist>
- </section>
- </chapter>
-
-<chapter id="start_page"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/start_page.xml"
xreflabel="start_page">
- <?dbhtml filename="start_page.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>JSF application</keyword>
- <keyword>Java</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Creating the Start Page</title>
- <para>You also need to create a start page as an entry point into the
application.</para>
- <itemizedlist>
- <listitem>
- <para>In the Package Explorer view to the left, right-click
<emphasis>
- <property moreinfo="none">jsfHello >
WebContent</property>
- </emphasis> and select <emphasis>
- <property moreinfo="none">New > JSP
File</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>For Name type in <emphasis>
- <property moreinfo="none">index</property>
- </emphasis>, for Template select <emphasis>
- <property
moreinfo="none">JSPRedirect</property>
- </emphasis> and click <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>A JSP editor will open up on the newly created file.</para>
-
- <itemizedlist>
- <listitem>
- <para>In the Source part of the split screen, type
<emphasis>
- <property
moreinfo="none">/pages/inputname.jsf</property>
- </emphasis> in between the quotes for the page
attribute</para>
- </listitem>
- </itemizedlist>
- <para>The source coding should look like this now:</para>
- <programlisting format="linespecific"
role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0
transitional//en">
-<html>
-<head></head>
-<body>
-<jsp:forward page="/pages/inputname.jsf" />
-</body>
-</html>
-]]></programlisting>
-
- <para>Note the <emphasis>
- <property moreinfo="none">.jsf</property>
- </emphasis> extension for the file name. This is a mapping defined in the
web.xml file
- for the project for invoking <property
moreinfo="none">JavaServer Faces</property> when you run the
- application.</para>
- <itemizedlist>
- <listitem>
- <para>Select<emphasis>
- <property moreinfo="none"> File >
Save</property>
- </emphasis> from the menu bar</para>
- </listitem>
- </itemizedlist>
- </chapter>
-
-<chapter id="running_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/running_application.xml"
xreflabel="running_application">
- <?dbhtml filename="running_application.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>JSF application</keyword>
- <keyword>Java</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Running the Application</title>
- <para>Everything is now ready for running our application by using the
JBoss engine. For
- controlling JBoss server there is JBoss Server view:</para>
- <figure float="0">
- <title>JBoss Server View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Start up JBoss by clicking on the icon in JBoss Server view.
(If JBoss is
- already running, stop it by clicking on the red icon 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, JBoss is available</para>
- </listitem>
-
- <listitem>
- <para>Click the Run icon or right click your project folder and
select <emphasis>
- <property moreinfo="none">Run As > Run on
Server</property>
- </emphasis>:</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Run Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/jsf_application/jsf_application_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>This is the equivalent of launching the browser and typing
<emphasis>
- <property
moreinfo="none">http://localhost:8080/jsfHello</property>
- </emphasis> into your browser. Our <property
moreinfo="none">JSF application</property> should now
- appear.</para>
- </chapter>
-
-<chapter id="relevant_resources"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/relevant_resources.xml"
xreflabel="relevant_resources">
- <?dbhtml filename="relevant_resources.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>JSF application</keyword>
- <keyword>Java</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Other Relevant Resources on the topic</title>
- <para>JSF on Sun: <ulink
url="http://java.sun.com/javaee/javaserverfaces/">JavaServer Faces
- Technology</ulink></para>
- <para>Core JSF: <ulink
url="http://www.horstmann.com/corejsf/">Core JavaServer
Faces</ulink></para>
- <para>API: <ulink
url="http://java.sun.com/javaee/javaserverfaces/1.1/docs/api/index.h...
- API</ulink></para>
- <para>JSF Tags: <ulink
url="http://www.horstmann.com/corejsf/jsf-tags.html">JSF Core
- Tags</ulink></para>
- <para>HTML Tags Reference: <ulink
url="http://www.exadel.com/tutorial/jsf/jsftags-guide.html">JSF HTML Tags
Reference</ulink></para>
- <para>JSF Central: <ulink
url="http://www.jsfcentral.com/">JSF
Central - Your JavaServer Faces
- Community</ulink></para>
- <para>FAQ: <ulink
url="http://wiki.java.net/bin/view/Projects/JavaServerFacesSpecFaq&q...
- FAQ</ulink></para>
- <para>Download: <ulink
url="http://java.sun.com/javaee/javaserverfaces/download.html"&...
- Faces Technology - Download</ulink></para>
-
- <para>In summary, with this tutorial you should now know how to organize JSF
sample application
- using the wizards provided by <property moreinfo="none">JBoss
Tools</property>, configure its stuff and
- finally run it on the <property moreinfo="none">JBoss
Server</property>.</para>
-
- <para>Find out more features on JSF tooling in our <ulink
url="../../jsf_tools_ref_guide/html_single/index.html">JSF Tools
- Reference Guide</ulink>. If you have questions and suggestions, please
refer to <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
- Tools Forum</ulink>.</para>
-</chapter>
-
-</book>
+]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JSF Tools Tutorial</title>
+
+
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+
+ <releaseinfo>
+ Version: 3.0.0.GA
+ </releaseinfo>
+
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_too...
version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+
+<chapter id="introduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/introduction.xml"
xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Introduction</title>
+ <para>The following chapters describe how to deal with classic/old style of JSF
development. We
+ recommend users to use <ulink
url="../../seam/html_single/index.html">JBoss
+ Seam</ulink> to simplify development, but until then you can read about
classical JSF
+ usage here.</para>
+
+ <para>Thus, in this document we are going to show you how to create a simple
<property moreinfo="none">JSF application
+ </property>using <property moreinfo="none">JBoss
Tools</property> plugins for Eclipse. The completed
+ application will ask a user to enter a name and click a button. The resulting new
page
+ will display the familiar message, "Hello <name>!" This
+ tutorial will show you how to create and run such an application from the beginning
along the
+ way demonstrating some of the powerful features of <property
moreinfo="none">JBoss Tools</property>.</para>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find
<ulink
url="http://www.jboss.com/products/devstudio/docs">here</...
+ <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
+ </section>
+
+</chapter>
+
+
+<chapter id="jsf_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/jsf_application.xml"
xreflabel="jsf_application">
+ <?dbhtml filename="jsf_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating a Simple JSF Application</title>
+
+ <para>Firstly, we assume that you have already launched Eclipse with
<property moreinfo="none">JBoss Tools</property>
+ plug-ins installed and also that the <property
moreinfo="none">Web Development perspective</property> is the current
+ one. (If not, make it active by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective
> Web Development</property>
+ </emphasis> from the menu bar or by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective
> Other...</property>
+ </emphasis> from the menu bar and then selecting <emphasis>
+ <property moreinfo="none">Web Development</property>
+ </emphasis> from the Select Perspective dialog box.)</para>
+
+ <section id="setting_up_the_project">
+ <?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para>Now we are going to create a new project for the
application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>For that go to the menu bar and select <emphasis>
+ <property moreinfo="none">File > New
> Project...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss Tools Web
> JSF > JSF Project</property>
+ </emphasis> in the New Project dialog box</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Enter "jsfHello" as the project name.</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is, and click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+
+ </itemizedlist>
+ </section>
+
+ <section id="TheJSFApplicationConfigurationFile">
+ <?dbhtml filename="TheJSFApplicationConfigurationFile.html"?>
+ <title>JSF Configuration File</title>
+ <para>A jsfHello node should appear in the upper-left Package Explorer
view.</para>
+ <figure float="0">
+ <title>Package Explorer View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property
moreinfo="none">jsfHello</property>
+ </emphasis> to reveal the child nodes</para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property
moreinfo="none">WebContent</property>
+ </emphasis> under jsfHello</para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property
moreinfo="none">WEB-INF</property>
+ </emphasis> under WebContent</para>
+ </listitem>
+
+ <listitem>
+ <para>Then double-click on the <property
moreinfo="none">faces-config.xml</property> node to display
+ the JSF application configuration file editor</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Configuration File Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+</chapter>
+
+
+<chapter id="adding_navigation"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/adding_navigation.xml"
xreflabel="adding_navigation">
+ <?dbhtml filename="adding_navigation.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Adding Navigation to the Application</title>
+
+ <para>In our simple application, the flow is defined as a single navigation
rule connecting
+ two views (presentation files). At this point, we will create the
placeholders for the
+ two JSP presentation files and then the navigation rule to connect them as
views. Later,
+ we will complete the coding for the JSP presentation files. We can do all of
this in the
+ Diagram mode of the configuration file editor.</para>
+ <section id="AddingTwoViewsJSPPages">
+ <?dbhtml filename="AddingTwoViewsJSPPages.html"?>
+ <title>Adding Two Views (JSP Pages)</title>
+ <itemizedlist>
+ <listitem>
+ <para>Right-click anywhere on the diagram and select
<emphasis>
+ <property moreinfo="none">New
View...</property>
+ </emphasis> from the pop-up menu</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog box, type <emphasis>
+ <property
moreinfo="none">pages/inputname</property>
+ </emphasis> as the value for From-view-id</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ <para>If you look in the Package Explorer view you should see a
<emphasis>
+ <property moreinfo="none">pages</property>
+ </emphasis> folder under WebContent. Opening it will reveal the
JSP file you
+ just created</para>
+ </listitem>
+ <listitem>
+ <para>Back on the diagram, right-click anywhere and select
<emphasis>
+ <property moreinfo="none">New
View...</property>
+ </emphasis> from the pop-up menu</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog box, type <emphasis>
+ <property
moreinfo="none">pages/greeting</property>
+ </emphasis> as the value for From-view-id</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section id="CreatingTheTransitionNavigationRule">
+ <?dbhtml filename="CreatingTheTransitionNavigationRule.html"?>
+ <title>Creating the Transition (Navigation Rule)</title>
+ <itemizedlist>
+ <listitem>
+ <para>In the diagram, select the connection icon third from the top
along
+ the upper left side of the diagram</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Connection Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>to get an arrow cursor with a two-pronged plug at the arrow's
bottom.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">pages/inputname</property>
+ </emphasis> page icon and then click on the <emphasis>
+ <property
moreinfo="none">pages/greeting</property>
+ </emphasis> page icon</para>
+ </listitem>
+
+ </itemizedlist>
+ <para>A transition should appear between the two icons.</para>
+ <figure float="0">
+ <title>Transition Between Two Icons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File >
Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+</chapter>
+
+<chapter id="adding_managed_bean"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/adding_managed_bean.xml"
xreflabel="adding_managed_bean">
+ <?dbhtml filename="adding_managed_bean.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Adding a Managed Bean to the Application</title>
+ <para>To store data in the application, we will use a managed
bean.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Tree</property>
+ </emphasis> tab at the bottom of the editing window</para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property moreinfo="none">Managed
Beans</property>
+ </emphasis> node and then click the <emphasis>
+ <property moreinfo="none">Add...</property>
+ </emphasis> button displayed along the right side of the editor
window</para>
+ </listitem>
+ <listitem>
+ <para>Type in <emphasis>
+ <property
moreinfo="none">jsfHello.PersonBean</property>
+ </emphasis> for Class and <emphasis>
+ <property
moreinfo="none">personBean</property>
+ </emphasis> for Name. Leave Scope as is and Generate Source Code as
is
+ (checked)</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>personBean will now be selected and three sections of
information: <emphasis>
+ <property moreinfo="none">Managed
Bean</property>
+ </emphasis>, <emphasis>
+ <property
moreinfo="none">Properties</property>
+ </emphasis>, and <emphasis>
+ <property moreinfo="none">Advanced</property>
+ </emphasis>, will be displayed about it. Under the Properties
section, click the <emphasis>
+ <property moreinfo="none">Add...</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Type in <emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> for Property-Name. Leave everything else as is. (When
Property-
+ Class is not filled in, String is the assumed type)</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property
moreinfo="none">personBean</property>
+ </emphasis> node in the tree</para>
+ </listitem>
+ </itemizedlist>
+ <para>You should see this now:</para>
+ <figure float="0">
+ <title>Tree View in Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File >
Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ <para>You have now registered the <emphasis>
+ <property moreinfo="none">managed bean</property>
+ </emphasis> and created a <emphasis>
+ <property moreinfo="none">stub-coded class</property>
+ </emphasis> file for it.</para>
+
+ </chapter>
+
+<chapter id="jsp_view_files"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/jsp_view_files.xml"
xreflabel="jsp_view_files">
+ <?dbhtml filename="jsp_view_files.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Editing the JSP View Files</title>
+
+ <para>Now we will finish editing the JSP files for our two
"views" using
+ JSP Visual Page.</para>
+ <section id="Inputname.jsp">
+ <title>inputname.jsp</title>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">Diagram</property>
+ </emphasis> tab for the configuration file editor</para>
+ </listitem>
+ <listitem>
+ <para>Open the editor for this first JSP file by
double-clicking on the <emphasis>
+ <property moreinfo="none">/pages/inputname.
jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ </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>
+ <figure float="0">
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Some JSF code is already in the file, because we have chosen a
template to create
+ a page.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select the <emphasis>
+ <property
moreinfo="none">Visual</property>
+ </emphasis> 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 JBoss Tools Palette,
expand the <emphasis>
+ <property moreinfo="none">JSF
HTML</property>
+ </emphasis> palette folder by selecting it</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>JBoss Tools Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click on <emphasis>
+ <property moreinfo="none">form</property>
+ </emphasis> within this folder, drag the cursor over to the
editor, and drop
+ it inside the red box in the editor</para>
+ </listitem>
+ <listitem>
+ <para>Another red box will appear inside the first red
box</para>
+ </listitem>
+ <listitem>
+ <para>Right-click on the innermost box and select <emphasis
role="bold">
+ <property
moreinfo="none"><h:form></property>
+ </emphasis> Attributes from the menu</para>
+ </listitem>
+ <listitem>
+ <para>In the value field next to id, type <emphasis>
+ <property
moreinfo="none">greeting</property>
+ </emphasis> and click on the <emphasis>
+ <property moreinfo="none">Close</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Type "Please enter name:" inside the
boxes</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">inputText</property>
+ </emphasis> within the JSF HTML palette folder and drag it into
the
+ innermost box in the editor after "Please enter
+ name:"</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in the <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> field next to the value attribute and click on the
<property moreinfo="none">...
+ </property>button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property moreinfo="none">Managed Beans >
personBean > name</property>
+ </emphasis> node and click on the <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Back in the attributes dialog, select the
<emphasis>
+ <property
moreinfo="none">Advanced</property>
+ </emphasis> tab, type in <emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> as the value for the <emphasis
role="italic">
+ <property
moreinfo="none">"id"</property>
+ </emphasis> attribute, and then click on the <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">commandButton</property>
+ </emphasis> within the JSF HTML palette folder and drag it into
the
+ innermost box in the editor after the input box</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in the value field next
to the <emphasis role="italic">
+ <property
moreinfo="none">"action"</property>
+ </emphasis> attribute and click on the <property
moreinfo="none">...
+ </property>button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property moreinfo="none">View Actions >
greeting</property>
+ </emphasis> node and click on the <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> 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 <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should be something like this
now:</para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+<h:form id="greeting">
+<para>Please enter a name:</para>
+<h:inputText id="name" value="#{personBean.name}"/>
+<h:commandButton value=" Say Hello " action="greeting"/>
+</h:form>
+</f:view>
+</body>
+</html>
+]]></programlisting>
+ <para>The editor should look like this:</para>
+ <figure float="0">
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Save the file by selecting <emphasis>
+ <property moreinfo="none">File >
Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="Greeting.jsp">
+ <title>greeting.jsp</title>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">faces-config.xml</property>
+ </emphasis> tab to bring the diagram back</para>
+ </listitem>
+ <listitem>
+ <para>Open the editor for the second file by double-clicking on
the <emphasis>
+ <property
moreinfo="none">/pages/greeting.jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property
moreinfo="none">Visual</property>
+ </emphasis> tab, so we can work with the editor completely in
its WYSIWYG
+ mode</para>
+ </listitem>
+ <listitem>
+ <para>Type "Hello "(note space after Hello) into the
+ box</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property
moreinfo="none">outputText</property>
+ </emphasis> within the JSF HTML palette folder and drag it into
the
+ innermost box in the editor after "Hello"</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> field next to the value attribute and click on the
+ <property moreinfo="none">...</property>
(Browse) button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property moreinfo="none">Managed Beans >
personBean > name</property>
+ </emphasis> node, click on the <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> button, and then click on the <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Right after the output field, type an <emphasis>
+ <property moreinfo="none">exclamation
point</property>
+ </emphasis> (<emphasis>
+ <property moreinfo="none">!</property>
+ </emphasis>)</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should be something like this
now:</para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+Hello <h:outputText value="#{personBean.name}"/>!
+</f:view>
+</body>
+</html>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Save the file</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </chapter>
+
+<chapter id="start_page"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/start_page.xml"
xreflabel="start_page">
+ <?dbhtml filename="start_page.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating the Start Page</title>
+ <para>You also need to create a start page as an entry point into the
application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Package Explorer view to the left, right-click
<emphasis>
+ <property moreinfo="none">jsfHello >
WebContent</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">New > JSP
File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For Name type in <emphasis>
+ <property moreinfo="none">index</property>
+ </emphasis>, for Template select <emphasis>
+ <property
moreinfo="none">JSPRedirect</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>A JSP editor will open up on the newly created file.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Source part of the split screen, type
<emphasis>
+ <property
moreinfo="none">/pages/inputname.jsf</property>
+ </emphasis> in between the quotes for the page
attribute</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should look like this now:</para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0
transitional//en">
+<html>
+<head></head>
+<body>
+<jsp:forward page="/pages/inputname.jsf" />
+</body>
+</html>
+]]></programlisting>
+
+ <para>Note the <emphasis>
+ <property moreinfo="none">.jsf</property>
+ </emphasis> extension for the file name. This is a mapping defined in the
web.xml file
+ for the project for invoking <property
moreinfo="none">JavaServer Faces</property> when you run the
+ application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select<emphasis>
+ <property moreinfo="none"> File >
Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </chapter>
+
+<chapter id="running_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/running_application.xml"
xreflabel="running_application">
+ <?dbhtml filename="running_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Running the Application</title>
+ <para>Everything is now ready for running our application by using the
JBoss engine. For
+ controlling JBoss server there is JBoss Server view:</para>
+ <figure float="0">
+ <title>JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Start up JBoss by clicking on the icon in JBoss Server view.
(If JBoss is
+ already running, stop it by clicking on the red icon 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, JBoss is available</para>
+ </listitem>
+
+ <listitem>
+ <para>Click the Run icon or right click your project folder and
select <emphasis>
+ <property moreinfo="none">Run As > Run on
Server</property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Run Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/jsf_application/jsf_application_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This is the equivalent of launching the browser and typing
<emphasis>
+ <property
moreinfo="none">http://localhost:8080/jsfHello</property>
+ </emphasis> into your browser. Our <property
moreinfo="none">JSF application</property> should now
+ appear.</para>
+ </chapter>
+
+<chapter id="relevant_resources"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/jsf_tools_tutorial/en/modules/relevant_resources.xml"
xreflabel="relevant_resources">
+ <?dbhtml filename="relevant_resources.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Other Relevant Resources on the topic</title>
+ <para>JSF on Sun: <ulink
url="http://java.sun.com/javaee/javaserverfaces/">JavaServer Faces
+ Technology</ulink></para>
+ <para>Core JSF: <ulink
url="http://www.horstmann.com/corejsf/">Core JavaServer
Faces</ulink></para>
+ <para>API: <ulink
url="http://java.sun.com/javaee/javaserverfaces/1.1/docs/api/index.h...
+ API</ulink></para>
+ <para>JSF Tags: <ulink
url="http://www.horstmann.com/corejsf/jsf-tags.html">JSF Core
+ Tags</ulink></para>
+ <para>HTML Tags Reference: <ulink
url="http://www.exadel.com/tutorial/jsf/jsftags-guide.html">JSF HTML Tags
Reference</ulink></para>
+ <para>JSF Central: <ulink
url="http://www.jsfcentral.com/">JSF
Central - Your JavaServer Faces
+ Community</ulink></para>
+ <para>FAQ: <ulink
url="http://wiki.java.net/bin/view/Projects/JavaServerFacesSpecFaq&q...
+ FAQ</ulink></para>
+ <para>Download: <ulink
url="http://java.sun.com/javaee/javaserverfaces/download.html"&...
+ Faces Technology - Download</ulink></para>
+
+ <para>In summary, with this tutorial you should now know how to organize JSF
sample application
+ using the wizards provided by <property moreinfo="none">JBoss
Tools</property>, configure its stuff and
+ finally run it on the <property moreinfo="none">JBoss
Server</property>.</para>
+
+ <para>Find out more features on JSF tooling in our <ulink
url="../../jsf_tools_ref_guide/html_single/index.html">JSF Tools
+ Reference Guide</ulink>. If you have questions and suggestions, please
refer to <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
+ Tools Forum</ulink>.</para>
+</chapter>
+
+</book>
Modified: trunk/jsf/docs/userguide/en/master_output.xml
===================================================================
--- trunk/jsf/docs/userguide/en/master_output.xml 2009-03-05 18:34:07 UTC (rev 14042)
+++ trunk/jsf/docs/userguide/en/master_output.xml 2009-03-05 18:54:45 UTC (rev 14043)
@@ -24,4453 +24,4453 @@
<!ENTITY strutstutoriallink
"../../struts_tools_tutorial/html_single/index.html">
<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
-]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
- <bookinfo>
- <title>Visual Web Tools Reference Guide</title>
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
- <releaseinfo>
- Version: 2.0.0.GA
- </releaseinfo>
-<abstract>
- <title></title>
- <para>
- <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/pdf/Vi...
version</ulink>
- </para>
-</abstract>
-
-
- </bookinfo>
-<toc></toc>
-
-
-<chapter id="Visual_Web_Tools"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml"
xreflabel="Visual_Web_Tools">
- <?dbhtml filename="Visual_Web_Tools.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JBDS</keyword>
- <keyword>Java</keyword>
- <keyword>Web Tools</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Visual Web Tools</title>
-
- <para>This guide covers the usage of Visual Web Tools in <property
moreinfo="none">JBoss Developer
- Studio</property> and <property moreinfo="none">JBoss
Tools</property>. The difference between these products is
- that JBoss Tools are just a set of Eclipse plugins where JBoss Developer Studio adds
the following functionality:</para>
- <itemizedlist>
- <listitem>
- <para>an installer</para>
- </listitem>
- <listitem>
- <para>Eclipse and Web Tools preconfigured</para>
- </listitem>
- <listitem>
- <para>JBoss EAP with JBoss AS and Seam preconfigured</para>
- </listitem>
- <listitem>
- <para>3rd party plugins bundled and configured</para>
- </listitem>
- <listitem>
- <para>access to RHEL and Red Hat Network</para>
- </listitem>
- <listitem>
- <para>access to the JBoss/Red Hat supported software</para>
- </listitem>
- </itemizedlist>
-
- <para>For additional information, please visit the JBoss Developer Studio home
page at: <ulink
url="http://www.jboss.com/products/devstudio">http://www.jbo...
-
- <para>In JBoss Tools there is an extensive collection of specialized wizards,
editors and views
- that can be used in various scenarios while developing Web applications. The following
chapters
- walk through these features.</para>
-
- <section id="key_features">
- <title>Key Features of Visual Web Tools</title>
- <para>Here is the table of the main features of Visual Web Tools:</para>
-
- <table>
-
- <title>Key Functionality for Visual Web Tools</title>
- <tgroup cols="3">
-
- <colspec align="left" colnum="1"
colwidth="2*"></colspec>
- <colspec colnum="2" colwidth="4*"></colspec>
- <colspec align="left" colnum="3"
colwidth="2*"></colspec>
-
- <thead>
- <row>
- <entry>Feature</entry>
- <entry>Benefit</entry>
- <entry>Chapter</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Visual Page Editor</entry>
- <entry>Powerful and customizable visual page editor. Possibility to develop
an application
- using any web technology: jsf, seam, struts, jsp, html and others. Developing
using four
- tabs: visual/source, visual, source and preview. Fast and easy switching between
these tabs.
- Split screen design of visual and source views. Full and instant synchronization
between
- source and visual views. Integration with properties and outline views. Graphical
toolbar to
- add inline styling to any tag.</entry>
- <entry>
- <link linkend="visual_page">visual page editor</link>
- </entry>
- </row>
-
- <row>
- <entry>JBoss Tools Palette</entry>
- <entry>Organizing various tags by groups, inserting tags into a jsp or xhtml
page with one
- click, adding custom or 3rd party tag libraries into the palette, easy controling
the number
- of tag groups shown on the palette.</entry>
- <entry>
- <link linkend="palette">jboss tools palette</link>
- </entry>
- </row>
-
- <row>
- <entry>Web Projects View</entry>
- <entry>Visualizing and displaying projects by function. Easy selecting of
different kinds of
- items and dropping them into jsp pages. Using context menus to develop the
application. Using
- icon shortcuts to create and import JSF and Struts projects. Expanding and
inspecting tag
- library files. Selecting custom and third-party tag libraries to drag and drop
onto the JBoss
- Tools Palette.</entry>
- <entry>
- <link linkend="web_projects">web projects view</link>
- </entry>
- </row>
-
- <row>
- <entry>OpenOn</entry>
- <entry>Easy navigation between views and other parts of your
projects.</entry>
- <entry>
- <link
linkend="OpenOnSelection4Hyperlinknavigation">openOn</link>
- </entry>
- </row>
-
- <row>
- <entry>Content Assist</entry>
- <entry>Code completion proposals while working with html, java, JavaScript ,
xml, jsp, xhtml, xhtml, seam project
- and jsf configuration files. Content assist based on project data (dynamic code
assist); with
- graphical editor. Code completion for values from property files, beans attributes
and
- methods, navigation rule outcomes and jsf variables.</entry>
- <entry>
- <link
linkend="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">content
assist</link>
- </entry>
- </row>
-
- <row>
- <entry>Drag-and-Drop</entry>
- <entry>Possibility of inserting any tag onto the page you are editing by just
drag-and-droping
- it from the palette to this page. Adding any properties, managed bean attributes,
navigation
- rules, tag library file declarations, jsp files from web projects view by clicking
them and
- draging to source code.</entry>
- <entry>
- <link linkend="visual_page">visual page editor</link>
- <link linkend="DragAndDrop">drag-and-drop</link>
- </entry>
- </row>
-
- <row>
- <entry>RichFaces Support</entry>
- <entry>Tight integration between JBDS and <ulink
url="http://www.jboss.org/jbossrichfaces">RichFaces</ulin... frameworks.
Easy managing RichFaces
- components in any web application. Support for RichFaces and Ajax4jsf libraries in
JBoss
- Tools Palette. Rendering RichFaces components in Visual Page
Editor.</entry>
- <entry>
- <link linkend="RichFacesSupport">RichFaces support</link>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
-<section>
- <title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink
url="http://www.jboss.com/products/devstudio/docs">here</...
- <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
-</section>
-
-</chapter>
-
-
-<chapter id="springTools"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/spring_tools.xml">
- <?dbhtml filename="springTools.html"?>
- <title>Spring Tools</title>
-
- <para>JBoss Developer Studio is bundled with <ulink
url="http://springide.org/project">Spring IDE</ulink> for Eclipse.
- Visit Spring IDE site for the latest versions and documentation.</para>
-
-
- <section>
- <title><ulink
url="http://springide.org/project/wiki/SpringideGuide">Spring IDE
guide</ulink></title>
-
- <para><ulink
url="http://springide.org/project">Spring
IDE</ulink> is a graphical user interface for the configuration files used by the
<ulink
url="http://www.springframework.org/">Spring
Framework</ulink>. It's built as a set of plugins for the Eclipse
platform.</para>
-
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#AddProjectNatu...
Spring Project
Nature</ulink></title><para></para></section>
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#CreateNewProje...
New Spring Project</ulink></title><para></para></section>
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#AddProjectRefe...
References To Other Spring
Projects</ulink></title><para></para></section>
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#AddBeansConfig...
Spring Beans Config
Files</ulink></title><para></para></section>
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#CreateBeansCon...
Spring Beans Config
Sets</ulink></title><para></para></section>
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#OpenSpringExpl...
Spring Explorer</ulink></title><para></para></section>
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#ValidateBeansC...
Spring Beans Config</ulink></title><para></para></section>
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#OpenBeansGraph...
Spring Beans Graph</ulink></title><para></para></section>
- <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#SearchBeans&qu...
Spring Beans</ulink></title><para></para></section>
-
- </section>
-
- </chapter>
-
-
-<chapter id="jbds_editors" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/editors.xml"
xreflabel="jbds_editors">
- <?dbhtml filename="editors.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JBDS</keyword>
- <keyword>Editor</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Editors</title>
-
- <para>In the <ulink
url="../../jsf_tools_ref_guide/html_single/index.html">JSF Tools Reference
Guide</ulink> and <ulink
url="../../struts_tools_ref_guide/html_single/index.html">Struts Tools
Reference Guide</ulink> you had possibility to
- read about Graphical Editor for <ulink
url="../../jsf_tools_ref_guide/html_single/index.html#jsf_config_file">JSF</ulink>
- and <ulink
url="../../struts_tools_ref_guide/html_single/index.html#struts_config_editor">Struts</ulink>
configuration
- files, <ulink
url="../../struts_tools_ref_guide/html_single/index.html#GraphicalEditorForTilesFiles132">Graphical
Editor for
- Tiles Files</ulink>, <ulink
url="../../struts_tools_ref_guide/html_single/index.html#GraphicalEditorForStrutsValidationFiles86">Graphical
Editor for
- Struts Validation Files</ulink>. All these editors have <link
linkend="OpenOnSelection4Hyperlinknavigation">
- <property moreinfo="none">OpenOn</property>
- </link> and <link
linkend="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
- <property moreinfo="none">Content Assist</property>
- </link> features, which are described in more details in this document. In
addition you get
- to know a <link linkend="visual_page">Visual Page
Editor</link> for combined visual and
- source editing of Web pages and many <link
linkend="more_editors">other editors</link> for
- different types of files.</para>
-
- <section id="editors_features">
-
- <title>Editors Features</title>
- <para>JBoss Developer Studio has powerful editor features that help you
easily navigate
- within your application and make use of content and code assist no matter
what project
- file (jsp, xhtml, xml, css, etc...) you are working on.</para>
-
- <section id="OpenOnSelection4Hyperlinknavigation">
-
- <title>OpenOn</title>
-
- <para><property moreinfo="none">OpenOn</property>
lets you easily link directly from one resource to
- another in your project without using the Package Explorer view (project
tree). With
- OpenOn, you can simply use <emphasis>
- <property moreinfo="none">F3</property>
- </emphasis> or <emphasis>
- <property
moreinfo="none">Ctrl+Click</property>
- </emphasis> on a reference to another file and the file will be
opened.</para>
-
- <para>OpenOn is available for the following files:</para>
- <itemizedlist>
- <listitem>
- <para>
- <link linkend="XMLFiles232">XML
files</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="JSPPages223">JSP/XHTML
Pages</link>
- </para>
- </listitem>
- <listitem>
- <para>Java files</para>
- </listitem>
- </itemizedlist>
- <section id="XMLFiles232">
-
- <title>XML Files</title>
-
- <para>Press and hold down the Ctrl key. As you move the mouse
cursor over different
- file references in the file, they display an underline. When you
hover the name
- of the file you want to open, click and the file will open in its own
editor. In
- this example the managed bean NameBean will open.</para>
- <figure float="0">
- <title>NameBean Managed Bean</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>This is the result of using OpenOn.</para>
- <figure float="0">
- <title>NameBean Java Class</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You can also use OpenOn with defined
attributes.</para>
- <figure float="0">
- <title>OpenOn With Defined Attributes</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You can also open any JSP pages.</para>
- <figure float="0">
- <title>JSP Page OpenOn</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="JSPPages223">
-
- <title>JSP Pages</title>
-
- <para><property
moreinfo="none">OpenOn</property> is also very useful in JSP pages. It
will allow
- you to quickly jump to the reference instead of having to hunt around
in the
- project structure.</para>
-
- <para>You can easily open the imported property
files.</para>
- <figure float="0">
- <title>OpenOn With Imported Property Files</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Use OpenOn to open a CSS file used with a JSP
page:</para>
- <figure float="0">
- <title>OpenOn With CSS File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Open managed beans:</para>
- <figure float="0">
- <title>OpenOn With Managed Beans</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>For JSP files in a JSF project, you can also easily open the
navigation rules
- by applying <property
moreinfo="none">OpenOn</property> to the JSF tag for the navigation
- outcome:</para>
- <figure float="0">
- <title>OpenOn With JSF Tag</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- </section>
-
- <section
id="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
-
- <title>Content Assist</title>
- <para><property moreinfo="none">Content
assist</property> is available when working with</para>
-
- <itemizedlist>
- <listitem>
- <para>
- <ulink
url="../../seam/html_single/index.html#ContentAssist">Seam project
files</ulink>
- </para>
-
- </listitem>
- <listitem>
- <para>
- <link linkend="JSFProjectFiles3087">JSF project
files</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="StrutsProjectFile46s3">Struts
project files</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="JSPPages434">JSP
files</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="ContentAssistForRF">RichFaces
components</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink
url="../../esb_ref_guide/html_single/index.html#ESBContentAssist">ESB XML
files</ulink>
- </para>
- </listitem>
- </itemizedlist>
-
- <para>Notice, that code completion for EL variables has icons
illustrating what they are
- from. Currently it's performed for resource bundles, JSF and Seam
- components.</para>
-
- <figure float="0">
- <title>JSF Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_8d.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure float="0">
- <title>Seam Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_8c.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Also, as you can see, the ranking and sorting are available in EL
code
- completions.</para>
-
- <section id="JSFProjectFiles3087">
-
- <title>JSF Project Files</title>
-
- <para>When working with JSF project in JBoss Developer Studio, you
can use various
- <property moreinfo="none">Content Assist
features</property> while developing:</para>
- <itemizedlist>
- <listitem>
- <para>Content Assist for XML, JSP and JSF configuration
files</para>
- </listitem>
- <listitem>
- <para>Content Assist based on project data</para>
- </listitem>
- <listitem>
- <para>Content Assist with graphical JSF
editor</para>
- </listitem>
- </itemizedlist>
- <section
id="ContentAssistForXMLJSPAndJSFConfigurationFiles865">
-
- <title>Content Assist for XML, JSP and JSF configuration
files</title>
-
- <para>At any point when working with any XML, JSP and JSF
configuration files
- Content Assist is available to help you. Simply type
<emphasis>
- <property
moreinfo="none">Ctrl-Space</property>
- </emphasis> to see what is available.</para>
-
- <para>Content Assist for JSF configuration file:</para>
- <figure float="0">
- <title>Content Assist in JSF Configuration
File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_9.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Content Assist for JSF JSP file:</para>
- <figure float="0">
- <title>Content Assist in JSP File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_10.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Content Assist for other JSF XML project files (web.xml
shown):</para>
- <figure float="0">
- <title>Content Assist in web.xml File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_11.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="ContentAssistBasedOnProjectData86">
-
- <title>Content Assist Based on Project Data</title>
-
- <para>JBoss Developer Studio takes Content Assist to the next
level. Studio will
- constantly scan your project and you will be able to insert code
into the
- JSP page from your project that includes:</para>
- <itemizedlist>
- <listitem>
- <para>Values from Property files</para>
- </listitem>
- <listitem>
- <para><emphasis role="italic">
- <property
moreinfo="none">"Managed beans"</property>
- </emphasis> attributes and methods</para>
- </listitem>
- <listitem>
- <para>Navigation Rule Outcomes</para>
- </listitem>
- <listitem>
- <para>JSF variables (context, request
etc...)</para>
- </listitem>
- </itemizedlist>
- <para>The figure below shows how to insert message from a
Properties files. You
- simply put the cursor inside the <emphasis
role="italic">
- <property
moreinfo="none">"value"</property>
- </emphasis> attribute and press <emphasis>
- <property
moreinfo="none">Ctrl-Space</property>. </emphasis> JBoss
Developer Studio will
- scan your project and show a list of possible values to
insert.</para>
- <figure float="0">
- <title>Inserting Message</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>In the following screenshot we are inserting a
<emphasis role="italic">
- <property moreinfo="none">"Managed
bean"</property>
- </emphasis> attribute value. Again, by simply clicking
- <emphasis><property
moreinfo="none">Ctrl-Space</property>,</emphasis> JBoss
- Developer Studio will show a list of all possible values that you
can
- insert.</para>
-
- <para>Once you select a Managed bean, it will show you a list
of all available
- attributes for the selected Managed bean
(userBean).</para>
- <figure float="0">
- <title>Attributes List</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Code Assist based on project data will also prompt you
for navigation
- rules that exist in your JSF configuration file.</para>
- <figure float="0">
- <title>Code Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Code Assist can also provide you with access to the beans
located in jar archives.</para>
-
- <figure float="0">
- <title>Code Assist: accessing beans in jar
archives</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_14_a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- <section id="ContentAssistWithinJSFGraphicalEditor44">
-
- <title>Content Assist within Tree JSF Editor</title>
-
- <para>JBoss Developer Studio also provides Content Assist when
working within
- the Tree JSF configuration editor. Just click <emphasis>
- <property
moreinfo="none">Ctrl-Space</property>. </emphasis></para>
- <figure float="0">
- <title>Content Assist in Tree JSF Configuration
Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_15.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <!--
-
- <para>If a field contains right class name and you click a
link near the
- field you will come to the file with this class otherwise a
new Java
- Class dialog will be shown:</para>
- <figure>
- <title>New Java Class</title>
- <mediaobject>
- <imageobject>
- <imagedata
-
fileref="images/editors_features/editors_features_16.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>If you entered an incorrect name in the field error
markers will be
- shown for field labels and tree items:</para>
- <figure>
- <title>Error Markers</title>
- <mediaobject>
- <imageobject>
- <imagedata
-
fileref="images/editors_features/editors_features_17.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>To add a new property to a managed bean
expand <emphasis>
- <property>Managed Beans</property>
- </emphasis> and select <emphasis
role="bold">
-
<property><name_of_bean></property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property>Add</property>
- </emphasis> button in the Properties
panel</para>
- </listitem>
- <listitem>
- <para>In the dialog Add Property define a new
property. From here
- also you can generate setters and getters
methods:</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Create New Property</title>
- <mediaobject>
- <imageobject>
- <imagedata
-
fileref="images/editors_features/editors_features_18.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Here you can also add an additional navigation rule
to the
- faces-config.xml file.</para>
- <itemizedlist>
- <listitem>
- <para>Select <emphasis>
- <property>Navigation
Rules</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property>Add</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>In the dialog <emphasis>
- <property>Add Rule</property>
- </emphasis> define a view and give a name to
the rule. Click
- Finish:</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Add New Navigation Rule</title>
- <mediaobject>
- <imageobject>
- <imagedata
-
fileref="images/editors_features/editors_features_19.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- -->
- </section>
- </section>
-
- <section id="StrutsProjectFile46s3">
- <title>Struts Project Files</title>
- <para>Content Assist features are available when you work with
Struts
- projects.</para>
-
-
- <section id="ContentAssistForStrutsConfigurationFile75">
-
-
- <title>Content Assist for Struts Configuration
File</title>
-
- <para>Content Assist helps you in Struts Configuration
file.</para>
-
- <figure float="0">
- <title>Struts Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_20.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="ContentAssistForStrutsJSPFile07">
-
- <title>Content Assist for Struts JSP File</title>
-
- <para>Using Code Assist in Struts JSP file is shown
below.</para>
-
- <figure float="0">
- <title>Struts JSP Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_21.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
- <section id="JSPPages434">
-
- <title>JSP Pages</title>
-
-
- <section id="ContentAssistForJSFTags96">
-
- <title>Content Assist for JSF Tags</title>
- <para>JBDS provides full code completion for JSF
tags:</para>
-
- <figure float="0">
- <title>JSF Tags Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_22.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>When the tag is selected the required attributes, if
there any, are
- already inserted and the cursor is located to the first
attribute. At this
- point you can ask for attribute proposals.</para>
- <figure float="0">
- <title>Attributes Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_23.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- <section id="ContentAssistForJSTLTags6332">
-
- <title>Content Assist for JSTL Tags</title>
- <figure float="0">
- <title>JSTL Tags Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_24.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="ContentAssistForHTMLTags7454">
-
- <title>Content Assist for HTML Tags</title>
- <para>Content assist for HTML tags has the same mechanism as
for JSF
- tags:</para>
- <figure float="0">
- <title>HTML Tags Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_25.png"
scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You can use as well attributes proposals for HTML
tags:</para>
- <figure float="0">
- <title>HTML Tags Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_26.png"
scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="ContentAssistForJavaScriptTags67433">
-
- <title>Content Assist for JavaScript Tags</title>
- <figure float="0">
- <title>JavaScript Tags Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_27.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
-
- <section id="AddingDynamicCodeAssistToCustomComponents8745">
-
- <title>Adding dynamic code assist to custom components that were
added to JBoss
- Tools Palette</title>
- <para>Here is what you need to do to add project based code assist
to a custom
- component added in <property moreinfo="none">JBoss
Developer Studio</property>:</para>
- <orderedlist continuation="restarts"
inheritnum="ignore">
- <listitem>
- <para>Create a new xml file in <emphasis>
- <property
moreinfo="none"><JBDS_home>studio/eclipse/plugins/org.jboss.tools.common.kb_***/schemas/tld/</property>.
- </emphasis>For example call it <emphasis>
- <property moreinfo="none">
JeniaFaces.xml</property>
- </emphasis>. The file should be written according to
<emphasis>
- <property
moreinfo="none"><JBDS_home>/studio/eclipse/plugins/org.jboss.tools.common.kb/kb.jar/org/jboss/tools/common/kb/kb-schema_1.0.dtd</property>
- </emphasis></para>
- </listitem>
- </orderedlist>
- <para>Follow these steps to set what is available for code
assist:</para>
- <itemizedlist>
- <listitem>
- <para>Adds code assist for JSF pre-defined objects, such
as
- <![CDATA[value=]]><emphasis
role="italic">
- <property
moreinfo="none">"#{param}"</property>
- </emphasis>:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
- <proposal type="jsfVariables"/>
-</AttributeType>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Add bundle resource (property file) <property
moreinfo="none">code
- assist</property>:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
- <proposal type="bundleProperty"/>
-</AttributeType>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Add managed bean property <property
moreinfo="none">code assist</property>:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
- <proposal type="beanProperty"/>
-</AttributeType>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Add managed bean property but of a specified
type:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
- <proposal type="beanProperty">
- <param name="type" value="java.lang.Boolean"/>
- </proposal>
-</AttributeType>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Add managed bean method with a
signature:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
- <proposal type="beanMethodBySignature">
- <param name="paramType"
value="javax.faces.context.FacesContext"/>
- <param name="paramType"
value="javax.faces.component.UIComponent"/>
- <param name="paramType" value="java.lang.Object"/>
- <param name="returnType" value="void"/>
- </proposal>
-</AttributeType>
-]]></programlisting>
- <orderedlist continuation="restarts"
inheritnum="ignore">
- <listitem>
- <para>Add information on your xml file in <emphasis>
- <property
moreinfo="none"><JBDS_home>/studio/eclipse/plugins/org.jboss.common.kb_***/plugin.xml</property>
- </emphasis></para>
- <programlisting format="linespecific"
role="XML"><![CDATA[
- <tld
- jsf="true"
- name="Jenia Faces"
- schema-location="schemas/tld/myJSF.xml"
-
uri="http://www.jenia.org/jsf/dataTools"/>]]>
- </programlisting>
- </listitem>
-
- <listitem>
- <para>Restart Eclipse. You should now have code assist for
the
- component.</para>
- </listitem>
- </orderedlist>
-
- </section>
- </section>
- <section
id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing74">
-
- <title>Synchronized Source and Visual Editing</title>
-
- <para><property moreinfo="none">JBoss Developer
Studio</property> offers the flexibility to edit any
- files in either source or extra visual modes at the same
time.</para>
-
- <para>The project is yours and so is the source. <property
moreinfo="none">JBoss Developer
- Studio</property> provides you many different graphical editors
to speed your
- application development. At the same time, you always have a full control
over all
- project source files. Any changes you make in the source view immediately
appear in
- the graphical view.</para>
-
- <para>The JSF configuration file editor has three views: <property
moreinfo="none">Diagram</property>,
- <property moreinfo="none">Tree</property> and
<property moreinfo="none">Source</property>. All views are
- synchronized, you can edit the file in any view.</para>
- <figure float="0">
- <title>Three Views are Synchronized</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_32.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The same is relevant to all other <property
moreinfo="none">JBoss Developer Studio</property>
- editors.</para>
-
- <para>Web XML editor is shown. Web XML editor has a graphical view
(Tree) and source
- (Source).</para>
-
- <figure float="0">
- <title>Two Views are Synchronized</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_35.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para><property moreinfo="none">JBoss Developer
Studio</property> TLD file editor is shown in Tree view.
- At any point you can edit the source by switching to Source
view.</para>
- <figure float="0">
- <title>Two Views are Synchronized</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_37.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- </section>
- <section id="visual_page" role="updated">
-
- <title>Visual Page Editor</title>
-
- <para><property moreinfo="none">JBoss Developer
Studio</property> comes with a powerful and customizable
- <property moreinfo="none">Visual Page
Editor</property> (VPE). You can use the Visual Page Editor to
- develop an application using any technology: JSF, Struts, JSP, HTML and
others. Double-click on the necessary file in the Package Explorer view to open it in the
Visual Editor or just drag-and-drop it into perspective (the drag-and-drop feature can be
also applied to JSP, XHTML or HTML files created locally).</para>
-
- <para>Current VPE version has three tabs: <property
moreinfo="none">Visual/Source</property>,
- <property moreinfo="none">Source</property> and
<property moreinfo="none">Preview</property>. To switch between the
- views you can use tabs at the bottom of the VPE or the shortcuts
<emphasis>
- <property moreinfo="none">Ctrl + PageUp/Ctrl +
PageDown</property>
- </emphasis>.</para>
-
- <figure float="0">
- <title>Visual Page Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_1.png"
scale="95"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <section id="visual_source">
- <title>Visual/Source View</title>
-
- <para>Using the <property moreinfo="none">Visual/Source
view</property> you can edit your pages in the
- Source and Visual modes simultaneously having an instant synchronization
between
- them:</para>
- <figure float="0">
- <title>Visual/Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_2.png"
scale="95"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The view is designed in the form of a split pane with toggle
buttons for quickly
- moving between Source, Visual or Source/Visual modes as shown on the
figure
- above.</para>
-
- <para>One more way to toggle between the various states of the split
pane is using the
- shortcuts <emphasis>
- <property moreinfo="none">Shift +
F6</property>
- </emphasis> for maximizing/restoring the Source part and
<emphasis>
- <property moreinfo="none">Shift + Alt +
F6</property>
- </emphasis> for maximizing/restoring the Visual part.</para>
- <tip>
- <title>Tip:</title>
- <para>When editing large documents hiding the Visual part will
speed up the
- editing.</para>
- </tip>
-
- <para>It should be pointed out that, no matter in what mode you are
working, you get a
- full integration with <property
moreinfo="none">Properties</property> and <property
moreinfo="none">Outline
- views</property>:</para>
- <figure float="0">
- <title>Integration with Properties and Outline Views</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_3.png"
scale="55"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>It's also possible to use the <link
linkend="palette">JBoss Tools
- Palette</link> to insert any tag from the list of tag libraries
to the page you
- are editing with just a click or drag-and-drop.</para>
- <figure float="0">
- <title>Inserting Tag From the Palette</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para> You can insert a tag/component from the palette into either the
Source or the
- Visual part by calling a context menu and selecting <property
moreinfo="none">Insert
- around</property>, <property
moreinfo="none">Insert before</property>, <property
moreinfo="none">Insert
- after</property> or <property
moreinfo="none">Replace With</property>, pointing to
- <property moreinfo="none">From
Palette</property>, picking the type of the tag and finally
- choosing the tag you want to insert. </para>
-
- <para>The image below illustrates how you can insert a tag into the
Source part.</para>
- <figure float="0">
- <title>Inserting a tag into the Source part </title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_23a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>And this is how a tag is inserted using a context menu in the
Visual part.</para>
-
- <figure float="0">
- <title>Inserting a tag into the Visual part</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_23b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para><property moreinfo="none">Visual Page
Editor</property> provides the option for displaying
- non-visual tags in Visual mode of the editor. To enable this option
expand the
- submenu in the top left corner of the Visual part and select
<emphasis>
- <property moreinfo="none">Show Non-visual
tags</property>.</emphasis></para>
-
- <figure float="0">
- <title>Enabling the Option for Showing Non-visual
Tags</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_4a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the figure you can see non-visual elements with gray dashed
borders.</para>
-
- <figure float="0">
- <title>Non-visual Tag in the VPE</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_4b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To disable this option again expand the same submenu and select
<emphasis>
- <property moreinfo="none">Hide Non-visual
tags</property>.</emphasis></para>
-
- <figure float="0">
- <title>Non-visual Tag in the VPE</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_4c.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <section id="comments">
- <title>Commenting out Code</title>
-
- <para><property
moreinfo="none">VPE</property> supports possibility to add comments in
files you are
- working with (JSP, XHTML, etc.):</para>
-
- <itemizedlist>
- <listitem>
- <para>HTML comments (<emphasis>
- <property moreinfo="none"><!--
--></property>
- </emphasis>) which are output to the client
</para>
- </listitem>
- <listitem>
- <para>JSP comments (<emphasis>
- <property moreinfo="none"><%--
--%></property>
- </emphasis>) which are not output to the client as part
of the JSP page
- output</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="codefolding">
- <title>Using Code Folding</title>
- <para>
- <property moreinfo="none">Visual Page
Editor</property> lets you collapse (hide) and expand
- (show) sections of your code to make it easier to navigate and read.
</para>
- <para>Code folding can be enabled by right-clicking on the left
margin on the Source
- part of Visual Page Editor, selecting <property
moreinfo="none">Folding</property> and checking
- the <property moreinfo="none">Enable
Folding</property> checkbox or using the <emphasis>
- <property
moreinfo="none">Ctrl+Numpad_Divide</property>
- </emphasis> shortcut.</para>
- <para>When the code folding is enabled a minus sing (
<inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_23c.png"></imagedata>
- </imageobject>
- </inlinemediaobject> ) will appear on the left margin of the
editor next to each
- opening block tag. </para>
-
- <figure float="0">
- <title>Enabled Code Folding </title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_24a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click the minus sign to collapse a block tag.</para>
-
- <para>When the minus sing is clicked on the appropriate tag
collapses and a plus
- sing ( <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_23d.png"></imagedata>
- </imageobject>
- </inlinemediaobject> ) is displayed on the left margin as well
as a gray
- rectangle two dots ( <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_23e.png"></imagedata>
- </imageobject>
- </inlinemediaobject> ) appears after opening and closing tags.
</para>
-
- <figure float="0">
- <title>Collapsed Code</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_24b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="JSPsyntaxvalidation84">
-
- <title>JSP Syntax Validation</title>
- <para>When working in JBoss Tools JSP editor you are constantly
provided with
- feedback and contextual error checking as you type.</para>
- </section>
-
- <section id="taglib_versions_support">
- <title>Support for Taglib versions</title>
-
- <para>VPE templates now support various versions of tag libraries.
It means that the
- <property moreinfo="none">VPE</property>
takes control over those components which have
- different parameters or preview according to the framework version
(like seam
- 1.2 and seam 2.0, or JSF 1.1 and JSF 1.2).</para>
-
- <para>For example, <emphasis>
- <property
moreinfo="none"><s:decorate></property>
- </emphasis> element in seam has different parameters in
versions 1.2 and 2.0 as
- well as <emphasis>
- <property
moreinfo="none"><h:outputLink></property>
- </emphasis> JSF element has different preview in versions 1.1
and 1.2.</para>
- </section>
- </section>
-
- <section id="pages_styling">
- <title>Pages Styling</title>
-
- <para>Most web pages use the cascading style sheets (CSS) to control
the way they look.
- With <property moreinfo="none">Visual Page
Editor</property> you can easily stylise your pages. In
- this section we are going to introduce you to a powerful mechanism that
- <property moreinfo="none">VPE</property>
provides for a complete control over pages styling. </para>
-
- <section id="inline_styling">
- <title>Inline Style Editing</title>
-
- <para>In the Visual part of the <property
moreinfo="none">VPE</property> there is a graphical
- toolbar, use it to add inline styling to JSF and Struts tags on your
page. The
- toolbar can be hidden by clicking on arrow sign in the upper left
corner.</para>
-
- <figure float="0">
- <title>Text Formatting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For editing inline styles for DOM elements <property
moreinfo="none">VPE</property> also
- provides <property moreinfo="none">CSS
Dialog</property>. It can be called from <emphasis>
- <property moreinfo="none">style</property>
- </emphasis> line in the <property
moreinfo="none">Properties view</property> for a currently
- selected element.</para>
-
- <figure float="0">
- <title>Call the CSS Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para id="css_dialog"><property
moreinfo="none">CSS Dialog</property> has four tabs where css
- properties for text, background, borders and others can be specified.
A simple
- preview which is generated at the top of the <property
moreinfo="none">CSS Dialog</property>
- allows you to see the changes before you apply them.</para>
-
- <figure float="0">
- <title>CSS Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="external_stylesheets">
- <title>External Stylesheets</title>
- <para>The pages you are working with in <property
moreinfo="none">VPE</property> can use external
- stylesheets. <property
moreinfo="none">VPE</property> allows you to create new style classes
in
- existing stylesheets and/or edit them as well. For these purposes
<property moreinfo="none">CSS
- Style Class Dialog</property> is provided (hot keys -
<emphasis>
- <property
moreinfo="none">CTRL+SHIT+C</property>).</emphasis></para>
- <para>Select the element for which you need to create or edit style
class and press
- button next to <emphasis>
- <property
moreinfo="none">styleClass</property>
- </emphasis> field in <property
moreinfo="none">Properties view</property>.</para>
-
- <figure float="0">
- <title>Calling the CSS Style Class Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>It'll pick up the <property
moreinfo="none">CSS Style Class Dialog</property> which
- looks like on the figure below.</para>
- <figure float="0">
- <title>CSS Style Class Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_18.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>First, you should specify the CSS file where you are going to
put your style
- class. Do this by pressing the button next to the <emphasis>
- <property moreinfo="none">CSS
file</property>
- </emphasis> field.</para>
- <figure float="0">
- <title>CSS File Selection</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_19.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To create new CSS class write its name in the
<emphasis>
- <property moreinfo="none">Style
class</property>
- </emphasis> field and then configure style settings switching
between the tabs: <emphasis>
- <property
moreinfo="none">Text/Font</property>, </emphasis>
- <emphasis>
- <property
moreinfo="none">Background</property>, </emphasis>
- <emphasis>
- <property moreinfo="none">Boxes</property>,
</emphasis>
- <emphasis>
- <property moreinfo="none">Property
Sheet</property>. </emphasis>The list of already exisiting classes with names
begining with the symbols printed will be displayed on standard "Ctrl+Space" key
combination. To add existing styling to
- the chosen element just point to the
- necessary one. Each time you select any class it is displayed in the
Preview tab. Click on the <emphasis><property
moreinfo="none">Apply</property></emphasis> button will apply the
changes without closing the window.</para>
-
- <figure float="0">
- <title>Style Class Selection</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_20.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <emphasis>
- <property moreinfo="none">Edited
properties</property>
- </emphasis> tab gives a preview of the properties which are set
for the existing
- style class. You can easily modify them with the help of this
wizard.</para>
-
- <figure float="0">
- <title>Edited Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_21.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If the style class isn't chosen, the tab doesn't show
any properties.</para>
-
- <figure float="0">
- <title>Edited Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/edited_properties.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <emphasis>
- <property moreinfo="none">Preview
tab</property>
- </emphasis> is for observing the content of the chosen CSS
file. This tab is hidden if no CSS file is chosen.</para>
-
- <figure float="0">
- <title>Preview Tab</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/preview_tab.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>At the top of the <property
moreinfo="none">CSS Style Class Dialog</property>
- you can see a preview box which visualizes the result. To edit the
preview you should double click in the box. To leave the focus, use <emphasis>
- <property moreinfo="none">Ctrl +
Tab</property>.</emphasis></para>
-
- <figure float="0">
- <title>Editing the Preview</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/preview_box.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The dialog for creating a new CSS class, which is called from
<emphasis>
- <property moreinfo="none">New > Other...
> JBoss Tools Web > CSS Class</property>,
- </emphasis> looks the same.</para>
-
- <figure float="0">
- <title>New CSS Class Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_22.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
-
- <section id="vpe_templating">
- <title>Templating</title>
-
- <para>The VPE also makes it possible to create templates for unknown
tags.</para>
-
- <para>To call the <property moreinfo="none">Template
dialog</property> for a tag, right-click on it in
- Visual mode and select <emphasis>
- <property moreinfo="none">Setup Template for
<tag name></property>
- </emphasis> option.</para>
-
- <figure float="0">
- <title>Calling Template Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_7a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para id="template_dialog">Here is what the <property
moreinfo="none">Template dialog</property> looks
- like.</para>
-
- <figure float="0">
- <title>Template Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_7b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para><emphasis>
- <property moreinfo="none">Tag for
Display</property>
- </emphasis> field in the <property
moreinfo="none">Template dialog</property> requires specifying a
- type of tag. It can be SPAN, DIV, TABLE or any other html element. Check
<emphasis>
- <property moreinfo="none">Children</property>
- </emphasis>, if you want to mark a tag as a child
element.</para>
-
- <para>The <emphasis>
- <property moreinfo="none">Value</property>
- </emphasis> field is for setting a tag value.</para>
- <para>As for the <emphasis>
- <property moreinfo="none">Style</property>
- </emphasis> field, you can fill it out manually or make use of the
button next to
- the field to bring the <link linkend="css_dialog">CSS
Dialog</link> for editing
- styles.</para>
-
- <para>You can observe all defined templates in the <link
linkend="VisualPageEditor2">VPE
- Preferences</link> on the Templates tab which you can quickly
access by pressing
- <link linkend="AdvancedSettings954">Preferences
button</link>.</para>
-
- <figure float="0">
- <title>Templates Tab of the VPE Preferences Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_7c.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Here it's possible to edit or remove any listed in the table
- template.</para>
-
- </section>
-
- <section id="AdvancedSettings954">
-
- <title>Advanced Settings</title>
-
- <para>In the left vertical pane of the Visual part there are three
buttons: <emphasis>
- <property
moreinfo="none">Preferences</property></emphasis>
- (
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/icon_1.png"></imagedata>
- </imageobject>
- </inlinemediaobject>
- ),
-
-
-
-
- <emphasis>
- <property moreinfo="none">Refresh</property>
- </emphasis>
- (
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/icon_2.png"></imagedata>
- </imageobject>
- </inlinemediaobject>
- )
- and <emphasis>
- <property moreinfo="none">Page Design
Options</property> </emphasis>(
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/icon_3.png"></imagedata>
- </imageobject>
- </inlinemediaobject>
- )
-
- .</para>
-
- <figure float="0">
- <title>Buttons on the Visual Part of VPE</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem id="vpe_preferences">
- <para><emphasis>
- <property
moreinfo="none">Preferences</property>
- </emphasis> button
- (
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/icon_1.png"></imagedata>
- </imageobject>
- </inlinemediaobject>
- )
-
-
-
-
-
- provides a quick access to <property
moreinfo="none">Visual Page
- Editor</property> preferences.</para>
-
- <figure float="0">
- <title>Visual Page Editor Preferences Window</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
-
- <listitem>
- <para>Clicking on <emphasis>
- <property
moreinfo="none">Refresh</property>
- </emphasis> button
-
-
- (
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/icon_2.png"></imagedata>
- </imageobject>
- </inlinemediaobject>
- )
-
-
-
-
-
-
-
- you refresh the displayed information.</para>
- </listitem>
-
- <listitem>
- <para><emphasis>
- <property moreinfo="none">Page Design
Options</property>
- </emphasis> button
- (
- <inlinemediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/icon_3.png"></imagedata>
- </imageobject>
- </inlinemediaobject>
- )
-
-
- leads to a window which helps you specify necessary
- references of the resources. It is represented by a window with 4
tabs. The
- first one, <emphasis>
- <property moreinfo="none">Actual Run-Time
folders</property>,
- </emphasis> is used to replace absolute and relative path
values when
- generating a preview: </para>
- <figure float="0">
- <title>Page Design Options: Actual Run-Time
folders</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>The second tab, <emphasis>
- <property moreinfo="none">Included CSS
files</property>
- </emphasis>, is used to add CSS files to be linked by
Visual Page Editor
- when generating a preview:</para>
-
- <figure float="0">
- <title>Page Design Options: Included CSS
files</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_10_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
-
- <para>The third one, <emphasis>
- <property moreinfo="none">Included tag
libs</property></emphasis>, can be used to add Taglibs that can be used by the
editor for
- getting appropriate templates to generate a
preview:</para>
-
- <figure float="0">
- <title>Page Design Options: Included tag
libs</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_10_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>And finally, the <emphasis>
- <property moreinfo="none">Substituted El
expressions</property>
- </emphasis> tab is used to add El expressions that will be
substituted by
- the editor when generating a preview:</para>
-
- <figure float="0">
- <title>Page Design Options: Substituted El
expressions</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_10_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>The first two tabs of the window let you define actual
runtime folders.
- The example below will help you understand how this can be
done.</para>
-
- <para>Suppose you have the following project
structure:</para>
-
- <programlisting format="linespecific"
role="XML"><![CDATA[WebContent/
- pages/
- img/
- a.gif
- header.jsp
- main.jsp
- ]]></programlisting>
-
- <para>The content of the <emphasis>
- <property
moreinfo="none">header.jsp</property>
- </emphasis> is:</para>
- <programlisting format="linespecific"
role="XML"><![CDATA[My Header
-<img src="img/a.gif"/>
-]]></programlisting>
- <para>and <emphasis>
- <property
moreinfo="none">main.jsp</property>
- </emphasis> content is:</para>
- <programlisting format="linespecific"
role="XML"><![CDATA[<jsp:include page="pages/header.jsp"
/>
-]]></programlisting>
- <para> When you open <emphasis>
- <property
moreinfo="none">main.jsp</property>
- </emphasis> in <property
moreinfo="none">Visual Page Editor</property>, it will not be able
- to resolve the image from the header, however, it will work fine
in runtime.
- To fix this in design time, click the <emphasis>
- <property moreinfo="none">Page Design
Options</property>
- </emphasis> button and set <emphasis>
- <property moreinfo="none">Actual Run-Time
Relative Folder</property>
- </emphasis> to <emphasis>'projectName >
WebContent >
- pages'</emphasis> and you will see the image
appeared.</para>
- <para></para>
-
- <para>Let' consider an example for other tabs. For
instance, the
- definition of your CSS on the page is the next:</para>
-
- <programlisting format="linespecific"
role="XML"><![CDATA[<link rel="stylesheet"
type="text/css"
- href="#{facesContext.externalContext.requestContextPath}/style.css"/>
-]]></programlisting>
-
- <para>This will work fine in runtime, but the <property
moreinfo="none">Visual Page
- Editor</property> doesn't know what
- <emphasis>requestContextPath</emphasis> in design
time is. In order to
- see the necessary styles applied in design time your should add a
path to
- your stylesheet in the <property
moreinfo="none">CSS File Path</property> section.</para>
-
- <para>The next <property
moreinfo="none">URI</property> section lets you add URI taglibs so
that
- the editor knows where to find the tag libraries.</para>
-
- <para>And the last <property
moreinfo="none">Substituted EL expressions</property> section is
- provided to specify the values for specific EL variables. It can
be useful
- for a preview generation.</para>
- <para>As an example look at the figure below:</para>
- <figure float="0">
- <title>EL Expression</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Here bath in Source and Visual modes you see the EL
expression
- <emphasis>#{user.name}</emphasis>. When you
switch to <property moreinfo="none">Preview
- view</property>, you'll also see this expression.
Now press <emphasis>
- <property moreinfo="none">Page Design
Options</property>
- </emphasis> button and set the value for the
- <emphasis>"user.name"</emphasis> as
- <emphasis><property
moreinfo="none">World</property>.</emphasis></para>
-
- <figure float="0">
- <title>Setting the Value for the EL
Expression</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As a result in Visual mode and Preview view the word
<emphasis>
- <property
moreinfo="none">World</property>
- </emphasis> is displayed.</para>
- <figure float="0">
- <title>The EL Expression Value</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
-
- </itemizedlist>
-
- <para>You can find useful one more functionality provided by VPE. At
the bottom of the
- <property moreinfo="none">Visual/Source
view</property> there is a <property moreinfo="none">Selection Tag
- Bar</property>. It allows to see tags tree for a current
component selected in
- Visual or Source mode.</para>
-
- <figure float="0">
- <title>Selection Tag Bar</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you want to hide the <property
moreinfo="none">Selection Tag Bar</property>, use the button in
- the form of a red cross on the lower right side. To reset it again you
should check
- the proper option in the <link
linkend="vpe_preferences">VPE
- Preferences</link>.</para>
- </section>
-
- <section id="page_preview">
- <title>Page Preview</title>
-
- <para><property moreinfo="none">VPE</property>
comes with design-time preview feature which is available
- for:</para>
-
- <itemizedlist>
- <listitem>
- <para>Struts Pages</para>
- </listitem>
- <listitem>
- <para>JSF Pages</para>
- </listitem>
- </itemizedlist>
-
- <para><property moreinfo="none">Preview
view</property> is read-only, it shows how the page will look
- like in a browser.</para>
- <figure float="0">
- <title>Preview View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/visual_page/visual_page_16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <!--para>You can even
- attach your stylesheet to the preview.</para-->
- </section>
-
- <section id="SetupnotesforLinu895x">
-
- <title>Setup notes for Linux</title>
-
- <para>Linux users may need to do the following to get the <property
moreinfo="none">Visual Page
- Editor</property> to work correctly on their
machines.</para>
-
- <para> The Visual Page Editor requires the library libstdc++.so.5. This
library is
- contained in the compat-libstdc++-33.i386 package.</para>
-
- <itemizedlist>
- <listitem>
- <para>To install this package on Fedora Core or Red Hat
Enterprise Linux run the
- following command:</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[yum install compat-libstdc++-33.i386
-]]></programlisting>
- </listitem>
-
-
- <listitem>
- <para>On any other rpm based distributions download
libstdc++.so.5 and run the
- following command:</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[rpm -Uvh compat-libstdc++-33.i386
-]]></programlisting>
- </listitem>
-
-
- <listitem>
- <para>On Debian based distributives run the following command:
</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[apt-get install compat-libstdc++-33.i386
-]]></programlisting>
- </listitem>
-
- </itemizedlist>
-
- <para> In case you have the library installed and you still have issue
with starting the
- visual page editor then close all browser views/editors and leave one
visual page
- editor open and restart eclipse. This should force a load of the right
XULRunner
- viewer.</para>
-
- </section>
-
- <!-- <section
id="CreateLookAndFeel(Design-timeMetadate)ForAnyCustomJSFComponents41">
-<?dbhtml
filename="CreateLookAndFeel(Design-timeMetadate)ForAnyCustomJSFComponents.html"?>
-<title>JSP Visual Page Editor - Design Time Look and Feel for Custom
Components</title>
-
-<itemizedlist>
-<listitem><ulink
url="http://www.jboss.org/404.html">Template
definition for design-time representation of custom tags</ulink> (pdf)
-<para></para>
- <note>
- <title>Note:</title>
- <para>The templates files are now saved in
<emphasis><RedHatDeveloperStudio>\eclipse\plugins\com.exadel.vpe_1.1.1\plugin.xml</emphasis>.
The PDF files show the old location.</para>
- </note>
-<para></para></listitem>
-
-<listitem><ulink
url="http://www.jboss.org/404.html">Steps to
Create Plug-in</ulink> (pdf)</listitem>
-<listitem><ulink url="index.html">How to use create(..)
method</ulink> (pdf)</listitem>
-<listitem>API
-<itemizedlist>
-<listitem><ulink
url="http://www.jboss.org/404.html">VpeAbstractTemplate</...
-<listitem><ulink
url="http://www.jboss.org/404.html">VpeTemplate</ulink>...
-<listitem><ulink
url="http://www.jboss.org/404.html">Download</ulink> examples. The
examples.zip file contains two
- applications. The first application transforms the JSP source tag into visual tag
(HTML). This application
- is an Eclipse plug-in. Import as an Eclipse project. The second application is a Web
applications which
- uses the custom component (project with JSF Nature).</listitem>
-</itemizedlist>
-<para>Please send us an email to <ulink
url="mailto:support@exadel.com">support@exadel.com</ulink> if you have
- questions about this feature.</para>
-</section>
-
-
-<section id="HTML401Suppor421t">
-<?dbhtml filename="HTML4.01Support.html"?>
-<title>HTML 4.01 Support</title>
-</section>
-
-<section id="JSP2.0JSTL1.0And1.1Suppor52t">
-<?dbhtml filename="JSP2.0JSTL1.0And1.1Support.html"?>
-<title>JSP 2.0, JSTL 1.0/1.1 support</title>
-</section>
--->
-
- </section>
-
- <section id="more_editors">
-
- <title>More Editors</title>
-
- <para>Besides Visual Page Editor JBDS is supplied with a huge range of
various editors for
- different file types: properties, TLD, web.xml, tiles, and so
on.</para>
- <section id="GraphicalPropertiesEditor">
-
- <title>Graphical Properties Editor</title>
-
- <para><property moreinfo="none">The Properties
editor</property> allows you to work in two different
- modes and also supports unicode characters.</para>
-
- <para>To create a new properties file, in the Package Explorer view,
select<emphasis>
- <property moreinfo="none"> New > Properties
File</property>
- </emphasis> from the right-click context menu on the folder where
you want to create
- the file.</para>
- <figure float="0">
- <title>Selecting Properties File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can edit the file using a table-oriented
"Properties"
- viewer:</para>
-
- <figure float="0">
- <title>"Properties" Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use a Source viewer for editing the
file:</para>
- <figure float="0">
- <title>Source Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="GraphicalTLDEditor">
-
- <title>Graphical TLD Editor</title>
-
- <para><property moreinfo="none">The TLD
editor</property> comes with same features you will find in all
- other JBoss Developer Studio editors:</para>
-
- <itemizedlist>
- <listitem>
- <para>Graphical and source edit modes</para>
- </listitem>
- <listitem>
- <para>Validation and error checking</para>
- </listitem>
- </itemizedlist>
- <section id="TreeView2">
-
- <title>Tree view</title>
-
- <figure float="0">
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="SourceView1">
-
- <title>Source view</title>
-
- <para>You can easily switch from Tree to Source by selecting the
Source tab at the
- bottom of the editor.</para>
-
- <figure float="0">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can easily add a <property
moreinfo="none">new tag</property>:</para>
-
- <figure float="0">
- <title>Adding a New Tag</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_6.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also easily add a <property
moreinfo="none">new attribute</property> to an existing
- tag:</para>
- <figure float="0">
- <title>Adding a New Attribute</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_7.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Content assist is available when editing the file using the
Source
- viewer:</para>
-
- <figure float="0">
- <title>Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_8.png"
scale="65"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the Source viewer, if at any point a tag is incorrect or
incomplete, an
- error will be indicated next to the line and also in the Problems
view
- below.</para>
-
- <figure float="0">
- <title>Error Reporting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
-
-
- <section id="GraphicalWebApplicationFileEditor">
-
- <title>Graphical Web Application File (web.xml) Editor</title>
-
- <para>The Web Application File editor comes with the same features you
will find in all
- other JBoss Developer Studio editors:</para>
-
- <itemizedlist>
- <listitem>
- <para>Graphical and source edit modes</para>
- </listitem>
- <listitem>
- <para>Validation and error checking</para>
- </listitem>
- </itemizedlist>
- <section id="TreeView1">
- <title>Tree View</title>
-
- <figure float="0">
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can add any new elements right in the <property
moreinfo="none">Tree
- viewer</property>:</para>
-
- <figure float="0">
- <title>Adding New Elements</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="SourceView2">
-
- <title>Source View</title>
-
- <para>Switch to the <property
moreinfo="none">Source viewer </property>to edit the web.xml file by
- hand at any time:</para>
-
- <figure float="0">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="ContentAssist">
-
- <title>Content Assist</title>
-
- <para>Content assist is available in the Source viewer. Simply
click <emphasis>
- <property
moreinfo="none">CTRL-Space</property>
- </emphasis> anywhere in the file.</para>
-
- <figure float="0">
- <title>Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_13.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="ErrorCheckingAndValidation">
-
- <title>Errors Checking and Validation</title>
-
- <para>If errors occur anywhere in the file, small red dots will
appear next to the
- lines where the errors occurred. Also, note that the file is marked
by a small x
- in the Package Explorer view.</para>
-
- <figure float="0">
- <title>Errors Reporting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
-
- <section id="CSSEditor">
-
- <title>CSS Editor</title>
-
- <para>The <property moreinfo="none">CSS
editor</property> comes with the same features you will find in
- all other JBoss Developer Studio editors.</para>
-
- <itemizedlist>
- <listitem>
- <para>Content assist</para>
- </listitem>
- <listitem>
- <para>Validation and error checking</para>
- </listitem>
- </itemizedlist>
-
- <para>With the CSS (Cascading Style Sheet) editor, you can take
advantage of code
- prompting:</para>
-
- <figure float="0">
- <title>CSS Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_41.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <!-- <para>You can also use the Outline view next to the editor
to navigate through the CSS
- file:</para>
-
- <figure>
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_42.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- -->
-
- <para>And you can also use the Properties view next to the editor to
edit existing
- stylesheet declaration properties:</para>
-
- <figure float="0">
- <title>Properties View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_43.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- <section id="JavaScriptEditor">
-
- <title>JavaScript Editor</title>
-
- <para>The <property moreinfo="none">JavaScript
editor</property> includes a Preview viewer and a Source
- viewer. In the Source viewer, you can use code assist:</para>
-
- <figure float="0">
- <title>JavaScript Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_44.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use the Source viewer with the Outline view to
navigate around the
- file:</para>
-
- <figure float="0">
- <title>Source Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_45.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- <!-- <section id="ImageViewer">
-
- <title>Image Viewer</title>
- <para>This simple image viewer allows you to view GIF and JPEG files
individually in a
- separate window:</para>
-
- <figure>
- <title>Image Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_46.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section> -->
- <section id="XSDEditor">
-
- <title>XSD Editor</title>
-
- <para>JBoss Developer Studio comes with an <property
moreinfo="none">XSD Editor</property> for XML
- Schema files. This editor comes from the Web Tools Project (WTP) (see
<ulink
url="http://www.eclipse.org/webtools/testtutorials/gettingstarted/Ge...
Getting Started</ulink>).</para>
-
- <para>To create a new XSD file, right-click a folder in the Package
Explorer view,
- select <emphasis>
- <property moreinfo="none">New >
Other...</property>
- </emphasis> from the context menu and then select <emphasis>
- <property moreinfo="none">XML > XML
Schema</property>
- </emphasis> in the dialog box.</para>
-
- <figure float="0">
- <title>Creating New XSD file</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_47.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The XSD Editor includes two viewers for working on the file, a
Design viewer and a
- Source viewer:</para>
-
- <figure float="0">
- <title>Source Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_48.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the Design viewer, you can drill down on an element by
double-clicking on
- it:</para>
-
- <figure float="0">
- <title>Design Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_49.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Various edit options are available when you right-click an
element in the
- diagram:</para>
-
- <figure float="0">
- <title>Edit Options</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_50.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use the Properties view to edit a selected
element:</para>
-
- <figure float="0">
- <title>Properties View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_51.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use a Source viewer for the file. In this viewer,
along with direct
- editing of the source code, you can also edit the file by using the
Properties view
- on the right:</para>
-
- <figure float="0">
- <title>Source Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_52.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- <section id="SupportforXMLSchema">
-
- <title>Support for XML Schema</title>
-
- <para>JBoss Developer Studio fully supports XML files based on schemas
as well as
- DTDs:</para>
- <figure float="0">
- <title>XML File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/more_editors/more_editors_53.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
- </section>
-
-</chapter>
-
-
-<chapter id="palette"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/palette.xml"
xreflabel="palette">
- <?dbhtml filename="palette.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>Jboss Tools palette</keyword>
- <keyword>tags</keyword>
- <keyword>JSP page</keyword>
- </keywordset>
- </chapterinfo>
- <title>JBoss Tools Palette</title>
- <para>This chapter will introduce you to the functionality provided by
<property moreinfo="none">JBoss Tools
- Palette</property>. The Palette allows you to quickly and easily create
your JSP or JSF
- pages. Now you can do it more faster without additional knowledge.</para>
- <para>The <property moreinfo="none">JBoss Tools
Palette</property> allows you to:</para>
- <itemizedlist>
- <listitem>
- <para>Insert tags into a JSP or JSF page with one click</para>
- </listitem>
- <listitem>
- <para>Add custom and 3rd party tags</para>
- </listitem>
- </itemizedlist>
- <para>The JBoss Tools Palette contains a developer's project tag libraries
and provides
- possibility to add any tag libraries to it. Also you can choose a necessary one
from the
- list of already existed tag libraries:</para>
- <itemizedlist>
- <listitem>
- <para>HTML</para>
- </listitem>
- <listitem>
- <para>JBoss</para>
- </listitem>
- <listitem>
- <para>JSF</para>
- </listitem>
- <listitem>
- <para>JSTL</para>
- </listitem>
- <listitem>
- <para>MyFaces</para>
- </listitem>
- <listitem>
- <para>Oracle ADF Faces</para>
- </listitem>
- <listitem>
- <para>Struts</para>
- </listitem>
- <listitem>
- <para>XHTML</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Default View of The JBoss Tools Palette</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>By default the Palette is represented in Web Development Perspective with
five groups. If
- you can't see it, select <emphasis>
- <property moreinfo="none">Window > Show View Other...
> JBoss Tools Web > JBoss
- Tools Palette</property>
- </emphasis> from the menu bar.</para>
-
- <section id="PaletteOptions">
- <?dbhtml filename="PaletteOptions.html"?>
- <title>Palette Options</title>
- <para>To facilitate your work, you can configure the Palette in your own
way, by selecting
- the corresponding icon on the Palette toolbar.</para>
- <para>There is a possibility to configure the JBoss Tools
Palette:</para>
- <itemizedlist>
- <listitem>
- <para> to <property moreinfo="none">edit the
palette</property> content by adding, removing or
- changing the palette elements</para>
- </listitem>
- <listitem>
- <para> to <property moreinfo="none">show/hide
groups</property>, subgroups</para>
- </listitem>
- <listitem>
- <para>to <property moreinfo="none">import
groups</property>, subgroups</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Palette Buttons</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <section id="PaletteEditor">
- <?dbhtml filename="PaletteEditor.html"?>
- <title>Palette Editor</title>
- <para>JBoss Tools Palette contains existing libraries of tags, thus
the
- <property moreinfo="none">Palette
editor</property> is intended to work with them or create your
- new one, as well.</para>
- <para>To open the editor, click on the <emphasis>
- <property moreinfo="none">Palette
Editor</property>
- </emphasis> icon: <figure float="0">
- <title>Palette Editor Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </para>
- <para>The window has two parts. There is a reflected grouped list of
components on the
- left side of the palette editor. Each group is divided into multiple
groups, every
- of which is a tag library. The right side of the palette editor is an
editing window
- where it's possible to change values of group or tag library
attributes
- that you've chosen on the left part of the window. </para>
- <para>It can also be done by right click and using <emphasis>
- <property moreinfo="none">Edit…</property>
- </emphasis> option.</para>
- <literallayout class="normal"
format="linespecific"></literallayout>
- <para> For example, <property
moreinfo="none">JSF</property> group consists of
- <property moreinfo="none">Core</property>,
<property moreinfo="none">Facelets</property>, <property
moreinfo="none">HTML</property>
- tag libraries and the attributes as <property
moreinfo="none">name</property>,
- <property moreinfo="none">description</property>
and <property moreinfo="none">hidden</property> which are available
- for editing: </para>
- <figure float="0">
- <title>Tag Libraries of the JSF Group</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_24.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The Palette Editor provides the following possibilities when
working with existing
- tags or icons:</para>
- <itemizedlist>
- <listitem>
- <para>to work with a set of icons</para>
- <para><emphasis>
- <property
moreinfo="none">Icons</property>
- </emphasis> is the root folder for the icon sets. The first
step is creating
- the icon set. Right click on the <emphasis>
- <property
moreinfo="none">Icons</property>
- </emphasis> folder and select <emphasis>
- <property moreinfo="none">Create >
Create Set...</property>
- </emphasis></para>
- <para>Set the value of the name in the <emphasis>
- <property moreinfo="none">Add
Icons</property>
- </emphasis> window and click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button. A new element will appear in the
list.</para>
- <figure float="0">
- <title>Creating a Set of Icons</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Also you can delete the set. Right click on the set of
icons that you wish
- to remove and chose the <emphasis>
- <property moreinfo="none">Delete
Set</property>
- </emphasis> option from the pop-up menu or click the
<emphasis>
- <property
moreinfo="none">Delete</property>
- </emphasis> keyboard button.</para>
- </listitem>
- <listitem>
- <para>to edit icons in the chosen set</para>
- <para>When the set of icons is created, new icons can be
imported to it. Choose
- the required set and select the option <emphasis>
- <property moreinfo="none">Create >
Import Icon... </property>
- </emphasis> from the pop-up menu that appears after you
right-click on a
- folder.</para>
- <figure float="0">
- <title>Creating Icons</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_18.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Set the name of the icon and the path and click
<emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button.</para>
- </listitem>
- <listitem>
- <para>to work with a group of tag libraries</para>
- <para>The first step in work with the editor is creating a
group of libraries.
- It's very easy to do, right mouse button click on the
<emphasis>
- <property
moreinfo="none">Palette</property>
- </emphasis> folder and select <emphasis>
- <property moreinfo="none">Create >
Create Group…</property>
- </emphasis></para>
- <para>Set a name of a group in the <property
moreinfo="none">Create Group</property> window and
- click <emphasis>
- <property
moreinfo="none">OK</property>
- </emphasis> button. A new element will appear at the end of
the list.</para>
- <figure float="0">
- <title>Creating a Group of Tag Libraries</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_19.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You are allowed to edit or delete a group, as well. If
you'd like
- to change attributes of a group, use the right editing window of
the palette
- editor or the <emphasis>
- <property
moreinfo="none">Edit...</property>
- </emphasis> option, like it was mentioned before. In order
to remove the
- group, right click on the group that you wish to remove and
choose the <emphasis>
- <property
moreinfo="none">Delete</property>
- </emphasis> option or click the <emphasis>
- <property
moreinfo="none">Delete</property>
- </emphasis> keyboard button.</para>
- <important>
- <title>Important:</title>
- <para>The removal option is enabled only for custom
folders.</para>
- </important>
- </listitem>
- <listitem>
- <para>to work with a tag library</para>
- <para>The group maintains a list of tag libraries. If you'd
like to
- create your own library, click right mouse button on the group
and choose <emphasis>
- <property moreinfo="none">Create
Group…</property>
- </emphasis> option.</para>
- <figure float="0">
- <title>Creating a tag library</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_20.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>After setting the attribute name and the path of the
icon, click <emphasis>
- <property
moreinfo="none">Ok</property>
- </emphasis> button.</para>
- <note>
- <title>Note:</title>
- <para>If you do not choose an icon the default one will be
assigned.</para>
- </note>
- <para>You are allowed to edit or delete the tag library, as
well. If
- you'd like to change attributes of the library or choose
another
- icon, use the right editing window of the palette editor or the
<emphasis>
- <property
moreinfo="none">Edit...</property>
- </emphasis> option. In order to remove the tag library,
right click on the
- library that you wish to remove and chose the <emphasis>
- <property
moreinfo="none">Delete</property>
- </emphasis> option or click the <emphasis>
- <property
moreinfo="none">Delete</property>
- </emphasis> keyboard button.</para>
- <important>
- <title>Important:</title>
- <para>The removal option is enabled only for custom tag
libraries.</para>
- </important>
- </listitem>
- <listitem>
- <para>to work with a tag element</para>
- <para>When the library folder is created, new tags can be added
to it. Choose
- the required library and select the option <emphasis>
- <property moreinfo="none">Create >
Create Macro…</property>
- </emphasis> from the pop-up menu that appears after you
right-click on a
- folder.</para>
- <figure float="0">
- <title>Creating a tag element</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_21.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>In the <property moreinfo="none">Add
Palette Macro</property> window, you can configure
- the tag element. Attribute <emphasis>
- <property
moreinfo="none">Name</property>
- </emphasis> is mandatory to fill and it will be the name of
the tag element.
- Other settings are optional. You can choose the icon and set the
<emphasis>
- <property moreinfo="none">Start
Text</property>
- </emphasis> and the <emphasis>
- <property moreinfo="none">End
Text</property>
- </emphasis> for your tag element. If your tag text is too
long, use the <emphasis>
- <property
moreinfo="none">Change...</property>
- </emphasis> button to see it all. For <emphasis>
- <property moreinfo="none">start
text</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">end
text</property>
- </emphasis> there is a possibility to control the cursor
position by using
- "|" symbol.</para>
- <figure float="0">
- <title>Parameters of the Palette element</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_23.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>After all the attributes are set, click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button.</para>
- <note>
- <title>Note:</title>
- <para>If you do not choose an icon the default one will be
assigned.</para>
- </note>
- <para>You are also allowed to edit or delete the tag. If
you'd like to
- change the attributes of the tag or choose another icon for it,
use the
- right editing window of the palette editor or the
<emphasis>
- <property
moreinfo="none">Edit...</property>
- </emphasis> option from the pop-up menu. In order to remove
the tag, right
- click on the tag that you wish to remove and chose the
<emphasis>
- <property
moreinfo="none">Delete</property>
- </emphasis> option or click the <emphasis>
- <property
moreinfo="none">Delete</property>
- </emphasis> keyboard button.</para>
- <important>
- <title>Important:</title>
- <para>The removal option is enabled only for custom tags.
JBoss Palette tags
- can not be removed but can be modified.</para>
- </important>
- </listitem>
-
- </itemizedlist>
-
- <para>If you have changed any abject in the tree view and you don't
like the final result you can always use the <emphasis><property
moreinfo="none">Restore Defaults</property></emphasis> button.
Click on it will restore defaults for the object selected and for its children elements.
Please remember that the button will only restore data for objects defined in the default
palette. If selected object is created by you, the button will be disabled. Child objects
added by you will not be removed.</para>
- <para>When updating JBoss Tools the palette content is not
updated.</para>
- </section>
- <section id="show_hide">
- <?dbhtml filename="Show/Hide.html"?>
- <title>Show/Hide</title>
- <para><emphasis>
- <property moreinfo="none">Show/Hide</property>
- </emphasis> is a very useful feature that allows you to control the
number of tag
- groups that are shown on the palette.</para>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Show/Hide</property>
- </emphasis> button, at the top right side of the JBoss
Tools Palette.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Show/Hide Button</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>In the dialog Show/Hide Drawers check the groups the
libraries of which
- you want to be shown on the palette:</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Show/Hide Drawers</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>If libraries are not displayed in the palette, check whether they
are selected.
- Click the plus sign to expand the libraries of the group and make sure
that a tick
- is put next to the wanted libraries.</para>
- <!-- <para>(When you deactivate the group(s), the JBoss Palette
remembers your last chose.
- The libraries… )</para>
- -->
- <itemizedlist>
- <listitem>
- <para>Click <emphasis><property
moreinfo="none">OK</property>.</emphasis> The new groups will
- now be shown on the palette:</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>New Added Groups</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The names of the elements are compound. The first part is the
group name and the
- second is the library name.</para>
- </section>
- <section id="Import">
- <?dbhtml filename="Import.html"?>
- <title>Import</title>
- <para>The Import button lets you add a custom or 3rd party tag library
to JBoss Tools
- Palette. Find out more information on how to add particular tags see the
<link linkend="ImportButton521">Adding Custom JSF Tags</link>
section.
- <!--<link
linkend="CreatingAndWorkingCustomCapability">Learn how to
import</link>. --></para>
- </section>
- </section>
- <section id="UsingThePaletteIncludingOneClickTagInsertion">
- <?dbhtml
filename="UsingThePaletteIncludingOneClickTagInsertion.html"?>
- <title>Using the Palette</title>
- <section id="InsertingTagsIntoAJSPFile">
- <?dbhtml filename="InsertingTagsIntoAJSPFile.html"?>
- <title>Inserting Tags into a JSP File</title>
- <para>A new tag can be added into any text file including jsp, htm,
html and xhtml.</para>
- <para>Let's do it. Open your JSP file and place the cursor in a
place where
- you'd like to add a tag and then click that tag in the palette. In
the
- <property moreinfo="none">Insert Tag</property>
window, that appears, you can set the value of<emphasis>
- <property moreinfo="none">general</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">advanced</property>
- </emphasis> attributes of the tag that you chose.</para>
- <figure float="0">
- <title>Inserting Tag</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_25.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>In the example below, the <emphasis>
- <property
moreinfo="none">commandButton</property>
- </emphasis> tag has been inserted.</para>
- <figure float="0">
- <title>Inserting Tag</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/palette/palette_2.png"
scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>if you place the cursor over any tag, a balloon hint is shown
with all the
- <emphasis role="italic">
- <property
moreinfo="none">"tag"</property>
- </emphasis> attributes.</para>
- </tip>
- <para>The cursor position after adding a tag into a file is specified
by
- "|" symbol in the tag template on the right in the Palette
Editor
- window. </para>
- <figure float="0">
- <title>Palette Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para> Above you can see where the cursor position for
<emphasis>
- <property moreinfo="none">HTML > Form >
input</property>
- </emphasis> is set. Thus, after adding this tag into your file the
cursor will be in
- the attribute "type". Then, you can straight use the
combination
- of buttons <property moreinfo="none">Ctrl +
Space</property> to inquire about a prompting. </para>
- <figure float="0">
- <title>Cursor position</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/palette/palette_16.png"
scale="50"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="AddingCustomJSFTagsToTheRedHatPalette7433">
- <?dbhtml
filename="AddingCustomJSFTagsToTheJBossToolsPalette.html"?>
- <title>Adding Custom JSF Tags to the JBoss Tools Palette</title>
-
- <para>There are two ways to add any custom or 3rd party tag library to
the
- <property moreinfo="none">JBoss Tools
Palette</property>:</para>
- <itemizedlist>
- <listitem>
- <para>Drag-and-drop from the Web Projects view</para>
- </listitem>
- <listitem>
- <para>The Import button on the JBoss Tools
Palette</para>
- </listitem>
- </itemizedlist>
- <para>Before you can add your custom component library, you need to
make sure it is
- included in your project. Either place the <emphasis
role="italic">
- <property
moreinfo="none">".tld"</property>
- </emphasis> file or the <emphasis role="italic">
- <property
moreinfo="none">".jar"</property>
- </emphasis> that includes your tag library under the lib folder in
your project. </para>
- <section id="Drag_and_Drop65332">
- <?dbhtml filename="DragAndDrop.html"?>
- <title>Drag-and-Drop</title>
- <para>Switch to the Web Projects view and expand the Tag Libraries
folder. If the
- view is not active, select <emphasis>
- <property moreinfo="none">Window > Show
View > Web Projects</property>
- </emphasis> from the menu bar.</para>
- <figure float="0">
- <title>Web Projects View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Also make sure that the JBoss Tools Palette is open. Select
the tag library
- that you want to add and simply drag-and-drop it on to the JBoss
Tools Palette.</para>
- <para>You will see the following dialog window. As you can see
JBoss Developer
- Studio takes care of all the details. Chosen <emphasis>
- <property moreinfo="none">TLD
file</property>
- </emphasis>, <emphasis>
- <property moreinfo="none">name</property>
- </emphasis> and <emphasis>
- <property
moreinfo="none">prefix</property>
- </emphasis> of the library and <emphasis>
- <property moreinfo="none">Library
URL</property>
- </emphasis> are detected, thus just need to set the
<emphasis>
- <property moreinfo="none">Group</property>
- </emphasis> name to which you wish to place this tag library.
You can either add
- this tag library to an existing Group or just create a new
one.</para>
- <figure float="0">
- <title>Import Tags From TLD File Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Once you are finished, you will see the new tag library added
to the JBoss
- Tools Palette.</para>
- <figure float="0">
- <title>JBoss Tools Palette with New Tag Library</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="ImportButton521">
- <?dbhtml filename="ImportButton.html"?>
- <title>Import Button</title>
- <para>The same you can do with <emphasis>
- <property
moreinfo="none">Import</property>
- </emphasis> button. You can see this button at the top right
side of the JBoss
- Tools Palette.</para>
- <figure float="0">
- <title>Import Button</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>By clicking on the <emphasis>
- <property moreinfo="none">Import
button</property>
- </emphasis> you will see the Import Tag window a similar like
in the <link linkend="Drag_and_Drop65332"> Drag-and-Drop</link>
method. Set the name and
- prefix of the library and Library URL. Also you need to set the Group
name to
- which you'd like to add your tag library. And like in the
previous
- method you can add it to an existing Group or create a new one. On
this Import
- Tag form you can use <emphasis>
- <property
moreinfo="none">Browse...</property>
- </emphasis>button to locate the tag library that you want to
add:</para>
- <figure float="0">
- <title>Select TLD File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
- </section>
-
-</chapter>
-
-
-<chapter id="richfaces_support" role="new"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/richfaces_support.xml"
xreflabel="richfaces_support">
- <?dbhtml filename="editors.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JBDS</keyword>
- <keyword>RichFaces</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>RichFaces Support</title>
-
- <para><property moreinfo="none">JBoss Developer
Studio</property> comes with a tight integration with <ulink
url="http://labs.jboss.com/jbossrichfaces/">RichFaces component
framework</ulink>.</para>
-
- <note>
- <title>Note:</title>
- <para><ulink
url="http://www.jboss.org/jbossrichfaces/downloads/">RichFaces
- 3.3</ulink> is fully supported in the current version of <property
moreinfo="none">JBoss Developer Studio</property> (i. e. 2.0.0.GA) and
<property moreinfo="none">JBoss Tools
3.0.0.GA</property>.</para>
- </note>
-
- <para>The following features are implemented and fully supported for the
current version of the RichFaces components:</para>
-
- <itemizedlist>
- <listitem><para><link
linkend="ContentAssistForRF">Content
Assist</link></para></listitem>
- <listitem><para><link
linkend="RF_openOn">OpenOn</link></para></listitem>
- <listitem><para><link
linkend="RF_in_palette">Representing in JBoss Tools
Palette</link></para></listitem>
- </itemizedlist>
-
- <para>All you have to do is to <ulink
url="http://www.jboss.org/jbossrichfaces/downloads/">downloa...
and install RichFaces libraries into your
- project, i. e. just put <emphasis>
- <property moreinfo="none">richfaces-*.jar</property>
- </emphasis> files into the <emphasis>
- <property moreinfo="none">/lib</property>
- </emphasis> project folder. Also how to get started with <property
moreinfo="none">RichFaces</property> you can find in <ulink
url="http://jboss.org/file-access/default/members/jbossrichfaces/fre...
documentation</ulink>.</para>
-
- <section id="ContentAssistForRF">
- <title>Code Assist for RichFaces</title>
-
- <para><property moreinfo="none">JBDS/JBoss
Tools</property> indeed provide code completion for <ulink
url="http://www.jboss.org/jbossrichfaces">RichFaces</ulin... framework
- components.</para>
-
- <tip>
- <title>Tip:</title>
-
- <para>RichFaces 3.3 is now fully supported in code
completion.</para>
- </tip>
-
- <figure float="0">
- <title>Content Assist for RichFaces Components</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_29.png"
scale="65"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="RF_openOn">
- <title>OpenOn for RichFaces</title>
-
- <para>Working with <emphasis>
- <property
moreinfo="none">.jsp/.xhtml</property></emphasis> pages in
<property moreinfo="none">VPE</property> you can also take the
advantage of <emphasis>
- <property
moreinfo="none">OpenOn</property></emphasis> feature for the
<property moreinfo="none">RichFaces</property>
components.</para>
-
- <para>For example, <property
moreinfo="none">Richfaces</property> tags <emphasis>
- <property
moreinfo="none"><rich:insert></property>
- </emphasis> and <emphasis>
- <property
moreinfo="none"><a4j:include></property>
- </emphasis> has <property
moreinfo="none">OpenOn</property> support.</para>
-
- <figure float="0">
- <title>OpenOn With Richfaces Tag</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_8a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure float="0">
- <title>OpenOn With A4j Tag</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_8b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="RF_in_palette">
- <title>RichFaces in the JBoss Tools Palette</title>
-
- <para>RichFaces and Ajax4jsf tag libraries always exist in <link
linkend="palette">JBoss Tools
- Palette</link>.</para>
-
- <figure float="0">
- <title>RichFaces Components</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/palette/palette_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To insert a <property
moreinfo="none">RichFaces</property> component on a page:</para>
- <itemizedlist>
- <listitem>
- <para>expand <emphasis>
- <property moreinfo="none">JBoss
RichFaces</property>
- </emphasis> group on the palette</para>
- </listitem>
-
- <listitem>
- <para>click on some component</para>
- </listitem>
-
- <listitem>
- <para>put the needed attributes in the <emphasis>
- <property moreinfo="none">Insert
Tag</property>
- </emphasis> dialog and click <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button
- </para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Inserting Tag</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_30.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <property
moreinfo="none">RichFaces</property> component will be inserted on your
page and displayed in source and visual
- modes:</para>
-
- <figure float="0">
- <title>RichFaces Component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/editors_features/editors_features_31.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section>
- <title>Relevant Resources Links</title>
-
- <para>To get more in-depth information on <property
moreinfo="none">RichFaces</property> framework refer to <ulink
url="http://jboss.org/file-access/default/members/jbossrichfaces/fre...
Developer Guide</ulink>.</para>
- <para>It may be also helpful for you to look through the <ulink
url="http://docs.jboss.org/tools/movies/">movies</ulink> where there
are ones that demonstrate the usage of RichFaces components.</para>
- </section>
-</chapter>
-
-<chapter id="web_projects"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/web_projects.xml"
xreflabel="web_projects">
- <?dbhtml filename="web_projects.html"?>
-<title>Web Projects View</title>
-<para><property moreinfo="none">Web Projects</property> is a
special view that comes with JBoss Developer Studio.</para>
-<para>If the Web Projects view's tab is not visible next to the Package
Explorer tab, select <emphasis><property moreinfo="none">Window
> Show View > Other > JBoss Tools Web > Web
Projects</property></emphasis> from the menu bar.</para>
-<para>With the Web Projects view, you can:</para>
-
-<itemizedlist>
-<listitem><para>Visualize the project better because the project artifacts
for JSF and Struts projects are organized and displayed by
function.</para></listitem>
-<listitem>
- <para>Select these kinds of items to drag and drop into JSP
pages:</para>
- <itemizedlist>
- <listitem><para>JSF managed bean
attributes</para></listitem>
-<listitem><para>JSF navigation rules outcomes</para></listitem>
-<listitem><para>Property file values</para></listitem>
-<listitem><para>Tag library files</para></listitem>
-<listitem><para>Tags from tag libraries</para></listitem>
-<listitem><para>JSP page links</para></listitem>
-</itemizedlist>
-</listitem>
-<listitem><para>Use context menus to develop the application (all create and
edit functions are available)</para></listitem>
-<listitem><para>Use icon shortcuts to create and import JSF and Struts
projects</para></listitem>
-<listitem><para>Expand and inspect tag library
files</para></listitem>
-<listitem><para><link
linkend="AddingCustomJSFTagsToTheRedHatPalette7433">Select custom and
third-party tag libraries to drag and drop onto
-the JBoss Tools Palette</link></para></listitem>
-</itemizedlist>
-
-<section id="ProjectOrganization">
-
-<title>Project Organization</title>
-<para>The Web Projects view organizes your project in a different way. The physical
structure of course stays the same. The new organization combines common project artifacts
together which makes it simpler to
-locate what you are looking for and develop.</para>
-
-<para>The screen shot below shows a JSF project and a Struts project in Web
Projects view.</para>
-<figure float="0">
- <title>Web Projects View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-</section>
-<section id="DragAndDrop">
-
-<title>Drag and Drop</title>
- <para>Web Projects View has a drag and drop option that can be used for
property, managed bean attributes, navigation rules, tag library file declaration and JSP
Pages.</para>
-<section id="ForAProperty">
-
-<title>For a Property</title>
- <para>Expand the <property moreinfo="none">Resources
Bundles</property> folder that holds all the Property files in your project. Select
the file from which you want to add the property and then select the
property.</para>
-<para>We will be dragging and dropping a property file value inside the outputText
tag for the <emphasis role="italic"><property
moreinfo="none">"value"</property></emphasis>
attribute.</para>
-<figure float="0">
-<title>OutputText Tag</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_2.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<para>Select the property:</para>
-<figure float="0">
-<title>Selecting Property</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_3.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
- <para>Drag the property and drop it between the quotes for the value attribute
in the JSP file. Notice that JBoss Developer Studio added the correctly formatted
expression for referring to the property value <emphasis><property
moreinfo="none">#{Message.header}</property></emphasis>
automatically.</para>
- <figure float="0">
-<title>Inserted Property</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_4.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<para>You can actually place the tag anywhere in the page, not just inside an
existing tag. In this case,
- JBoss Developer Studio will place the complete tag <emphasis><property
moreinfo="none"><h:outputText
value="#{Message.header}"/></property></emphasis> in the
page.</para>
- </section>
-<section id="ForManagedBeanAttributes">
-
-<title>For Managed Bean Attributes</title>
-
-<para>Select a <emphasis role="italic"><property
moreinfo="none">"managed bean"</property></emphasis>
attribute and then drag and drop it onto the JSP page. We are going to place it inside the
<emphasis role="italic"><property
moreinfo="none">"value"</property></emphasis> attribute
of the inputText tag.</para>
-<figure float="0">
-<title>Selecting Managed Bean Attribute</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_5.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<para>Once again, JBoss Developer Studio adds the correct expression,
<emphasis>#{user.name}</emphasis>.</para>
-<figure float="0">
-<title>Added Expression</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_6.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-</section>
-<section id="NavigationRules">
-
-<title>Navigation Rules</title>
-
-<para>Select the navigation rule under <emphasis><property
moreinfo="none">Configuration > faces-config.xml > Navigation
Rules</property></emphasis>:</para>
-<figure float="0">
-<title>Selecting Navigation Rule</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_7.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<para>Drag and drop it inside the commandButton tag:</para>
-<figure float="0">
-<title>Naviagation Rule in CommandButton Tag</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_8.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<para>You could do the same if the navigation rule was defined inside an action
method:</para>
-<figure float="0">
-<title>Navigation Rule in Action Method</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_9.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<para>Here is how it would look after drag and drop:</para>
-<figure float="0">
-<title>Inserted Navigation Rule</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_10.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-</section>
-<section id="ForATagLibraryFileDeclaration">
-
-<title>For a Tag Library File Declaration</title>
-
-<para>Select a TLD file:</para>
-<figure float="0">
-<title>Selecting TLD File</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_11.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<para>Then drag and drop it onto the JSP page to add a declaration at the top of
the page:</para>
-<figure float="0">
-<title>Inserted TLD File</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_12.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-</section>
-<section id="ForJSPPages">
-
-<title>For JSP Pages</title>
-
-<para>You can also drag and drop a JSP page path to a JSP page to create a forward
as shown:</para>
-<figure float="0">
-<title>Creating JSP Forward</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/web_projects/web_projects_13.png"
scale="80"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-</section>
-</section>
-<section id="DevelopingTheApplication">
-
-<title>Developing the Application</title>
-
-<para>It is also possible to develop your application right from the Web Projects
view.
-Simply right-click any node in the tree and select an appropriate action from the context
menu. For instance, this screen capture shows creating a new navigation
rule.</para>
-<figure float="0">
-<title>Creating New Navigation Rule</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/web_projects/web_projects_14.png"
scale="90"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-</section>
-<section id="ExpandingTagLibraryFiles">
-
-<title>Expanding Tag Library Files</title>
-
-<para>You can easily expand any TLD file in the project. Browse to the Tag
Libraries folder. Right-click a TLD file and select <emphasis><property
moreinfo="none">Expand</property></emphasis>. The TLD file will
now be expanded.</para>
-
-<para>You can then select any tag and drag it onto a JSP page.</para>
-<figure float="0">
-<title>Expanding Tag Library File</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_15.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-</section>
-<section id="DragAndDropTagLibrariesOnToRedHatPalette">
-
-<title>Drag and Drop Tag Libraries on to JBoss Tools Palette</title>
-
- <para>Read <link
linkend="AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag
Libraries</link> to learn about this.</para>
-</section>
-<section id="CreateAndImportJSFAndStrutsProjects">
-<title>Create and Import JSF and Struts Projects</title>
-
-<para>You can also create and import JSF and Struts project from Web Projects view
by selecting the
-buttons below.</para>
-
-<para>From left to right:</para>
-
-<orderedlist continuation="restarts" inheritnum="ignore">
-<listitem><para>Create New JSF Project</para></listitem>
-<listitem><para>Import JSF Project</para></listitem>
-<listitem><para>Create New Struts Project</para></listitem>
-<listitem><para>Import Struts Project</para></listitem>
-</orderedlist>
-<figure float="0">
-<title>Web Projects View Buttons</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/web_projects/web_projects_16.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-</section>
-
-</chapter>
-
-<chapter id="preferences"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/preferences.xml"
xreflabel="preferences">
- <?dbhtml filename="preferences.html"?>
- <title>JBoss Tools Preferences</title>
-
- <para>Configuring the various <property moreinfo="none">JBoss
Developer Studio</property> features is done via
- the <property moreinfo="none">Preferences</property> screen
by selecting <emphasis>
- <property moreinfo="none">Window > Preferences
> JBoss Tools</property>
- </emphasis> from the menu bar.</para>
- <figure float="0">
- <title>Preferences are included in this dialog.</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>From this screen, you can select these more specific sets of <property
moreinfo="none">JBoss Tools
- preferences</property>:</para>
-
- <itemizedlist>
- <listitem>
- <para>
- <link linkend="PackagingArchives">Packaging
Archives</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="Editors">Editors</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="VisualPageEditor2">Visual Page
Editor</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="el_variables">El Variables</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="JSF">JSF</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="JSFPage">JSF Page</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="JSFPropject">JSF Propject</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="JSFFlowDiagram">JSF Flow
Diagram</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="Seam">Seam</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="SeamValidator">Seam
Validator</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="Struts">Struts</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="struts_automation">Struts
Automatic</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="Plug-inInsets">Plug-in
Insets</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="ResourceInsets">Resource
Insets</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="StrutsCustomization">Struts
Customization</link>
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- <link linkend="StrutsProject">Struts
Project</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="StrutsSupport">Struts
Support</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="StrutsPages">Struts Pages</link>
- </para>
- </listitem>
-
- <listitem>
- <para>
- <link linkend="StrutsFlowDiagram">Struts Flow
Diagram</link>
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- <link linkend="tiles_diagram">Tiles Diagram</link>
- </para>
- </listitem>
- <listitem>
- <para>
- <link linkend="Verification">Verification</link>
- </para>
- </listitem>
- </itemizedlist>
-
- <para>The <property
moreinfo="none">Preferences</property> dialog <emphasis>(
<property moreinfo="none">Window >
- Preferences</property>) </emphasis> also allows to adjust
settings for <link linkend="JBossServerPreferences">JBoss
Server</link> and <link linkend="XDoclet">XDoclet</link>
module.</para>
-
- <section id="PackagingArchives">
- <?dbhtml filename="PackagingArchives.html"?>
- <title>Packaging Archives</title>
-
- <para>Fallow to <emphasis>
- <property moreinfo="none">JBoss Tools > Packaging
Archives</property>
- </emphasis> to open the page for changing Packaging Archives
preferences.</para>
- <para>Here you can determine settings for Project Packages view and core
preferences.</para>
-
- <figure float="0">
- <title>Packaging Archives</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The next table lists all available preferences for Packaging Archives
and their
- description.</para>
-
- <table>
- <title>Packaging Archives Preferences</title>
-
- <tgroup cols="3">
-
- <colspec align="left" colnum="1"
colwidth="2*"></colspec>
- <colspec colnum="2"
colwidth="4*"></colspec>
- <colspec colnum="3"
colwidth="2*"></colspec>
-
- <thead>
- <row>
- <entry>Option</entry>
- <entry>Description</entry>
- <entry>Default</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>Enable incremental builder</entry>
- <entry>Uncheck this option if you don't want to enable
incremental
- builder for your resources</entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Show full output path next to
packages</entry>
- <entry>This option allows you to show or hide an output
path next to
- packages
- <!--(<link
linkend="full_outputpath_for_packages">See the
- figure</link>)-->.</entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Show the full root directory of
filesets</entry>
- <entry>If on, the full root directory is displayed next to
filesets.
- Otherwise, it's hidden
- <!--(<link
- linkend="full_rootdir_for_filesets">See the
figure</link>)-->.</entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Show project at the root</entry>
- <entry>This option allows you to choose whether to display
a project name at
- the root of the packages or not. When checked, 'Show all
- projects that contain packages' is enabled
- <!--(<link
- linkend="project_at_the_root">See the
figure</link>)-->.</entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Show all projects that contain
packages</entry>
- <entry>Selecting this setting enables the Projects
Archiving view to show or
- hide all projects that contain packages. The option is
available when
- the previous one is checked.</entry>
- <entry>Off</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <!--
- <figure id="full_outputpath_for_packages">
- <title>Show Full Output Path next to Packages</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure id="full_rootdir_for_filesets">
- <title>Show the Full Root Directory of Filesets</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure id="project_at_the_root">
- <title>Show Project at the root</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
--->
-
- </section>
-
- <!--section id="CodeAssist">
- <?dbhtml filename="CodeAssist.html"?>
- <title>CodeAssist</title>
- <para>Select <emphasis>
- <property>JBoss Tools > XDoclet > Code
Assist</property>
- </emphasis> to see Code Assist preference page.</para>
- <para>Here is what the Code Assist preference page looks like:
</para>
- <figure>
- <title>CodeAssist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section-->
-
- <section id="Editors">
- <?dbhtml filename="Editors.html"?>
- <title>Editors</title>
- <para>To adjust settings common for all editors supplied with <property
moreinfo="none">JBoss Developer
- Studio</property> you should select <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Editors</property>.</emphasis></para>
-
- <figure float="0">
- <title>Editors</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the Editors page the following preferences are
available:</para>
-
- <table>
-
- <title>Editors Preferences</title>
- <tgroup cols="3">
-
- <colspec align="left" colnum="1"
colwidth="2*"></colspec>
- <colspec colnum="2"
colwidth="4*"></colspec>
- <colspec colnum="3"
colwidth="2*"></colspec>
-
- <thead>
- <row>
- <entry>Option</entry>
- <entry>Description</entry>
- <entry>Default</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>Always use JBoss Tools editors with Open
option</entry>
- <entry></entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Show warning when project has no JBoss Tools
capabilities</entry>
- <entry>Check this option to be sure that any JBoss Tools
editor fully
- available for a particular type of file. If no, you'll
be
- warned about this.</entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Use Source tab as a default for multi-tab
editors</entry>
- <entry>If on, an editor will open the files in the Source
view by
- default</entry>
- <entry>Off</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- </section>
-
- <section id="VisualPageEditor2">
- <?dbhtml filename="VisualPageEditor.html"?>
- <title>Visual Page Editor</title>
- <para><emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Editors > Visual Page
- Editor</property>
- </emphasis> screen allows you to control some aspects of the behavior
of the
- <property moreinfo="none">Visual Page
Editor</property> (VPE) for JSF/HTML files.</para>
- <figure float="0">
- <title>Visual Page Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The next table lists the possible settings that you can adjust on
the
- <property moreinfo="none">General tab</property> of
the VPE Preferences page.</para>
-
-
- <table>
-
- <title>VPE Preferences</title>
- <tgroup cols="3">
-
- <colspec align="left" colnum="1"
colwidth="2*"></colspec>
- <colspec colnum="2"
colwidth="4*"></colspec>
- <colspec colnum="3"
colwidth="2*"></colspec>
-
- <thead>
- <row>
- <entry>Option</entry>
- <entry>Description</entry>
- <entry>Default</entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>Show Border for Unknown Tags</entry>
- <entry>The option allows to place the border around unknown
tags or undo
- this</entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Show Non-Visual Tags</entry>
- <entry>Check this box, if you want the editor shows
non-visual elements on
- the page you're editing</entry>
- <entry>Off</entry>
- </row>
-
- <row>
- <entry>Show Resource Bundles Usage as EL Expressions
</entry>
- <entry>If the option is checked, the editor will show EL
expressions instead
- of the resource values</entry>
- <entry>Off</entry>
- </row>
-
- <row>
- <entry>Always Prompts for Tag Attributes During Tag Insert
</entry>
- <entry>Having this option off, the dialog with possible
attributes for
- inserting tag won't appear if all its attributes are
optional</entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Show Selection Tag Bar</entry>
- <entry>This option allows to show or hide the Selection
Bar</entry>
- <entry>On</entry>
- </row>
-
- <row>
- <entry>Always Hide Selection Bar Without
Prompt</entry>
- <entry>Check this box if you don't want the
confirmation window
- appears when closing the Selection Bar</entry>
- <entry>Off</entry>
- </row>
-
- <row>
- <entry>Default Editor Tab</entry>
- <entry>The option provides with a possibility to choose one
of the following
- views - Visual/Source, Source or Preview, as default when
opening the
- editor</entry>
- <entry>Visual/Source</entry>
- </row>
-
- <row>
- <entry>Size of Visual Editor Pane 0 – 100% </entry>
- <entry>With the help of this scroll bar you can adjust the
percentage rating
- between the Source and Visual modes of the Visual/Source
view</entry>
- <entry>50%</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <para>On the <property moreinfo="none">Templates
tab</property> you can edit or remove <link
linkend="vpe_templating">VPE templates</link>.</para>
- <figure float="0">
- <title>Visual Page Editor Templates</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select a template for editing from the available list and press
<emphasis>
- <property moreinfo="none">Edit</property>
- </emphasis> button. It will pick up the <link
linkend="template_dialog">Template
- dialog</link> where you can adjust new settings.</para>
- </section>
-
- <section id="el_variables">
- <?dbhtml filename="el_variables.html"?>
- <title>El Variables</title>
- <para>To specify necessary EL variables globally, i. e. for all projects
and resources in
- your workspace, you should go to <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> El Variables</property>. </emphasis></para>
-
- <figure float="0">
- <title>El Variables</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click <emphasis>
- <property moreinfo="none">Add...</property>
- </emphasis> to set value for a new EL variable. In the appeared wizard
you should
- specify the global values and press <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis>.</para>
-
- <figure float="0">
- <title>Adding a Global El Variable</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>If you specify an equal variable in <link
linkend="el_exp_para">VPE EL
- dialog</link> and in Preference EL dialog, variable from
preference dialog will
- have priority.</para>
- </tip>
- </section>
- <!--section id="JBossServers">
- <?dbhtml filename="JBossServers.html"?>
- <title>JBoss Servers</title>
- <para>The following preferences can be changed on the <emphasis>
- <property>JBoss Tools > JBoss Servers</property>
- </emphasis> preference page.</para>
- <para>Here is what the JBoss Servers preference page looks
like:</para>
- <figure>
- <title>JBoss Servers</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section-->
-
- <section id="JSF">
- <?dbhtml filename="JSF.html"?>
- <title>JSF</title>
- <para>Select <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> JSF</property>
- </emphasis> to get to the JSF Project specific
preferences.</para>
- <figure float="0">
- <title>JSF</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="JSFPage">
- <?dbhtml filename="JSF Page.html"?>
- <title>JSF Pages</title>
- <para>By selecting <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> JSF > JSF Pages</property>
- </emphasis> you can add jsf pages or remove existing
ones.</para>
- <figure float="0">
- <title>JSF Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="JSFPropject">
- <?dbhtml filename="JSFPropject.html"?>
- <title>JSF Project</title>
- <para>Select <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> JSF > Project</property>
- </emphasis> to see JSF Project preferences page.</para>
- <para>On the <emphasis>
- <property moreinfo="none">New Project</property>
- </emphasis> tab you can set default values for <ulink url="
../../jsf_tools_ref_guide/html_single/index.html#new_jsf_project">New JSF
Project</ulink> wizard:</para>
-
- <itemizedlist>
- <listitem>
- <para><emphasis>
- <property
moreinfo="none">Version</property>
- </emphasis> for setting the default JSF
Environment</para>
- </listitem>
-
- <listitem>
- <para><emphasis>
- <property moreinfo="none">Project
Template</property>
- </emphasis> so as <property moreinfo="none">New
JSF Project wizard</property> shows this
- template as default for the chosen JSF Environment</para>
- </listitem>
-
- <listitem>
- <para><emphasis>
- <property moreinfo="none">Project
Root</property>
- </emphasis> for specifying default location for a new JSF
project</para>
- <para>If you check <emphasis>
- <property moreinfo="none">Use Default
Path</property>
- </emphasis> here, this box will be also checked in the
<property moreinfo="none">New JSF Project
- wizard</property>.</para>
- </listitem>
-
- <listitem>
- <para><emphasis>
- <property moreinfo="none">Servlet
Version</property>
- </emphasis> for setting the default Servlet version of a new
JSF project</para>
- <para>Here it's also possible to define whether to register Web
Context in <emphasis>
- <property
moreinfo="none">server.xml</property>
- </emphasis> while organizing a new project or not. Check the
proper box in order
- to do that.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>New JSF Propject Preferences</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the <emphasis>
- <property moreinfo="none">Import
Project</property>
- </emphasis> tab in the JSF Project screen you can determine the default
Servlet version
- for the <ulink url="
../../Exadel-migration/html_single/index.html#import_jsf_screen">Import JSF
Project</ulink>
- wizard and also whether to register Web Context in <emphasis>
- <property moreinfo="none">server.xml</property>
- </emphasis> or not.</para>
-
- <figure float="0">
- <title>Import JSF Propject Preferences</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="JSFFlowDiagram">
- <?dbhtml filename="JSFFlowDiagram.html"?>
- <title>JSF Flow Diagram</title>
- <para>Selecting <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Editors > JSF Flow Diagram</property>
- </emphasis> allows you to specify some aspects of the Diagram mode of
the JSF
- configuration file editor.</para>
-
- <figure float="0">
- <title>JSF Flow Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_15.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The first two items control the background grid for the diagram. The
next two items
- allow you to control the appearance of the labels for views (pages) and the
transitions
- between views. For these two items, clicking the <emphasis>
- <property moreinfo="none">Change... </property>
- </emphasis>button allows you to assign a font with a dialog
box.</para>
-
- <para>The first check box determines whether a view in the diagram that
doesn't have a
- transition connecting it to another view yet should be written to the source
code as a
- partial navigation rule. The next check box determines whether the diagram
cursor
- reverts immediately to the standard selection mode after it's used in
the
- transition-drawing mode to draw a transition. Finally, the last two check
boxes concern
- shortcuts. A shortcut is a transition that is there but isn't actually
displayed in the
- diagram as going all the way to the target view it's connected to, in
order to make the
- diagram clearer. With the check boxes, you can decide whether to display a
small
- shortcut icon as part of the shortcut and also whether to display the target
view as a
- label or not.</para>
- <figure float="0">
- <title>Add View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_16.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Selecting the Add Page tab in the JSF Flow Diagram screen allows you
to determine the
- default template and file extension for views (pages) you add directly into
the diagram
- using a context menu or the view-adding mode of the diagram
cursor.</para>
- </section>
-
- <section id="label_decorations">
- <title>Label Decorations</title>
-
- <para>The Label Decorations page is opened from <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Label Decorations</property>. </emphasis></para>
-
- <figure float="0">
- <title>Label Decorations</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On this page you can determine the format for a text output near the
decoration label
- for different Web resources. To change the value for selected element, click
<emphasis>
- <property moreinfo="none">Add
Variable...</property>
- </emphasis> button next to <emphasis>
- <property moreinfo="none">Format</property>
- </emphasis> field. Appeared wizard will prompt you to select one from
the available
- list.</para>
-
- <figure float="0">
- <title>Label Decoration for Validator</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_18.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="Seam">
- <?dbhtml filename="Seam.html"?>
- <title>Seam</title>
- <para>The following preferences can be changed on the <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Seam</property>
- </emphasis> page.</para>
- <para>On <emphasis>
- <property moreinfo="none">Seam</property>
- </emphasis> screen you can add and remove Seam runtimes.</para>
- <para>Here is what Seam preference page looks like:</para>
- <figure float="0">
- <title>Seam</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_19.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="SeamValidator">
- <?dbhtml filename="SeamValidator.html"?>
- <title>Seam Validator</title>
- <para>The following preferences can be changed on the <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Seam > Validator</property>
- </emphasis> page.</para>
- <para>In <emphasis>
- <property moreinfo="none">Validator</property>
- </emphasis> panel you configure seam problems that will be processed
by
- validator.</para>
- <figure float="0">
- <title>Seam Validator</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_20.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="Struts">
- <?dbhtml filename="Struts.html"?>
- <title>Struts</title>
- <para>By selecting <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Struts</property>
- </emphasis> you can configure Struts projects specific
preferences.</para>
- <figure float="0">
- <title>Struts</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_21.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="struts_automation">
- <?dbhtml filename="struts_automation.html"?>
- <title>Struts Automation</title>
- <para>On <emphasis>
- <property moreinfo="none">Automation</property>
- </emphasis> panel you can modify default text for the Tilel Struts
plug-in element, the
- Validator Struts plug-in element, and error message resource
files.</para>
- <figure float="0">
- <title>Struts Automatic</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_22.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="Plug-inInsets">
- <?dbhtml filename="Plug-inInsets.html"?>
- <title>Plug-in Insets</title>
- <para>By selecting <emphasis>
- <property moreinfo="none">Web > Struts >
Automation > Plug-in Insets</property>
- </emphasis> on tab Tiles you can define a default text for tiles
plugin.</para>
- <figure float="0">
- <title>Plug-in Insets</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_23.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The same is done but for validator plugin on the tab
Validators.</para>
- <figure float="0">
- <title>Plug-in Insets of Validators</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_24.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="ResourceInsets">
- <?dbhtml filename="ResourceInsets.html"?>
- <title>Resource Insets</title>
- <para>To see Resource Insets preference page select <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Strats > Automation > Resource Insets</property>
- </emphasis>.</para>
- <para>On <emphasis>
- <property moreinfo="none">Resource
Insets</property>
- </emphasis> panel you determine default error messages for error
resource files.</para>
- <figure float="0">
- <title>Resource Insets</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_25.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="StrutsCustomization">
- <?dbhtml filename="StrutsCustomization"?>
- <title>Struts Customization</title>
- <para>The following preferences can be changed on the <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Struts > Customization</property>
- </emphasis> page.</para>
- <para>In the<emphasis>
- <property moreinfo="none">Customization</property>
- </emphasis> screen you configure Link Recognizer for Struts
tags.</para>
- <figure float="0">
- <title>Struts Customization</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_26.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="StrutsProject">
- <?dbhtml filename="StrutsProject.html"?>
- <title>Struts Project</title>
- <para>You can change the following preferences on the <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Struts > Project</property>
- </emphasis> preference page:</para>
- <para>On <emphasis>
- <property moreinfo="none">Project</property>
- </emphasis> panel you define a template for a new Struts created
project: servlet
- version, page template and so on.</para>
- <figure float="0">
- <title>Struts Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_27.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Selecting the Import Project tab in the Struts Project screen allows
you to determine
- the default servlet version and whether to register Web Context in
server.xml.</para>
- <figure float="0">
- <title>Import Struts Pages</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_28.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="StrutsSupport">
- <?dbhtml filename="StrutsSupport.html"?>
- <title>Struts Support</title>
- <para>The following preferences can be changed on the <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Struts > Project > Struts Support</property>
- </emphasis> page.</para>
- <para>Select <emphasis>
- <property moreinfo="none">Struts
Support</property>
- </emphasis> screen if you want to configure Struts versions support
settings.</para>
- <figure float="0">
- <title>Struts Support</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_29.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="StrutsPages">
- <?dbhtml filename="StrutsPages.html"?>
- <title>Struts Pages</title>
- <para>You can change the following preferences on the JBoss Tools >
Web > Struts > Struts
- Pages preference page.</para>
- <para>On <emphasis>
- <property moreinfo="none">Struts Pages</property>
- </emphasis> panel you can add or remove Struts pages.</para>
- <figure float="0">
- <title>Struts Pages</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_30.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="StrutsFlowDiagram">
- <?dbhtml filename="StrutsFlowDiagram.html"?>
- <title>Struts Flow Diagram</title>
- <para>Similarly to the JSF Flow Diagram screen, selecting <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Editor > Struts Flow Diagram</property>
- </emphasis> page allows you to specify aspects of the Diagram mode of
the Struts
- configuration file editor. The Struts Flow Diagram screen adds an option to
hide the
- Diagram tab and labeling settings for additional artifacts. </para>
- <figure float="0">
- <title>Struts Flow Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_31.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Selecting the Add Page tab in the Struts Flow Diagram screen allows
you to determine
- the default template and file extension for views (pages) you add directly
into the
- diagram using a context menu or the view-adding mode of the diagram
cursor.</para>
- <figure float="0">
- <title>Adding Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_32.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="tiles_diagram">
- <?dbhtml filename="titles_diagram.html"?>
- <title>Tiles Diagram</title>
- <para><emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Editors > Title Diagram</property>
- </emphasis> screen allows you control some settings for the placement
of Tiles
- definitions in the Diagram mode of the JBoss Tools Tiles
editor.</para>
- <figure float="0">
- <title>Title Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_33.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="Verification">
- <?dbhtml filename="Verification.html"?>
- <title>Verification</title>
- <para>The following preferences can be changed on the <emphasis>
- <property moreinfo="none">JBoss Tools > Web
> Verification</property>
- </emphasis> page.</para>
- <para>On Rules Configuration tab of <emphasis>
- <property moreinfo="none">Verifcation</property>
- </emphasis> panel you can determine JSF and Struts rules.</para>
- <figure float="0">
- <title>Verification</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_34.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>On Options tab you can define a limit for the reported errors
number.</para>
- <figure float="0">
- <title>Options of Verification</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_35.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="JBossServerPreferences">
- <?dbhtml filename="View.html"?>
- <title>Server Preferences</title>
- <para>Preferences for <property moreinfo="none">JBoss
Server</property> and other servers can be changed on
- the <emphasis>
- <property moreinfo="none">Server</property>
- </emphasis> page.</para>
-
- <figure float="0">
- <title>Server Preferences</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_36.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the <emphasis>
- <property moreinfo="none">Server > Runtime
Environments</property>
- </emphasis> page you can add new or modify already defined Server
Runtime.</para>
-
- <figure float="0">
- <title>Runtime Environments</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_37.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Server Launching preferences can be configured on the
<emphasis>
- <property moreinfo="none">Server >
Launching</property>
- </emphasis> page.</para>
-
- <figure float="0">
- <title>Server Launching Preferences</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_38.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Going to <emphasis>
- <property moreinfo="none">Server >
Audio</property>
- </emphasis> you can enable/disable the sound notification for different
Server states
- and actions and set the sound volume as well.</para>
-
- <figure float="0">
- <title>Sound Notification Adjustment</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_40.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="XDoclet">
- <?dbhtml filename="XDoclet.html"?>
- <title>XDoclet</title>
- <para>The preferences for XDoclet can be changed if you click
<emphasis>
- <property moreinfo="none">XDoclet</property>
- </emphasis> on the left navigation bar.</para>
- <para>On the <emphasis>
- <property moreinfo="none">XDoclet</property>
- </emphasis> screen it's possible to enable/disable XDoclet builder
by checking
- proper box, specify XDoclet home and determine XDoclet module version as
well.</para>
-
- <figure float="0">
- <title>XDoclet</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_41.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Switch to <emphasis>
- <property moreinfo="none">XDoclet >
ejbdoclet</property>
- </emphasis> page in order to adjust settings for EJB-specific
sub-tasks.</para>
-
- <figure float="0">
- <title>ejbdoclet</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_42.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To configure settings for various web-specific XDoclet sub-tasks,
follow to <emphasis>
- <property moreinfo="none">XDoclet >
webdoclet</property>
- </emphasis> page.</para>
-
- <figure float="0">
- <title>webdoclet</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_43.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the whole, this document should guide you to those parts of
<property moreinfo="none">JBoss
- Tools</property> which you specifically need to develop Web
Applications. It covers
- different aspects of visual components such as editors, views, etc. for
browsing,
- representing and editing web resources you are working with.</para>
-
- <para>If there's anything we didn't cover or you can't figure
- out, please feel free to visit our <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Developer Studio Users Forum</ulink> or <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Tools Users Forum</ulink> to ask questions. There we are also looking for
- your suggestions and comments.</para>
- </section>
-
- <!--section id="XDocletTemplates">
- <?dbhtml filename="XDocletTemplates.html"?>
- <title>XDoclet Templates</title>
- <para>To see what XDoclet tags templates available for completion select
<emphasis>
- <property>JBoss Tools > XDoclet > Code Assist >
Templates</property>
- </emphasis>.</para>
- <figure>
- <title>XDoclet Templates</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_32.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>By right clicking on any tree element you can add a new template,
remove or rename it
- and also add a new tree.</para>
- <para>Select, for example, <emphasis>
- <property>Add</property>
- </emphasis> and you'll be prompted by a list of available
elements to
- add.</para>
- <figure>
- <title>Add New XDoclet Template</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_33.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>By double-clicking some element a new list will be shown: now for
available
- methods.</para>
- <figure>
- <title>Select New Element</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_34.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Choose any element from the list, then select an
attribute.</para>
- <figure>
- <title>Select New Element</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_35.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>It will be added to the available templates.</para>
- <figure>
- <title>Select New Element</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_36.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="XDocletsVariables">
- <?dbhtml filename="XDocletsVariables.html"?>
- <title>XDoclets Variables</title>
- <para>By selecting <emphasis>
- <property>JBoss Tools > XDoclet >
Variables</property>
- </emphasis> you define variables used in templates.</para>
- <figure>
- <title>XDoclets Variables</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_37.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="ChangingDefaultEnvironmentDuringProjectCreation">
- <?dbhtml
filename="ChangingDefaultEnvironmentDuringProjectCreation.html"?>
- <title>Changing Default Environment During Project Creation</title>
-
- <para>To change the default environment and project template for either JSF
or Struts new
- project creation:</para>
-
- <orderedlist>
- <listitem>
- <para>Select<emphasis>
- <property> Window > Preferences > JBoss Tools
> Web
- > {JSF or Struts} > Project</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>For Version set the environment you want to be the default
one</para>
- </listitem>
- <listitem>
- <para>For Project Template set the template you want to be the
default one</para>
- </listitem>
- </orderedlist>
-
- <figure>
- <title>Changing Enviroment Template</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_36.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="ChangingDefaultProjectTemplateDuringProjectCreatio8n">
- <?dbhtml
filename="ChangingDefaultEnvironmentDuringProjectCreation.html"?>
- <title>Changing Default Project Template During Project
Creation</title>
-
- <para>To change the default project template for either JSF or Struts new
project
- creation:</para>
-
- <orderedlist>
- <listitem>
- <para>Select<emphasis>
- <property> Window > Preferences > JBoss Tools >
Web > {JSF or Struts} >
- Project</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>For Project Template set the template you want to be the
default one</para>
- </listitem>
- </orderedlist>
-
- <figure>
- <title>Changing Project Template</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/preferences/preferences_37.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
--->
-</chapter>
-
-</book>
+]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Visual Web Tools Reference Guide</title>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 2.0.0.GA
+ </releaseinfo>
+<abstract>
+ <title></title>
+ <para>
+ <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/pdf/Vi...
version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+<toc></toc>
+
+
+<chapter id="Visual_Web_Tools"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml"
xreflabel="Visual_Web_Tools">
+ <?dbhtml filename="Visual_Web_Tools.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Java</keyword>
+ <keyword>Web Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Visual Web Tools</title>
+
+ <para>This guide covers the usage of Visual Web Tools in <property
moreinfo="none">JBoss Developer
+ Studio</property> and <property moreinfo="none">JBoss
Tools</property>. The difference between these products is
+ that JBoss Tools are just a set of Eclipse plugins where JBoss Developer Studio adds
the following functionality:</para>
+ <itemizedlist>
+ <listitem>
+ <para>an installer</para>
+ </listitem>
+ <listitem>
+ <para>Eclipse and Web Tools preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>JBoss EAP with JBoss AS and Seam preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>3rd party plugins bundled and configured</para>
+ </listitem>
+ <listitem>
+ <para>access to RHEL and Red Hat Network</para>
+ </listitem>
+ <listitem>
+ <para>access to the JBoss/Red Hat supported software</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>For additional information, please visit the JBoss Developer Studio home
page at: <ulink
url="http://www.jboss.com/products/devstudio">http://www.jbo...
+
+ <para>In JBoss Tools there is an extensive collection of specialized wizards,
editors and views
+ that can be used in various scenarios while developing Web applications. The following
chapters
+ walk through these features.</para>
+
+ <section id="key_features">
+ <title>Key Features of Visual Web Tools</title>
+ <para>Here is the table of the main features of Visual Web Tools:</para>
+
+ <table>
+
+ <title>Key Functionality for Visual Web Tools</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1"
colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+ <colspec align="left" colnum="3"
colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Visual Page Editor</entry>
+ <entry>Powerful and customizable visual page editor. Possibility to develop
an application
+ using any web technology: jsf, seam, struts, jsp, html and others. Developing
using four
+ tabs: visual/source, visual, source and preview. Fast and easy switching between
these tabs.
+ Split screen design of visual and source views. Full and instant synchronization
between
+ source and visual views. Integration with properties and outline views. Graphical
toolbar to
+ add inline styling to any tag.</entry>
+ <entry>
+ <link linkend="visual_page">visual page editor</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>JBoss Tools Palette</entry>
+ <entry>Organizing various tags by groups, inserting tags into a jsp or xhtml
page with one
+ click, adding custom or 3rd party tag libraries into the palette, easy controling
the number
+ of tag groups shown on the palette.</entry>
+ <entry>
+ <link linkend="palette">jboss tools palette</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Web Projects View</entry>
+ <entry>Visualizing and displaying projects by function. Easy selecting of
different kinds of
+ items and dropping them into jsp pages. Using context menus to develop the
application. Using
+ icon shortcuts to create and import JSF and Struts projects. Expanding and
inspecting tag
+ library files. Selecting custom and third-party tag libraries to drag and drop
onto the JBoss
+ Tools Palette.</entry>
+ <entry>
+ <link linkend="web_projects">web projects view</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>OpenOn</entry>
+ <entry>Easy navigation between views and other parts of your
projects.</entry>
+ <entry>
+ <link
linkend="OpenOnSelection4Hyperlinknavigation">openOn</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Content Assist</entry>
+ <entry>Code completion proposals while working with html, java, JavaScript ,
xml, jsp, xhtml, xhtml, seam project
+ and jsf configuration files. Content assist based on project data (dynamic code
assist); with
+ graphical editor. Code completion for values from property files, beans attributes
and
+ methods, navigation rule outcomes and jsf variables.</entry>
+ <entry>
+ <link
linkend="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">content
assist</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Drag-and-Drop</entry>
+ <entry>Possibility of inserting any tag onto the page you are editing by just
drag-and-droping
+ it from the palette to this page. Adding any properties, managed bean attributes,
navigation
+ rules, tag library file declarations, jsp files from web projects view by clicking
them and
+ draging to source code.</entry>
+ <entry>
+ <link linkend="visual_page">visual page editor</link>
+ <link linkend="DragAndDrop">drag-and-drop</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>RichFaces Support</entry>
+ <entry>Tight integration between JBDS and <ulink
url="http://www.jboss.org/jbossrichfaces">RichFaces</ulin... frameworks.
Easy managing RichFaces
+ components in any web application. Support for RichFaces and Ajax4jsf libraries in
JBoss
+ Tools Palette. Rendering RichFaces components in Visual Page
Editor.</entry>
+ <entry>
+ <link linkend="RichFacesSupport"> RichFaces support</link>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+<section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink
url="http://www.jboss.com/products/devstudio/docs">here</...
+ <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
+</section>
+
+</chapter>
+
+
+<chapter id="springTools"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/spring_tools.xml">
+ <?dbhtml filename="springTools.html"?>
+ <title>Spring Tools</title>
+
+ <para>JBoss Developer Studio is bundled with <ulink
url="http://springide.org/project">Spring IDE</ulink> for Eclipse.
+ Visit Spring IDE site for the latest versions and documentation.</para>
+
+
+ <section>
+ <title><ulink
url="http://springide.org/project/wiki/SpringideGuide">Spring IDE
guide</ulink></title>
+
+ <para><ulink
url="http://springide.org/project">Spring
IDE</ulink> is a graphical user interface for the configuration files used by the
<ulink
url="http://www.springframework.org/">Spring
Framework</ulink>. It's built as a set of plugins for the Eclipse
platform.</para>
+
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#AddProjectNatu...
Spring Project
Nature</ulink></title><para></para></section>
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#CreateNewProje...
New Spring Project</ulink></title><para></para></section>
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#AddProjectRefe...
References To Other Spring
Projects</ulink></title><para></para></section>
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#AddBeansConfig...
Spring Beans Config
Files</ulink></title><para></para></section>
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#CreateBeansCon...
Spring Beans Config
Sets</ulink></title><para></para></section>
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#OpenSpringExpl...
Spring Explorer</ulink></title><para></para></section>
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#ValidateBeansC...
Spring Beans Config</ulink></title><para></para></section>
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#OpenBeansGraph...
Spring Beans Graph</ulink></title><para></para></section>
+ <section><title><ulink
url="http://springide.org/project/wiki/SpringideGuide#SearchBeans&qu...
Spring Beans</ulink></title><para></para></section>
+
+ </section>
+
+ </chapter>
+
+
+<chapter id="jbds_editors" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/editors.xml"
xreflabel="jbds_editors">
+ <?dbhtml filename="editors.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Editor</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Editors</title>
+
+ <para>In the <ulink
url="../../jsf_tools_ref_guide/html_single/index.html">JSF Tools Reference
Guide</ulink> and <ulink
url="../../struts_tools_ref_guide/html_single/index.html">Struts Tools
Reference Guide</ulink> you had possibility to
+ read about Graphical Editor for <ulink
url="../../jsf_tools_ref_guide/html_single/index.html#jsf_config_file">JSF</ulink>
+ and <ulink
url="../../struts_tools_ref_guide/html_single/index.html#struts_config_editor">Struts</ulink>
configuration
+ files, <ulink
url="../../struts_tools_ref_guide/html_single/index.html#GraphicalEditorForTilesFiles132">Graphical
Editor for
+ Tiles Files</ulink>, <ulink
url="../../struts_tools_ref_guide/html_single/index.html#GraphicalEditorForStrutsValidationFiles86">Graphical
Editor for
+ Struts Validation Files</ulink>. All these editors have <link
linkend="OpenOnSelection4Hyperlinknavigation">
+ <property moreinfo="none">OpenOn</property>
+ </link> and <link
linkend="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
+ <property moreinfo="none">Content Assist</property>
+ </link> features, which are described in more details in this document. In
addition you get
+ to know a <link linkend="visual_page">Visual Page
Editor</link> for combined visual and
+ source editing of Web pages and many <link
linkend="more_editors">other editors</link> for
+ different types of files.</para>
+
+ <section id="editors_features">
+
+ <title>Editors Features</title>
+ <para>JBoss Developer Studio has powerful editor features that help you
easily navigate
+ within your application and make use of content and code assist no matter
what project
+ file (jsp, xhtml, xml, css, etc...) you are working on.</para>
+
+ <section id="OpenOnSelection4Hyperlinknavigation">
+
+ <title>OpenOn</title>
+
+ <para><property moreinfo="none">OpenOn</property>
lets you easily link directly from one resource to
+ another in your project without using the Package Explorer view (project
tree). With
+ OpenOn, you can simply use <emphasis>
+ <property moreinfo="none">F3</property>
+ </emphasis> or <emphasis>
+ <property
moreinfo="none">Ctrl+Click</property>
+ </emphasis> on a reference to another file and the file will be
opened.</para>
+
+ <para>OpenOn is available for the following files:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <link linkend="XMLFiles232">XML
files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="JSPPages223">JSP/XHTML
Pages</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Java files</para>
+ </listitem>
+ </itemizedlist>
+ <section id="XMLFiles232">
+
+ <title>XML Files</title>
+
+ <para>Press and hold down the Ctrl key. As you move the mouse
cursor over different
+ file references in the file, they display an underline. When you
hover the name
+ of the file you want to open, click and the file will open in its own
editor. In
+ this example the managed bean NameBean will open.</para>
+ <figure float="0">
+ <title>NameBean Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This is the result of using OpenOn.</para>
+ <figure float="0">
+ <title>NameBean Java Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can also use OpenOn with defined
attributes.</para>
+ <figure float="0">
+ <title>OpenOn With Defined Attributes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can also open any JSP pages.</para>
+ <figure float="0">
+ <title>JSP Page OpenOn</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="JSPPages223">
+
+ <title>JSP Pages</title>
+
+ <para><property
moreinfo="none">OpenOn</property> is also very useful in JSP pages. It
will allow
+ you to quickly jump to the reference instead of having to hunt around
in the
+ project structure.</para>
+
+ <para>You can easily open the imported property
files.</para>
+ <figure float="0">
+ <title>OpenOn With Imported Property Files</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Use OpenOn to open a CSS file used with a JSP
page:</para>
+ <figure float="0">
+ <title>OpenOn With CSS File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Open managed beans:</para>
+ <figure float="0">
+ <title>OpenOn With Managed Beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>For JSP files in a JSF project, you can also easily open the
navigation rules
+ by applying <property
moreinfo="none">OpenOn</property> to the JSF tag for the navigation
+ outcome:</para>
+ <figure float="0">
+ <title>OpenOn With JSF Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+ <section
id="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
+
+ <title>Content Assist</title>
+ <para><property moreinfo="none">Content
assist</property> is available when working with</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink
url="../../seam/html_single/index.html#ContentAssist">Seam project
files</ulink>
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="JSFProjectFiles3087">JSF project
files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="StrutsProjectFile46s3">Struts
project files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="JSPPages434">JSP
files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="ContentAssistForRF">RichFaces
components</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink
url="../../esb_ref_guide/html_single/index.html#ESBContentAssist">ESB XML
files</ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Notice, that code completion for EL variables has icons
illustrating what they are
+ from. Currently it's performed for resource bundles, JSF and Seam
+ components.</para>
+
+ <figure float="0">
+ <title>JSF Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_8d.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Seam Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_8c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Also, as you can see, the ranking and sorting are available in EL
code
+ completions.</para>
+
+ <section id="JSFProjectFiles3087">
+
+ <title>JSF Project Files</title>
+
+ <para>When working with JSF project in JBoss Developer Studio, you
can use various
+ <property moreinfo="none">Content Assist
features</property> while developing:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Content Assist for XML, JSP and JSF configuration
files</para>
+ </listitem>
+ <listitem>
+ <para>Content Assist based on project data</para>
+ </listitem>
+ <listitem>
+ <para>Content Assist with graphical JSF
editor</para>
+ </listitem>
+ </itemizedlist>
+ <section
id="ContentAssistForXMLJSPAndJSFConfigurationFiles865">
+
+ <title>Content Assist for XML, JSP and JSF configuration
files</title>
+
+ <para>At any point when working with any XML, JSP and JSF
configuration files
+ Content Assist is available to help you. Simply type
<emphasis>
+ <property
moreinfo="none">Ctrl-Space</property>
+ </emphasis> to see what is available.</para>
+
+ <para>Content Assist for JSF configuration file:</para>
+ <figure float="0">
+ <title>Content Assist in JSF Configuration
File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_9.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Content Assist for JSF JSP file:</para>
+ <figure float="0">
+ <title>Content Assist in JSP File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_10.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Content Assist for other JSF XML project files (web.xml
shown):</para>
+ <figure float="0">
+ <title>Content Assist in web.xml File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_11.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistBasedOnProjectData86">
+
+ <title>Content Assist Based on Project Data</title>
+
+ <para>JBoss Developer Studio takes Content Assist to the next
level. Studio will
+ constantly scan your project and you will be able to insert code
into the
+ JSP page from your project that includes:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Values from Property files</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="italic">
+ <property
moreinfo="none">"Managed beans"</property>
+ </emphasis> attributes and methods</para>
+ </listitem>
+ <listitem>
+ <para>Navigation Rule Outcomes</para>
+ </listitem>
+ <listitem>
+ <para>JSF variables (context, request
etc...)</para>
+ </listitem>
+ </itemizedlist>
+ <para>The figure below shows how to insert message from a
Properties files. You
+ simply put the cursor inside the <emphasis
role="italic">
+ <property
moreinfo="none">"value"</property>
+ </emphasis> attribute and press <emphasis>
+ <property
moreinfo="none">Ctrl-Space</property>. </emphasis> JBoss
Developer Studio will
+ scan your project and show a list of possible values to
insert.</para>
+ <figure float="0">
+ <title>Inserting Message</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the following screenshot we are inserting a
<emphasis role="italic">
+ <property moreinfo="none">"Managed
bean"</property>
+ </emphasis> attribute value. Again, by simply clicking
+ <emphasis><property
moreinfo="none">Ctrl-Space</property>,</emphasis> JBoss
+ Developer Studio will show a list of all possible values that you
can
+ insert.</para>
+
+ <para>Once you select a Managed bean, it will show you a list
of all available
+ attributes for the selected Managed bean
(userBean).</para>
+ <figure float="0">
+ <title>Attributes List</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Code Assist based on project data will also prompt you
for navigation
+ rules that exist in your JSF configuration file.</para>
+ <figure float="0">
+ <title>Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Code Assist can also provide you with access to the beans
located in jar archives.</para>
+
+ <figure float="0">
+ <title>Code Assist: accessing beans in jar
archives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_14_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="ContentAssistWithinJSFGraphicalEditor44">
+
+ <title>Content Assist within Tree JSF Editor</title>
+
+ <para>JBoss Developer Studio also provides Content Assist when
working within
+ the Tree JSF configuration editor. Just click <emphasis>
+ <property
moreinfo="none">Ctrl-Space</property>. </emphasis></para>
+ <figure float="0">
+ <title>Content Assist in Tree JSF Configuration
Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_15.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!--
+
+ <para>If a field contains right class name and you click a
link near the
+ field you will come to the file with this class otherwise a
new Java
+ Class dialog will be shown:</para>
+ <figure>
+ <title>New Java Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+
fileref="images/editors_features/editors_features_16.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If you entered an incorrect name in the field error
markers will be
+ shown for field labels and tree items:</para>
+ <figure>
+ <title>Error Markers</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+
fileref="images/editors_features/editors_features_17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To add a new property to a managed bean
expand <emphasis>
+ <property>Managed Beans</property>
+ </emphasis> and select <emphasis
role="bold">
+
<property><name_of_bean></property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Add</property>
+ </emphasis> button in the Properties
panel</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog Add Property define a new
property. From here
+ also you can generate setters and getters
methods:</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Create New Property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+
fileref="images/editors_features/editors_features_18.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Here you can also add an additional navigation rule
to the
+ faces-config.xml file.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Navigation
Rules</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Add</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog <emphasis>
+ <property>Add Rule</property>
+ </emphasis> define a view and give a name to
the rule. Click
+ Finish:</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Add New Navigation Rule</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+
fileref="images/editors_features/editors_features_19.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ -->
+ </section>
+ </section>
+
+ <section id="StrutsProjectFile46s3">
+ <title>Struts Project Files</title>
+ <para>Content Assist features are available when you work with
Struts
+ projects.</para>
+
+
+ <section id="ContentAssistForStrutsConfigurationFile75">
+
+
+ <title>Content Assist for Struts Configuration
File</title>
+
+ <para>Content Assist helps you in Struts Configuration
file.</para>
+
+ <figure float="0">
+ <title>Struts Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistForStrutsJSPFile07">
+
+ <title>Content Assist for Struts JSP File</title>
+
+ <para>Using Code Assist in Struts JSP file is shown
below.</para>
+
+ <figure float="0">
+ <title>Struts JSP Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_21.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ <section id="JSPPages434">
+
+ <title>JSP Pages</title>
+
+
+ <section id="ContentAssistForJSFTags96">
+
+ <title>Content Assist for JSF Tags</title>
+ <para>JBDS provides full code completion for JSF
tags:</para>
+
+ <figure float="0">
+ <title>JSF Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_22.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the tag is selected the required attributes, if
there any, are
+ already inserted and the cursor is located to the first
attribute. At this
+ point you can ask for attribute proposals.</para>
+ <figure float="0">
+ <title>Attributes Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_23.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="ContentAssistForJSTLTags6332">
+
+ <title>Content Assist for JSTL Tags</title>
+ <figure float="0">
+ <title>JSTL Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_24.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistForHTMLTags7454">
+
+ <title>Content Assist for HTML Tags</title>
+ <para>Content assist for HTML tags has the same mechanism as
for JSF
+ tags:</para>
+ <figure float="0">
+ <title>HTML Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_25.png"
scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can use as well attributes proposals for HTML
tags:</para>
+ <figure float="0">
+ <title>HTML Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_26.png"
scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistForJavaScriptTags67433">
+
+ <title>Content Assist for JavaScript Tags</title>
+ <figure float="0">
+ <title>JavaScript Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_27.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="AddingDynamicCodeAssistToCustomComponents8745">
+
+ <title>Adding dynamic code assist to custom components that were
added to JBoss
+ Tools Palette</title>
+ <para>Here is what you need to do to add project based code assist
to a custom
+ component added in <property moreinfo="none">JBoss
Developer Studio</property>:</para>
+ <orderedlist continuation="restarts"
inheritnum="ignore">
+ <listitem>
+ <para>Create a new xml file in <emphasis>
+ <property
moreinfo="none"><JBDS_home>studio/eclipse/plugins/org.jboss.tools.common.kb_***/schemas/tld/</property>.
+ </emphasis>For example call it <emphasis>
+ <property moreinfo="none">
JeniaFaces.xml</property>
+ </emphasis>. The file should be written according to
<emphasis>
+ <property
moreinfo="none"><JBDS_home>/studio/eclipse/plugins/org.jboss.tools.common.kb/kb.jar/org/jboss/tools/common/kb/kb-schema_1.0.dtd</property>
+ </emphasis></para>
+ </listitem>
+ </orderedlist>
+ <para>Follow these steps to set what is available for code
assist:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Adds code assist for JSF pre-defined objects, such
as
+ <![CDATA[value=]]><emphasis
role="italic">
+ <property
moreinfo="none">"#{param}"</property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="jsfVariables"/>
+</AttributeType>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Add bundle resource (property file) <property
moreinfo="none">code
+ assist</property>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="bundleProperty"/>
+</AttributeType>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Add managed bean property <property
moreinfo="none">code assist</property>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="beanProperty"/>
+</AttributeType>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Add managed bean property but of a specified
type:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="beanProperty">
+ <param name="type" value="java.lang.Boolean"/>
+ </proposal>
+</AttributeType>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Add managed bean method with a
signature:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="beanMethodBySignature">
+ <param name="paramType"
value="javax.faces.context.FacesContext"/>
+ <param name="paramType"
value="javax.faces.component.UIComponent"/>
+ <param name="paramType" value="java.lang.Object"/>
+ <param name="returnType" value="void"/>
+ </proposal>
+</AttributeType>
+]]></programlisting>
+ <orderedlist continuation="restarts"
inheritnum="ignore">
+ <listitem>
+ <para>Add information on your xml file in <emphasis>
+ <property
moreinfo="none"><JBDS_home>/studio/eclipse/plugins/org.jboss.common.kb_***/plugin.xml</property>
+ </emphasis></para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[
+ <tld
+ jsf="true"
+ name="Jenia Faces"
+ schema-location="schemas/tld/myJSF.xml"
+
uri="http://www.jenia.org/jsf/dataTools"/>]]>
+ </programlisting>
+ </listitem>
+
+ <listitem>
+ <para>Restart Eclipse. You should now have code assist for
the
+ component.</para>
+ </listitem>
+ </orderedlist>
+
+ </section>
+ </section>
+ <section
id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing74">
+
+ <title>Synchronized Source and Visual Editing</title>
+
+ <para><property moreinfo="none">JBoss Developer
Studio</property> offers the flexibility to edit any
+ files in either source or extra visual modes at the same
time.</para>
+
+ <para>The project is yours and so is the source. <property
moreinfo="none">JBoss Developer
+ Studio</property> provides you many different graphical editors
to speed your
+ application development. At the same time, you always have a full control
over all
+ project source files. Any changes you make in the source view immediately
appear in
+ the graphical view.</para>
+
+ <para>The JSF configuration file editor has three views: <property
moreinfo="none">Diagram</property>,
+ <property moreinfo="none">Tree</property> and
<property moreinfo="none">Source</property>. All views are
+ synchronized, you can edit the file in any view.</para>
+ <figure float="0">
+ <title>Three Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_32.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The same is relevant to all other <property
moreinfo="none">JBoss Developer Studio</property>
+ editors.</para>
+
+ <para>Web XML editor is shown. Web XML editor has a graphical view
(Tree) and source
+ (Source).</para>
+
+ <figure float="0">
+ <title>Two Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_35.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><property moreinfo="none">JBoss Developer
Studio</property> TLD file editor is shown in Tree view.
+ At any point you can edit the source by switching to Source
view.</para>
+ <figure float="0">
+ <title>Two Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_37.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+ <section id="visual_page" role="updated">
+
+ <title>Visual Page Editor</title>
+
+ <para><property moreinfo="none">JBoss Developer
Studio</property> comes with a powerful and customizable
+ <property moreinfo="none">Visual Page
Editor</property> (VPE). You can use the Visual Page Editor to
+ develop an application using any technology: JSF, Struts, JSP, HTML and
others. Double-click on the necessary file in the Package Explorer view to open it in the
Visual Editor or just drag-and-drop it into perspective (the drag-and-drop feature can be
also applied to JSP, XHTML or HTML files created locally).</para>
+
+ <para>Current VPE version has three tabs: <property
moreinfo="none">Visual/Source</property>,
+ <property moreinfo="none">Source</property> and
<property moreinfo="none">Preview</property>. To switch between the
+ views you can use tabs at the bottom of the VPE or the shortcuts
<emphasis>
+ <property moreinfo="none">Ctrl + PageUp/Ctrl +
PageDown</property>
+ </emphasis>.</para>
+
+ <figure float="0">
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_1.png"
scale="95"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="visual_source">
+ <title>Visual/Source View</title>
+
+ <para>Using the <property moreinfo="none">Visual/Source
view</property> you can edit your pages in the
+ Source and Visual modes simultaneously having an instant synchronization
between
+ them:</para>
+ <figure float="0">
+ <title>Visual/Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_2.png"
scale="95"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The view is designed in the form of a split pane with toggle
buttons for quickly
+ moving between Source, Visual or Source/Visual modes as shown on the
figure
+ above.</para>
+
+ <para>One more way to toggle between the various states of the split
pane is using the
+ shortcuts <emphasis>
+ <property moreinfo="none">Shift +
F6</property>
+ </emphasis> for maximizing/restoring the Source part and
<emphasis>
+ <property moreinfo="none">Shift + Alt +
F6</property>
+ </emphasis> for maximizing/restoring the Visual part.</para>
+ <tip>
+ <title>Tip:</title>
+ <para>When editing large documents hiding the Visual part will
speed up the
+ editing.</para>
+ </tip>
+
+ <para>It should be pointed out that, no matter in what mode you are
working, you get a
+ full integration with <property
moreinfo="none">Properties</property> and <property
moreinfo="none">Outline
+ views</property>:</para>
+ <figure float="0">
+ <title>Integration with Properties and Outline Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_3.png"
scale="55"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It's also possible to use the <link
linkend="palette">JBoss Tools
+ Palette</link> to insert any tag from the list of tag libraries
to the page you
+ are editing with just a click or drag-and-drop.</para>
+ <figure float="0">
+ <title>Inserting Tag From the Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> You can insert a tag/component from the palette into either the
Source or the
+ Visual part by calling a context menu and selecting <property
moreinfo="none">Insert
+ around</property>, <property
moreinfo="none">Insert before</property>, <property
moreinfo="none">Insert
+ after</property> or <property
moreinfo="none">Replace With</property>, pointing to
+ <property moreinfo="none">From
Palette</property>, picking the type of the tag and finally
+ choosing the tag you want to insert. </para>
+
+ <para>The image below illustrates how you can insert a tag into the
Source part.</para>
+ <figure float="0">
+ <title>Inserting a tag into the Source part </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_23a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>And this is how a tag is inserted using a context menu in the
Visual part.</para>
+
+ <figure float="0">
+ <title>Inserting a tag into the Visual part</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_23b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para><property moreinfo="none">Visual Page
Editor</property> provides the option for displaying
+ non-visual tags in Visual mode of the editor. To enable this option
expand the
+ submenu in the top left corner of the Visual part and select
<emphasis>
+ <property moreinfo="none">Show Non-visual
tags</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Enabling the Option for Showing Non-visual
Tags</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_4a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the figure you can see non-visual elements with gray dashed
borders.</para>
+
+ <figure float="0">
+ <title>Non-visual Tag in the VPE</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_4b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To disable this option again expand the same submenu and select
<emphasis>
+ <property moreinfo="none">Hide Non-visual
tags</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Non-visual Tag in the VPE</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_4c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="comments">
+ <title>Commenting out Code</title>
+
+ <para><property
moreinfo="none">VPE</property> supports possibility to add comments in
files you are
+ working with (JSP, XHTML, etc.):</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>HTML comments (<emphasis>
+ <property moreinfo="none"><!--
--></property>
+ </emphasis>) which are output to the client
</para>
+ </listitem>
+ <listitem>
+ <para>JSP comments (<emphasis>
+ <property moreinfo="none"><%--
--%></property>
+ </emphasis>) which are not output to the client as part
of the JSP page
+ output</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="codefolding">
+ <title>Using Code Folding</title>
+ <para>
+ <property moreinfo="none">Visual Page
Editor</property> lets you collapse (hide) and expand
+ (show) sections of your code to make it easier to navigate and read.
</para>
+ <para>Code folding can be enabled by right-clicking on the left
margin on the Source
+ part of Visual Page Editor, selecting <property
moreinfo="none">Folding</property> and checking
+ the <property moreinfo="none">Enable
Folding</property> checkbox or using the <emphasis>
+ <property
moreinfo="none">Ctrl+Numpad_Divide</property>
+ </emphasis> shortcut.</para>
+ <para>When the code folding is enabled a minus sing (
<inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_23c.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject> ) will appear on the left margin of the
editor next to each
+ opening block tag. </para>
+
+ <figure float="0">
+ <title>Enabled Code Folding </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_24a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click the minus sign to collapse a block tag.</para>
+
+ <para>When the minus sing is clicked on the appropriate tag
collapses and a plus
+ sing ( <inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_23d.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject> ) is displayed on the left margin as well
as a gray
+ rectangle two dots ( <inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_23e.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject> ) appears after opening and closing tags.
</para>
+
+ <figure float="0">
+ <title>Collapsed Code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_24b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="JSPsyntaxvalidation84">
+
+ <title>JSP Syntax Validation</title>
+ <para>When working in JBoss Tools JSP editor you are constantly
provided with
+ feedback and contextual error checking as you type.</para>
+ </section>
+
+ <section id="taglib_versions_support">
+ <title>Support for Taglib versions</title>
+
+ <para>VPE templates now support various versions of tag libraries.
It means that the
+ <property moreinfo="none">VPE</property>
takes control over those components which have
+ different parameters or preview according to the framework version
(like seam
+ 1.2 and seam 2.0, or JSF 1.1 and JSF 1.2).</para>
+
+ <para>For example, <emphasis>
+ <property
moreinfo="none"><s:decorate></property>
+ </emphasis> element in seam has different parameters in
versions 1.2 and 2.0 as
+ well as <emphasis>
+ <property
moreinfo="none"><h:outputLink></property>
+ </emphasis> JSF element has different preview in versions 1.1
and 1.2.</para>
+ </section>
+ </section>
+
+ <section id="pages_styling">
+ <title>Pages Styling</title>
+
+ <para>Most web pages use the cascading style sheets (CSS) to control
the way they look.
+ With <property moreinfo="none">Visual Page
Editor</property> you can easily stylise your pages. In
+ this section we are going to introduce you to a powerful mechanism that
+ <property moreinfo="none">VPE</property>
provides for a complete control over pages styling. </para>
+
+ <section id="inline_styling">
+ <title>Inline Style Editing</title>
+
+ <para>In the Visual part of the <property
moreinfo="none">VPE</property> there is a graphical
+ toolbar, use it to add inline styling to JSF and Struts tags on your
page. The
+ toolbar can be hidden by clicking on arrow sign in the upper left
corner.</para>
+
+ <figure float="0">
+ <title>Text Formatting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For editing inline styles for DOM elements <property
moreinfo="none">VPE</property> also
+ provides <property moreinfo="none">CSS
Dialog</property>. It can be called from <emphasis>
+ <property moreinfo="none">style</property>
+ </emphasis> line in the <property
moreinfo="none">Properties view</property> for a currently
+ selected element.</para>
+
+ <figure float="0">
+ <title>Call the CSS Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para id="css_dialog"><property
moreinfo="none">CSS Dialog</property> has four tabs where css
+ properties for text, background, borders and others can be specified.
A simple
+ preview which is generated at the top of the <property
moreinfo="none">CSS Dialog</property>
+ allows you to see the changes before you apply them.</para>
+
+ <figure float="0">
+ <title>CSS Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="external_stylesheets">
+ <title>External Stylesheets</title>
+ <para>The pages you are working with in <property
moreinfo="none">VPE</property> can use external
+ stylesheets. <property
moreinfo="none">VPE</property> allows you to create new style classes
in
+ existing stylesheets and/or edit them as well. For these purposes
<property moreinfo="none">CSS
+ Style Class Dialog</property> is provided (hot keys -
<emphasis>
+ <property
moreinfo="none">CTRL+SHIT+C</property>).</emphasis></para>
+ <para>Select the element for which you need to create or edit style
class and press
+ button next to <emphasis>
+ <property
moreinfo="none">styleClass</property>
+ </emphasis> field in <property
moreinfo="none">Properties view</property>.</para>
+
+ <figure float="0">
+ <title>Calling the CSS Style Class Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It'll pick up the <property
moreinfo="none">CSS Style Class Dialog</property> which
+ looks like on the figure below.</para>
+ <figure float="0">
+ <title>CSS Style Class Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>First, you should specify the CSS file where you are going to
put your style
+ class. Do this by pressing the button next to the <emphasis>
+ <property moreinfo="none">CSS
file</property>
+ </emphasis> field.</para>
+ <figure float="0">
+ <title>CSS File Selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To create new CSS class write its name in the
<emphasis>
+ <property moreinfo="none">Style
class</property>
+ </emphasis> field and then configure style settings switching
between the tabs: <emphasis>
+ <property
moreinfo="none">Text/Font</property>, </emphasis>
+ <emphasis>
+ <property
moreinfo="none">Background</property>, </emphasis>
+ <emphasis>
+ <property moreinfo="none">Boxes</property>,
</emphasis>
+ <emphasis>
+ <property moreinfo="none">Property
Sheet</property>. </emphasis>The list of already exisiting classes with names
begining with the symbols printed will be displayed on standard "Ctrl+Space" key
combination. To add existing styling to
+ the chosen element just point to the
+ necessary one. Each time you select any class it is displayed in the
Preview tab. Click on the <emphasis><property
moreinfo="none">Apply</property></emphasis> button will apply the
changes without closing the window.</para>
+
+ <figure float="0">
+ <title>Style Class Selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Edited
properties</property>
+ </emphasis> tab gives a preview of the properties which are set
for the existing
+ style class. You can easily modify them with the help of this
wizard.</para>
+
+ <figure float="0">
+ <title>Edited Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If the style class isn't chosen, the tab doesn't show
any properties.</para>
+
+ <figure float="0">
+ <title>Edited Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/edited_properties.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Preview
tab</property>
+ </emphasis> is for observing the content of the chosen CSS
file. This tab is hidden if no CSS file is chosen.</para>
+
+ <figure float="0">
+ <title>Preview Tab</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/preview_tab.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>At the top of the <property
moreinfo="none">CSS Style Class Dialog</property>
+ you can see a preview box which visualizes the result. To edit the
preview you should double click in the box. To leave the focus, use <emphasis>
+ <property moreinfo="none">Ctrl +
Tab</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Editing the Preview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/preview_box.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The dialog for creating a new CSS class, which is called from
<emphasis>
+ <property moreinfo="none">New > Other...
> JBoss Tools Web > CSS Class</property>,
+ </emphasis> looks the same.</para>
+
+ <figure float="0">
+ <title>New CSS Class Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="vpe_templating">
+ <title>Templating</title>
+
+ <para>The VPE also makes it possible to create templates for unknown
tags.</para>
+
+ <para>To call the <property moreinfo="none">Template
dialog</property> for a tag, right-click on it in
+ Visual mode and select <emphasis>
+ <property moreinfo="none">Setup Template for
<tag name></property>
+ </emphasis> option.</para>
+
+ <figure float="0">
+ <title>Calling Template Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_7a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para id="template_dialog">Here is what the <property
moreinfo="none">Template dialog</property> looks
+ like.</para>
+
+ <figure float="0">
+ <title>Template Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_7b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><emphasis>
+ <property moreinfo="none">Tag for
Display</property>
+ </emphasis> field in the <property
moreinfo="none">Template dialog</property> requires specifying a
+ type of tag. It can be SPAN, DIV, TABLE or any other html element. Check
<emphasis>
+ <property moreinfo="none">Children</property>
+ </emphasis>, if you want to mark a tag as a child
element.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Value</property>
+ </emphasis> field is for setting a tag value.</para>
+ <para>As for the <emphasis>
+ <property moreinfo="none">Style</property>
+ </emphasis> field, you can fill it out manually or make use of the
button next to
+ the field to bring the <link linkend="css_dialog">CSS
Dialog</link> for editing
+ styles.</para>
+
+ <para>You can observe all defined templates in the <link
linkend="VisualPageEditor2">VPE
+ Preferences</link> on the Templates tab which you can quickly
access by pressing
+ <link linkend="AdvancedSettings954">Preferences
button</link>.</para>
+
+ <figure float="0">
+ <title>Templates Tab of the VPE Preferences Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_7c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here it's possible to edit or remove any listed in the table
+ template.</para>
+
+ </section>
+
+ <section id="AdvancedSettings954">
+
+ <title>Advanced Settings</title>
+
+ <para>In the left vertical pane of the Visual part there are three
buttons: <emphasis>
+ <property
moreinfo="none">Preferences</property></emphasis>
+ (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/icon_1.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ ),
+
+
+
+
+ <emphasis>
+ <property moreinfo="none">Refresh</property>
+ </emphasis>
+ (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/icon_2.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ )
+ and <emphasis>
+ <property moreinfo="none">Page Design
Options</property> </emphasis>(
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/icon_3.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ )
+
+ .</para>
+
+ <figure float="0">
+ <title>Buttons on the Visual Part of VPE</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem id="vpe_preferences">
+ <para><emphasis>
+ <property
moreinfo="none">Preferences</property>
+ </emphasis> button
+ (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/icon_1.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ )
+
+
+
+
+
+ provides a quick access to <property
moreinfo="none">Visual Page
+ Editor</property> preferences.</para>
+
+ <figure float="0">
+ <title>Visual Page Editor Preferences Window</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+
+ <listitem>
+ <para>Clicking on <emphasis>
+ <property
moreinfo="none">Refresh</property>
+ </emphasis> button
+
+
+ (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/icon_2.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ )
+
+
+
+
+
+
+
+ you refresh the displayed information.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis>
+ <property moreinfo="none">Page Design
Options</property>
+ </emphasis> button
+ (
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/icon_3.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ )
+
+
+ leads to a window which helps you specify necessary
+ references of the resources. It is represented by a window with 4
tabs. The
+ first one, <emphasis>
+ <property moreinfo="none">Actual Run-Time
folders</property>,
+ </emphasis> is used to replace absolute and relative path
values when
+ generating a preview: </para>
+ <figure float="0">
+ <title>Page Design Options: Actual Run-Time
folders</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The second tab, <emphasis>
+ <property moreinfo="none">Included CSS
files</property>
+ </emphasis>, is used to add CSS files to be linked by
Visual Page Editor
+ when generating a preview:</para>
+
+ <figure float="0">
+ <title>Page Design Options: Included CSS
files</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_10_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+
+ <para>The third one, <emphasis>
+ <property moreinfo="none">Included tag
libs</property></emphasis>, can be used to add Taglibs that can be used by the
editor for
+ getting appropriate templates to generate a
preview:</para>
+
+ <figure float="0">
+ <title>Page Design Options: Included tag
libs</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_10_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>And finally, the <emphasis>
+ <property moreinfo="none">Substituted El
expressions</property>
+ </emphasis> tab is used to add El expressions that will be
substituted by
+ the editor when generating a preview:</para>
+
+ <figure float="0">
+ <title>Page Design Options: Substituted El
expressions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_10_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The first two tabs of the window let you define actual
runtime folders.
+ The example below will help you understand how this can be
done.</para>
+
+ <para>Suppose you have the following project
structure:</para>
+
+ <programlisting format="linespecific"
role="XML"><![CDATA[WebContent/
+ pages/
+ img/
+ a.gif
+ header.jsp
+ main.jsp
+ ]]></programlisting>
+
+ <para>The content of the <emphasis>
+ <property
moreinfo="none">header.jsp</property>
+ </emphasis> is:</para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[My Header
+<img src="img/a.gif"/>
+]]></programlisting>
+ <para>and <emphasis>
+ <property
moreinfo="none">main.jsp</property>
+ </emphasis> content is:</para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<jsp:include page="pages/header.jsp"
/>
+]]></programlisting>
+ <para> When you open <emphasis>
+ <property
moreinfo="none">main.jsp</property>
+ </emphasis> in <property
moreinfo="none">Visual Page Editor</property>, it will not be able
+ to resolve the image from the header, however, it will work fine
in runtime.
+ To fix this in design time, click the <emphasis>
+ <property moreinfo="none">Page Design
Options</property>
+ </emphasis> button and set <emphasis>
+ <property moreinfo="none">Actual Run-Time
Relative Folder</property>
+ </emphasis> to <emphasis>'projectName >
WebContent >
+ pages'</emphasis> and you will see the image
appeared.</para>
+ <para></para>
+
+ <para>Let' consider an example for other tabs. For
instance, the
+ definition of your CSS on the page is the next:</para>
+
+ <programlisting format="linespecific"
role="XML"><![CDATA[<link rel="stylesheet"
type="text/css"
+ href="#{facesContext.externalContext.requestContextPath}/style.css"/>
+]]></programlisting>
+
+ <para>This will work fine in runtime, but the <property
moreinfo="none">Visual Page
+ Editor</property> doesn't know what
+ <emphasis>requestContextPath</emphasis> in design
time is. In order to
+ see the necessary styles applied in design time your should add a
path to
+ your stylesheet in the <property
moreinfo="none">CSS File Path</property> section.</para>
+
+ <para>The next <property
moreinfo="none">URI</property> section lets you add URI taglibs so
that
+ the editor knows where to find the tag libraries.</para>
+
+ <para>And the last <property
moreinfo="none">Substituted EL expressions</property> section is
+ provided to specify the values for specific EL variables. It can
be useful
+ for a preview generation.</para>
+ <para>As an example look at the figure below:</para>
+ <figure float="0">
+ <title>EL Expression</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here bath in Source and Visual modes you see the EL
expression
+ <emphasis>#{user.name}</emphasis>. When you
switch to <property moreinfo="none">Preview
+ view</property>, you'll also see this expression.
Now press <emphasis>
+ <property moreinfo="none">Page Design
Options</property>
+ </emphasis> button and set the value for the
+ <emphasis>"user.name"</emphasis> as
+ <emphasis><property
moreinfo="none">World</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Setting the Value for the EL
Expression</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As a result in Visual mode and Preview view the word
<emphasis>
+ <property
moreinfo="none">World</property>
+ </emphasis> is displayed.</para>
+ <figure float="0">
+ <title>The EL Expression Value</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>You can find useful one more functionality provided by VPE. At
the bottom of the
+ <property moreinfo="none">Visual/Source
view</property> there is a <property moreinfo="none">Selection Tag
+ Bar</property>. It allows to see tags tree for a current
component selected in
+ Visual or Source mode.</para>
+
+ <figure float="0">
+ <title>Selection Tag Bar</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you want to hide the <property
moreinfo="none">Selection Tag Bar</property>, use the button in
+ the form of a red cross on the lower right side. To reset it again you
should check
+ the proper option in the <link
linkend="vpe_preferences">VPE
+ Preferences</link>.</para>
+ </section>
+
+ <section id="page_preview">
+ <title>Page Preview</title>
+
+ <para><property moreinfo="none">VPE</property>
comes with design-time preview feature which is available
+ for:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Struts Pages</para>
+ </listitem>
+ <listitem>
+ <para>JSF Pages</para>
+ </listitem>
+ </itemizedlist>
+
+ <para><property moreinfo="none">Preview
view</property> is read-only, it shows how the page will look
+ like in a browser.</para>
+ <figure float="0">
+ <title>Preview View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/visual_page/visual_page_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!--para>You can even
+ attach your stylesheet to the preview.</para-->
+ </section>
+
+ <section id="SetupnotesforLinu895x">
+
+ <title>Setup notes for Linux</title>
+
+ <para>Linux users may need to do the following to get the <property
moreinfo="none">Visual Page
+ Editor</property> to work correctly on their
machines.</para>
+
+ <para> The Visual Page Editor requires the library libstdc++.so.5. This
library is
+ contained in the compat-libstdc++-33.i386 package.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>To install this package on Fedora Core or Red Hat
Enterprise Linux run the
+ following command:</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[yum install compat-libstdc++-33.i386
+]]></programlisting>
+ </listitem>
+
+
+ <listitem>
+ <para>On any other rpm based distributions download
libstdc++.so.5 and run the
+ following command:</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[rpm -Uvh compat-libstdc++-33.i386
+]]></programlisting>
+ </listitem>
+
+
+ <listitem>
+ <para>On Debian based distributives run the following command:
</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[apt-get install compat-libstdc++-33.i386
+]]></programlisting>
+ </listitem>
+
+ </itemizedlist>
+
+ <para> In case you have the library installed and you still have issue
with starting the
+ visual page editor then close all browser views/editors and leave one
visual page
+ editor open and restart eclipse. This should force a load of the right
XULRunner
+ viewer.</para>
+
+ </section>
+
+ <!-- <section
id="CreateLookAndFeel(Design-timeMetadate)ForAnyCustomJSFComponents41">
+<?dbhtml
filename="CreateLookAndFeel(Design-timeMetadate)ForAnyCustomJSFComponents.html"?>
+<title>JSP Visual Page Editor - Design Time Look and Feel for Custom
Components</title>
+
+<itemizedlist>
+<listitem><ulink
url="http://www.jboss.org/404.html">Template
definition for design-time representation of custom tags</ulink> (pdf)
+<para></para>
+ <note>
+ <title>Note:</title>
+ <para>The templates files are now saved in
<emphasis><RedHatDeveloperStudio>\eclipse\plugins\com.exadel.vpe_1.1.1\plugin.xml</emphasis>.
The PDF files show the old location.</para>
+ </note>
+<para></para></listitem>
+
+<listitem><ulink
url="http://www.jboss.org/404.html">Steps to
Create Plug-in</ulink> (pdf)</listitem>
+<listitem><ulink url="index.html">How to use create(..)
method</ulink> (pdf)</listitem>
+<listitem>API
+<itemizedlist>
+<listitem><ulink
url="http://www.jboss.org/404.html">VpeAbstractTemplate</...
+<listitem><ulink
url="http://www.jboss.org/404.html">VpeTemplate</ulink>...
+<listitem><ulink
url="http://www.jboss.org/404.html">Download</ulink> examples. The
examples.zip file contains two
+ applications. The first application transforms the JSP source tag into visual tag
(HTML). This application
+ is an Eclipse plug-in. Import as an Eclipse project. The second application is a Web
applications which
+ uses the custom component (project with JSF Nature).</listitem>
+</itemizedlist>
+<para>Please send us an email to <ulink
url="mailto:support@exadel.com">support@exadel.com</ulink> if you have
+ questions about this feature.</para>
+</section>
+
+
+<section id="HTML401Suppor421t">
+<?dbhtml filename="HTML4.01Support.html"?>
+<title>HTML 4.01 Support</title>
+</section>
+
+<section id="JSP2.0JSTL1.0And1.1Suppor52t">
+<?dbhtml filename="JSP2.0JSTL1.0And1.1Support.html"?>
+<title>JSP 2.0, JSTL 1.0/1.1 support</title>
+</section>
+-->
+
+ </section>
+
+ <section id="more_editors">
+
+ <title>More Editors</title>
+
+ <para>Besides Visual Page Editor JBDS is supplied with a huge range of
various editors for
+ different file types: properties, TLD, web.xml, tiles, and so
on.</para>
+ <section id="GraphicalPropertiesEditor">
+
+ <title>Graphical Properties Editor</title>
+
+ <para><property moreinfo="none">The Properties
editor</property> allows you to work in two different
+ modes and also supports unicode characters.</para>
+
+ <para>To create a new properties file, in the Package Explorer view,
select<emphasis>
+ <property moreinfo="none"> New > Properties
File</property>
+ </emphasis> from the right-click context menu on the folder where
you want to create
+ the file.</para>
+ <figure float="0">
+ <title>Selecting Properties File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can edit the file using a table-oriented
"Properties"
+ viewer:</para>
+
+ <figure float="0">
+ <title>"Properties" Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use a Source viewer for editing the
file:</para>
+ <figure float="0">
+ <title>Source Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="GraphicalTLDEditor">
+
+ <title>Graphical TLD Editor</title>
+
+ <para><property moreinfo="none">The TLD
editor</property> comes with same features you will find in all
+ other JBoss Developer Studio editors:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Graphical and source edit modes</para>
+ </listitem>
+ <listitem>
+ <para>Validation and error checking</para>
+ </listitem>
+ </itemizedlist>
+ <section id="TreeView2">
+
+ <title>Tree view</title>
+
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="SourceView1">
+
+ <title>Source view</title>
+
+ <para>You can easily switch from Tree to Source by selecting the
Source tab at the
+ bottom of the editor.</para>
+
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can easily add a <property
moreinfo="none">new tag</property>:</para>
+
+ <figure float="0">
+ <title>Adding a New Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_6.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also easily add a <property
moreinfo="none">new attribute</property> to an existing
+ tag:</para>
+ <figure float="0">
+ <title>Adding a New Attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_7.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Content assist is available when editing the file using the
Source
+ viewer:</para>
+
+ <figure float="0">
+ <title>Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_8.png"
scale="65"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the Source viewer, if at any point a tag is incorrect or
incomplete, an
+ error will be indicated next to the line and also in the Problems
view
+ below.</para>
+
+ <figure float="0">
+ <title>Error Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+
+ <section id="GraphicalWebApplicationFileEditor">
+
+ <title>Graphical Web Application File (web.xml) Editor</title>
+
+ <para>The Web Application File editor comes with the same features you
will find in all
+ other JBoss Developer Studio editors:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Graphical and source edit modes</para>
+ </listitem>
+ <listitem>
+ <para>Validation and error checking</para>
+ </listitem>
+ </itemizedlist>
+ <section id="TreeView1">
+ <title>Tree View</title>
+
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can add any new elements right in the <property
moreinfo="none">Tree
+ viewer</property>:</para>
+
+ <figure float="0">
+ <title>Adding New Elements</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="SourceView2">
+
+ <title>Source View</title>
+
+ <para>Switch to the <property
moreinfo="none">Source viewer </property>to edit the web.xml file by
+ hand at any time:</para>
+
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssist">
+
+ <title>Content Assist</title>
+
+ <para>Content assist is available in the Source viewer. Simply
click <emphasis>
+ <property
moreinfo="none">CTRL-Space</property>
+ </emphasis> anywhere in the file.</para>
+
+ <figure float="0">
+ <title>Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_13.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ErrorCheckingAndValidation">
+
+ <title>Errors Checking and Validation</title>
+
+ <para>If errors occur anywhere in the file, small red dots will
appear next to the
+ lines where the errors occurred. Also, note that the file is marked
by a small x
+ in the Package Explorer view.</para>
+
+ <figure float="0">
+ <title>Errors Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="CSSEditor">
+
+ <title>CSS Editor</title>
+
+ <para>The <property moreinfo="none">CSS
editor</property> comes with the same features you will find in
+ all other JBoss Developer Studio editors.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Content assist</para>
+ </listitem>
+ <listitem>
+ <para>Validation and error checking</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>With the CSS (Cascading Style Sheet) editor, you can take
advantage of code
+ prompting:</para>
+
+ <figure float="0">
+ <title>CSS Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_41.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!-- <para>You can also use the Outline view next to the editor
to navigate through the CSS
+ file:</para>
+
+ <figure>
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_42.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ -->
+
+ <para>And you can also use the Properties view next to the editor to
edit existing
+ stylesheet declaration properties:</para>
+
+ <figure float="0">
+ <title>Properties View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_43.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="JavaScriptEditor">
+
+ <title>JavaScript Editor</title>
+
+ <para>The <property moreinfo="none">JavaScript
editor</property> includes a Preview viewer and a Source
+ viewer. In the Source viewer, you can use code assist:</para>
+
+ <figure float="0">
+ <title>JavaScript Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_44.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use the Source viewer with the Outline view to
navigate around the
+ file:</para>
+
+ <figure float="0">
+ <title>Source Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_45.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <!-- <section id="ImageViewer">
+
+ <title>Image Viewer</title>
+ <para>This simple image viewer allows you to view GIF and JPEG files
individually in a
+ separate window:</para>
+
+ <figure>
+ <title>Image Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_46.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section> -->
+ <section id="XSDEditor">
+
+ <title>XSD Editor</title>
+
+ <para>JBoss Developer Studio comes with an <property
moreinfo="none">XSD Editor</property> for XML
+ Schema files. This editor comes from the Web Tools Project (WTP) (see
<ulink
url="http://www.eclipse.org/webtools/testtutorials/gettingstarted/Ge...
Getting Started</ulink>).</para>
+
+ <para>To create a new XSD file, right-click a folder in the Package
Explorer view,
+ select <emphasis>
+ <property moreinfo="none">New >
Other...</property>
+ </emphasis> from the context menu and then select <emphasis>
+ <property moreinfo="none">XML > XML
Schema</property>
+ </emphasis> in the dialog box.</para>
+
+ <figure float="0">
+ <title>Creating New XSD file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_47.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The XSD Editor includes two viewers for working on the file, a
Design viewer and a
+ Source viewer:</para>
+
+ <figure float="0">
+ <title>Source Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_48.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the Design viewer, you can drill down on an element by
double-clicking on
+ it:</para>
+
+ <figure float="0">
+ <title>Design Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_49.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Various edit options are available when you right-click an
element in the
+ diagram:</para>
+
+ <figure float="0">
+ <title>Edit Options</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_50.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use the Properties view to edit a selected
element:</para>
+
+ <figure float="0">
+ <title>Properties View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_51.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use a Source viewer for the file. In this viewer,
along with direct
+ editing of the source code, you can also edit the file by using the
Properties view
+ on the right:</para>
+
+ <figure float="0">
+ <title>Source Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_52.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="SupportforXMLSchema">
+
+ <title>Support for XML Schema</title>
+
+ <para>JBoss Developer Studio fully supports XML files based on schemas
as well as
+ DTDs:</para>
+ <figure float="0">
+ <title>XML File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/more_editors/more_editors_53.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+</chapter>
+
+
+<chapter id="palette"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/palette.xml"
xreflabel="palette">
+ <?dbhtml filename="palette.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Jboss Tools palette</keyword>
+ <keyword>tags</keyword>
+ <keyword>JSP page</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>JBoss Tools Palette</title>
+ <para>This chapter will introduce you to the functionality provided by
<property moreinfo="none">JBoss Tools
+ Palette</property>. The Palette allows you to quickly and easily create
your JSP or JSF
+ pages. Now you can do it more faster without additional knowledge.</para>
+ <para>The <property moreinfo="none">JBoss Tools
Palette</property> allows you to:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Insert tags into a JSP or JSF page with one click</para>
+ </listitem>
+ <listitem>
+ <para>Add custom and 3rd party tags</para>
+ </listitem>
+ </itemizedlist>
+ <para>The JBoss Tools Palette contains a developer's project tag libraries
and provides
+ possibility to add any tag libraries to it. Also you can choose a necessary one
from the
+ list of already existed tag libraries:</para>
+ <itemizedlist>
+ <listitem>
+ <para>HTML</para>
+ </listitem>
+ <listitem>
+ <para>JBoss</para>
+ </listitem>
+ <listitem>
+ <para>JSF</para>
+ </listitem>
+ <listitem>
+ <para>JSTL</para>
+ </listitem>
+ <listitem>
+ <para>MyFaces</para>
+ </listitem>
+ <listitem>
+ <para>Oracle ADF Faces</para>
+ </listitem>
+ <listitem>
+ <para>Struts</para>
+ </listitem>
+ <listitem>
+ <para>XHTML</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Default View of The JBoss Tools Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By default the Palette is represented in Web Development Perspective with
five groups. If
+ you can't see it, select <emphasis>
+ <property moreinfo="none">Window > Show View Other...
> JBoss Tools Web > JBoss
+ Tools Palette</property>
+ </emphasis> from the menu bar.</para>
+
+ <section id="PaletteOptions">
+ <?dbhtml filename="PaletteOptions.html"?>
+ <title>Palette Options</title>
+ <para>To facilitate your work, you can configure the Palette in your own
way, by selecting
+ the corresponding icon on the Palette toolbar.</para>
+ <para>There is a possibility to configure the JBoss Tools
Palette:</para>
+ <itemizedlist>
+ <listitem>
+ <para> to <property moreinfo="none">edit the
palette</property> content by adding, removing or
+ changing the palette elements</para>
+ </listitem>
+ <listitem>
+ <para> to <property moreinfo="none">show/hide
groups</property>, subgroups</para>
+ </listitem>
+ <listitem>
+ <para>to <property moreinfo="none">import
groups</property>, subgroups</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Palette Buttons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <section id="PaletteEditor">
+ <?dbhtml filename="PaletteEditor.html"?>
+ <title>Palette Editor</title>
+ <para>JBoss Tools Palette contains existing libraries of tags, thus
the
+ <property moreinfo="none">Palette
editor</property> is intended to work with them or create your
+ new one, as well.</para>
+ <para>To open the editor, click on the <emphasis>
+ <property moreinfo="none">Palette
Editor</property>
+ </emphasis> icon: <figure float="0">
+ <title>Palette Editor Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ <para>The window has two parts. There is a reflected grouped list of
components on the
+ left side of the palette editor. Each group is divided into multiple
groups, every
+ of which is a tag library. The right side of the palette editor is an
editing window
+ where it's possible to change values of group or tag library
attributes
+ that you've chosen on the left part of the window. </para>
+ <para>It can also be done by right click and using <emphasis>
+ <property moreinfo="none">Edit…</property>
+ </emphasis> option.</para>
+ <literallayout class="normal"
format="linespecific"></literallayout>
+ <para> For example, <property
moreinfo="none">JSF</property> group consists of
+ <property moreinfo="none">Core</property>,
<property moreinfo="none">Facelets</property>, <property
moreinfo="none">HTML</property>
+ tag libraries and the attributes as <property
moreinfo="none">name</property>,
+ <property moreinfo="none">description</property>
and <property moreinfo="none">hidden</property> which are available
+ for editing: </para>
+ <figure float="0">
+ <title>Tag Libraries of the JSF Group</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The Palette Editor provides the following possibilities when
working with existing
+ tags or icons:</para>
+ <itemizedlist>
+ <listitem>
+ <para>to work with a set of icons</para>
+ <para><emphasis>
+ <property
moreinfo="none">Icons</property>
+ </emphasis> is the root folder for the icon sets. The first
step is creating
+ the icon set. Right click on the <emphasis>
+ <property
moreinfo="none">Icons</property>
+ </emphasis> folder and select <emphasis>
+ <property moreinfo="none">Create >
Create Set...</property>
+ </emphasis></para>
+ <para>Set the value of the name in the <emphasis>
+ <property moreinfo="none">Add
Icons</property>
+ </emphasis> window and click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button. A new element will appear in the
list.</para>
+ <figure float="0">
+ <title>Creating a Set of Icons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Also you can delete the set. Right click on the set of
icons that you wish
+ to remove and chose the <emphasis>
+ <property moreinfo="none">Delete
Set</property>
+ </emphasis> option from the pop-up menu or click the
<emphasis>
+ <property
moreinfo="none">Delete</property>
+ </emphasis> keyboard button.</para>
+ </listitem>
+ <listitem>
+ <para>to edit icons in the chosen set</para>
+ <para>When the set of icons is created, new icons can be
imported to it. Choose
+ the required set and select the option <emphasis>
+ <property moreinfo="none">Create >
Import Icon... </property>
+ </emphasis> from the pop-up menu that appears after you
right-click on a
+ folder.</para>
+ <figure float="0">
+ <title>Creating Icons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Set the name of the icon and the path and click
<emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>to work with a group of tag libraries</para>
+ <para>The first step in work with the editor is creating a
group of libraries.
+ It's very easy to do, right mouse button click on the
<emphasis>
+ <property
moreinfo="none">Palette</property>
+ </emphasis> folder and select <emphasis>
+ <property moreinfo="none">Create >
Create Group…</property>
+ </emphasis></para>
+ <para>Set a name of a group in the <property
moreinfo="none">Create Group</property> window and
+ click <emphasis>
+ <property
moreinfo="none">OK</property>
+ </emphasis> button. A new element will appear at the end of
the list.</para>
+ <figure float="0">
+ <title>Creating a Group of Tag Libraries</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You are allowed to edit or delete a group, as well. If
you'd like
+ to change attributes of a group, use the right editing window of
the palette
+ editor or the <emphasis>
+ <property
moreinfo="none">Edit...</property>
+ </emphasis> option, like it was mentioned before. In order
to remove the
+ group, right click on the group that you wish to remove and
choose the <emphasis>
+ <property
moreinfo="none">Delete</property>
+ </emphasis> option or click the <emphasis>
+ <property
moreinfo="none">Delete</property>
+ </emphasis> keyboard button.</para>
+ <important>
+ <title>Important:</title>
+ <para>The removal option is enabled only for custom
folders.</para>
+ </important>
+ </listitem>
+ <listitem>
+ <para>to work with a tag library</para>
+ <para>The group maintains a list of tag libraries. If you'd
like to
+ create your own library, click right mouse button on the group
and choose <emphasis>
+ <property moreinfo="none">Create
Group…</property>
+ </emphasis> option.</para>
+ <figure float="0">
+ <title>Creating a tag library</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After setting the attribute name and the path of the
icon, click <emphasis>
+ <property
moreinfo="none">Ok</property>
+ </emphasis> button.</para>
+ <note>
+ <title>Note:</title>
+ <para>If you do not choose an icon the default one will be
assigned.</para>
+ </note>
+ <para>You are allowed to edit or delete the tag library, as
well. If
+ you'd like to change attributes of the library or choose
another
+ icon, use the right editing window of the palette editor or the
<emphasis>
+ <property
moreinfo="none">Edit...</property>
+ </emphasis> option. In order to remove the tag library,
right click on the
+ library that you wish to remove and chose the <emphasis>
+ <property
moreinfo="none">Delete</property>
+ </emphasis> option or click the <emphasis>
+ <property
moreinfo="none">Delete</property>
+ </emphasis> keyboard button.</para>
+ <important>
+ <title>Important:</title>
+ <para>The removal option is enabled only for custom tag
libraries.</para>
+ </important>
+ </listitem>
+ <listitem>
+ <para>to work with a tag element</para>
+ <para>When the library folder is created, new tags can be added
to it. Choose
+ the required library and select the option <emphasis>
+ <property moreinfo="none">Create >
Create Macro…</property>
+ </emphasis> from the pop-up menu that appears after you
right-click on a
+ folder.</para>
+ <figure float="0">
+ <title>Creating a tag element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the <property moreinfo="none">Add
Palette Macro</property> window, you can configure
+ the tag element. Attribute <emphasis>
+ <property
moreinfo="none">Name</property>
+ </emphasis> is mandatory to fill and it will be the name of
the tag element.
+ Other settings are optional. You can choose the icon and set the
<emphasis>
+ <property moreinfo="none">Start
Text</property>
+ </emphasis> and the <emphasis>
+ <property moreinfo="none">End
Text</property>
+ </emphasis> for your tag element. If your tag text is too
long, use the <emphasis>
+ <property
moreinfo="none">Change...</property>
+ </emphasis> button to see it all. For <emphasis>
+ <property moreinfo="none">start
text</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">end
text</property>
+ </emphasis> there is a possibility to control the cursor
position by using
+ "|" symbol.</para>
+ <figure float="0">
+ <title>Parameters of the Palette element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After all the attributes are set, click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button.</para>
+ <note>
+ <title>Note:</title>
+ <para>If you do not choose an icon the default one will be
assigned.</para>
+ </note>
+ <para>You are also allowed to edit or delete the tag. If
you'd like to
+ change the attributes of the tag or choose another icon for it,
use the
+ right editing window of the palette editor or the
<emphasis>
+ <property
moreinfo="none">Edit...</property>
+ </emphasis> option from the pop-up menu. In order to remove
the tag, right
+ click on the tag that you wish to remove and chose the
<emphasis>
+ <property
moreinfo="none">Delete</property>
+ </emphasis> option or click the <emphasis>
+ <property
moreinfo="none">Delete</property>
+ </emphasis> keyboard button.</para>
+ <important>
+ <title>Important:</title>
+ <para>The removal option is enabled only for custom tags.
JBoss Palette tags
+ can not be removed but can be modified.</para>
+ </important>
+ </listitem>
+
+ </itemizedlist>
+
+ <para>If you have changed any abject in the tree view and you don't
like the final result you can always use the <emphasis><property
moreinfo="none">Restore Defaults</property></emphasis> button.
Click on it will restore defaults for the object selected and for its children elements.
Please remember that the button will only restore data for objects defined in the default
palette. If selected object is created by you, the button will be disabled. Child objects
added by you will not be removed.</para>
+ <para>When updating JBoss Tools the palette content is not
updated.</para>
+ </section>
+ <section id="show_hide">
+ <?dbhtml filename="Show/Hide.html"?>
+ <title>Show/Hide</title>
+ <para><emphasis>
+ <property moreinfo="none">Show/Hide</property>
+ </emphasis> is a very useful feature that allows you to control the
number of tag
+ groups that are shown on the palette.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Show/Hide</property>
+ </emphasis> button, at the top right side of the JBoss
Tools Palette.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Show/Hide Button</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the dialog Show/Hide Drawers check the groups the
libraries of which
+ you want to be shown on the palette:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Show/Hide Drawers</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If libraries are not displayed in the palette, check whether they
are selected.
+ Click the plus sign to expand the libraries of the group and make sure
that a tick
+ is put next to the wanted libraries.</para>
+ <!-- <para>(When you deactivate the group(s), the JBoss Palette
remembers your last chose.
+ The libraries… )</para>
+ -->
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis><property
moreinfo="none">OK</property>.</emphasis> The new groups will
+ now be shown on the palette:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Added Groups</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The names of the elements are compound. The first part is the
group name and the
+ second is the library name.</para>
+ </section>
+ <section id="Import">
+ <?dbhtml filename="Import.html"?>
+ <title>Import</title>
+ <para>The Import button lets you add a custom or 3rd party tag library
to JBoss Tools
+ Palette. Find out more information on how to add particular tags see the
<link linkend="ImportButton521">Adding Custom JSF Tags</link>
section.
+ <!--<link
linkend="CreatingAndWorkingCustomCapability">Learn how to
import</link>. --></para>
+ </section>
+ </section>
+ <section id="UsingThePaletteIncludingOneClickTagInsertion">
+ <?dbhtml
filename="UsingThePaletteIncludingOneClickTagInsertion.html"?>
+ <title>Using the Palette</title>
+ <section id="InsertingTagsIntoAJSPFile">
+ <?dbhtml filename="InsertingTagsIntoAJSPFile.html"?>
+ <title>Inserting Tags into a JSP File</title>
+ <para>A new tag can be added into any text file including jsp, htm,
html and xhtml.</para>
+ <para>Let's do it. Open your JSP file and place the cursor in a
place where
+ you'd like to add a tag and then click that tag in the palette. In
the
+ <property moreinfo="none">Insert Tag</property>
window, that appears, you can set the value of<emphasis>
+ <property moreinfo="none">general</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">advanced</property>
+ </emphasis> attributes of the tag that you chose.</para>
+ <figure float="0">
+ <title>Inserting Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the example below, the <emphasis>
+ <property
moreinfo="none">commandButton</property>
+ </emphasis> tag has been inserted.</para>
+ <figure float="0">
+ <title>Inserting Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_2.png"
scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>if you place the cursor over any tag, a balloon hint is shown
with all the
+ <emphasis role="italic">
+ <property
moreinfo="none">"tag"</property>
+ </emphasis> attributes.</para>
+ </tip>
+ <para>The cursor position after adding a tag into a file is specified
by
+ "|" symbol in the tag template on the right in the Palette
Editor
+ window. </para>
+ <figure float="0">
+ <title>Palette Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Above you can see where the cursor position for
<emphasis>
+ <property moreinfo="none">HTML > Form >
input</property>
+ </emphasis> is set. Thus, after adding this tag into your file the
cursor will be in
+ the attribute "type". Then, you can straight use the
combination
+ of buttons <property moreinfo="none">Ctrl +
Space</property> to inquire about a prompting. </para>
+ <figure float="0">
+ <title>Cursor position</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_16.png"
scale="50"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="AddingCustomJSFTagsToTheRedHatPalette7433">
+ <?dbhtml
filename="AddingCustomJSFTagsToTheJBossToolsPalette.html"?>
+ <title>Adding Custom JSF Tags to the JBoss Tools Palette</title>
+
+ <para>There are two ways to add any custom or 3rd party tag library to
the
+ <property moreinfo="none">JBoss Tools
Palette</property>:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Drag-and-drop from the Web Projects view</para>
+ </listitem>
+ <listitem>
+ <para>The Import button on the JBoss Tools
Palette</para>
+ </listitem>
+ </itemizedlist>
+ <para>Before you can add your custom component library, you need to
make sure it is
+ included in your project. Either place the <emphasis
role="italic">
+ <property
moreinfo="none">".tld"</property>
+ </emphasis> file or the <emphasis role="italic">
+ <property
moreinfo="none">".jar"</property>
+ </emphasis> that includes your tag library under the lib folder in
your project. </para>
+ <section id="Drag_and_Drop65332">
+ <?dbhtml filename="DragAndDrop.html"?>
+ <title>Drag-and-Drop</title>
+ <para>Switch to the Web Projects view and expand the Tag Libraries
folder. If the
+ view is not active, select <emphasis>
+ <property moreinfo="none">Window > Show
View > Web Projects</property>
+ </emphasis> from the menu bar.</para>
+ <figure float="0">
+ <title>Web Projects View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Also make sure that the JBoss Tools Palette is open. Select
the tag library
+ that you want to add and simply drag-and-drop it on to the JBoss
Tools Palette.</para>
+ <para>You will see the following dialog window. As you can see
JBoss Developer
+ Studio takes care of all the details. Chosen <emphasis>
+ <property moreinfo="none">TLD
file</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> and <emphasis>
+ <property
moreinfo="none">prefix</property>
+ </emphasis> of the library and <emphasis>
+ <property moreinfo="none">Library
URL</property>
+ </emphasis> are detected, thus just need to set the
<emphasis>
+ <property moreinfo="none">Group</property>
+ </emphasis> name to which you wish to place this tag library.
You can either add
+ this tag library to an existing Group or just create a new
one.</para>
+ <figure float="0">
+ <title>Import Tags From TLD File Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once you are finished, you will see the new tag library added
to the JBoss
+ Tools Palette.</para>
+ <figure float="0">
+ <title>JBoss Tools Palette with New Tag Library</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ImportButton521">
+ <?dbhtml filename="ImportButton.html"?>
+ <title>Import Button</title>
+ <para>The same you can do with <emphasis>
+ <property
moreinfo="none">Import</property>
+ </emphasis> button. You can see this button at the top right
side of the JBoss
+ Tools Palette.</para>
+ <figure float="0">
+ <title>Import Button</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By clicking on the <emphasis>
+ <property moreinfo="none">Import
button</property>
+ </emphasis> you will see the Import Tag window a similar like
in the <link linkend="Drag_and_Drop65332"> Drag-and-Drop</link>
method. Set the name and
+ prefix of the library and Library URL. Also you need to set the Group
name to
+ which you'd like to add your tag library. And like in the
previous
+ method you can add it to an existing Group or create a new one. On
this Import
+ Tag form you can use <emphasis>
+ <property
moreinfo="none">Browse...</property>
+ </emphasis>button to locate the tag library that you want to
add:</para>
+ <figure float="0">
+ <title>Select TLD File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ </section>
+
+</chapter>
+
+
+<chapter id="richfaces_support" role="new"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/richfaces_support.xml"
xreflabel="richfaces_support">
+ <?dbhtml filename="editors.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>RichFaces</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>RichFaces Support</title>
+
+ <para><property moreinfo="none">JBoss Developer
Studio</property> comes with a tight integration with <ulink
url="http://labs.jboss.com/jbossrichfaces/">RichFaces component
framework</ulink>.</para>
+
+ <note>
+ <title>Note:</title>
+ <para><ulink
url="http://www.jboss.org/jbossrichfaces/downloads/">RichFaces
+ 3.3</ulink> is fully supported in the current version of <property
moreinfo="none">JBoss Developer Studio</property> (i. e. 2.0.0.GA) and
<property moreinfo="none">JBoss Tools
3.0.0.GA</property>.</para>
+ </note>
+
+ <para>The following features are implemented and fully supported for the
current version of the RichFaces components:</para>
+
+ <itemizedlist>
+ <listitem><para><link
linkend="ContentAssistForRF">Content
Assist</link></para></listitem>
+ <listitem><para><link
linkend="RF_openOn">OpenOn</link></para></listitem>
+ <listitem><para><link
linkend="RF_in_palette">Representing in JBoss Tools
Palette</link></para></listitem>
+ </itemizedlist>
+
+ <para>All you have to do is to <ulink
url="http://www.jboss.org/jbossrichfaces/downloads/">downloa...
and install RichFaces libraries into your
+ project, i. e. just put <emphasis>
+ <property moreinfo="none">richfaces-*.jar</property>
+ </emphasis> files into the <emphasis>
+ <property moreinfo="none">/lib</property>
+ </emphasis> project folder. Also how to get started with <property
moreinfo="none">RichFaces</property> you can find in <ulink
url="http://jboss.org/file-access/default/members/jbossrichfaces/fre...
documentation</ulink>.</para>
+
+ <section id="ContentAssistForRF">
+ <title>Code Assist for RichFaces</title>
+
+ <para><property moreinfo="none">JBDS/JBoss
Tools</property> indeed provide code completion for <ulink
url="http://www.jboss.org/jbossrichfaces">RichFaces</ulin... framework
+ components.</para>
+
+ <tip>
+ <title>Tip:</title>
+
+ <para>RichFaces 3.3 is now fully supported in code
completion.</para>
+ </tip>
+
+ <figure float="0">
+ <title>Content Assist for RichFaces Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_29.png"
scale="65"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="RF_openOn">
+ <title>OpenOn for RichFaces</title>
+
+ <para>Working with <emphasis>
+ <property
moreinfo="none">.jsp/.xhtml</property></emphasis> pages in
<property moreinfo="none">VPE</property> you can also take the
advantage of <emphasis>
+ <property
moreinfo="none">OpenOn</property></emphasis> feature for the
<property moreinfo="none">RichFaces</property>
components.</para>
+
+ <para>For example, <property
moreinfo="none">Richfaces</property> tags <emphasis>
+ <property
moreinfo="none"><rich:insert></property>
+ </emphasis> and <emphasis>
+ <property
moreinfo="none"><a4j:include></property>
+ </emphasis> has <property
moreinfo="none">OpenOn</property> support.</para>
+
+ <figure float="0">
+ <title>OpenOn With Richfaces Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_8a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>OpenOn With A4j Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_8b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="RF_in_palette">
+ <title>RichFaces in the JBoss Tools Palette</title>
+
+ <para>RichFaces and Ajax4jsf tag libraries always exist in <link
linkend="palette">JBoss Tools
+ Palette</link>.</para>
+
+ <figure float="0">
+ <title>RichFaces Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/palette/palette_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To insert a <property
moreinfo="none">RichFaces</property> component on a page:</para>
+ <itemizedlist>
+ <listitem>
+ <para>expand <emphasis>
+ <property moreinfo="none">JBoss
RichFaces</property>
+ </emphasis> group on the palette</para>
+ </listitem>
+
+ <listitem>
+ <para>click on some component</para>
+ </listitem>
+
+ <listitem>
+ <para>put the needed attributes in the <emphasis>
+ <property moreinfo="none">Insert
Tag</property>
+ </emphasis> dialog and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Inserting Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_30.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property
moreinfo="none">RichFaces</property> component will be inserted on your
page and displayed in source and visual
+ modes:</para>
+
+ <figure float="0">
+ <title>RichFaces Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/editors_features/editors_features_31.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Relevant Resources Links</title>
+
+ <para>To get more in-depth information on <property
moreinfo="none">RichFaces</property> framework refer to <ulink
url="http://jboss.org/file-access/default/members/jbossrichfaces/fre...
Developer Guide</ulink>.</para>
+ <para>It may be also helpful for you to look through the <ulink
url="http://docs.jboss.org/tools/movies/">movies</ulink> where there
are ones that demonstrate the usage of RichFaces components.</para>
+ </section>
+</chapter>
+
+<chapter id="web_projects"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/web_projects.xml"
xreflabel="web_projects">
+ <?dbhtml filename="web_projects.html"?>
+<title>Web Projects View</title>
+<para><property moreinfo="none">Web Projects</property> is a
special view that comes with JBoss Developer Studio.</para>
+<para>If the Web Projects view's tab is not visible next to the Package
Explorer tab, select <emphasis><property moreinfo="none">Window
> Show View > Other > JBoss Tools Web > Web
Projects</property></emphasis> from the menu bar.</para>
+<para>With the Web Projects view, you can:</para>
+
+<itemizedlist>
+<listitem><para>Visualize the project better because the project artifacts
for JSF and Struts projects are organized and displayed by
function.</para></listitem>
+<listitem>
+ <para>Select these kinds of items to drag and drop into JSP
pages:</para>
+ <itemizedlist>
+ <listitem><para>JSF managed bean
attributes</para></listitem>
+<listitem><para>JSF navigation rules outcomes</para></listitem>
+<listitem><para>Property file values</para></listitem>
+<listitem><para>Tag library files</para></listitem>
+<listitem><para>Tags from tag libraries</para></listitem>
+<listitem><para>JSP page links</para></listitem>
+</itemizedlist>
+</listitem>
+<listitem><para>Use context menus to develop the application (all create and
edit functions are available)</para></listitem>
+<listitem><para>Use icon shortcuts to create and import JSF and Struts
projects</para></listitem>
+<listitem><para>Expand and inspect tag library
files</para></listitem>
+<listitem><para><link
linkend="AddingCustomJSFTagsToTheRedHatPalette7433">Select custom and
third-party tag libraries to drag and drop onto
+the JBoss Tools Palette</link></para></listitem>
+</itemizedlist>
+
+<section id="ProjectOrganization">
+
+<title>Project Organization</title>
+<para>The Web Projects view organizes your project in a different way. The physical
structure of course stays the same. The new organization combines common project artifacts
together which makes it simpler to
+locate what you are looking for and develop.</para>
+
+<para>The screen shot below shows a JSF project and a Struts project in Web
Projects view.</para>
+<figure float="0">
+ <title>Web Projects View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</section>
+<section id="DragAndDrop">
+
+<title>Drag and Drop</title>
+ <para>Web Projects View has a drag and drop option that can be used for
property, managed bean attributes, navigation rules, tag library file declaration and JSP
Pages.</para>
+<section id="ForAProperty">
+
+<title>For a Property</title>
+ <para>Expand the <property moreinfo="none">Resources
Bundles</property> folder that holds all the Property files in your project. Select
the file from which you want to add the property and then select the
property.</para>
+<para>We will be dragging and dropping a property file value inside the outputText
tag for the <emphasis role="italic"><property
moreinfo="none">"value"</property></emphasis>
attribute.</para>
+<figure float="0">
+<title>OutputText Tag</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_2.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Select the property:</para>
+<figure float="0">
+<title>Selecting Property</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_3.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+ <para>Drag the property and drop it between the quotes for the value attribute
in the JSP file. Notice that JBoss Developer Studio added the correctly formatted
expression for referring to the property value <emphasis><property
moreinfo="none">#{Message.header}</property></emphasis>
automatically.</para>
+ <figure float="0">
+<title>Inserted Property</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_4.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>You can actually place the tag anywhere in the page, not just inside an
existing tag. In this case,
+ JBoss Developer Studio will place the complete tag <emphasis><property
moreinfo="none"><h:outputText
value="#{Message.header}"/></property></emphasis> in the
page.</para>
+ </section>
+<section id="ForManagedBeanAttributes">
+
+<title>For Managed Bean Attributes</title>
+
+<para>Select a <emphasis role="italic"><property
moreinfo="none">"managed bean"</property></emphasis>
attribute and then drag and drop it onto the JSP page. We are going to place it inside the
<emphasis role="italic"><property
moreinfo="none">"value"</property></emphasis> attribute
of the inputText tag.</para>
+<figure float="0">
+<title>Selecting Managed Bean Attribute</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_5.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Once again, JBoss Developer Studio adds the correct expression,
<emphasis>#{user.name}</emphasis>.</para>
+<figure float="0">
+<title>Added Expression</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_6.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="NavigationRules">
+
+<title>Navigation Rules</title>
+
+<para>Select the navigation rule under <emphasis><property
moreinfo="none">Configuration > faces-config.xml > Navigation
Rules</property></emphasis>:</para>
+<figure float="0">
+<title>Selecting Navigation Rule</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_7.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Drag and drop it inside the commandButton tag:</para>
+<figure float="0">
+<title>Naviagation Rule in CommandButton Tag</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_8.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>You could do the same if the navigation rule was defined inside an action
method:</para>
+<figure float="0">
+<title>Navigation Rule in Action Method</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_9.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Here is how it would look after drag and drop:</para>
+<figure float="0">
+<title>Inserted Navigation Rule</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_10.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="ForATagLibraryFileDeclaration">
+
+<title>For a Tag Library File Declaration</title>
+
+<para>Select a TLD file:</para>
+<figure float="0">
+<title>Selecting TLD File</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_11.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Then drag and drop it onto the JSP page to add a declaration at the top of
the page:</para>
+<figure float="0">
+<title>Inserted TLD File</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_12.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="ForJSPPages">
+
+<title>For JSP Pages</title>
+
+<para>You can also drag and drop a JSP page path to a JSP page to create a forward
as shown:</para>
+<figure float="0">
+<title>Creating JSP Forward</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_13.png"
scale="80"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+</section>
+<section id="DevelopingTheApplication">
+
+<title>Developing the Application</title>
+
+<para>It is also possible to develop your application right from the Web Projects
view.
+Simply right-click any node in the tree and select an appropriate action from the context
menu. For instance, this screen capture shows creating a new navigation
rule.</para>
+<figure float="0">
+<title>Creating New Navigation Rule</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_14.png"
scale="90"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="ExpandingTagLibraryFiles">
+
+<title>Expanding Tag Library Files</title>
+
+<para>You can easily expand any TLD file in the project. Browse to the Tag
Libraries folder. Right-click a TLD file and select <emphasis><property
moreinfo="none">Expand</property></emphasis>. The TLD file will
now be expanded.</para>
+
+<para>You can then select any tag and drag it onto a JSP page.</para>
+<figure float="0">
+<title>Expanding Tag Library File</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_15.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="DragAndDropTagLibrariesOnToRedHatPalette">
+
+<title>Drag and Drop Tag Libraries on to JBoss Tools Palette</title>
+
+ <para>Read <link
linkend="AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag
Libraries</link> to learn about this.</para>
+</section>
+<section id="CreateAndImportJSFAndStrutsProjects">
+<title>Create and Import JSF and Struts Projects</title>
+
+<para>You can also create and import JSF and Struts project from Web Projects view
by selecting the
+buttons below.</para>
+
+<para>From left to right:</para>
+
+<orderedlist continuation="restarts" inheritnum="ignore">
+<listitem><para>Create New JSF Project</para></listitem>
+<listitem><para>Import JSF Project</para></listitem>
+<listitem><para>Create New Struts Project</para></listitem>
+<listitem><para>Import Struts Project</para></listitem>
+</orderedlist>
+<figure float="0">
+<title>Web Projects View Buttons</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/web_projects/web_projects_16.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+
+</chapter>
+
+<chapter id="preferences"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/preferences.xml"
xreflabel="preferences">
+ <?dbhtml filename="preferences.html"?>
+ <title>JBoss Tools Preferences</title>
+
+ <para>Configuring the various <property moreinfo="none">JBoss
Developer Studio</property> features is done via
+ the <property moreinfo="none">Preferences</property> screen
by selecting <emphasis>
+ <property moreinfo="none">Window > Preferences
> JBoss Tools</property>
+ </emphasis> from the menu bar.</para>
+ <figure float="0">
+ <title>Preferences are included in this dialog.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>From this screen, you can select these more specific sets of <property
moreinfo="none">JBoss Tools
+ preferences</property>:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <link linkend="PackagingArchives">Packaging
Archives</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="Editors">Editors</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="VisualPageEditor2">Visual Page
Editor</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="el_variables">El Variables</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="JSF">JSF</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="JSFPage">JSF Page</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="JSFPropject">JSF Propject</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="JSFFlowDiagram">JSF Flow
Diagram</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="Seam">Seam</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="SeamValidator">Seam
Validator</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="Struts">Struts</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="struts_automation">Struts
Automatic</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="Plug-inInsets">Plug-in
Insets</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="ResourceInsets">Resource
Insets</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="StrutsCustomization">Struts
Customization</link>
+ </para>
+ </listitem>
+
+
+ <listitem>
+ <para>
+ <link linkend="StrutsProject">Struts
Project</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="StrutsSupport">Struts
Support</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="StrutsPages">Struts Pages</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="StrutsFlowDiagram">Struts Flow
Diagram</link>
+ </para>
+ </listitem>
+
+
+ <listitem>
+ <para>
+ <link linkend="tiles_diagram">Tiles Diagram</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="Verification">Verification</link>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The <property
moreinfo="none">Preferences</property> dialog <emphasis>(
<property moreinfo="none">Window >
+ Preferences</property>) </emphasis> also allows to adjust
settings for <link linkend="JBossServerPreferences">JBoss
Server</link> and <link linkend="XDoclet">XDoclet</link>
module.</para>
+
+ <section id="PackagingArchives">
+ <?dbhtml filename="PackagingArchives.html"?>
+ <title>Packaging Archives</title>
+
+ <para>Fallow to <emphasis>
+ <property moreinfo="none">JBoss Tools > Packaging
Archives</property>
+ </emphasis> to open the page for changing Packaging Archives
preferences.</para>
+ <para>Here you can determine settings for Project Packages view and core
preferences.</para>
+
+ <figure float="0">
+ <title>Packaging Archives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The next table lists all available preferences for Packaging Archives
and their
+ description.</para>
+
+ <table>
+ <title>Packaging Archives Preferences</title>
+
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1"
colwidth="2*"></colspec>
+ <colspec colnum="2"
colwidth="4*"></colspec>
+ <colspec colnum="3"
colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>Enable incremental builder</entry>
+ <entry>Uncheck this option if you don't want to enable
incremental
+ builder for your resources</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show full output path next to
packages</entry>
+ <entry>This option allows you to show or hide an output
path next to
+ packages
+ <!--(<link
linkend="full_outputpath_for_packages">See the
+ figure</link>)-->.</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show the full root directory of
filesets</entry>
+ <entry>If on, the full root directory is displayed next to
filesets.
+ Otherwise, it's hidden
+ <!--(<link
+ linkend="full_rootdir_for_filesets">See the
figure</link>)-->.</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show project at the root</entry>
+ <entry>This option allows you to choose whether to display
a project name at
+ the root of the packages or not. When checked, 'Show all
+ projects that contain packages' is enabled
+ <!--(<link
+ linkend="project_at_the_root">See the
figure</link>)-->.</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show all projects that contain
packages</entry>
+ <entry>Selecting this setting enables the Projects
Archiving view to show or
+ hide all projects that contain packages. The option is
available when
+ the previous one is checked.</entry>
+ <entry>Off</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <!--
+ <figure id="full_outputpath_for_packages">
+ <title>Show Full Output Path next to Packages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure id="full_rootdir_for_filesets">
+ <title>Show the Full Root Directory of Filesets</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure id="project_at_the_root">
+ <title>Show Project at the root</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+-->
+
+ </section>
+
+ <!--section id="CodeAssist">
+ <?dbhtml filename="CodeAssist.html"?>
+ <title>CodeAssist</title>
+ <para>Select <emphasis>
+ <property>JBoss Tools > XDoclet > Code
Assist</property>
+ </emphasis> to see Code Assist preference page.</para>
+ <para>Here is what the Code Assist preference page looks like:
</para>
+ <figure>
+ <title>CodeAssist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section-->
+
+ <section id="Editors">
+ <?dbhtml filename="Editors.html"?>
+ <title>Editors</title>
+ <para>To adjust settings common for all editors supplied with <property
moreinfo="none">JBoss Developer
+ Studio</property> you should select <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Editors</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Editors</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the Editors page the following preferences are
available:</para>
+
+ <table>
+
+ <title>Editors Preferences</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1"
colwidth="2*"></colspec>
+ <colspec colnum="2"
colwidth="4*"></colspec>
+ <colspec colnum="3"
colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>Always use JBoss Tools editors with Open
option</entry>
+ <entry></entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show warning when project has no JBoss Tools
capabilities</entry>
+ <entry>Check this option to be sure that any JBoss Tools
editor fully
+ available for a particular type of file. If no, you'll
be
+ warned about this.</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Use Source tab as a default for multi-tab
editors</entry>
+ <entry>If on, an editor will open the files in the Source
view by
+ default</entry>
+ <entry>Off</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section id="VisualPageEditor2">
+ <?dbhtml filename="VisualPageEditor.html"?>
+ <title>Visual Page Editor</title>
+ <para><emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Editors > Visual Page
+ Editor</property>
+ </emphasis> screen allows you to control some aspects of the behavior
of the
+ <property moreinfo="none">Visual Page
Editor</property> (VPE) for JSF/HTML files.</para>
+ <figure float="0">
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The next table lists the possible settings that you can adjust on
the
+ <property moreinfo="none">General tab</property> of
the VPE Preferences page.</para>
+
+
+ <table>
+
+ <title>VPE Preferences</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1"
colwidth="2*"></colspec>
+ <colspec colnum="2"
colwidth="4*"></colspec>
+ <colspec colnum="3"
colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>Show Border for Unknown Tags</entry>
+ <entry>The option allows to place the border around unknown
tags or undo
+ this</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show Non-Visual Tags</entry>
+ <entry>Check this box, if you want the editor shows
non-visual elements on
+ the page you're editing</entry>
+ <entry>Off</entry>
+ </row>
+
+ <row>
+ <entry>Show Resource Bundles Usage as EL Expressions
</entry>
+ <entry>If the option is checked, the editor will show EL
expressions instead
+ of the resource values</entry>
+ <entry>Off</entry>
+ </row>
+
+ <row>
+ <entry>Always Prompts for Tag Attributes During Tag Insert
</entry>
+ <entry>Having this option off, the dialog with possible
attributes for
+ inserting tag won't appear if all its attributes are
optional</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Show Selection Tag Bar</entry>
+ <entry>This option allows to show or hide the Selection
Bar</entry>
+ <entry>On</entry>
+ </row>
+
+ <row>
+ <entry>Always Hide Selection Bar Without
Prompt</entry>
+ <entry>Check this box if you don't want the
confirmation window
+ appears when closing the Selection Bar</entry>
+ <entry>Off</entry>
+ </row>
+
+ <row>
+ <entry>Default Editor Tab</entry>
+ <entry>The option provides with a possibility to choose one
of the following
+ views - Visual/Source, Source or Preview, as default when
opening the
+ editor</entry>
+ <entry>Visual/Source</entry>
+ </row>
+
+ <row>
+ <entry>Size of Visual Editor Pane 0 – 100% </entry>
+ <entry>With the help of this scroll bar you can adjust the
percentage rating
+ between the Source and Visual modes of the Visual/Source
view</entry>
+ <entry>50%</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>On the <property moreinfo="none">Templates
tab</property> you can edit or remove <link
linkend="vpe_templating">VPE templates</link>.</para>
+ <figure float="0">
+ <title>Visual Page Editor Templates</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select a template for editing from the available list and press
<emphasis>
+ <property moreinfo="none">Edit</property>
+ </emphasis> button. It will pick up the <link
linkend="template_dialog">Template
+ dialog</link> where you can adjust new settings.</para>
+ </section>
+
+ <section id="el_variables">
+ <?dbhtml filename="el_variables.html"?>
+ <title>El Variables</title>
+ <para>To specify necessary EL variables globally, i. e. for all projects
and resources in
+ your workspace, you should go to <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> El Variables</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>El Variables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click <emphasis>
+ <property moreinfo="none">Add...</property>
+ </emphasis> to set value for a new EL variable. In the appeared wizard
you should
+ specify the global values and press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis>.</para>
+
+ <figure float="0">
+ <title>Adding a Global El Variable</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>If you specify an equal variable in <link
linkend="el_exp_para">VPE EL
+ dialog</link> and in Preference EL dialog, variable from
preference dialog will
+ have priority.</para>
+ </tip>
+ </section>
+ <!--section id="JBossServers">
+ <?dbhtml filename="JBossServers.html"?>
+ <title>JBoss Servers</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property>JBoss Tools > JBoss Servers</property>
+ </emphasis> preference page.</para>
+ <para>Here is what the JBoss Servers preference page looks
like:</para>
+ <figure>
+ <title>JBoss Servers</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section-->
+
+ <section id="JSF">
+ <?dbhtml filename="JSF.html"?>
+ <title>JSF</title>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> JSF</property>
+ </emphasis> to get to the JSF Project specific
preferences.</para>
+ <figure float="0">
+ <title>JSF</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="JSFPage">
+ <?dbhtml filename="JSF Page.html"?>
+ <title>JSF Pages</title>
+ <para>By selecting <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> JSF > JSF Pages</property>
+ </emphasis> you can add jsf pages or remove existing
ones.</para>
+ <figure float="0">
+ <title>JSF Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="JSFPropject">
+ <?dbhtml filename="JSFPropject.html"?>
+ <title>JSF Project</title>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> JSF > Project</property>
+ </emphasis> to see JSF Project preferences page.</para>
+ <para>On the <emphasis>
+ <property moreinfo="none">New Project</property>
+ </emphasis> tab you can set default values for <ulink url="
../../jsf_tools_ref_guide/html_single/index.html#new_jsf_project">New JSF
Project</ulink> wizard:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>
+ <property
moreinfo="none">Version</property>
+ </emphasis> for setting the default JSF
Environment</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis>
+ <property moreinfo="none">Project
Template</property>
+ </emphasis> so as <property moreinfo="none">New
JSF Project wizard</property> shows this
+ template as default for the chosen JSF Environment</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis>
+ <property moreinfo="none">Project
Root</property>
+ </emphasis> for specifying default location for a new JSF
project</para>
+ <para>If you check <emphasis>
+ <property moreinfo="none">Use Default
Path</property>
+ </emphasis> here, this box will be also checked in the
<property moreinfo="none">New JSF Project
+ wizard</property>.</para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis>
+ <property moreinfo="none">Servlet
Version</property>
+ </emphasis> for setting the default Servlet version of a new
JSF project</para>
+ <para>Here it's also possible to define whether to register Web
Context in <emphasis>
+ <property
moreinfo="none">server.xml</property>
+ </emphasis> while organizing a new project or not. Check the
proper box in order
+ to do that.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>New JSF Propject Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the <emphasis>
+ <property moreinfo="none">Import
Project</property>
+ </emphasis> tab in the JSF Project screen you can determine the default
Servlet version
+ for the <ulink url="
../../Exadel-migration/html_single/index.html#import_jsf_screen">Import JSF
Project</ulink>
+ wizard and also whether to register Web Context in <emphasis>
+ <property moreinfo="none">server.xml</property>
+ </emphasis> or not.</para>
+
+ <figure float="0">
+ <title>Import JSF Propject Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="JSFFlowDiagram">
+ <?dbhtml filename="JSFFlowDiagram.html"?>
+ <title>JSF Flow Diagram</title>
+ <para>Selecting <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Editors > JSF Flow Diagram</property>
+ </emphasis> allows you to specify some aspects of the Diagram mode of
the JSF
+ configuration file editor.</para>
+
+ <figure float="0">
+ <title>JSF Flow Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_15.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first two items control the background grid for the diagram. The
next two items
+ allow you to control the appearance of the labels for views (pages) and the
transitions
+ between views. For these two items, clicking the <emphasis>
+ <property moreinfo="none">Change... </property>
+ </emphasis>button allows you to assign a font with a dialog
box.</para>
+
+ <para>The first check box determines whether a view in the diagram that
doesn't have a
+ transition connecting it to another view yet should be written to the source
code as a
+ partial navigation rule. The next check box determines whether the diagram
cursor
+ reverts immediately to the standard selection mode after it's used in
the
+ transition-drawing mode to draw a transition. Finally, the last two check
boxes concern
+ shortcuts. A shortcut is a transition that is there but isn't actually
displayed in the
+ diagram as going all the way to the target view it's connected to, in
order to make the
+ diagram clearer. With the check boxes, you can decide whether to display a
small
+ shortcut icon as part of the shortcut and also whether to display the target
view as a
+ label or not.</para>
+ <figure float="0">
+ <title>Add View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_16.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Selecting the Add Page tab in the JSF Flow Diagram screen allows you
to determine the
+ default template and file extension for views (pages) you add directly into
the diagram
+ using a context menu or the view-adding mode of the diagram
cursor.</para>
+ </section>
+
+ <section id="label_decorations">
+ <title>Label Decorations</title>
+
+ <para>The Label Decorations page is opened from <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Label Decorations</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>Label Decorations</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On this page you can determine the format for a text output near the
decoration label
+ for different Web resources. To change the value for selected element, click
<emphasis>
+ <property moreinfo="none">Add
Variable...</property>
+ </emphasis> button next to <emphasis>
+ <property moreinfo="none">Format</property>
+ </emphasis> field. Appeared wizard will prompt you to select one from
the available
+ list.</para>
+
+ <figure float="0">
+ <title>Label Decoration for Validator</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="Seam">
+ <?dbhtml filename="Seam.html"?>
+ <title>Seam</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Seam</property>
+ </emphasis> page.</para>
+ <para>On <emphasis>
+ <property moreinfo="none">Seam</property>
+ </emphasis> screen you can add and remove Seam runtimes.</para>
+ <para>Here is what Seam preference page looks like:</para>
+ <figure float="0">
+ <title>Seam</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="SeamValidator">
+ <?dbhtml filename="SeamValidator.html"?>
+ <title>Seam Validator</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Seam > Validator</property>
+ </emphasis> page.</para>
+ <para>In <emphasis>
+ <property moreinfo="none">Validator</property>
+ </emphasis> panel you configure seam problems that will be processed
by
+ validator.</para>
+ <figure float="0">
+ <title>Seam Validator</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="Struts">
+ <?dbhtml filename="Struts.html"?>
+ <title>Struts</title>
+ <para>By selecting <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Struts</property>
+ </emphasis> you can configure Struts projects specific
preferences.</para>
+ <figure float="0">
+ <title>Struts</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="struts_automation">
+ <?dbhtml filename="struts_automation.html"?>
+ <title>Struts Automation</title>
+ <para>On <emphasis>
+ <property moreinfo="none">Automation</property>
+ </emphasis> panel you can modify default text for the Tilel Struts
plug-in element, the
+ Validator Struts plug-in element, and error message resource
files.</para>
+ <figure float="0">
+ <title>Struts Automatic</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="Plug-inInsets">
+ <?dbhtml filename="Plug-inInsets.html"?>
+ <title>Plug-in Insets</title>
+ <para>By selecting <emphasis>
+ <property moreinfo="none">Web > Struts >
Automation > Plug-in Insets</property>
+ </emphasis> on tab Tiles you can define a default text for tiles
plugin.</para>
+ <figure float="0">
+ <title>Plug-in Insets</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The same is done but for validator plugin on the tab
Validators.</para>
+ <figure float="0">
+ <title>Plug-in Insets of Validators</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="ResourceInsets">
+ <?dbhtml filename="ResourceInsets.html"?>
+ <title>Resource Insets</title>
+ <para>To see Resource Insets preference page select <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Strats > Automation > Resource Insets</property>
+ </emphasis>.</para>
+ <para>On <emphasis>
+ <property moreinfo="none">Resource
Insets</property>
+ </emphasis> panel you determine default error messages for error
resource files.</para>
+ <figure float="0">
+ <title>Resource Insets</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StrutsCustomization">
+ <?dbhtml filename="StrutsCustomization"?>
+ <title>Struts Customization</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Struts > Customization</property>
+ </emphasis> page.</para>
+ <para>In the<emphasis>
+ <property moreinfo="none">Customization</property>
+ </emphasis> screen you configure Link Recognizer for Struts
tags.</para>
+ <figure float="0">
+ <title>Struts Customization</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StrutsProject">
+ <?dbhtml filename="StrutsProject.html"?>
+ <title>Struts Project</title>
+ <para>You can change the following preferences on the <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Struts > Project</property>
+ </emphasis> preference page:</para>
+ <para>On <emphasis>
+ <property moreinfo="none">Project</property>
+ </emphasis> panel you define a template for a new Struts created
project: servlet
+ version, page template and so on.</para>
+ <figure float="0">
+ <title>Struts Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_27.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Selecting the Import Project tab in the Struts Project screen allows
you to determine
+ the default servlet version and whether to register Web Context in
server.xml.</para>
+ <figure float="0">
+ <title>Import Struts Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_28.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StrutsSupport">
+ <?dbhtml filename="StrutsSupport.html"?>
+ <title>Struts Support</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Struts > Project > Struts Support</property>
+ </emphasis> page.</para>
+ <para>Select <emphasis>
+ <property moreinfo="none">Struts
Support</property>
+ </emphasis> screen if you want to configure Struts versions support
settings.</para>
+ <figure float="0">
+ <title>Struts Support</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_29.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StrutsPages">
+ <?dbhtml filename="StrutsPages.html"?>
+ <title>Struts Pages</title>
+ <para>You can change the following preferences on the JBoss Tools >
Web > Struts > Struts
+ Pages preference page.</para>
+ <para>On <emphasis>
+ <property moreinfo="none">Struts Pages</property>
+ </emphasis> panel you can add or remove Struts pages.</para>
+ <figure float="0">
+ <title>Struts Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_30.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StrutsFlowDiagram">
+ <?dbhtml filename="StrutsFlowDiagram.html"?>
+ <title>Struts Flow Diagram</title>
+ <para>Similarly to the JSF Flow Diagram screen, selecting <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Editor > Struts Flow Diagram</property>
+ </emphasis> page allows you to specify aspects of the Diagram mode of
the Struts
+ configuration file editor. The Struts Flow Diagram screen adds an option to
hide the
+ Diagram tab and labeling settings for additional artifacts. </para>
+ <figure float="0">
+ <title>Struts Flow Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_31.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Selecting the Add Page tab in the Struts Flow Diagram screen allows
you to determine
+ the default template and file extension for views (pages) you add directly
into the
+ diagram using a context menu or the view-adding mode of the diagram
cursor.</para>
+ <figure float="0">
+ <title>Adding Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_32.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="tiles_diagram">
+ <?dbhtml filename="titles_diagram.html"?>
+ <title>Tiles Diagram</title>
+ <para><emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Editors > Title Diagram</property>
+ </emphasis> screen allows you control some settings for the placement
of Tiles
+ definitions in the Diagram mode of the JBoss Tools Tiles
editor.</para>
+ <figure float="0">
+ <title>Title Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_33.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="Verification">
+ <?dbhtml filename="Verification.html"?>
+ <title>Verification</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none">JBoss Tools > Web
> Verification</property>
+ </emphasis> page.</para>
+ <para>On Rules Configuration tab of <emphasis>
+ <property moreinfo="none">Verifcation</property>
+ </emphasis> panel you can determine JSF and Struts rules.</para>
+ <figure float="0">
+ <title>Verification</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_34.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On Options tab you can define a limit for the reported errors
number.</para>
+ <figure float="0">
+ <title>Options of Verification</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_35.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="JBossServerPreferences">
+ <?dbhtml filename="View.html"?>
+ <title>Server Preferences</title>
+ <para>Preferences for <property moreinfo="none">JBoss
Server</property> and other servers can be changed on
+ the <emphasis>
+ <property moreinfo="none">Server</property>
+ </emphasis> page.</para>
+
+ <figure float="0">
+ <title>Server Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_36.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the <emphasis>
+ <property moreinfo="none">Server > Runtime
Environments</property>
+ </emphasis> page you can add new or modify already defined Server
Runtime.</para>
+
+ <figure float="0">
+ <title>Runtime Environments</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_37.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Server Launching preferences can be configured on the
<emphasis>
+ <property moreinfo="none">Server >
Launching</property>
+ </emphasis> page.</para>
+
+ <figure float="0">
+ <title>Server Launching Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_38.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Going to <emphasis>
+ <property moreinfo="none">Server >
Audio</property>
+ </emphasis> you can enable/disable the sound notification for different
Server states
+ and actions and set the sound volume as well.</para>
+
+ <figure float="0">
+ <title>Sound Notification Adjustment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_40.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="XDoclet">
+ <?dbhtml filename="XDoclet.html"?>
+ <title>XDoclet</title>
+ <para>The preferences for XDoclet can be changed if you click
<emphasis>
+ <property moreinfo="none">XDoclet</property>
+ </emphasis> on the left navigation bar.</para>
+ <para>On the <emphasis>
+ <property moreinfo="none">XDoclet</property>
+ </emphasis> screen it's possible to enable/disable XDoclet builder
by checking
+ proper box, specify XDoclet home and determine XDoclet module version as
well.</para>
+
+ <figure float="0">
+ <title>XDoclet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_41.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Switch to <emphasis>
+ <property moreinfo="none">XDoclet >
ejbdoclet</property>
+ </emphasis> page in order to adjust settings for EJB-specific
sub-tasks.</para>
+
+ <figure float="0">
+ <title>ejbdoclet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_42.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To configure settings for various web-specific XDoclet sub-tasks,
follow to <emphasis>
+ <property moreinfo="none">XDoclet >
webdoclet</property>
+ </emphasis> page.</para>
+
+ <figure float="0">
+ <title>webdoclet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_43.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the whole, this document should guide you to those parts of
<property moreinfo="none">JBoss
+ Tools</property> which you specifically need to develop Web
Applications. It covers
+ different aspects of visual components such as editors, views, etc. for
browsing,
+ representing and editing web resources you are working with.</para>
+
+ <para>If there's anything we didn't cover or you can't figure
+ out, please feel free to visit our <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Developer Studio Users Forum</ulink> or <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
Tools Users Forum</ulink> to ask questions. There we are also looking for
+ your suggestions and comments.</para>
+ </section>
+
+ <!--section id="XDocletTemplates">
+ <?dbhtml filename="XDocletTemplates.html"?>
+ <title>XDoclet Templates</title>
+ <para>To see what XDoclet tags templates available for completion select
<emphasis>
+ <property>JBoss Tools > XDoclet > Code Assist >
Templates</property>
+ </emphasis>.</para>
+ <figure>
+ <title>XDoclet Templates</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_32.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By right clicking on any tree element you can add a new template,
remove or rename it
+ and also add a new tree.</para>
+ <para>Select, for example, <emphasis>
+ <property>Add</property>
+ </emphasis> and you'll be prompted by a list of available
elements to
+ add.</para>
+ <figure>
+ <title>Add New XDoclet Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_33.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By double-clicking some element a new list will be shown: now for
available
+ methods.</para>
+ <figure>
+ <title>Select New Element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_34.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Choose any element from the list, then select an
attribute.</para>
+ <figure>
+ <title>Select New Element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_35.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>It will be added to the available templates.</para>
+ <figure>
+ <title>Select New Element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_36.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="XDocletsVariables">
+ <?dbhtml filename="XDocletsVariables.html"?>
+ <title>XDoclets Variables</title>
+ <para>By selecting <emphasis>
+ <property>JBoss Tools > XDoclet >
Variables</property>
+ </emphasis> you define variables used in templates.</para>
+ <figure>
+ <title>XDoclets Variables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_37.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="ChangingDefaultEnvironmentDuringProjectCreation">
+ <?dbhtml
filename="ChangingDefaultEnvironmentDuringProjectCreation.html"?>
+ <title>Changing Default Environment During Project Creation</title>
+
+ <para>To change the default environment and project template for either JSF
or Struts new
+ project creation:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Select<emphasis>
+ <property> Window > Preferences > JBoss Tools
> Web
+ > {JSF or Struts} > Project</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For Version set the environment you want to be the default
one</para>
+ </listitem>
+ <listitem>
+ <para>For Project Template set the template you want to be the
default one</para>
+ </listitem>
+ </orderedlist>
+
+ <figure>
+ <title>Changing Enviroment Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_36.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="ChangingDefaultProjectTemplateDuringProjectCreatio8n">
+ <?dbhtml
filename="ChangingDefaultEnvironmentDuringProjectCreation.html"?>
+ <title>Changing Default Project Template During Project
Creation</title>
+
+ <para>To change the default project template for either JSF or Struts new
project
+ creation:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Select<emphasis>
+ <property> Window > Preferences > JBoss Tools >
Web > {JSF or Struts} >
+ Project</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For Project Template set the template you want to be the
default one</para>
+ </listitem>
+ </orderedlist>
+
+ <figure>
+ <title>Changing Project Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/preferences/preferences_37.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+-->
+</chapter>
+
+</book>
Modified: trunk/seam/docs/reference/en/master_output.xml
===================================================================
--- trunk/seam/docs/reference/en/master_output.xml 2009-03-05 18:34:07 UTC (rev 14042)
+++ trunk/seam/docs/reference/en/master_output.xml 2009-03-05 18:54:45 UTC (rev 14043)
@@ -31,3007 +31,3007 @@
<!ENTITY strutstutoriallink
"../../struts_tools_tutorial/html_single/index.html">
-]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
-
- <bookinfo>
-
- <title>Seam Dev Tools Reference Guide</title>
-
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
-
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
-
<author><firstname>Michael</firstname><surname>Sorokin</surname></author>
-
-
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
- <releaseinfo>
- Version: 3.0.0.GA
- </releaseinfo>
-
-<abstract>
- <title></title>
- <para>
- <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/seam/pdf/S...
version</ulink>
- </para>
-</abstract>
-
-
- </bookinfo>
- <toc></toc>
-
-
-<chapter id="intro"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/intro.xml"
xreflabel="intro">
- <?dbhtml filename="intro.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Introduction</title>
-
- <section>
-
- <title>What is Seam?</title>
- <para>This introduction will help you to understand what is <property
moreinfo="none">Seam</property>.</para>
- <para><property moreinfo="none">Seam</property> is a
fully featured application framework on top of Java EE
- 5. It is also one of the most popular enterprise Java framework today. Seam
deeply
- integrates many other standard-based or open source frameworks (e.g., JSF,
EJB3, JMS,
- Web Services, jBPM, JBoss Rules, Ajax4jsf, RichFaces, Facelets, Spring,
iText, Quartz,
- TestNG, etc.), and provides a single programming model for developers to
- "drive" those underlying frameworks via simple annotated POJOs
(Plain
- Old Java Objects). It makes life easier for developers to tackle complex
enterprise
- applications with many component frameworks.</para>
- </section>
-
- <section>
- <title>Installation into Eclipse</title>
-
- <para>Here, we are going to explain how to install Seam plugin into
Eclipse.</para>
-
- <para>Seam is a one module of JBoss Tools project. Since Seam has a
dependence on other JBoss Tools modules we recommend you to install
- a bundle of all <ulink
url="http://labs.jboss.com/tools/download/index.html">JBoss Tools
plug-ins</ulink>. Installation instruction you can find on JBoss Wiki in <ulink
url="http://labs.jboss.com/wiki/InstallingJBossTools">Instal...
section.</para>
-
- </section>
-
- <section>
- <title>Other relevant resources on the topic</title>
-
- <para>The <ulink
url="http://seamframework.org/">Seam
Framework</ulink> - Next generation enterprise Java development.</para>
- <para>All latest release versions of JBoss Developer Studio/JBoss Tools
documentation you can find <ulink
url="http://docs.jboss.org/tools/2.1.0.GA/">here</ulink&g...
- <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
-
- </section>
-</chapter>
-
-
-<chapter id="create_seam" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/creating_new_seam.xml"
xreflabel="create_seam">
- <?dbhtml filename="create_new_seam.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
- <title>Creating a New Seam Project via the New Seam Project
wizard</title>
- <para>In this chapter we provide you with the necessary steps to start working
with Seam
- Framework.</para>
-
- <para>At first, we suggest setting the specific Seam perspective that combines
a number of
- different views and editors needed for work with resources concerned. For that
select <emphasis>
- <property moreinfo="none">Window > Open Perspective
> Other > Seam</property>
- </emphasis> or you can also access it through the button in the right top
corner.</para>
-
- <figure float="0">
- <title>Seam Perspective Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_0.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Also the <emphasis>
- <property moreinfo="none">Open Web
Browser</property></emphasis> action is directly available in the <property
moreinfo="none">Seam perspective</property>.</para>
-
- <figure float="0">
- <title>Embedded Web Browser Button</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_01.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <section id="standaloneSeam" role="updated">
- <title>Create standalone Seam Web Project</title>
- <para>The best way to get started with Seam is to organise a simple Seam
Project and
- experiment with it by creating variations.</para>
- <para>Thus, you should select <emphasis>
- <property moreinfo="none">File > New > Seam
Web Project</property>
- </emphasis> to run the <property moreinfo="none">New
Seam Project</property> wizard. The wizard form
- allows you to create runtime and server instances in order to get started
creating,
- running, and debugging J2EE (only) applications.</para>
- <para>Seam Web Project wizard has an option for selecting the actual Server
(not just WTP
- runtime) that will be used for the project. This allows the wizard to
identify correctly
- where the required datasource and driver libraries need to go.</para>
- <para>Let's get through the wizard step-by-step. First, you should
enter a name and
- a location directory for your new project.</para>
-
- <figure float="0" id="figure_create_seam1">
- <title>New Seam Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the figure above you can see the runtime and the server already
created.</para>
-
- <para>If you need to create a new runtime, click on the <emphasis>
- <property moreinfo="none">New...</property>
- </emphasis> button in the <property
moreinfo="none">Target Runtime</property> section. It brings up the
- wizard where you can specify a new JBoss Server Runtime environment or the
other type of
- runtime appropriate for configuring your project. Let's create one more
JBoss 4.2
- Runtime. Hence, after choosing it click on <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> button.</para>
-
- <figure float="0">
- <title>Specifying Target Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>All what you need here is to name runtime, type the path to its
install directory or
- locate it by using <emphasis>
- <property moreinfo="none">Browse</property>
- </emphasis> button, select a Java Runtime Environment, and select which
configuration
- you want.</para>
-
- <figure float="0">
- <title>Specifying Target Runtime Configurations</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Clicking on <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> returns you to the <link
linkend="figure_create_seam1">New Seam Project
- wizard page</link>.</para>
-
- <para>The next step is to define a Server that you can do by clicking
- on <emphasis>
- <property moreinfo="none">New...</property>
- </emphasis> button in the <property
moreinfo="none">Target Server</property> section. In appeared
- <property moreinfo="none">New Server
dialog</property> the last server which matches the runtime
- will be selected.</para>
-
- <para>All declared runtimes are listed in the combo box under the servers
view. Here, you
- can indicate a server runtime that you need. Click <emphasis>
- <property moreinfo="none">Add</property>
- </emphasis> if you want to add a new Server Runtime.</para>
-
- <figure float="0">
- <title>Specifying Target Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Next page allows you to verify the information for chosen server.
Leave everything as
- it is and click on <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis>.</para>
-
- <figure float="0">
- <title>Specifying Server Configurations</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the last wizard step you can modify your projects to configure
them on the
- Server.</para>
-
- <figure float="0">
- <title>Project Modification for Configuring on the
Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>Once you have the Target Server defined click on <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button to return to the first page of the <property
moreinfo="none">New Seam Project
- wizard</property>.</para>
-
- <tip>
- <title>Tip:</title>
- <para>We suggest that you look through our <ulink
url="../../as/html_single/index.html">AS manager
- guide</ulink> to find out more about runtimes and
servers.</para>
- </tip>
-
- <figure float="0">
- <title>Completion of Runtime and Server Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The last section on this wizard step is <property
moreinfo="none">Configuration</property>. Here, you
- can select one of the pre-defined project configurations either associated
with Seam
- 1.2, Seam 2.0 or with Seam 2.1. Furthermore, you can create your own
configuration by
- pressing the <emphasis>
- <property moreinfo="none">Modify...</property>
- </emphasis> button. It will open the dialog which allows to configure
your own set of
- facets for adding extra functionality to your project.</para>
-
- <para>Pass to the next section to find out more details on this
dialog.</para>
-
- </section>
- <section id="projectFacets">
- <title>Select the Project Facets</title>
-
- <para>The <property moreinfo="none">Project Facets
wizard</property> allows you to enable or disable
- specific facets which define necessary characteristics for the project. In
time you
- switch to this wizard form, all critical facets are already checked for the
chosen
- Configuration.</para>
-
- <para>Notice that this page of the wizard also allows you to set the
necessary version for
- any facet. </para>
-
- <figure float="0">
- <title>Project Facets Selection</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Moreover, here you can specify your own preset of selected facets by
checking needed
- ones in project facets window and clicking on <emphasis>
- <property moreinfo="none">Save</property>
- </emphasis> button.</para>
-
- <figure float="0">
- <title>Specifying Custom Facet Preset</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To see all available Server runtimes click on <property
moreinfo="none">Runtimes</property> tab on the
- left. You can create a new one using the <emphasis>
- <property moreinfo="none">New</property>
- </emphasis> button. If more than one runtimes are checked here, the
<emphasis>
- <property moreinfo="none">Make Primary</property>
- </emphasis> button won't be dimmed yet. So you can make use of it
to mark
- primary runtime.</para>
-
- <figure float="0">
- <title>Runtime Manipulations</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para><emphasis>
- <property moreinfo="none">Ok</property>
- </emphasis> button will bring you to the <property
moreinfo="none">Web Module</property> wizard form
- again.</para>
- </section>
-
- <section id="configureWebModule">
- <title>How to Configure Web Module Settings</title>
-
- <para> As we deal with a Dynamic Web Application we should first specify
the top level
- directory of our application for deploying it to a server afterwards. You
know, this
- kind of application contains both Web and Java code resources. Thus, it's
also important
- to indicate the content directory as well as Java source directory. The
wizard will put
- all those values itself. So you can leave everything as it is.</para>
-
- <figure float="0">
- <title>Web Module Settings</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Choose <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> to switch to the next wizard form.</para>
- </section>
-
- <section id="addJSFCapab">
- <title>Adding JSF Capabilities</title>
-
- <para>This wizard helps you to add JSF capabilities into your project for
representing
- appropriate behaviours associated with JSF. </para>
- <para>Checking <emphasis>
- <property moreinfo="none">Server Supplied JSF
Implementation</property>
- </emphasis> means that you will have a default JSF implementation given
by
- server.</para>
-
- <figure float="0">
- <title>Adding JSF Capabilities to Web Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In case when you want to use your custom JSF implementation check a
lower radio
- button. You are able to create a library of jars by clicking on
<emphasis>
- <property moreinfo="none">New</property>
- </emphasis> button.</para>
- <para>Here, it's necessary to type a <property
moreinfo="none">Library Name</property>, select a
- <property moreinfo="none">Version
Supported</property> and add proper <property
moreinfo="none">Library
- jars</property>. Then click on <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> to complete the choice.</para>
- <figure float="0">
- <title>Create JSF Implementation Library</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the Component Libraries section of the wizard you can also add
<property moreinfo="none">Component
- Libraries</property> (e.g. <ulink
url="http://www.jboss.org/jbossrichfaces">Richfaces</ulink>). Just
click on <emphasis>
- <property moreinfo="none">New</property>
- </emphasis> button. Appeared dialog will ask you to type the Library
name, supported
- version and add necessary jar's. Press <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> to complete the choice.</para>
-
- <figure float="0">
- <title>Create JSF Implementation Component Library</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_18.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The last wizard options allows to edit a path for <property
moreinfo="none">JSF Configuration
- File</property>, a name for <property
moreinfo="none">JSF Servlet</property>, <property
moreinfo="none">JSF Servlet
- Classname</property> and change <property
moreinfo="none">URL Mapping Patterns</property>.</para>
-
- <figure float="0">
- <title>JSF Capabilities Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_19.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Finally, as we are arranging the Seam Web project, the last step we
should do is to
- adjust project configurations associated with the Seam.</para>
- </section>
-
- <section id="seamFacet">
- <title>Configure Seam Facet Settings</title>
-
- <para>The last wizard step is related to Seam facet and allows you to do
the
- following:</para>
- <figure float="0">
- <title>Seam Facet Settings</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Create Seam runtime and define Seam home
folder.</para>
- </listitem>
- </itemizedlist>
- <para>For that click on <emphasis>
- <property moreinfo="none">Add</property>
- </emphasis> button in the <property
moreinfo="none">General</property> section. Notice that in this
- wizard presented below you can create a Seam runtime only for that version
which was
- selected in the <link linkend="projectFacets">Project
Facets</link> wizard (version 1.2
- in our case).</para>
-
- <figure float="0">
- <title>Seam Runtime Creation</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Select EAR or WAR deployment by checking a necessary radio
button.</para>
- </listitem>
- <listitem>
- <para>Select a <emphasis>
- <property moreinfo="none">Database
Type</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Seam Runtime Creation</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_20.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>and then specify a <emphasis>
- <property moreinfo="none">Connection
profile</property>
- </emphasis> appropriate for your database.</para>
-
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Connection Profile Options</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_21.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can edit chosen profile by using <emphasis>
- <property moreinfo="none">Edit</property>
- </emphasis> button or organise a new one by clicking on
<emphasis>
- <property moreinfo="none">New</property>
- </emphasis> button and selecting necessary for you type of connection
profile.</para>
- <figure float="0">
- <title>Connection Profile Selecting</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the other dialog you'll be asked to enter its name and
description. And
- then you should select a proper driver and adjust connection details. Press
<emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> to preview all the adjusted settings and complete the
creation of the new
- profile.</para>
-
- <figure float="0">
- <title>Connection Details</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_22.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The next block of settings in the Seam Facet wizard are describing a
Database and a
- connection to it.</para>
- <para>In the <property moreinfo="none">Code
Generation</property> section the wizard have already put the
- names for your <property moreinfo="none">Session
Bean</property>, <property moreinfo="none">Entity
Bean</property> and
- <property moreinfo="none">Test</property> packages.
Of course, you can change them into the others
- which you like.</para>
-
- <figure float="0">
- <title>Code Generation Section</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/create_new_seam/create_seam_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click on <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> to generate a project.</para>
-
- <para></para>
- </section>
-</chapter>
-
-
-<chapter id="directory_str"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/directory_structure.xml"
xreflabel="directory_str">
- <?dbhtml filename="directory_structure.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>Eclipse</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Directory Structure of the Generated Project</title>
-
- <para>In this chapter we describe where the Seam wizard puts the generated
files for both EAR
- and WAR deployments.</para>
- <para>The Seam Project wizard generates projects like Eclipse WTP style in
order to utilize
- Eclipse WTP features and to have a correct classpath. To be more precise it
generates one
- project per artifact.</para>
-
- <section id="WAR">
- <title>WAR Deployment</title>
-
- <para>The project layout for WAR projects is:</para>
-
- <figure float="0">
- <title>Project Layout for WAR projects</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/directory_structure/directory_structure_1.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>A WAR project can only use Seam JavaBean and JPA Entity bean
components; it cannot use
- EJB3 Session beans etc.</para>
- <para>WAR projects are generated to enable Seam 1.2.1 war hotdeploy
feature. Classes put
- into <emphasis>
- <property moreinfo="none">src/action</property>
- </emphasis> will be deployed to <emphasis>
- <property moreinfo="none">WEB-INF/dev</property>
- </emphasis> from which Seam 1.2.1 automatically will perform hotdeploy
of new
- components.</para>
- <note>
- <title>Note:</title>
- <para>Because of Eclipse WTP limits the hot deployed classes also
existed in <emphasis>
- <property
moreinfo="none">WEB-INF/classes</property>, </emphasis> but since
Seam gives <emphasis>
- <property
moreinfo="none">WEB-INF/dev</property>
- </emphasis> precedence it will work.</para>
- </note>
-
- <para>Furthermore the Seam Project wizard generates a test project that is
setup to run
- <link linkend="testNG">TestNG</link> directly
against the proper libraries and
- server runtime libraries. When the TestNG plugin is installed you can just
run your
- tests via <emphasis><property moreinfo="none">Run As
> TestNG Test</property>.</emphasis></para>
- <para>In order to deploy WAR project on server, right-click on the project
and select <emphasis>
- <property moreinfo="none">Run As > Run on
Server</property>.</emphasis> Studio will deploy
- WAR project into one web application on server to <property
moreinfo="none">deploy</property>
- folder.</para>
-
- </section>
-
- <section id="EAR">
- <title>EAR Deployment</title>
- <para>The project layout for EAR projects is:</para>
-
- <figure float="0">
- <title>Project Layout for EAR projects</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/directory_structure/directory_structure_2.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>An EAR project can use the whole range of Seam components, including
EJB3 Session
- beans.</para>
- <para>In order to deploy EAR project on server, right-click on the project
with
- <property moreinfo="none">-ear</property> postfix
and select <emphasis>
- <property moreinfo="none">Run As > Run on
Server</property>.</emphasis> Studio will take care
- about all modules and deploy EAR project into one enterprise application on
server to
- <property moreinfo="none">deploy</property> folder.
EAR application keeps <property moreinfo="none">ejb</property>
- and <property moreinfo="none">war</property> modules of
the EAR project.</para>
- </section>
-
- <section id="seam_version_changing">
-
- <title>Changing the Seam Version</title>
-
- <para>To upgrade or downgrade your projects Seam version use the facet
preferences. You
- should right-click your project and choose <emphasis>
- <property moreinfo="none">Project
Facets</property>
- </emphasis> category. Next select <emphasis>
- <property moreinfo="none">Seam</property>
- </emphasis> and change its version to needed one.</para>
-
- <figure float="0">
- <title>Changing the Seam Facet Version</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/directory_structure/directory_structure_3.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After pressing <emphasis>
- <property moreinfo="none">Apply</property>
- </emphasis> the wizard for adjusting new Seam runtime settings
appears.</para>
-
- <figure float="0">
- <title>Changing the Seam Facet Version</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/directory_structure/directory_structure_4.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you need to update the libraries for you project, check the
<emphasis>
- <property moreinfo="none">Update
libraries</property>
- </emphasis> option. All libraries you checked will be removed and the
libraries from the
- new Seam distribution will be added after clicking <emphasis>
- <property
moreinfo="none">Ok</property>.</emphasis></para>
-
- <figure float="0">
- <title>Changing the Seam Facet Version</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/directory_structure/directory_structure_5.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Note:</title>
-
- <para>The note "Seam configuration files and their XSDs won't
be changed" is
- meant that the libraries, Seam facet and runtime version will be changed,
but
- configuration files that refer to the old version will have to be
manually
- updated.</para>
- </note>
- </section>
-
- <section id="changing_seam_parent_project">
- <title>Changing Seam Parent Project</title>
-
- <para>Starting from the 2.0.0.CR2 version of <property
moreinfo="none">JBoss Tools</property> it is possible
- to change the Seam parent project. In earlier versions this was only
controllable at a
- project creation time, now it can be changed for existing projects
too.</para>
-
- <para>Go to your project preferences and select <emphasis>
- <property moreinfo="none">Seam Settings</property>
- </emphasis> category on the left. Press the <emphasis>
- <property moreinfo="none">Browse</property>
- </emphasis> button next to the <emphasis>
- <property moreinfo="none">Main Seam
Project</property>
- </emphasis> section to select the other Seam parent
project.</para>
-
- <figure float="0">
- <title>Changing Seam Parent Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/directory_structure/directory_structure_6.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="renaming_projects_folders">
- <title>Renaming the Projects and Folders</title>
-
- <para>If you need to rename one of the Seam Project artifacts
- (<emphasis><project_name></emphasis>,
- <emphasis><project_name>-test</emphasis>,
- <emphasis><project_name>-test</emphasis> or
- <emphasis><project_name>-ejb</emphasis>) or any
entire folder like
-
<emphasis><project_name>/WebContent</emphasis>,
- <emphasis><project_name>/ejbModule</emphasis>,
-
<emphasis><project_name>-test/test-src</emphasis>, or project
name in
- packages
<emphasis>org.domain.<project_name>.session</emphasis>,
-
<emphasis>org.domain.<project_name>.entity</emphasis>, you can
do this
- by brining the context menu and navigating <emphasis>
- <property moreinfo="none">Refactor >
Rename...</property>
- </emphasis> or just pressing <emphasis>
- <property moreinfo="none">Shift + Alt +
R</property>
- </emphasis> under the chosen resource.</para>
-
- <para>Use <emphasis>
- <property moreinfo="none">Refactor >
Move...</property>
- </emphasis> (or <emphasis>
- <property moreinfo="none">Shift + Alt +
V</property>
- </emphasis>), if you need to move
- <emphasis><project_name>/WebContent</emphasis>
folder,
- <emphasis><project_name>/ejbModule</emphasis>
folder or
- <emphasis><project_name>/test-src</emphasis>
folder in the other place
- within the Project structure.</para>
- </section>
-</chapter>
-
-
-<chapter id="menus_and_actions"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_menus_and_actions.xml"
xreflabel="menus_and_actions">
- <?dbhtml filename="seam_menus_and_actions.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- <keyword>menus</keyword>
- <keyword>actions</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Menus and Actions</title>
-
- <para>In this chapter we provide a description of Seam actions that are
available from</para>
- <itemizedlist>
- <listitem>
- <para>Menu bar</para>
- </listitem>
- <listitem>
- <para>Toolbar</para>
- </listitem>
- <listitem>
- <para>Context menus in views</para>
- </listitem>
- </itemizedlist>
-
-
- <section id="file_menu">
-
- <title>File Menu Actions</title>
-
- <para>In a Seam perspective, by default there are the following actions in
<emphasis>
- <property moreinfo="none">File >
New</property>
- </emphasis> submenu</para>
-
- <table>
- <title>Seam Actions in the New Submenu</title>
- <tgroup cols="2">
- <colspec align="left" colnum="1"
colwidth="1*"></colspec>
- <colspec colnum="2"
colwidth="4*"></colspec>
-
- <thead>
- <row>
- <entry align="center">
- <para>Name</para>
- </entry>
-
- <entry align="center">
- <para>Function</para>
- </entry>
-
- </row>
- </thead>
-
- <tbody>
-
-
- <row>
- <entry>
- <para>
- <property moreinfo="none">Seam Web
Project</property>
- </para>
-
- </entry>
-
- <entry>
- <para>Runs <link
linkend="standaloneSeam">New Seam Project</link> wizard
- for creating a new Seam project </para>
- </entry>
-
-
- </row>
-
-
- <row>
- <entry>
- <para>
- <property moreinfo="none">Seam
Action</property>
- </para>
-
- </entry>
-
- <entry>
- <para>Runs <link
linkend="seam_action">New Seam Action</link> wizard for
- creating a new Seam action </para>
- </entry>
-
-
- </row>
-
-
-
- <row>
- <entry>
- <para>
- <property moreinfo="none">Seam
Form</property>
- </para>
-
- </entry>
-
- <entry>
- <para>Runs <link
linkend="seam_form">New Seam Form</link> wizard for
- creating a new Seam form </para>
- </entry>
-
-
- </row>
-
-
- <row>
- <entry>
- <para>
- <property moreinfo="none">Seam
Entity</property>
- </para>
-
- </entry>
-
- <entry>
- <para>Runs <link
linkend="seam_entity">New Seam Entity</link> wizard for
- creating a new Seam entity </para>
- </entry>
-
-
- </row>
-
- <row>
- <entry>
- <para>
- <property moreinfo="none">Seam
Conversation</property>
- </para>
-
- </entry>
-
- <entry>
- <para>Runs <link
linkend="seam_conversation">New Seam
- Conversation</link> wizard for creating a new Seam
conversation
- </para>
- </entry>
-
-
-
- </row>
-
- <row>
- <entry>
- <para>
- <property moreinfo="none">Seam Generate
Entities</property>
- </para>
-
- </entry>
-
- <entry>
- <para>Runs <link
linkend="generate_entities">Generate Seam
- Entities</link> wizard</para>
- </entry>
-
-
-
- </row>
-
-
- </tbody>
- </tgroup>
- </table>
-
-
- </section>
-
- <section id="navigate_menu">
- <title>Navigate Menu Actions</title>
-
- <para>In the next sections we are going to describe Seam actions which can
help you to
- easily navigate through the source code.</para>
-
- <section id="find_seam_ref_decl">
-
- <title>Find Seam References/Declarations</title>
-
- <para>To find EL expretions both in <emphasis>
- <property moreinfo="none">.java</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">.xhtml</property>
- </emphasis> files use Find Seam References/Declarations actions.
For that, in the main menu bar click on <emphasis>
- <property moreinfo="none">Search > Find Seam
References</property>
- </emphasis> or <emphasis><property
moreinfo="none">Find Seam Declarations</property>.</emphasis>
- </para>
-
- <para>Look at the description of the actions in the table
below.</para>
-
- <table>
- <title>Find Seam References/Declarations actions</title>
- <tgroup cols="3">
- <colspec align="left" colnum="1"
colwidth="1*"></colspec>
- <colspec colnum="2"
colwidth="4*"></colspec>
- <colspec colnum="3"
colwidth="2*"></colspec>
-
-
- <thead>
- <row>
- <entry align="center">
- <para>Name</para>
- </entry>
-
- <entry align="center">
- <para>Function</para>
- </entry>
-
- <entry align="center">
- <para>Keyboard Shortcut</para>
- </entry>
- </row>
- </thead>
-
- <tbody>
-
-
- <row>
- <entry>
- <para>
- <property moreinfo="none">Find Seam
References</property>
- </para>
- <para>
- <property moreinfo="none">Find Seam
Declarations</property>
- </para>
- </entry>
-
- <entry>
- <para>Find all references and declarations to the
selected element.
- It's available for EL expressions in both .java
and .xhtml
- files. Differs from normal Eclipse Find
References/Declarations
- by showing an EL or Seam references in the Search
View. </para>
- </entry>
-
- <entry>
- <para>Ctrl+G</para>
- <para>Ctrl+Shift+G</para>
- <para>also Ctrl + 1 for .java files</para>
-
- </entry>
-
- </row>
- </tbody>
- </tgroup>
- </table>
-
-
- <para>On the screenshot example below you could see that the search
results are listed
- in the
- <property moreinfo="none">Search
view</property>.
- </para>
-
- <figure float="0">
- <title>Find Seam Declaration for
"Identity"</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_menus_and_actions/menus_and_actions1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use Ctrl + 1 in .java files to activate the
actions:</para>
-
- <figure float="0">
- <title>Find Seam References for "Identity"</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_menus_and_actions/menus_and_actions2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="open_seam_component">
- <title>Open Seam Component</title>
-
- <para>To open Seam Components click on <emphasis><property
moreinfo="none">Navigate > Open Seam
- Component</property></emphasis> in the main menu bar. This
dialog is also available from toolbar
- icon or with hot keys combination "Ctrl+Shift+Z
".</para>
-
- <figure float="0">
- <title>Open Seam Components icon</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_menus_and_actions/menus_and_actions3_0.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the table below read a description about the
dialog.</para>
-
- <table>
- <title>Open Seam Components Dialog</title>
- <tgroup cols="3">
- <colspec align="left" colnum="1"
colwidth="1*"></colspec>
- <colspec colnum="2"
colwidth="4*"></colspec>
- <colspec colnum="3"
colwidth="2*"></colspec>
-
-
- <thead>
- <row>
- <entry align="center">
- <para>Name</para>
- </entry>
-
- <entry align="center">
- <para>Function</para>
- </entry>
-
- <entry align="center">
- <para>Keyboard Shortcut</para>
- </entry>
- </row>
- </thead>
-
- <tbody>
-
-
- <row>
- <entry>
- <para>
- <property moreinfo="none">Open Seam
Components</property>
- </para>
-
- </entry>
-
- <entry>
- <para>Brings up the Open Seam Component dialog to
open a component
- in the editor. The Open Seam Component selection
dialog shows
- all Seam components existing in the workspace. You
can search
- the components via their short, imported or full
name.</para>
- </entry>
-
- <entry>
- <para>Ctrl+Shift+Z</para>
-
- </entry>
-
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <para>Enter a name in the text field and see the results as it shown on
screenshot: </para>
-
- <figure float="0">
- <title>Open Seam Components Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_menus_and_actions/menus_and_actions3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- </section>
-
-</chapter>
-
-
-<chapter id="seam_wizards"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_wizards.xml"
xreflabel="seam_wizards">
- <?dbhtml filename="seam_wizards.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Wizards</title>
-
- <para>This chapter introduces you with Seam Components.</para>
- <para>All the Seam component generations options known from Seam-gen are
available as wizards
- (with sensible auto-defaulting) for creating various common Seam
components:</para>
-
- <itemizedlist>
- <listitem>
- <para>
- <property moreinfo="none">Seam Action</property>
- </para>
- </listitem>
- <listitem>
- <para>
- <property moreinfo="none">Seam Form</property>
- </para>
- </listitem>
- <listitem>
- <para>
- <property moreinfo="none">Seam Entity</property>
- </para>
- </listitem>
- <listitem>
- <para>
- <property moreinfo="none">Seam
Conversation</property>
- </para>
- </listitem>
- </itemizedlist>
-
- <para>Go to <emphasis>
- <property moreinfo="none">File > New</property>
- </emphasis> and select the component wizard.</para>
-
- <figure float="0">
- <title>Seam Component Wizards</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The wizards create multiple resources and place it in the appropriate
folders depending on
- your project structure (WAR or EAR).</para>
- <para>Let's create a WAR project using the New Seam Project
wizard.</para>
-
- <figure float="0">
- <title>Seam Project WAR Deployment</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After the project is created you need deploy it on server.</para>
-
-
- <section id="seam_action">
-
- <title>New Seam Action</title>
-
- <para>In this and following sections you can see example creating Seam
Components.</para>
- <para>To create a New Seam Action you should select a necessary project,
type a name for
- <property moreinfo="none">Seam
component</property>, <property moreinfo="none">POJO
class</property>,
- <property moreinfo="none">Method</property>,
<property moreinfo="none">Page</property> and select a
- <property moreinfo="none">Package</property> using
the <emphasis>
- <property moreinfo="none">Browse</property>
- </emphasis> button.</para>
-
- <figure float="0">
- <title>New Seam Action Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you specify a class which already exists, the wizard will warn you
about it.</para>
-
- <figure float="0">
- <title>Wizard Warning against Existing File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/action_warning.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can see the action page in <property
moreinfo="none">WebContent</property> folder. Click on it to
- open in JBoss Tools HTML Editor.</para>
-
- <figure float="0">
- <title>Action Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_5.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <note>
- <title>Note:</title>
- <para>You don't need to restart the server to see how the action
component works. Just
- use context menu <emphasis><property
moreinfo="none">Run As > Run On
- Server</property>.</emphasis></para>
- </note>
-
- <para>Action component was hot-deployed. Forms and Conversations will work
the same
- way.</para>
-
- <figure float="0">
- <title>Action Component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
- </section>
- <section id="seam_form">
- <title>New Seam Form</title>
-
- <para>Click on <property
moreinfo="none">actionMethod</property> in the internal browser and add
a form in
- your project using the New Seam Form wizard <emphasis><property
moreinfo="none">File > New > Seam
- Form</property>.</emphasis></para>
- <para>Select a necessary project, type a name for <property
moreinfo="none">Seam component</property>,
- <property moreinfo="none">POJO class</property>,
<property moreinfo="none">Method</property>,
- <property moreinfo="none">Page</property> and
select a <property moreinfo="none">Package</property> using
<emphasis>
- <property moreinfo="none">Browse</property>
- </emphasis> button.</para>
-
- <figure float="0">
- <title>New Seam Form Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you specify a class which already exists, the wizard will warn you
about it.</para>
-
- <figure float="0">
- <title>Wizard Warning against Existing File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/form_warning.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Form Page was created in <property
moreinfo="none">WebContent</property> folder.</para>
-
- <figure float="0">
- <title>Form Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_8.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Deploy the form on server. Right click on Form Page, select
<emphasis><property moreinfo="none">Run As
- > Run On
Server</property>.</emphasis></para>
-
- <figure float="0">
- <title>Form Component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Form component was hot-deployed.</para>
-
- </section>
-
- <section id="seam_conversation">
- <title>New Seam Conversation</title>
-
- <para>Enter some value in the text field (e.g. <property
moreinfo="none">value1</property>) and click on
- <property
moreinfo="none">formMethod</property>.</para>
- <para>Add a conversation using the New Seam Conversation wizard
<emphasis><property moreinfo="none">File >
- New > Seam
Form</property>.</emphasis></para>
- <para>You should select a necessary project, type a name for <property
moreinfo="none">Seam
- component</property>, <property
moreinfo="none">POJO class</property>, <property
moreinfo="none">Method</property>,
- <property moreinfo="none">Page</property> and
select a <property moreinfo="none">Package</property> using
<emphasis>
- <property moreinfo="none">Browse</property>
- </emphasis> button.</para>
-
-
- <figure float="0">
- <title>New Seam Conversation Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you specify a class which already exists, the wizard will warn you
about it.</para>
-
- <figure float="0">
- <title>Wizard Warning against Existing File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/conversation_warning.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Conversation page was created in <property
moreinfo="none">WebContent</property> folder.</para>
-
- <figure float="0">
- <title>Conversation Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_11.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Right click on Conversation page, select <emphasis><property
moreinfo="none">Run As > Run On
- Server</property>.</emphasis></para>
-
- <figure float="0">
- <title>Conversation Component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Conversation component was hot-deployed.</para>
- <para>Click on <property
moreinfo="none">Begin</property> and <property
moreinfo="none">Increment</property> buttons to
- check the conversation functionality.</para>
-
- </section>
-
-
- <section id="seam_entity">
- <title>New Seam Entity</title>
-
- <para>Entities cannot be hot-deployed, so we need to stop the
server.</para>
- <para>Create an Entity using the New Entity wizard
<emphasis><property moreinfo="none">File > New > Seam
- Entity</property>.</emphasis>
- </para>
-
- <para>You should select a necessary project, type a name for <property
moreinfo="none">Entity
- class</property>, select a <property
moreinfo="none">Package</property> using <emphasis>
- <property moreinfo="none">Browse</property>
- </emphasis> button, type a name for <property
moreinfo="none">Master Page</property> and
- <property
moreinfo="none">Page</property>.</para>
-
- <figure float="0">
- <title>New Seam Entity Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you specify a class which already exists, the wizard will warn you
about it.</para>
-
- <figure float="0">
- <title>Wizard Warning against Existing File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/entity_warning.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Master Page and the Entity were created in <property
moreinfo="none">WebContent</property>
- folder.</para>
-
- <figure float="0">
- <title>Master Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_14.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Entity page is:</para>
-
- <figure float="0">
- <title>Entity Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_15.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Run the Entity page on server. This is what you get:</para>
-
- <figure float="0">
- <title>Customer Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Let's create two customers <property
moreinfo="none">c1</property> and <property
moreinfo="none">c2</property>. Enter
- the name in the text field and press the <property
moreinfo="none">Save</property> button. Customer
- should be successfully created. Press <property
moreinfo="none">Done</property>. Do the same for
- <property moreinfo="none">c2</property> customer.
The result should be:</para>
-
- <figure float="0">
- <title>Two Customers Are Created</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_wizards/seam_wizards_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-</chapter>
-
-
-<chapter id="generate_entities"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/generate_entities.xml"
xreflabel="generate_entities">
- <?dbhtml filename="generate_entities.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Generate Entities</title>
-
- <para>The main purpose of this chapter is to tell you about Seam Generate
Entities.</para>
- <para>Generate Entities is available directly from within Eclipse using
Hibernate Tools plugin for the standard seam-gen generation.</para>
- <para>Generate Entities generates a set of CRUD Seam components and web pages
based on existing tables in a database or on existing entities in your
application.</para>
-
-
- <figure float="0">
- <title>Generate Seam Entities Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/generate_entities/generate_entities1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the Generate Seam Entities wizard there are two generation modes:
Reverse Engineer from database
- and Use existing entities.</para>
-
- <para>The <property moreinfo="none">Reverse Engineer from
database</property> mode can be described in four steps:</para>
- <orderedlist continuation="restarts" inheritnum="ignore">
- <listitem><para>The wizard gets in database, extracts the tables and
- their connections</para></listitem>
- <listitem><para>On basis of this metainfomation the Entity classes
are generated into
- <property
moreinfo="none">org.domain.project.entity</property>
package</para></listitem>
- <listitem><para>For the entities from step 2 the classes <property
moreinfo="none">EntityList</property> and <property
moreinfo="none">EntityHome</property> are generated
- into <property
moreinfo="none">org.domain.project.session</property>
package</para></listitem>
- <listitem><para>The xhtml pages are
generated.</para></listitem>
- </orderedlist>
- <para>
- Checking the <property moreinfo="none">Use existing
entities</property> mode the wizard executes only 3 and 4 steps. It generates
missing classes and
- xhtml pages.
- </para>
-
- <para>Read the <link
linkend="crud_database_application">Generate a CRUD Database
Application</link> chapter in order to see how the <property
moreinfo="none">Generate Seam Entities</property> wizard can be
used.</para>
-
-
- </chapter>
-
-
-
-<chapter id="seam_editors" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_editors.xml"
xreflabel="seam_editors">
- <?dbhtml filename="seam_editors.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Editors Features</title>
-
- <para>In this chapter you will know what Seam Editors features are and how to
work with them. </para>
-
- <section id="ContentAssist">
-
- <title>Content Assist</title>
-
- <para><property moreinfo="none">Content
Assist</property> (Ctrl + Space) is available when using EL variables in the
following file formats:</para>
- <itemizedlist>
- <listitem>
- <para>JSP</para>
- </listitem>
- <listitem>
- <para>XHTML</para>
- </listitem>
- <listitem>
- <para>XML</para>
- </listitem>
- <listitem>
- <para>JAVA</para>
- </listitem>
- </itemizedlist>
-
- <para>Notice, the code completion for the Seam components shows the
proposals marked with Seam icon.</para>
-
- <figure float="0">
- <title>Content Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_1.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Note:</title>
-
- <para>To get Code Assist available for an externally generated and
imported project,
- don't forget to enable Seam features and configure Seam Settings in
<link linkend="project_pref">Project
Preferences</link>.</para>
- </note>
-
- <section id="components_code_assist" role="new">
- <title>Content Assist for components.xml</title>
-
- <para>While you are editing a <emphasis>
- <property
moreinfo="none">components.xml</property>
- </emphasis> file you can make use of the Content Assist for
inserting needed
- elements.</para>
-
- <figure float="0">
- <title>Content Assist in the component.xml Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_1a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The editor also makes code completion aware of methods/attributes
for EntityQuery
- component.</para>
-
- <figure float="0">
- <title>Content Assist for EntityQuery Component</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_1b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
-
- <section id="OpenOn">
- <title>OpenOn</title>
-
- <para><property moreinfo="none">OpenOn</property>
let's you easily navigate through your project without
- using the Package Explorer or Project Explorer. After pressing
<emphasis>
- <property moreinfo="none">Ctrl + left
click</property>
- </emphasis> (or just F3) you will see a corresponding method or
class.</para>
-
- <figure float="0">
- <title>OpenOn</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>OpenOn is also supported in Page Descriptors(page.xml). You can
<property moreinfo="none">Ctrl + left click</property> on the bean
to open navigate to the bean you clicked on. </para>
-
- <figure float="0">
- <title>OpenOn in page.xml file</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_2a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
- </section>
-
- <section id="SeamValidation">
- <title>Seam Validation</title>
-
- <para>Validation of various possible problematic definitions is implemented
for Seam
- applications.</para>
-
- <para>If an issue is found it will be shown in the standard <property
moreinfo="none">Problems
- View</property>.</para>
-
- <figure float="0">
- <title>Seam Validation</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_6.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>In the preferences page for Seam Validator you can see and modify the
validator
- behavior. Go to <emphasis>
- <property moreinfo="none">Window > Preferences
> JBoss Tools > Web > Seam > Validator</property>
- </emphasis> and select the severity level for the optional Seam
Validator
- problem.</para>
-
- <figure float="0">
- <title>Seam Validator Preferences</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On WTP projects validation are enabled by default and thus executed
automatically, but
- on normal Java projects you will have to go and add the Validation builder of
your
- project . It is available in the properties of your project under
- <property moreinfo="none">Validation</property>.
The validations can be run manually by clicking
- <property moreinfo="none">Validate</property> via
the context menu on your project which will
- execute all the active WTP validations.</para>
- </section>
-
- <section id="ComponentsEditor">
- <title>Structured components.xml Editor</title>
-
- <para>When editing <property
moreinfo="none">components.xml</property> a structured tree editor is
available
- in addition to pure source editing. It has a graphical view (Tree tab) and
source
- (Source tab).</para>
-
- <figure float="0">
- <title>component.xml Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Note:</title>
-
- <para>You can view and edit <property
moreinfo="none">components.xml</property> and other xml files
- directly in the Project Explorer and Properties sheet without opening
the
- components.xml editor.</para>
- </note>
- <figure float="0">
- <title>component.xml Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_editors/seam_editors_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
-</chapter>
-
-
-<chapter id="seam_view"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_view.xml"
xreflabel="seam_view">
- <?dbhtml filename="seam_view.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Views</title>
-
- <section>
- <title>Seam Components View</title>
-
- <para>This chapter introduces you with Seam Components View.</para>
- <para>The <property moreinfo="none">Seam Components
View</property> is available from Seam perspective. It provides a list of seam
components found in a project.</para>
-
- <figure float="0">
- <title>Seam Components View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_view/seam_view_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Seam Components View can show a components default scope in two
ways:</para>
-
- <itemizedlist>
- <listitem><para>as labels on each component (click on the
triangular symbol at the top of the Seam Components View page and select
<emphasis><property moreinfo="none">Scope Presentation >
Label</property></emphasis>)</para></listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>As label</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_view/seam_view_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem><para>as a node per scope where the components are
grouped under a node representing its default scope.</para></listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>As node</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_view/seam_view_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Seam Packages can be presented in two ways:</para>
-
- <itemizedlist>
- <listitem><para>Flat</para></listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Flat Presentation of Seam Packages</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_view/seam_view_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem><para>Hierarchical</para></listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Hierarchical Presentation of Seam Packages</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_view/seam_view_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Seam Component View can be filtered by choosing <property
moreinfo="none">Customize View</property>.</para>
-
- <figure float="0">
- <title>Customize View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_view/seam_view_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select the <emphasis><property
moreinfo="none">Seam Components from
Libraries</property></emphasis> under the Filters tab.
- This will make the view ignore components defined in jars. This will hide the
many built-in Seam components and leave only those that are actually defined in the
project or have been actively configured via components.xml. Therefore, deselecting the
filter will show you all available components.</para>
- <para>Selecting the <emphasis><property
moreinfo="none">Seam Components from Referenced
Projects</property></emphasis> will hide the components that dependent on
other project.</para>
-
- <figure float="0">
- <title>Available Custimozations</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_view/seam_view_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section>
- <title>Project Explorer integration</title>
-
- <para>If you don't like to have a view for every piece of information
in Eclipse, the content of the Seam Components view is also available as a node in the
built-in Project Explorer (not Package Explorer!) view in Eclipse.</para>
-
- <figure float="0">
- <title>Seam Components in Project Explorer</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_view/seam_view_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- </chapter>
-
-
-<chapter id="seam_preferences"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_preferences.xml"
xreflabel="seam_preferences">
- <!-- mark as new -->
- <?dbhtml filename="seam_preferences.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>Preferences</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Preferences</title>
-
- <para>In this chapter you get to know how Seam preferences can be modified
during the
- development process.</para>
-
- <section id="gen_pref">
- <title>General Preferences</title>
-
- <para>Seam preferences can be set using the Seam preference page. Click on
- <emphasis><property moreinfo="none">Window
> Preferences > JBoss Tools > Web >
- Seam</property>.</emphasis></para>
-
- <para>On this page you can manage the Seam Runtime. Use the appropriate
buttons to
- <property moreinfo="none">Add</property> more
runtimes or to <property moreinfo="none">Remove</property> those
that
- are not needed.</para>
-
- <figure float="0">
- <title>Seam Preferences Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/seam_preferences1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Clicking on <property
moreinfo="none">Edit</property> button you get the form where you can
change the
- path of Seam runtime home folder, modify name and version. Press
- <property moreinfo="none">Finish</property> to
apply the changes.</para>
-
- <figure float="0">
- <title>Edit Seam Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/seam_preferences1_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <section id="validator_pref">
-
- <title>Validator Preferences</title>
-
- <para>Seam preference page includes a subsection <property
moreinfo="none">Validator</property>. See
- <emphasis><property moreinfo="none">Window
> Preferences > JBoss Tools > Web > Seam >
- Validator</property>.</emphasis></para>
- <para>On this page you can choose a severity level for the various Seam
validator
- problems. For example, if you want to ignore the case when component name
is
- duplicated expand the <property
moreinfo="none">Components</property> node and select
- <property moreinfo="none">Ignore</property>
next to <property moreinfo="none">Duplicate component
- name</property>. After that you won't see the
error.</para>
-
-
- <figure float="0">
- <title>Seam Validator Preference Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/seam_preferences1_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Notice, that in the <emphasis>
- <property moreinfo="none">Expression
language</property>
- </emphasis> section there is now a preference for setting severity
of EL
- Syntax. You can select whether the Seam validator displays an error, a
warning or just ignore the EL Syntax error.</para>
-
- <figure float="0">
- <title>Severity Preference for EL Syntax</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/el_syntax_error.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the upper right corner of the page there is a <property
moreinfo="none">Configure Project
- Specific Settings</property> link. Clicking on it you get the
form where you can choose a
- project for specific setting. Project specific configuration allows you
to have
- different validator settings for each project. Check the <property
moreinfo="none">Show only
- projects with project specific settings</property> if you want
to see the
- projects that have been already set. Click on <property
moreinfo="none">Ok</property>.</para>
-
- <figure float="0">
- <title>Project Specific Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/seam_preferences1_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You get the validator properties page for chosen project. Check
the
- <property moreinfo="none">Enable project specific
settings</property> to be able to change the
- settings.</para>
-
- <note>
- <title>Note:</title>
- <para>You can open the same page by right clicking on the needed
project in Package
- Explorer, then <emphasis><property
moreinfo="none">Properties > Seam
- Validator</property>.</emphasis></para>
- </note>
-
- <figure float="0">
- <title>Validator Properties Page for Chosen Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/seam_preferences1_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- </section>
- </section>
-
- <section id="project_pref">
- <title>Project Preferences</title>
-
- <para>Once Seam project is created you can modify its settings. Right click
on Seam project
- in Project Explorer and select <emphasis><property
moreinfo="none">Properties > Seam
- Settings</property>.</emphasis></para>
- <para>This project properties page allows you to have a flexible project
layout. It means
- that you are not restricted with a specific project structure. You can use
the Seam
- wizards (New Action, Form, Entity, etc.) on Maven, command line seam-gen or
your own
- project structure. </para>
-
- <figure float="0">
- <title>Properties for Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/seam_preferences2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>The wizard doesn't allow the renaming of the artifacts listed
in the Seam
- Settings. It's possible to do in the <property
moreinfo="none">Package Explorer</property>.
- See <link linkend="renaming_projects_folders">Renaming
the Projects and
- Folders</link>.</para>
- </tip>
-
- <para>Also notice, you are not required to use the <property
moreinfo="none">New Seam Project
- wizard</property> to benefit from Seam artifact wizards. You can
just enable Seam on
- your existing project by checking <property
moreinfo="none">Seam Support</property> and targeting to
- Seam Runtime, and then configure the folders as you want.</para>
-
- <figure float="0">
- <title>Properties for Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/seam_preferences2_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>On the figure above fields for configuring Seam artifacts are
dimmed because Seam
- Runtime is not selected.</para>
- </tip>
-
- <para>In Seam Wizards (New Action, Form, Entity, Conversation, Generate
Entities) you can
- get a quick access to project settings using the <property
moreinfo="none">Settings</property> link in
- the upper right corner of each wizard.</para>
-
- <figure float="0">
- <title>Settings Link</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/seam_preferences/seam_preferences2_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- </section>
-
-</chapter>
-
-
-<chapter id="adding_seam_support_to_ear_project" role="new"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/adding_seam_support_to_ear_project.xml"
xreflabel="adding_seam_support_to _ear_project">
- <?dbhtml filename="adding_seam_support_to _ear_project.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>EAR</keyword>
- <keyword>Seam</keyword>
- <keyword></keyword>
- <keyword></keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Adding Seam support to EAR project</title>
- <para>From this chapter you will find out how to add Seam support to EAR
project</para>
- <para>For example you have several WTP projects:</para>
-
- <itemizedlist>
- <listitem><para> seamproject-ear (You can create WTP EAR project
using New -> Project -> Java EE -> Enterprise Application Project
wizard)</para></listitem>
- <listitem><para> seamproject-ejb (You can create WTP EJB project
using New -> Project -> EJB -> EJB Project
wizard)</para></listitem>
- <listitem><para> seamproject-war (You can create WTP WEB project
using New -> Project -> Web -> Dynamic Web Project
wizard)</para></listitem>
- </itemizedlist>
-
- <tip><title>Tip</title>
- <para>You can add as many EJBs modules as you want just doing the same for
each EJB project.</para></tip>
-
- <figure float="0">
- <title>WTP Projects</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/adding_seam_support_to_project/wtp_projects.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Make sure EJB and WAR are included in EAR as modules (Properties for
seamproject-ear -> Java EE Module Dependencies)</para>
-
- <figure float="0">
- <title>Java EE Module Dependencies</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/adding_seam_support_to_project/java_ee_module_dependencies.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Make sure there is jboss-seam.jar in application.xml as
well:</para>
-
- <figure float="0">
- <title>Java EE Module Dependencies</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/adding_seam_support_to_project/application_xml_with_jboss-seam_jar.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>Then include libs from EAR to EJB Manifest Class-Path (Properties for
seamproject-ejb -> Java EE Module Dependencies)</para>
-
- <figure float="0">
- <title>Including Libs from EAR to EJB Manifest Class-Path</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/adding_seam_support_to_project/including_libs_from_ear_to_ejb_manifest_class-path.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Include libs from EAR and seamproject-ejb.jar to WAR Manifest Class-Path
(Properties for seamproject-war -> Java EE Module Dependencies)</para>
-
- <figure float="0">
- <title>Including Libs from EAR and seamproject-ejb.jar to WAR Manifest
Class-Path</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/adding_seam_support_to_project/including_libs_from_ear_to_war_manifest_class-path.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Thus we have set our WTP EAR/EJB/WAR projects and now we are ready to add
Seam support to them:</para>
-
- <para>First you have to add Seam support to WAR project: Properties for
seamproject-war -> Seam Settings</para>
-
-
- <figure float="0">
- <title>Adding Seam Support to WAR Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/adding_seam_support_to_project/adding_seam_support_to_war_project.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>Set seamproject-war as Main Seam project. All other settings mostly are
used by New Seam Entity/Action/Form/Conversation/... Wizards. Thus you can set them as you
wish.</para>
-
- <para>Then you can add Seam support to EJB project: Properties for
seamproject-war -> Seam Settings</para>
-
- <figure float="0">
- <title>Adding Seam Support to EJB Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/adding_seam_support_to_project/adding_seam_support_to_ejb_project.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>It&s important to set seamproject-war project as main Seam
project there.</para>
- <para>It will allow Seam Tools to use one common Seam model for
seamproject-ejb and seamproject-war projects.</para>
-
- <para>The last step is to clean/build the projects</para>
-
- <para>That is all. You have added Seam support to your EAR project.
</para>
-
- <figure float="0">
- <title>Added Seam Support to EAR Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/adding_seam_support_to_project/added_seam_support_to_ear_project.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-</chapter>
-
-<chapter id="crud_database_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/crud_database_application.xml"
xreflabel="crud_database_application">
- <?dbhtml filename="crud_database_application.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>CRUD</keyword>
- <keyword>Database Application</keyword>
- </keywordset>
- </chapterinfo>
- <title>Generate a CRUD Database Application</title>
- <section>
- <title>What is CRUD?</title>
- <para>
- <property moreinfo="none">CRUD</property> is an acronym
for the four basic types of SQL commands: <emphasis>
- <property moreinfo="none">Create</property>
- </emphasis>, <emphasis>
- <property moreinfo="none">Read</property>
- </emphasis>, <emphasis>
- <property moreinfo="none">Update</property>
- </emphasis>, <emphasis>
- <property moreinfo="none">Delete</property>
- </emphasis>. Most applications have some kind of <property
moreinfo="none">CRUD</property>
- functionality, and we can assume that every programmer had to deal with
- <property moreinfo="none">CRUD</property> at some
point. A <property moreinfo="none">CRUD</property> application is
- one that uses forms to get data into and out of a database. </para>
- <para> In the next section we will create <link
linkend="intro">Seam</link> Web application,
- connect it to the <ulink
url="http://www.hsqldb.org/">HSQL</ulink> database and add
- <property moreinfo="none">CRUD</property> support.
</para>
- </section>
-
- <section>
- <title>How to create the CRUD Database Application with Seam</title>
-
- <itemizedlist>
- <listitem>
- <para>First, you should <ulink
url="http://docs.jboss.org/tools/resources/">download</ul... a
database and start it by running <emphasis>
- <property
moreinfo="none">./runDBServer.sh</property>
- </emphasis> or <emphasis>
- <property
moreinfo="none">runDBServer.bat</property>
- </emphasis> from the database directory.</para>
- </listitem>
- <listitem>
- <para>Create a new Seam Web Project using <property
moreinfo="none">New Seam Project
- wizard</property> or main menu <emphasis><property
moreinfo="none">File > New > Seam Web
- Project</property>.</emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Seam Web Project Creation</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_01.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Name your project as <emphasis>
- <property
moreinfo="none">crudapp</property>, </emphasis> specify Target
Runtime, Server and
- Seam Runtime configuration. Then press <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> and follow the next wizard steps keeping default
settings.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>New Seam Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_02.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>Please have a look <link
linkend="create_seam">here</link> how to create Target
- Runtime and Seam Runtime in order to get started creating, running, and
debugging
- J2EE applications.</para>
- </tip>
-
- <itemizedlist>
- <listitem>
- <para>On <emphasis>
- <property moreinfo="none">Seam
Facet</property>
- </emphasis> page click <emphasis>
- <property
moreinfo="none">New...</property>
- </emphasis> next to the <property
moreinfo="none">Connection profile</property> section to
- create a new <property moreinfo="none">Connection
profile</property>.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Seam Facet page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_03.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>On <property moreinfo="none">New Connection
Profile</property> dialog select the <emphasis>
- <property
moreinfo="none">HSQLDB</property>
- </emphasis> connection profile type, name it <emphasis>
- <property
moreinfo="none">cruddb</property>
- </emphasis> and click <emphasis>
- <property moreinfo="none">Next</property>.
</emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>New JDBC Connection Profile</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_04.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>On the next page click the round icon next to the
<emphasis>
- <property
moreinfo="none">Drivers</property>
- </emphasis> field to select a database driver.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>New JDBC Connection Profile Database Driver</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_06.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Now you should see the <property
moreinfo="none">New Driver Definition</property> dialog. On
- the first tab select the <emphasis>
- <property moreinfo="none">HSQLDB JBDC
Driver</property>. </emphasis> Underneath in the <emphasis>
- <property moreinfo="none">Driver
name</property>
- </emphasis> field you can change its name if you
need.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Database Driver Type</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_07.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>You may notice the note on the previous figure. It prompts
that you should
- specify the driver of the type you pointed. Set the location of the
driver by
- switching to the next tab and press <emphasis>
- <property moreinfo="none">Add
JAR/Zip</property>
- </emphasis> button.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Driver Definition</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_09.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>On the <property
moreinfo="none">Properties</property> tab set the
- <emphasis><property
moreinfo="none">Connection URL</property>,</emphasis>
- <emphasis>
- <property moreinfo="none">Database
Name</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">User
ID</property>
- </emphasis> and click <emphasis>
- <property moreinfo="none">OK</property>.
</emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Driver Definitions Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>After clicking <emphasis>
- <property moreinfo="none">OK</property>
- </emphasis> to submit the newly created driver you can observe
and if you need
- edit all specified connection details.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Driver and Connection Details</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Now click <emphasis>
- <property moreinfo="none">Test
Connection</property>
- </emphasis> to be sure that connection can be
established.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>JDBC Connection is OK</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Validate <emphasis>
- <property moreinfo="none">JDBC Connection
profile</property>
- </emphasis> settings and press <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> or <emphasis>
- <property moreinfo="none">Back</property>
- </emphasis> if something is wrong.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Validate JDBC Connection settings</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>After clicking <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> two projects <emphasis>
- <property
moreinfo="none">crudapp</property>
- </emphasis> and <emphasis>
- <property
moreinfo="none">crudapp-test</property>
- </emphasis> will be created.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>CRUDAPP Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Have a look at the created projects. You can expand
- <property
moreinfo="none">WEB_CONTENT</property> folder and open
- <property
moreinfo="none">home.xhtml</property> or <property
moreinfo="none">login.xhtml</property> with
- <property moreinfo="none">JBoss Visual
Editor</property>.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>login.xhtml in VPE</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Switch to <property moreinfo="none">Database
Development</property> perspective with <emphasis>
- <property moreinfo="none">Window->Open
Perspective->Other...</property>
- </emphasis> and connect to the <emphasis>
- <property
moreinfo="none">cruddb</property>
- </emphasis> database.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Connecting to the CRUDDB database</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_16.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Expand <emphasis>
- <property
moreinfo="none">cruddb</property>
- </emphasis> nodes to view its <emphasis>
- <property
moreinfo="none">Schemas</property>, </emphasis>
- <emphasis>
- <property
moreinfo="none">Tables</property>, </emphasis>
- <emphasis>
- <property
moreinfo="none">Columns</property>
- </emphasis> etc.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>CRUDDB Database</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_17.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Switch back to the <property
moreinfo="none">Seam</property> perspective. From the toolbar
- select <emphasis>
- <property moreinfo="none">New->Seam
Generate Entities</property>
- </emphasis> to create a set of <property
moreinfo="none">CRUD</property> Seam components and web
- pages based on existing tables in the database. On the first page of
<emphasis>
- <property moreinfo="none">Generate Seam
Entities</property>
- </emphasis> wizard keep everything by default and press
<emphasis>
- <property moreinfo="none">Next</property>.
</emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Generate Seam Entities</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_18.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Refresh</property></emphasis> to display all the
tables from the
- database.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Dialog for Selecting Tables</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_18a.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Now you can filter the tables. Use the <emphasis>
- <property
moreinfo="none">Include</property>
- </emphasis> button to include only necessary
ones.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Selecting Tables</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_18b.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Under <emphasis>
- <property
moreinfo="none">WebContent</property>
- </emphasis> folder you can find all generated <property
moreinfo="none">xhtml</property>
- files:</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Entities Web Pages</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_19.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>And under <emphasis>
- <property moreinfo="none">src</property>
- </emphasis> folder java classes are created.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Entities Java Classes</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_20.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Switch to <property
moreinfo="none">Hibernate</property> perspective with <emphasis>
- <property moreinfo="none">Window->Open
Perspective->Other...</property>.
- </emphasis> On <property
moreinfo="none">Hibernate Configurations</property> view expand the
<emphasis>
- <property
moreinfo="none">crudapp</property>
- </emphasis> configuration. Right click on <property
moreinfo="none">Customers</property> and
- select <emphasis>
- <property moreinfo="none">Open Mapping
Diagram</property>
- </emphasis> from the popup menu.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Hibernate Configurations View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_21.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Observe the <property moreinfo="none">Mapping
Diagram</property> opened in the editor. Here
- you can see the relations between models and database tables. For
better
- navigating on the diagram use the <property
moreinfo="none">Outline view</property>.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Mapping Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_22.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>For example, select <property
moreinfo="none">Customers</property> entity, right click and
- select <emphasis>
- <property moreinfo="none">Open Source
File</property>.
- </emphasis> This will open the <property
moreinfo="none">Customers.java</property> file in the
- java editor. You can also do this by right-clicking on the same
entity on the
- <property moreinfo="none">Mapping
Diagram</property>.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Entity class from Mapping Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_database_application/crud_database_application_23.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>So far, you are ready to deploy your application to JBoss Application
Server. This
- is described in the next chapter.</para>
-
- </section>
-
-</chapter>
-
-
-<chapter id="crud_application_walkthrough"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/crud_application_walkthrough.xml"
xreflabel="crud_application_walkthrough">
- <?dbhtml filename="crud_application_walkthrough.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>CRUD</keyword>
- <keyword>JBoss AS</keyword>
- </keywordset>
- </chapterinfo>
- <title>The CRUD Application Walkthrough</title>
- <para>After you familiarized oneself with example of creating the CRUD Database
Application with
- Seam, you can read this charter.</para>
- <section>
- <title>Using CRUD Application</title>
- <para>To run your CRUD Application you should do the following
steps:</para>
-
- <itemizedlist>
- <listitem>
- <para>Run a project on the Server. </para>
- </listitem>
- </itemizedlist>
-
- <para>On <emphasis>
- <property moreinfo="none">Package Explorer View
</property>
- </emphasis> right click on the <emphasis>
- <property moreinfo="none">crudapp</property>
- </emphasis> project, select <emphasis><property
moreinfo="none"> Run As > Run on
- Server</property>.</emphasis></para>
-
- <figure float="0">
- <title>Run Project on Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_1.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select a Server and click <property
moreinfo="none">Finish</property></para>
-
- <figure float="0">
- <title>Select a Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Home page of the <emphasis>
- <property moreinfo="none">crudapp</property>
- </emphasis> project should appear in <emphasis>
- <property moreinfo="none">Web Browser</property>
- </emphasis>.</para>
- <figure float="0">
- <title>Home page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_4.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After that you can use CRUD application with
- <property
moreinfo="none">"employee"</property> database.</para>
-
- <para>You can use internal JBDS Web Browser or your external Web Browser
with the same link
- (<ulink
url="http://localhost:8080/crudapp/home.seam">http://localhost:8080/crudapp/home.seam</ulink>).
</para>
- <para>Click on the <emphasis>
- <property moreinfo="none">Employees
List</property>
- </emphasis> link and observe that data from <emphasis>
- <property moreinfo="none">employee</property>
- </emphasis> database is displayed.</para>
- <figure float="0">
- <title>Employees List</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Use <property moreinfo="none">Employees search
parameters</property> fields to filter the selected
- list.</para>
-
- <para> Press <property
moreinfo="none">Select</property> opposite one of
employees.</para>
- <figure float="0">
- <title>Employee details</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para> Press <property
moreinfo="none">Edit</property> to edit employee fields.</para>
- <para> Enter <emphasis>
- <property moreinfo="none">Login</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">Password</property>
- </emphasis> to login. (Use
-
<emphasis>"crudapp-user"/"secret"</emphasis> for
- example)</para>
-
- <figure float="0">
- <title>Login page</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <figure float="0">
- <title>Edit Employee</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para> Fill in <emphasis>
- <property moreinfo="none">firstname</property>
- </emphasis> and press <property
moreinfo="none">Save</property>.</para>
- <para> Database will be updated.</para>
- </section>
-</chapter>
-
-
-<chapter id="testNG"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/testng.xml"
xreflabel="testNG">
- <?dbhtml filename="testNG.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JBDS</keyword>
- <keyword>testNG</keyword>
- </keywordset>
- </chapterinfo>
- <title>Using TestNG project</title>
- <para>With the help this chapter you will get to know with
TestNG.</para>
- <section>
- <title>What is TestNG?</title>
- <para><property moreinfo="none">TestNG</property>
("Testing, the Next Generation") is a
- Java unit testing framework that aims to overcome many limitations of JUnit.
TestNG
- introduces some new functionalities that make it more powerful and easier to
use, such
- as:</para>
- <itemizedlist>
- <listitem>
- <para>JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc
annotations)</para>
- </listitem>
- <listitem>
- <para>Flexible test configuration</para>
- </listitem>
- <listitem>
- <para>Support for data-driven testing (with
@DataProvider)</para>
- </listitem>
- <listitem>
- <para>Support for parameters</para>
- </listitem>
- <listitem>
- <para>Allows distribution of tests on slave machines</para>
- </listitem>
- <listitem>
- <para>Powerful execution model (no more TestSuite)</para>
- </listitem>
- <listitem>
- <para>Supported by a variety of tools and plug-ins (Eclipse, IDEA,
Maven,
- etc...)</para>
- </listitem>
- <listitem>
- <para>Embeds BeanShell for further flexibility</para>
- </listitem>
- <listitem>
- <para>Default JDK functions for runtime and logging (no
dependencies)</para>
- </listitem>
- <listitem>
- <para>Dependent methods for application server
testing</para>
- </listitem>
- </itemizedlist>
-
- <para>More information can be found on home page: <ulink
url="http://testng.org">www.testng.org</ulink></para>
- </section>
- <section id="OtherRelevantResourcesOnTheTopic5">
- <?dbhtml filename="OtherRelevantResourcesOnTheTopic5.html"?>
- <title>Other relevant resources on the topic</title>
- <para>
- <ulink
url="http://www.artima.com/lejava/articles/testng.html">Next...
Testing
- with TestNG (An Interview with Cedric Beust)</ulink>
- </para>
- <para>
- <ulink
url="http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.ht...:
- The next generation of unit testing</ulink>
- </para>
- <para>
- <ulink
url="http://dev2dev.bea.com/pub/a/2006/09/testng-categorization.html...
- Categorization Techniques with TestNG</ulink>
- </para>
- <para>
- <ulink
url="http://www-128.ibm.com/developerworks/java/library/j-testng/&qu...
makes
- Java unit testing a breeze</ulink>
- </para>
- <para>
- <ulink
url="http://www-128.ibm.com/developerworks/java/library/j-cq08296/in...
- pursuit of code quality: JUnit 4 vs. TestNG</ulink>
- </para>
- </section>
- <section>
- <title>How to use the generated Seam-test project to run Seam
tests?</title>
-
- <itemizedlist>
- <listitem>
- <para>Create a new Seam Web Project with EAR deployment using the
New Seam Project
- wizard.</para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <listitem>
- <para>After a project is created you will have the generated
Seam-test project that
- is setup to run TestNG directly against the proper libraries and
server runtime
- libraries.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Seam-test Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/testng/testng_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Add Seam Action to your project via
<emphasis><property moreinfo="none">File > New > Seam
- Action</property>.</emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Seam Action Creation</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/testng/testng_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Fill out the wizard fields. New Seam Action wizard will
create resources and
- place them in the appropriate folders dependent on EAR project
structure.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>New Seam Action Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/testng/testng_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>When Action is created you will see <property
moreinfo="none">actionPage.xhtml</property> in
- Package Explorer view. <property
moreinfo="none">ActionBean.java</property> will be
- automatically opened in Java Editor.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Created Action</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_8.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <itemizedlist>
- <listitem>
- <para>Select <property
moreinfo="none">ActionLocalTest.xml</property> in Seam-test project and
run
- the test with right click <emphasis><property
moreinfo="none">Run As > TestNG
- Suite</property>.</emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Running TestNG</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/testng/testng_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The test process will start and its output will be written in Console
View.</para>
-
- <figure float="0">
- <title>Test is Finished</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_10.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <itemizedlist>
- <listitem>
- <para>After running TestNG you will have the test results in
<emphasis>
- <property
moreinfo="none">test-output</property>
- </emphasis> folder in Seam-test project (press F5 to refresh
the Package
- Explorer view). Open <property
moreinfo="none">index.html</property> file with Web Browser or
- simply use the TestNG view.</para>
- </listitem>
- </itemizedlist>
-
- <para>The below view shows a successful run of the test.</para>
-
- <figure float="0">
- <title>Viewing the Test Results</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_11.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>You can see the test results in Web Browser.</para>
-
- <figure float="0">
- <title>Test Results in Browser</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_12.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After clicking on <emphasis>
- <property moreinfo="none">ActionLocal
Tests</property>
- </emphasis> link you will see the Results for ActionLocal
Tests.</para>
-
- <figure float="0">
- <title>Test Information</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_13.png"
scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select a result on the left-hand pane and its details will be
displayed on the
- right-hand one.</para>
-
- <figure float="0">
- <title>ActionLocal Test Details</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/testng/testng_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Thus with Seam tooling you can easily take advantage of TestNG
framework. As you can
- see, it generates its own TestNG project as a separate module within which
you can
- easily monitor the tests execution and their output.</para>
-
- <para>In conclusion, the main goal of this document is to get you know with
a full featureset
- that <property moreinfo="none">JBoss Tools</property>
provides to support Seam development. Thus if you have
- some questions, comments or suggestions on the topic, please fell free to ask
in the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
- Tools Forum</ulink>. You can also influence on how you want to see
JBoss Tools docs in
- future leaving your vote on our page <ulink
url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture">here&l...;.
</para>
-
- <para>A set of movies on Seam tooling is available <ulink
url="http://docs.jboss.org/tools/movies">here</ulink>....
- </section>
-</chapter>
-
- <!-- TODO: drools used in this section is not available for eclipse .3.3
&business_application; -->
-
-</book>
+]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+
+ <title>Seam Dev Tools Reference Guide</title>
+
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+
<author><firstname>Michael</firstname><surname>Sorokin</surname></author>
+
+
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 3.0.0.GA
+ </releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/seam/pdf/S...
version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+ <toc></toc>
+
+
+<chapter id="intro"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/intro.xml"
xreflabel="intro">
+ <?dbhtml filename="intro.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <section>
+
+ <title>What is Seam?</title>
+ <para>This introduction will help you to understand what is <property
moreinfo="none">Seam</property>.</para>
+ <para><property moreinfo="none">Seam</property> is a
fully featured application framework on top of Java EE
+ 5. It is also one of the most popular enterprise Java framework today. Seam
deeply
+ integrates many other standard-based or open source frameworks (e.g., JSF,
EJB3, JMS,
+ Web Services, jBPM, JBoss Rules, Ajax4jsf, RichFaces, Facelets, Spring,
iText, Quartz,
+ TestNG, etc.), and provides a single programming model for developers to
+ "drive" those underlying frameworks via simple annotated POJOs
(Plain
+ Old Java Objects). It makes life easier for developers to tackle complex
enterprise
+ applications with many component frameworks.</para>
+ </section>
+
+ <section>
+ <title>Installation into Eclipse</title>
+
+ <para>Here, we are going to explain how to install Seam plugin into
Eclipse.</para>
+
+ <para>Seam is a one module of JBoss Tools project. Since Seam has a
dependence on other JBoss Tools modules we recommend you to install
+ a bundle of all <ulink
url="http://labs.jboss.com/tools/download/index.html">JBoss Tools
plug-ins</ulink>. Installation instruction you can find on JBoss Wiki in <ulink
url="http://labs.jboss.com/wiki/InstallingJBossTools">Instal...
section.</para>
+
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>The <ulink
url="http://seamframework.org/">Seam
Framework</ulink> - Next generation enterprise Java development.</para>
+ <para>All latest release versions of JBoss Developer Studio/JBoss Tools
documentation you can find <ulink
url="http://docs.jboss.org/tools/2.1.0.GA/">here</ulink&g...
+ <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
+
+ </section>
+</chapter>
+
+
+<chapter id="create_seam" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/creating_new_seam.xml"
xreflabel="create_seam">
+ <?dbhtml filename="create_new_seam.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Creating a New Seam Project via the New Seam Project
wizard</title>
+ <para>In this chapter we provide you with the necessary steps to start working
with Seam
+ Framework.</para>
+
+ <para>At first, we suggest setting the specific Seam perspective that combines
a number of
+ different views and editors needed for work with resources concerned. For that
select <emphasis>
+ <property moreinfo="none">Window > Open Perspective
> Other > Seam</property>
+ </emphasis> or you can also access it through the button in the right top
corner.</para>
+
+ <figure float="0">
+ <title>Seam Perspective Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_0.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Also the <emphasis>
+ <property moreinfo="none">Open Web
Browser</property></emphasis> action is directly available in the <property
moreinfo="none">Seam perspective</property>.</para>
+
+ <figure float="0">
+ <title>Embedded Web Browser Button</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_01.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="standaloneSeam" role="updated">
+ <title>Create standalone Seam Web Project</title>
+ <para>The best way to get started with Seam is to organise a simple Seam
Project and
+ experiment with it by creating variations.</para>
+ <para>Thus, you should select <emphasis>
+ <property moreinfo="none">File > New > Seam
Web Project</property>
+ </emphasis> to run the <property moreinfo="none">New
Seam Project</property> wizard. The wizard form
+ allows you to create runtime and server instances in order to get started
creating,
+ running, and debugging J2EE (only) applications.</para>
+ <para>Seam Web Project wizard has an option for selecting the actual Server
(not just WTP
+ runtime) that will be used for the project. This allows the wizard to
identify correctly
+ where the required datasource and driver libraries need to go.</para>
+ <para>Let's get through the wizard step-by-step. First, you should
enter a name and
+ a location directory for your new project.</para>
+
+ <figure float="0" id="figure_create_seam1">
+ <title>New Seam Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the figure above you can see the runtime and the server already
created.</para>
+
+ <para>If you need to create a new runtime, click on the <emphasis>
+ <property moreinfo="none">New...</property>
+ </emphasis> button in the <property
moreinfo="none">Target Runtime</property> section. It brings up the
+ wizard where you can specify a new JBoss Server Runtime environment or the
other type of
+ runtime appropriate for configuring your project. Let's create one more
JBoss 4.2
+ Runtime. Hence, after choosing it click on <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button.</para>
+
+ <figure float="0">
+ <title>Specifying Target Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>All what you need here is to name runtime, type the path to its
install directory or
+ locate it by using <emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button, select a Java Runtime Environment, and select which
configuration
+ you want.</para>
+
+ <figure float="0">
+ <title>Specifying Target Runtime Configurations</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> returns you to the <link
linkend="figure_create_seam1">New Seam Project
+ wizard page</link>.</para>
+
+ <para>The next step is to define a Server that you can do by clicking
+ on <emphasis>
+ <property moreinfo="none">New...</property>
+ </emphasis> button in the <property
moreinfo="none">Target Server</property> section. In appeared
+ <property moreinfo="none">New Server
dialog</property> the last server which matches the runtime
+ will be selected.</para>
+
+ <para>All declared runtimes are listed in the combo box under the servers
view. Here, you
+ can indicate a server runtime that you need. Click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> if you want to add a new Server Runtime.</para>
+
+ <figure float="0">
+ <title>Specifying Target Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Next page allows you to verify the information for chosen server.
Leave everything as
+ it is and click on <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis>.</para>
+
+ <figure float="0">
+ <title>Specifying Server Configurations</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the last wizard step you can modify your projects to configure
them on the
+ Server.</para>
+
+ <figure float="0">
+ <title>Project Modification for Configuring on the
Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>Once you have the Target Server defined click on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to return to the first page of the <property
moreinfo="none">New Seam Project
+ wizard</property>.</para>
+
+ <tip>
+ <title>Tip:</title>
+ <para>We suggest that you look through our <ulink
url="../../as/html_single/index.html">AS manager
+ guide</ulink> to find out more about runtimes and
servers.</para>
+ </tip>
+
+ <figure float="0">
+ <title>Completion of Runtime and Server Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The last section on this wizard step is <property
moreinfo="none">Configuration</property>. Here, you
+ can select one of the pre-defined project configurations either associated
with Seam
+ 1.2, Seam 2.0 or with Seam 2.1. Furthermore, you can create your own
configuration by
+ pressing the <emphasis>
+ <property moreinfo="none">Modify...</property>
+ </emphasis> button. It will open the dialog which allows to configure
your own set of
+ facets for adding extra functionality to your project.</para>
+
+ <para>Pass to the next section to find out more details on this
dialog.</para>
+
+ </section>
+ <section id="projectFacets">
+ <title>Select the Project Facets</title>
+
+ <para>The <property moreinfo="none">Project Facets
wizard</property> allows you to enable or disable
+ specific facets which define necessary characteristics for the project. In
time you
+ switch to this wizard form, all critical facets are already checked for the
chosen
+ Configuration.</para>
+
+ <para>Notice that this page of the wizard also allows you to set the
necessary version for
+ any facet. </para>
+
+ <figure float="0">
+ <title>Project Facets Selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Moreover, here you can specify your own preset of selected facets by
checking needed
+ ones in project facets window and clicking on <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button.</para>
+
+ <figure float="0">
+ <title>Specifying Custom Facet Preset</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To see all available Server runtimes click on <property
moreinfo="none">Runtimes</property> tab on the
+ left. You can create a new one using the <emphasis>
+ <property moreinfo="none">New</property>
+ </emphasis> button. If more than one runtimes are checked here, the
<emphasis>
+ <property moreinfo="none">Make Primary</property>
+ </emphasis> button won't be dimmed yet. So you can make use of it
to mark
+ primary runtime.</para>
+
+ <figure float="0">
+ <title>Runtime Manipulations</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> button will bring you to the <property
moreinfo="none">Web Module</property> wizard form
+ again.</para>
+ </section>
+
+ <section id="configureWebModule">
+ <title>How to Configure Web Module Settings</title>
+
+ <para> As we deal with a Dynamic Web Application we should first specify
the top level
+ directory of our application for deploying it to a server afterwards. You
know, this
+ kind of application contains both Web and Java code resources. Thus, it's
also important
+ to indicate the content directory as well as Java source directory. The
wizard will put
+ all those values itself. So you can leave everything as it is.</para>
+
+ <figure float="0">
+ <title>Web Module Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Choose <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to switch to the next wizard form.</para>
+ </section>
+
+ <section id="addJSFCapab">
+ <title>Adding JSF Capabilities</title>
+
+ <para>This wizard helps you to add JSF capabilities into your project for
representing
+ appropriate behaviours associated with JSF. </para>
+ <para>Checking <emphasis>
+ <property moreinfo="none">Server Supplied JSF
Implementation</property>
+ </emphasis> means that you will have a default JSF implementation given
by
+ server.</para>
+
+ <figure float="0">
+ <title>Adding JSF Capabilities to Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In case when you want to use your custom JSF implementation check a
lower radio
+ button. You are able to create a library of jars by clicking on
<emphasis>
+ <property moreinfo="none">New</property>
+ </emphasis> button.</para>
+ <para>Here, it's necessary to type a <property
moreinfo="none">Library Name</property>, select a
+ <property moreinfo="none">Version
Supported</property> and add proper <property
moreinfo="none">Library
+ jars</property>. Then click on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to complete the choice.</para>
+ <figure float="0">
+ <title>Create JSF Implementation Library</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the Component Libraries section of the wizard you can also add
<property moreinfo="none">Component
+ Libraries</property> (e.g. <ulink
url="http://www.jboss.org/jbossrichfaces">Richfaces</ulink>). Just
click on <emphasis>
+ <property moreinfo="none">New</property>
+ </emphasis> button. Appeared dialog will ask you to type the Library
name, supported
+ version and add necessary jar's. Press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to complete the choice.</para>
+
+ <figure float="0">
+ <title>Create JSF Implementation Component Library</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The last wizard options allows to edit a path for <property
moreinfo="none">JSF Configuration
+ File</property>, a name for <property
moreinfo="none">JSF Servlet</property>, <property
moreinfo="none">JSF Servlet
+ Classname</property> and change <property
moreinfo="none">URL Mapping Patterns</property>.</para>
+
+ <figure float="0">
+ <title>JSF Capabilities Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Finally, as we are arranging the Seam Web project, the last step we
should do is to
+ adjust project configurations associated with the Seam.</para>
+ </section>
+
+ <section id="seamFacet">
+ <title>Configure Seam Facet Settings</title>
+
+ <para>The last wizard step is related to Seam facet and allows you to do
the
+ following:</para>
+ <figure float="0">
+ <title>Seam Facet Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create Seam runtime and define Seam home
folder.</para>
+ </listitem>
+ </itemizedlist>
+ <para>For that click on <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button in the <property
moreinfo="none">General</property> section. Notice that in this
+ wizard presented below you can create a Seam runtime only for that version
which was
+ selected in the <link linkend="projectFacets">Project
Facets</link> wizard (version 1.2
+ in our case).</para>
+
+ <figure float="0">
+ <title>Seam Runtime Creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select EAR or WAR deployment by checking a necessary radio
button.</para>
+ </listitem>
+ <listitem>
+ <para>Select a <emphasis>
+ <property moreinfo="none">Database
Type</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Seam Runtime Creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>and then specify a <emphasis>
+ <property moreinfo="none">Connection
profile</property>
+ </emphasis> appropriate for your database.</para>
+
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Connection Profile Options</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can edit chosen profile by using <emphasis>
+ <property moreinfo="none">Edit</property>
+ </emphasis> button or organise a new one by clicking on
<emphasis>
+ <property moreinfo="none">New</property>
+ </emphasis> button and selecting necessary for you type of connection
profile.</para>
+ <figure float="0">
+ <title>Connection Profile Selecting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the other dialog you'll be asked to enter its name and
description. And
+ then you should select a proper driver and adjust connection details. Press
<emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to preview all the adjusted settings and complete the
creation of the new
+ profile.</para>
+
+ <figure float="0">
+ <title>Connection Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The next block of settings in the Seam Facet wizard are describing a
Database and a
+ connection to it.</para>
+ <para>In the <property moreinfo="none">Code
Generation</property> section the wizard have already put the
+ names for your <property moreinfo="none">Session
Bean</property>, <property moreinfo="none">Entity
Bean</property> and
+ <property moreinfo="none">Test</property> packages.
Of course, you can change them into the others
+ which you like.</para>
+
+ <figure float="0">
+ <title>Code Generation Section</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/create_new_seam/create_seam_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to generate a project.</para>
+
+ <para></para>
+ </section>
+</chapter>
+
+
+<chapter id="directory_str"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/directory_structure.xml"
xreflabel="directory_str">
+ <?dbhtml filename="directory_structure.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>Eclipse</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Directory Structure of the Generated Project</title>
+
+ <para>In this chapter we describe where the Seam wizard puts the generated
files for both EAR
+ and WAR deployments.</para>
+ <para>The Seam Project wizard generates projects like Eclipse WTP style in
order to utilize
+ Eclipse WTP features and to have a correct classpath. To be more precise it
generates one
+ project per artifact.</para>
+
+ <section id="WAR">
+ <title>WAR Deployment</title>
+
+ <para>The project layout for WAR projects is:</para>
+
+ <figure float="0">
+ <title>Project Layout for WAR projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/directory_structure/directory_structure_1.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>A WAR project can only use Seam JavaBean and JPA Entity bean
components; it cannot use
+ EJB3 Session beans etc.</para>
+ <para>WAR projects are generated to enable Seam 1.2.1 war hotdeploy
feature. Classes put
+ into <emphasis>
+ <property moreinfo="none">src/action</property>
+ </emphasis> will be deployed to <emphasis>
+ <property moreinfo="none">WEB-INF/dev</property>
+ </emphasis> from which Seam 1.2.1 automatically will perform hotdeploy
of new
+ components.</para>
+ <note>
+ <title>Note:</title>
+ <para>Because of Eclipse WTP limits the hot deployed classes also
existed in <emphasis>
+ <property
moreinfo="none">WEB-INF/classes</property>, </emphasis> but since
Seam gives <emphasis>
+ <property
moreinfo="none">WEB-INF/dev</property>
+ </emphasis> precedence it will work.</para>
+ </note>
+
+ <para>Furthermore the Seam Project wizard generates a test project that is
setup to run
+ <link linkend="testNG">TestNG</link> directly
against the proper libraries and
+ server runtime libraries. When the TestNG plugin is installed you can just
run your
+ tests via <emphasis><property moreinfo="none">Run As
> TestNG Test</property>.</emphasis></para>
+ <para>In order to deploy WAR project on server, right-click on the project
and select <emphasis>
+ <property moreinfo="none">Run As > Run on
Server</property>.</emphasis> Studio will deploy
+ WAR project into one web application on server to <property
moreinfo="none">deploy</property>
+ folder.</para>
+
+ </section>
+
+ <section id="EAR">
+ <title>EAR Deployment</title>
+ <para>The project layout for EAR projects is:</para>
+
+ <figure float="0">
+ <title>Project Layout for EAR projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/directory_structure/directory_structure_2.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>An EAR project can use the whole range of Seam components, including
EJB3 Session
+ beans.</para>
+ <para>In order to deploy EAR project on server, right-click on the project
with
+ <property moreinfo="none">-ear</property> postfix
and select <emphasis>
+ <property moreinfo="none">Run As > Run on
Server</property>.</emphasis> Studio will take care
+ about all modules and deploy EAR project into one enterprise application on
server to
+ <property moreinfo="none">deploy</property> folder.
EAR application keeps <property moreinfo="none">ejb</property>
+ and <property moreinfo="none">war</property> modules of
the EAR project.</para>
+ </section>
+
+ <section id="seam_version_changing">
+
+ <title>Changing the Seam Version</title>
+
+ <para>To upgrade or downgrade your projects Seam version use the facet
preferences. You
+ should right-click your project and choose <emphasis>
+ <property moreinfo="none">Project
Facets</property>
+ </emphasis> category. Next select <emphasis>
+ <property moreinfo="none">Seam</property>
+ </emphasis> and change its version to needed one.</para>
+
+ <figure float="0">
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/directory_structure/directory_structure_3.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After pressing <emphasis>
+ <property moreinfo="none">Apply</property>
+ </emphasis> the wizard for adjusting new Seam runtime settings
appears.</para>
+
+ <figure float="0">
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/directory_structure/directory_structure_4.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you need to update the libraries for you project, check the
<emphasis>
+ <property moreinfo="none">Update
libraries</property>
+ </emphasis> option. All libraries you checked will be removed and the
libraries from the
+ new Seam distribution will be added after clicking <emphasis>
+ <property
moreinfo="none">Ok</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/directory_structure/directory_structure_5.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+
+ <para>The note "Seam configuration files and their XSDs won't
be changed" is
+ meant that the libraries, Seam facet and runtime version will be changed,
but
+ configuration files that refer to the old version will have to be
manually
+ updated.</para>
+ </note>
+ </section>
+
+ <section id="changing_seam_parent_project">
+ <title>Changing Seam Parent Project</title>
+
+ <para>Starting from the 2.0.0.CR2 version of <property
moreinfo="none">JBoss Tools</property> it is possible
+ to change the Seam parent project. In earlier versions this was only
controllable at a
+ project creation time, now it can be changed for existing projects
too.</para>
+
+ <para>Go to your project preferences and select <emphasis>
+ <property moreinfo="none">Seam Settings</property>
+ </emphasis> category on the left. Press the <emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button next to the <emphasis>
+ <property moreinfo="none">Main Seam
Project</property>
+ </emphasis> section to select the other Seam parent
project.</para>
+
+ <figure float="0">
+ <title>Changing Seam Parent Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/directory_structure/directory_structure_6.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="renaming_projects_folders">
+ <title>Renaming the Projects and Folders</title>
+
+ <para>If you need to rename one of the Seam Project artifacts
+ (<emphasis><project_name></emphasis>,
+ <emphasis><project_name>-test</emphasis>,
+ <emphasis><project_name>-test</emphasis> or
+ <emphasis><project_name>-ejb</emphasis>) or any
entire folder like
+
<emphasis><project_name>/WebContent</emphasis>,
+ <emphasis><project_name>/ejbModule</emphasis>,
+
<emphasis><project_name>-test/test-src</emphasis>, or project
name in
+ packages
<emphasis>org.domain.<project_name>.session</emphasis>,
+
<emphasis>org.domain.<project_name>.entity</emphasis>, you can
do this
+ by brining the context menu and navigating <emphasis>
+ <property moreinfo="none">Refactor >
Rename...</property>
+ </emphasis> or just pressing <emphasis>
+ <property moreinfo="none">Shift + Alt +
R</property>
+ </emphasis> under the chosen resource.</para>
+
+ <para>Use <emphasis>
+ <property moreinfo="none">Refactor >
Move...</property>
+ </emphasis> (or <emphasis>
+ <property moreinfo="none">Shift + Alt +
V</property>
+ </emphasis>), if you need to move
+ <emphasis><project_name>/WebContent</emphasis>
folder,
+ <emphasis><project_name>/ejbModule</emphasis>
folder or
+ <emphasis><project_name>/test-src</emphasis>
folder in the other place
+ within the Project structure.</para>
+ </section>
+</chapter>
+
+
+<chapter id="menus_and_actions"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_menus_and_actions.xml"
xreflabel="menus_and_actions">
+ <?dbhtml filename="seam_menus_and_actions.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>menus</keyword>
+ <keyword>actions</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Seam Menus and Actions</title>
+
+ <para>In this chapter we provide a description of Seam actions that are
available from</para>
+ <itemizedlist>
+ <listitem>
+ <para>Menu bar</para>
+ </listitem>
+ <listitem>
+ <para>Toolbar</para>
+ </listitem>
+ <listitem>
+ <para>Context menus in views</para>
+ </listitem>
+ </itemizedlist>
+
+
+ <section id="file_menu">
+
+ <title>File Menu Actions</title>
+
+ <para>In a Seam perspective, by default there are the following actions in
<emphasis>
+ <property moreinfo="none">File >
New</property>
+ </emphasis> submenu</para>
+
+ <table>
+ <title>Seam Actions in the New Submenu</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1"
colwidth="1*"></colspec>
+ <colspec colnum="2"
colwidth="4*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Function</para>
+ </entry>
+
+ </row>
+ </thead>
+
+ <tbody>
+
+
+ <row>
+ <entry>
+ <para>
+ <property moreinfo="none">Seam Web
Project</property>
+ </para>
+
+ </entry>
+
+ <entry>
+ <para>Runs <link
linkend="standaloneSeam">New Seam Project</link> wizard
+ for creating a new Seam project </para>
+ </entry>
+
+
+ </row>
+
+
+ <row>
+ <entry>
+ <para>
+ <property moreinfo="none">Seam
Action</property>
+ </para>
+
+ </entry>
+
+ <entry>
+ <para>Runs <link
linkend="seam_action">New Seam Action</link> wizard for
+ creating a new Seam action </para>
+ </entry>
+
+
+ </row>
+
+
+
+ <row>
+ <entry>
+ <para>
+ <property moreinfo="none">Seam
Form</property>
+ </para>
+
+ </entry>
+
+ <entry>
+ <para>Runs <link
linkend="seam_form">New Seam Form</link> wizard for
+ creating a new Seam form </para>
+ </entry>
+
+
+ </row>
+
+
+ <row>
+ <entry>
+ <para>
+ <property moreinfo="none">Seam
Entity</property>
+ </para>
+
+ </entry>
+
+ <entry>
+ <para>Runs <link
linkend="seam_entity">New Seam Entity</link> wizard for
+ creating a new Seam entity </para>
+ </entry>
+
+
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <property moreinfo="none">Seam
Conversation</property>
+ </para>
+
+ </entry>
+
+ <entry>
+ <para>Runs <link
linkend="seam_conversation">New Seam
+ Conversation</link> wizard for creating a new Seam
conversation
+ </para>
+ </entry>
+
+
+
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <property moreinfo="none">Seam Generate
Entities</property>
+ </para>
+
+ </entry>
+
+ <entry>
+ <para>Runs <link
linkend="generate_entities">Generate Seam
+ Entities</link> wizard</para>
+ </entry>
+
+
+
+ </row>
+
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ </section>
+
+ <section id="navigate_menu">
+ <title>Navigate Menu Actions</title>
+
+ <para>In the next sections we are going to describe Seam actions which can
help you to
+ easily navigate through the source code.</para>
+
+ <section id="find_seam_ref_decl">
+
+ <title>Find Seam References/Declarations</title>
+
+ <para>To find EL expretions both in <emphasis>
+ <property moreinfo="none">.java</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">.xhtml</property>
+ </emphasis> files use Find Seam References/Declarations actions.
For that, in the main menu bar click on <emphasis>
+ <property moreinfo="none">Search > Find Seam
References</property>
+ </emphasis> or <emphasis><property
moreinfo="none">Find Seam Declarations</property>.</emphasis>
+ </para>
+
+ <para>Look at the description of the actions in the table
below.</para>
+
+ <table>
+ <title>Find Seam References/Declarations actions</title>
+ <tgroup cols="3">
+ <colspec align="left" colnum="1"
colwidth="1*"></colspec>
+ <colspec colnum="2"
colwidth="4*"></colspec>
+ <colspec colnum="3"
colwidth="2*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Function</para>
+ </entry>
+
+ <entry align="center">
+ <para>Keyboard Shortcut</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+
+ <row>
+ <entry>
+ <para>
+ <property moreinfo="none">Find Seam
References</property>
+ </para>
+ <para>
+ <property moreinfo="none">Find Seam
Declarations</property>
+ </para>
+ </entry>
+
+ <entry>
+ <para>Find all references and declarations to the
selected element.
+ It's available for EL expressions in both .java
and .xhtml
+ files. Differs from normal Eclipse Find
References/Declarations
+ by showing an EL or Seam references in the Search
View. </para>
+ </entry>
+
+ <entry>
+ <para>Ctrl+G</para>
+ <para>Ctrl+Shift+G</para>
+ <para>also Ctrl + 1 for .java files</para>
+
+ </entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <para>On the screenshot example below you could see that the search
results are listed
+ in the
+ <property moreinfo="none">Search
view</property>.
+ </para>
+
+ <figure float="0">
+ <title>Find Seam Declaration for
"Identity"</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_menus_and_actions/menus_and_actions1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use Ctrl + 1 in .java files to activate the
actions:</para>
+
+ <figure float="0">
+ <title>Find Seam References for "Identity"</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_menus_and_actions/menus_and_actions2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="open_seam_component">
+ <title>Open Seam Component</title>
+
+ <para>To open Seam Components click on <emphasis><property
moreinfo="none">Navigate > Open Seam
+ Component</property></emphasis> in the main menu bar. This
dialog is also available from toolbar
+ icon or with hot keys combination "Ctrl+Shift+Z
".</para>
+
+ <figure float="0">
+ <title>Open Seam Components icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_menus_and_actions/menus_and_actions3_0.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the table below read a description about the
dialog.</para>
+
+ <table>
+ <title>Open Seam Components Dialog</title>
+ <tgroup cols="3">
+ <colspec align="left" colnum="1"
colwidth="1*"></colspec>
+ <colspec colnum="2"
colwidth="4*"></colspec>
+ <colspec colnum="3"
colwidth="2*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Function</para>
+ </entry>
+
+ <entry align="center">
+ <para>Keyboard Shortcut</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+
+ <row>
+ <entry>
+ <para>
+ <property moreinfo="none">Open Seam
Components</property>
+ </para>
+
+ </entry>
+
+ <entry>
+ <para>Brings up the Open Seam Component dialog to
open a component
+ in the editor. The Open Seam Component selection
dialog shows
+ all Seam components existing in the workspace. You
can search
+ the components via their short, imported or full
name.</para>
+ </entry>
+
+ <entry>
+ <para>Ctrl+Shift+Z</para>
+
+ </entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Enter a name in the text field and see the results as it shown on
screenshot: </para>
+
+ <figure float="0">
+ <title>Open Seam Components Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_menus_and_actions/menus_and_actions3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="seam_wizards"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_wizards.xml"
xreflabel="seam_wizards">
+ <?dbhtml filename="seam_wizards.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Seam Wizards</title>
+
+ <para>This chapter introduces you with Seam Components.</para>
+ <para>All the Seam component generations options known from Seam-gen are
available as wizards
+ (with sensible auto-defaulting) for creating various common Seam
components:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <property moreinfo="none">Seam Action</property>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <property moreinfo="none">Seam Form</property>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <property moreinfo="none">Seam Entity</property>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <property moreinfo="none">Seam
Conversation</property>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Go to <emphasis>
+ <property moreinfo="none">File > New</property>
+ </emphasis> and select the component wizard.</para>
+
+ <figure float="0">
+ <title>Seam Component Wizards</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The wizards create multiple resources and place it in the appropriate
folders depending on
+ your project structure (WAR or EAR).</para>
+ <para>Let's create a WAR project using the New Seam Project
wizard.</para>
+
+ <figure float="0">
+ <title>Seam Project WAR Deployment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After the project is created you need deploy it on server.</para>
+
+
+ <section id="seam_action">
+
+ <title>New Seam Action</title>
+
+ <para>In this and following sections you can see example creating Seam
Components.</para>
+ <para>To create a New Seam Action you should select a necessary project,
type a name for
+ <property moreinfo="none">Seam
component</property>, <property moreinfo="none">POJO
class</property>,
+ <property moreinfo="none">Method</property>,
<property moreinfo="none">Page</property> and select a
+ <property moreinfo="none">Package</property> using
the <emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button.</para>
+
+ <figure float="0">
+ <title>New Seam Action Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you specify a class which already exists, the wizard will warn you
about it.</para>
+
+ <figure float="0">
+ <title>Wizard Warning against Existing File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/action_warning.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can see the action page in <property
moreinfo="none">WebContent</property> folder. Click on it to
+ open in JBoss Tools HTML Editor.</para>
+
+ <figure float="0">
+ <title>Action Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_5.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <note>
+ <title>Note:</title>
+ <para>You don't need to restart the server to see how the action
component works. Just
+ use context menu <emphasis><property
moreinfo="none">Run As > Run On
+ Server</property>.</emphasis></para>
+ </note>
+
+ <para>Action component was hot-deployed. Forms and Conversations will work
the same
+ way.</para>
+
+ <figure float="0">
+ <title>Action Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ </section>
+ <section id="seam_form">
+ <title>New Seam Form</title>
+
+ <para>Click on <property
moreinfo="none">actionMethod</property> in the internal browser and add
a form in
+ your project using the New Seam Form wizard <emphasis><property
moreinfo="none">File > New > Seam
+ Form</property>.</emphasis></para>
+ <para>Select a necessary project, type a name for <property
moreinfo="none">Seam component</property>,
+ <property moreinfo="none">POJO class</property>,
<property moreinfo="none">Method</property>,
+ <property moreinfo="none">Page</property> and
select a <property moreinfo="none">Package</property> using
<emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button.</para>
+
+ <figure float="0">
+ <title>New Seam Form Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you specify a class which already exists, the wizard will warn you
about it.</para>
+
+ <figure float="0">
+ <title>Wizard Warning against Existing File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/form_warning.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Form Page was created in <property
moreinfo="none">WebContent</property> folder.</para>
+
+ <figure float="0">
+ <title>Form Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_8.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Deploy the form on server. Right click on Form Page, select
<emphasis><property moreinfo="none">Run As
+ > Run On
Server</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Form Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Form component was hot-deployed.</para>
+
+ </section>
+
+ <section id="seam_conversation">
+ <title>New Seam Conversation</title>
+
+ <para>Enter some value in the text field (e.g. <property
moreinfo="none">value1</property>) and click on
+ <property
moreinfo="none">formMethod</property>.</para>
+ <para>Add a conversation using the New Seam Conversation wizard
<emphasis><property moreinfo="none">File >
+ New > Seam
Form</property>.</emphasis></para>
+ <para>You should select a necessary project, type a name for <property
moreinfo="none">Seam
+ component</property>, <property
moreinfo="none">POJO class</property>, <property
moreinfo="none">Method</property>,
+ <property moreinfo="none">Page</property> and
select a <property moreinfo="none">Package</property> using
<emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button.</para>
+
+
+ <figure float="0">
+ <title>New Seam Conversation Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you specify a class which already exists, the wizard will warn you
about it.</para>
+
+ <figure float="0">
+ <title>Wizard Warning against Existing File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/conversation_warning.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Conversation page was created in <property
moreinfo="none">WebContent</property> folder.</para>
+
+ <figure float="0">
+ <title>Conversation Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_11.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Right click on Conversation page, select <emphasis><property
moreinfo="none">Run As > Run On
+ Server</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Conversation Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Conversation component was hot-deployed.</para>
+ <para>Click on <property
moreinfo="none">Begin</property> and <property
moreinfo="none">Increment</property> buttons to
+ check the conversation functionality.</para>
+
+ </section>
+
+
+ <section id="seam_entity">
+ <title>New Seam Entity</title>
+
+ <para>Entities cannot be hot-deployed, so we need to stop the
server.</para>
+ <para>Create an Entity using the New Entity wizard
<emphasis><property moreinfo="none">File > New > Seam
+ Entity</property>.</emphasis>
+ </para>
+
+ <para>You should select a necessary project, type a name for <property
moreinfo="none">Entity
+ class</property>, select a <property
moreinfo="none">Package</property> using <emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button, type a name for <property
moreinfo="none">Master Page</property> and
+ <property
moreinfo="none">Page</property>.</para>
+
+ <figure float="0">
+ <title>New Seam Entity Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you specify a class which already exists, the wizard will warn you
about it.</para>
+
+ <figure float="0">
+ <title>Wizard Warning against Existing File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/entity_warning.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Master Page and the Entity were created in <property
moreinfo="none">WebContent</property>
+ folder.</para>
+
+ <figure float="0">
+ <title>Master Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_14.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Entity page is:</para>
+
+ <figure float="0">
+ <title>Entity Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_15.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Run the Entity page on server. This is what you get:</para>
+
+ <figure float="0">
+ <title>Customer Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Let's create two customers <property
moreinfo="none">c1</property> and <property
moreinfo="none">c2</property>. Enter
+ the name in the text field and press the <property
moreinfo="none">Save</property> button. Customer
+ should be successfully created. Press <property
moreinfo="none">Done</property>. Do the same for
+ <property moreinfo="none">c2</property> customer.
The result should be:</para>
+
+ <figure float="0">
+ <title>Two Customers Are Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_wizards/seam_wizards_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+
+<chapter id="generate_entities"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/generate_entities.xml"
xreflabel="generate_entities">
+ <?dbhtml filename="generate_entities.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Seam Generate Entities</title>
+
+ <para>The main purpose of this chapter is to tell you about Seam Generate
Entities.</para>
+ <para>Generate Entities is available directly from within Eclipse using
Hibernate Tools plugin for the standard seam-gen generation.</para>
+ <para>Generate Entities generates a set of CRUD Seam components and web pages
based on existing tables in a database or on existing entities in your
application.</para>
+
+
+ <figure float="0">
+ <title>Generate Seam Entities Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/generate_entities/generate_entities1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the Generate Seam Entities wizard there are two generation modes:
Reverse Engineer from database
+ and Use existing entities.</para>
+
+ <para>The <property moreinfo="none">Reverse Engineer from
database</property> mode can be described in four steps:</para>
+ <orderedlist continuation="restarts" inheritnum="ignore">
+ <listitem><para>The wizard gets in database, extracts the tables and
+ their connections</para></listitem>
+ <listitem><para>On basis of this metainfomation the Entity classes
are generated into
+ <property
moreinfo="none">org.domain.project.entity</property>
package</para></listitem>
+ <listitem><para>For the entities from step 2 the classes <property
moreinfo="none">EntityList</property> and <property
moreinfo="none">EntityHome</property> are generated
+ into <property
moreinfo="none">org.domain.project.session</property>
package</para></listitem>
+ <listitem><para>The xhtml pages are
generated.</para></listitem>
+ </orderedlist>
+ <para>
+ Checking the <property moreinfo="none">Use existing
entities</property> mode the wizard executes only 3 and 4 steps. It generates
missing classes and
+ xhtml pages.
+ </para>
+
+ <para>Read the <link
linkend="crud_database_application">Generate a CRUD Database
Application</link> chapter in order to see how the <property
moreinfo="none">Generate Seam Entities</property> wizard can be
used.</para>
+
+
+ </chapter>
+
+
+
+<chapter id="seam_editors" role="updated"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_editors.xml"
xreflabel="seam_editors">
+ <?dbhtml filename="seam_editors.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Seam Editors Features</title>
+
+ <para>In this chapter you will know what Seam Editors features are and how to
work with them. </para>
+
+ <section id="ContentAssist">
+
+ <title>Content Assist</title>
+
+ <para><property moreinfo="none">Content
Assist</property> (Ctrl + Space) is available when using EL variables in the
following file formats:</para>
+ <itemizedlist>
+ <listitem>
+ <para>JSP</para>
+ </listitem>
+ <listitem>
+ <para>XHTML</para>
+ </listitem>
+ <listitem>
+ <para>XML</para>
+ </listitem>
+ <listitem>
+ <para>JAVA</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Notice, the code completion for the Seam components shows the
proposals marked with Seam icon.</para>
+
+ <figure float="0">
+ <title>Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_1.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+
+ <para>To get Code Assist available for an externally generated and
imported project,
+ don't forget to enable Seam features and configure Seam Settings in
<link linkend="project_pref">Project
Preferences</link>.</para>
+ </note>
+
+ <section id="components_code_assist" role="new">
+ <title>Content Assist for components.xml</title>
+
+ <para>While you are editing a <emphasis>
+ <property
moreinfo="none">components.xml</property>
+ </emphasis> file you can make use of the Content Assist for
inserting needed
+ elements.</para>
+
+ <figure float="0">
+ <title>Content Assist in the component.xml Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_1a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The editor also makes code completion aware of methods/attributes
for EntityQuery
+ component.</para>
+
+ <figure float="0">
+ <title>Content Assist for EntityQuery Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_1b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="OpenOn">
+ <title>OpenOn</title>
+
+ <para><property moreinfo="none">OpenOn</property>
let's you easily navigate through your project without
+ using the Package Explorer or Project Explorer. After pressing
<emphasis>
+ <property moreinfo="none">Ctrl + left
click</property>
+ </emphasis> (or just F3) you will see a corresponding method or
class.</para>
+
+ <figure float="0">
+ <title>OpenOn</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>OpenOn is also supported in Page Descriptors(page.xml). You can
<property moreinfo="none">Ctrl + left click</property> on the bean
to open navigate to the bean you clicked on. </para>
+
+ <figure float="0">
+ <title>OpenOn in page.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_2a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ </section>
+
+ <section id="SeamValidation">
+ <title>Seam Validation</title>
+
+ <para>Validation of various possible problematic definitions is implemented
for Seam
+ applications.</para>
+
+ <para>If an issue is found it will be shown in the standard <property
moreinfo="none">Problems
+ View</property>.</para>
+
+ <figure float="0">
+ <title>Seam Validation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_6.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>In the preferences page for Seam Validator you can see and modify the
validator
+ behavior. Go to <emphasis>
+ <property moreinfo="none">Window > Preferences
> JBoss Tools > Web > Seam > Validator</property>
+ </emphasis> and select the severity level for the optional Seam
Validator
+ problem.</para>
+
+ <figure float="0">
+ <title>Seam Validator Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On WTP projects validation are enabled by default and thus executed
automatically, but
+ on normal Java projects you will have to go and add the Validation builder of
your
+ project . It is available in the properties of your project under
+ <property moreinfo="none">Validation</property>.
The validations can be run manually by clicking
+ <property moreinfo="none">Validate</property> via
the context menu on your project which will
+ execute all the active WTP validations.</para>
+ </section>
+
+ <section id="ComponentsEditor">
+ <title>Structured components.xml Editor</title>
+
+ <para>When editing <property
moreinfo="none">components.xml</property> a structured tree editor is
available
+ in addition to pure source editing. It has a graphical view (Tree tab) and
source
+ (Source tab).</para>
+
+ <figure float="0">
+ <title>component.xml Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+
+ <para>You can view and edit <property
moreinfo="none">components.xml</property> and other xml files
+ directly in the Project Explorer and Properties sheet without opening
the
+ components.xml editor.</para>
+ </note>
+ <figure float="0">
+ <title>component.xml Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_editors/seam_editors_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="seam_view"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_view.xml"
xreflabel="seam_view">
+ <?dbhtml filename="seam_view.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Seam Views</title>
+
+ <section>
+ <title>Seam Components View</title>
+
+ <para>This chapter introduces you with Seam Components View.</para>
+ <para>The <property moreinfo="none">Seam Components
View</property> is available from Seam perspective. It provides a list of seam
components found in a project.</para>
+
+ <figure float="0">
+ <title>Seam Components View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_view/seam_view_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Seam Components View can show a components default scope in two
ways:</para>
+
+ <itemizedlist>
+ <listitem><para>as labels on each component (click on the
triangular symbol at the top of the Seam Components View page and select
<emphasis><property moreinfo="none">Scope Presentation >
Label</property></emphasis>)</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>As label</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_view/seam_view_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>as a node per scope where the components are
grouped under a node representing its default scope.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>As node</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_view/seam_view_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Seam Packages can be presented in two ways:</para>
+
+ <itemizedlist>
+ <listitem><para>Flat</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Flat Presentation of Seam Packages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_view/seam_view_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Hierarchical</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Hierarchical Presentation of Seam Packages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_view/seam_view_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Seam Component View can be filtered by choosing <property
moreinfo="none">Customize View</property>.</para>
+
+ <figure float="0">
+ <title>Customize View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_view/seam_view_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select the <emphasis><property
moreinfo="none">Seam Components from
Libraries</property></emphasis> under the Filters tab.
+ This will make the view ignore components defined in jars. This will hide the
many built-in Seam components and leave only those that are actually defined in the
project or have been actively configured via components.xml. Therefore, deselecting the
filter will show you all available components.</para>
+ <para>Selecting the <emphasis><property
moreinfo="none">Seam Components from Referenced
Projects</property></emphasis> will hide the components that dependent on
other project.</para>
+
+ <figure float="0">
+ <title>Available Custimozations</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_view/seam_view_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Project Explorer integration</title>
+
+ <para>If you don't like to have a view for every piece of information
in Eclipse, the content of the Seam Components view is also available as a node in the
built-in Project Explorer (not Package Explorer!) view in Eclipse.</para>
+
+ <figure float="0">
+ <title>Seam Components in Project Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_view/seam_view_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ </chapter>
+
+
+<chapter id="seam_preferences"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_preferences.xml"
xreflabel="seam_preferences">
+ <!-- mark as new -->
+ <?dbhtml filename="seam_preferences.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>Preferences</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Seam Preferences</title>
+
+ <para>In this chapter you get to know how Seam preferences can be modified
during the
+ development process.</para>
+
+ <section id="gen_pref">
+ <title>General Preferences</title>
+
+ <para>Seam preferences can be set using the Seam preference page. Click on
+ <emphasis><property moreinfo="none">Window
> Preferences > JBoss Tools > Web >
+ Seam</property>.</emphasis></para>
+
+ <para>On this page you can manage the Seam Runtime. Use the appropriate
buttons to
+ <property moreinfo="none">Add</property> more
runtimes or to <property moreinfo="none">Remove</property> those
that
+ are not needed.</para>
+
+ <figure float="0">
+ <title>Seam Preferences Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/seam_preferences1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Clicking on <property
moreinfo="none">Edit</property> button you get the form where you can
change the
+ path of Seam runtime home folder, modify name and version. Press
+ <property moreinfo="none">Finish</property> to
apply the changes.</para>
+
+ <figure float="0">
+ <title>Edit Seam Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/seam_preferences1_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="validator_pref">
+
+ <title>Validator Preferences</title>
+
+ <para>Seam preference page includes a subsection <property
moreinfo="none">Validator</property>. See
+ <emphasis><property moreinfo="none">Window
> Preferences > JBoss Tools > Web > Seam >
+ Validator</property>.</emphasis></para>
+ <para>On this page you can choose a severity level for the various Seam
validator
+ problems. For example, if you want to ignore the case when component name
is
+ duplicated expand the <property
moreinfo="none">Components</property> node and select
+ <property moreinfo="none">Ignore</property>
next to <property moreinfo="none">Duplicate component
+ name</property>. After that you won't see the
error.</para>
+
+
+ <figure float="0">
+ <title>Seam Validator Preference Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/seam_preferences1_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Notice, that in the <emphasis>
+ <property moreinfo="none">Expression
language</property>
+ </emphasis> section there is now a preference for setting severity
of EL
+ Syntax. You can select whether the Seam validator displays an error, a
warning or just ignore the EL Syntax error.</para>
+
+ <figure float="0">
+ <title>Severity Preference for EL Syntax</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/el_syntax_error.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the upper right corner of the page there is a <property
moreinfo="none">Configure Project
+ Specific Settings</property> link. Clicking on it you get the
form where you can choose a
+ project for specific setting. Project specific configuration allows you
to have
+ different validator settings for each project. Check the <property
moreinfo="none">Show only
+ projects with project specific settings</property> if you want
to see the
+ projects that have been already set. Click on <property
moreinfo="none">Ok</property>.</para>
+
+ <figure float="0">
+ <title>Project Specific Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/seam_preferences1_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You get the validator properties page for chosen project. Check
the
+ <property moreinfo="none">Enable project specific
settings</property> to be able to change the
+ settings.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>You can open the same page by right clicking on the needed
project in Package
+ Explorer, then <emphasis><property
moreinfo="none">Properties > Seam
+ Validator</property>.</emphasis></para>
+ </note>
+
+ <figure float="0">
+ <title>Validator Properties Page for Chosen Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/seam_preferences1_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ </section>
+ </section>
+
+ <section id="project_pref">
+ <title>Project Preferences</title>
+
+ <para>Once Seam project is created you can modify its settings. Right click
on Seam project
+ in Project Explorer and select <emphasis><property
moreinfo="none">Properties > Seam
+ Settings</property>.</emphasis></para>
+ <para>This project properties page allows you to have a flexible project
layout. It means
+ that you are not restricted with a specific project structure. You can use
the Seam
+ wizards (New Action, Form, Entity, etc.) on Maven, command line seam-gen or
your own
+ project structure. </para>
+
+ <figure float="0">
+ <title>Properties for Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/seam_preferences2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>The wizard doesn't allow the renaming of the artifacts listed
in the Seam
+ Settings. It's possible to do in the <property
moreinfo="none">Package Explorer</property>.
+ See <link linkend="renaming_projects_folders">Renaming
the Projects and
+ Folders</link>.</para>
+ </tip>
+
+ <para>Also notice, you are not required to use the <property
moreinfo="none">New Seam Project
+ wizard</property> to benefit from Seam artifact wizards. You can
just enable Seam on
+ your existing project by checking <property
moreinfo="none">Seam Support</property> and targeting to
+ Seam Runtime, and then configure the folders as you want.</para>
+
+ <figure float="0">
+ <title>Properties for Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/seam_preferences2_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>On the figure above fields for configuring Seam artifacts are
dimmed because Seam
+ Runtime is not selected.</para>
+ </tip>
+
+ <para>In Seam Wizards (New Action, Form, Entity, Conversation, Generate
Entities) you can
+ get a quick access to project settings using the <property
moreinfo="none">Settings</property> link in
+ the upper right corner of each wizard.</para>
+
+ <figure float="0">
+ <title>Settings Link</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/seam_preferences/seam_preferences2_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ </section>
+
+</chapter>
+
+
+<chapter id="adding_seam_support_to_ear_project" role="new"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/adding_seam_support_to_ear_project.xml"
xreflabel="adding_seam_support_to _ear_project">
+ <?dbhtml filename="adding_seam_support_to _ear_project.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>EAR</keyword>
+ <keyword>Seam</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Adding Seam support to EAR project</title>
+ <para>From this chapter you will find out how to add Seam support to EAR
project</para>
+ <para>For example you have several WTP projects:</para>
+
+ <itemizedlist>
+ <listitem><para> seamproject-ear (You can create WTP EAR project
using New -> Project -> Java EE -> Enterprise Application Project
wizard)</para></listitem>
+ <listitem><para> seamproject-ejb (You can create WTP EJB project
using New -> Project -> EJB -> EJB Project
wizard)</para></listitem>
+ <listitem><para> seamproject-war (You can create WTP WEB project
using New -> Project -> Web -> Dynamic Web Project
wizard)</para></listitem>
+ </itemizedlist>
+
+ <tip><title>Tip</title>
+ <para>You can add as many EJBs modules as you want just doing the same for
each EJB project.</para></tip>
+
+ <figure float="0">
+ <title>WTP Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/adding_seam_support_to_project/wtp_projects.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Make sure EJB and WAR are included in EAR as modules (Properties for
seamproject-ear -> Java EE Module Dependencies)</para>
+
+ <figure float="0">
+ <title>Java EE Module Dependencies</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/adding_seam_support_to_project/java_ee_module_dependencies.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Make sure there is jboss-seam.jar in application.xml as
well:</para>
+
+ <figure float="0">
+ <title>Java EE Module Dependencies</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/adding_seam_support_to_project/application_xml_with_jboss-seam_jar.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>Then include libs from EAR to EJB Manifest Class-Path (Properties for
seamproject-ejb -> Java EE Module Dependencies)</para>
+
+ <figure float="0">
+ <title>Including Libs from EAR to EJB Manifest Class-Path</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/adding_seam_support_to_project/including_libs_from_ear_to_ejb_manifest_class-path.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Include libs from EAR and seamproject-ejb.jar to WAR Manifest Class-Path
(Properties for seamproject-war -> Java EE Module Dependencies)</para>
+
+ <figure float="0">
+ <title>Including Libs from EAR and seamproject-ejb.jar to WAR Manifest
Class-Path</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/adding_seam_support_to_project/including_libs_from_ear_to_war_manifest_class-path.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Thus we have set our WTP EAR/EJB/WAR projects and now we are ready to add
Seam support to them:</para>
+
+ <para>First you have to add Seam support to WAR project: Properties for
seamproject-war -> Seam Settings</para>
+
+
+ <figure float="0">
+ <title>Adding Seam Support to WAR Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/adding_seam_support_to_project/adding_seam_support_to_war_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>Set seamproject-war as Main Seam project. All other settings mostly are
used by New Seam Entity/Action/Form/Conversation/... Wizards. Thus you can set them as you
wish.</para>
+
+ <para>Then you can add Seam support to EJB project: Properties for
seamproject-war -> Seam Settings</para>
+
+ <figure float="0">
+ <title>Adding Seam Support to EJB Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/adding_seam_support_to_project/adding_seam_support_to_ejb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It&s important to set seamproject-war project as main Seam
project there.</para>
+ <para>It will allow Seam Tools to use one common Seam model for
seamproject-ejb and seamproject-war projects.</para>
+
+ <para>The last step is to clean/build the projects</para>
+
+ <para>That is all. You have added Seam support to your EAR project.
</para>
+
+ <figure float="0">
+ <title>Added Seam Support to EAR Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/adding_seam_support_to_project/added_seam_support_to_ear_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+</chapter>
+
+<chapter id="crud_database_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/crud_database_application.xml"
xreflabel="crud_database_application">
+ <?dbhtml filename="crud_database_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>CRUD</keyword>
+ <keyword>Database Application</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Generate a CRUD Database Application</title>
+ <section>
+ <title>What is CRUD?</title>
+ <para>
+ <property moreinfo="none">CRUD</property> is an acronym
for the four basic types of SQL commands: <emphasis>
+ <property moreinfo="none">Create</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">Read</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">Update</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">Delete</property>
+ </emphasis>. Most applications have some kind of <property
moreinfo="none">CRUD</property>
+ functionality, and we can assume that every programmer had to deal with
+ <property moreinfo="none">CRUD</property> at some
point. A <property moreinfo="none">CRUD</property> application is
+ one that uses forms to get data into and out of a database. </para>
+ <para> In the next section we will create <link
linkend="intro">Seam</link> Web application,
+ connect it to the <ulink
url="http://www.hsqldb.org/">HSQL</ulink> database and add
+ <property moreinfo="none">CRUD</property> support.
</para>
+ </section>
+
+ <section>
+ <title>How to create the CRUD Database Application with Seam</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>First, you should <ulink
url="http://docs.jboss.org/tools/resources/">download</ul... a
database and start it by running <emphasis>
+ <property
moreinfo="none">./runDBServer.sh</property>
+ </emphasis> or <emphasis>
+ <property
moreinfo="none">runDBServer.bat</property>
+ </emphasis> from the database directory.</para>
+ </listitem>
+ <listitem>
+ <para>Create a new Seam Web Project using <property
moreinfo="none">New Seam Project
+ wizard</property> or main menu <emphasis><property
moreinfo="none">File > New > Seam Web
+ Project</property>.</emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Seam Web Project Creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_01.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Name your project as <emphasis>
+ <property
moreinfo="none">crudapp</property>, </emphasis> specify Target
Runtime, Server and
+ Seam Runtime configuration. Then press <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> and follow the next wizard steps keeping default
settings.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Seam Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_02.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>Please have a look <link
linkend="create_seam">here</link> how to create Target
+ Runtime and Seam Runtime in order to get started creating, running, and
debugging
+ J2EE applications.</para>
+ </tip>
+
+ <itemizedlist>
+ <listitem>
+ <para>On <emphasis>
+ <property moreinfo="none">Seam
Facet</property>
+ </emphasis> page click <emphasis>
+ <property
moreinfo="none">New...</property>
+ </emphasis> next to the <property
moreinfo="none">Connection profile</property> section to
+ create a new <property moreinfo="none">Connection
profile</property>.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Seam Facet page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_03.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>On <property moreinfo="none">New Connection
Profile</property> dialog select the <emphasis>
+ <property
moreinfo="none">HSQLDB</property>
+ </emphasis> connection profile type, name it <emphasis>
+ <property
moreinfo="none">cruddb</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Next</property>.
</emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>New JDBC Connection Profile</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_04.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>On the next page click the round icon next to the
<emphasis>
+ <property
moreinfo="none">Drivers</property>
+ </emphasis> field to select a database driver.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New JDBC Connection Profile Database Driver</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_06.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Now you should see the <property
moreinfo="none">New Driver Definition</property> dialog. On
+ the first tab select the <emphasis>
+ <property moreinfo="none">HSQLDB JBDC
Driver</property>. </emphasis> Underneath in the <emphasis>
+ <property moreinfo="none">Driver
name</property>
+ </emphasis> field you can change its name if you
need.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Database Driver Type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_07.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>You may notice the note on the previous figure. It prompts
that you should
+ specify the driver of the type you pointed. Set the location of the
driver by
+ switching to the next tab and press <emphasis>
+ <property moreinfo="none">Add
JAR/Zip</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Driver Definition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_09.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>On the <property
moreinfo="none">Properties</property> tab set the
+ <emphasis><property
moreinfo="none">Connection URL</property>,</emphasis>
+ <emphasis>
+ <property moreinfo="none">Database
Name</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">User
ID</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">OK</property>.
</emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Driver Definitions Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>After clicking <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> to submit the newly created driver you can observe
and if you need
+ edit all specified connection details.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Driver and Connection Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Now click <emphasis>
+ <property moreinfo="none">Test
Connection</property>
+ </emphasis> to be sure that connection can be
established.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JDBC Connection is OK</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Validate <emphasis>
+ <property moreinfo="none">JDBC Connection
profile</property>
+ </emphasis> settings and press <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">Back</property>
+ </emphasis> if something is wrong.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Validate JDBC Connection settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>After clicking <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> two projects <emphasis>
+ <property
moreinfo="none">crudapp</property>
+ </emphasis> and <emphasis>
+ <property
moreinfo="none">crudapp-test</property>
+ </emphasis> will be created.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>CRUDAPP Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Have a look at the created projects. You can expand
+ <property
moreinfo="none">WEB_CONTENT</property> folder and open
+ <property
moreinfo="none">home.xhtml</property> or <property
moreinfo="none">login.xhtml</property> with
+ <property moreinfo="none">JBoss Visual
Editor</property>.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>login.xhtml in VPE</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Switch to <property moreinfo="none">Database
Development</property> perspective with <emphasis>
+ <property moreinfo="none">Window->Open
Perspective->Other...</property>
+ </emphasis> and connect to the <emphasis>
+ <property
moreinfo="none">cruddb</property>
+ </emphasis> database.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Connecting to the CRUDDB database</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_16.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Expand <emphasis>
+ <property
moreinfo="none">cruddb</property>
+ </emphasis> nodes to view its <emphasis>
+ <property
moreinfo="none">Schemas</property>, </emphasis>
+ <emphasis>
+ <property
moreinfo="none">Tables</property>, </emphasis>
+ <emphasis>
+ <property
moreinfo="none">Columns</property>
+ </emphasis> etc.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>CRUDDB Database</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_17.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Switch back to the <property
moreinfo="none">Seam</property> perspective. From the toolbar
+ select <emphasis>
+ <property moreinfo="none">New->Seam
Generate Entities</property>
+ </emphasis> to create a set of <property
moreinfo="none">CRUD</property> Seam components and web
+ pages based on existing tables in the database. On the first page of
<emphasis>
+ <property moreinfo="none">Generate Seam
Entities</property>
+ </emphasis> wizard keep everything by default and press
<emphasis>
+ <property moreinfo="none">Next</property>.
</emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Generate Seam Entities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Refresh</property></emphasis> to display all the
tables from the
+ database.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Dialog for Selecting Tables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_18a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Now you can filter the tables. Use the <emphasis>
+ <property
moreinfo="none">Include</property>
+ </emphasis> button to include only necessary
ones.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting Tables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_18b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under <emphasis>
+ <property
moreinfo="none">WebContent</property>
+ </emphasis> folder you can find all generated <property
moreinfo="none">xhtml</property>
+ files:</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Entities Web Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_19.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>And under <emphasis>
+ <property moreinfo="none">src</property>
+ </emphasis> folder java classes are created.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Entities Java Classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Switch to <property
moreinfo="none">Hibernate</property> perspective with <emphasis>
+ <property moreinfo="none">Window->Open
Perspective->Other...</property>.
+ </emphasis> On <property
moreinfo="none">Hibernate Configurations</property> view expand the
<emphasis>
+ <property
moreinfo="none">crudapp</property>
+ </emphasis> configuration. Right click on <property
moreinfo="none">Customers</property> and
+ select <emphasis>
+ <property moreinfo="none">Open Mapping
Diagram</property>
+ </emphasis> from the popup menu.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Hibernate Configurations View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_21.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Observe the <property moreinfo="none">Mapping
Diagram</property> opened in the editor. Here
+ you can see the relations between models and database tables. For
better
+ navigating on the diagram use the <property
moreinfo="none">Outline view</property>.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Mapping Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_22.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>For example, select <property
moreinfo="none">Customers</property> entity, right click and
+ select <emphasis>
+ <property moreinfo="none">Open Source
File</property>.
+ </emphasis> This will open the <property
moreinfo="none">Customers.java</property> file in the
+ java editor. You can also do this by right-clicking on the same
entity on the
+ <property moreinfo="none">Mapping
Diagram</property>.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Entity class from Mapping Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_23.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>So far, you are ready to deploy your application to JBoss Application
Server. This
+ is described in the next chapter.</para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="crud_application_walkthrough"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/crud_application_walkthrough.xml"
xreflabel="crud_application_walkthrough">
+ <?dbhtml filename="crud_application_walkthrough.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>CRUD</keyword>
+ <keyword>JBoss AS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>The CRUD Application Walkthrough</title>
+ <para>After you familiarized oneself with example of creating the CRUD Database
Application with
+ Seam, you can read this charter.</para>
+ <section>
+ <title>Using CRUD Application</title>
+ <para>To run your CRUD Application you should do the following
steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Run a project on the Server. </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>On <emphasis>
+ <property moreinfo="none">Package Explorer View
</property>
+ </emphasis> right click on the <emphasis>
+ <property moreinfo="none">crudapp</property>
+ </emphasis> project, select <emphasis><property
moreinfo="none"> Run As > Run on
+ Server</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Run Project on Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_1.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select a Server and click <property
moreinfo="none">Finish</property></para>
+
+ <figure float="0">
+ <title>Select a Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Home page of the <emphasis>
+ <property moreinfo="none">crudapp</property>
+ </emphasis> project should appear in <emphasis>
+ <property moreinfo="none">Web Browser</property>
+ </emphasis>.</para>
+ <figure float="0">
+ <title>Home page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_4.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After that you can use CRUD application with
+ <property
moreinfo="none">"employee"</property> database.</para>
+
+ <para>You can use internal JBDS Web Browser or your external Web Browser
with the same link
+ (<ulink
url="http://localhost:8080/crudapp/home.seam">http://localhost:8080/crudapp/home.seam</ulink>).
</para>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Employees
List</property>
+ </emphasis> link and observe that data from <emphasis>
+ <property moreinfo="none">employee</property>
+ </emphasis> database is displayed.</para>
+ <figure float="0">
+ <title>Employees List</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Use <property moreinfo="none">Employees search
parameters</property> fields to filter the selected
+ list.</para>
+
+ <para> Press <property
moreinfo="none">Select</property> opposite one of
employees.</para>
+ <figure float="0">
+ <title>Employee details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para> Press <property
moreinfo="none">Edit</property> to edit employee fields.</para>
+ <para> Enter <emphasis>
+ <property moreinfo="none">Login</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Password</property>
+ </emphasis> to login. (Use
+
<emphasis>"crudapp-user"/"secret"</emphasis> for
+ example)</para>
+
+ <figure float="0">
+ <title>Login page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Edit Employee</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_application_walkthrough/crud_application_walkthrough_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Fill in <emphasis>
+ <property moreinfo="none">firstname</property>
+ </emphasis> and press <property
moreinfo="none">Save</property>.</para>
+ <para> Database will be updated.</para>
+ </section>
+</chapter>
+
+
+<chapter id="testNG"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/testng.xml"
xreflabel="testNG">
+ <?dbhtml filename="testNG.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>testNG</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Using TestNG project</title>
+ <para>With the help this chapter you will get to know with
TestNG.</para>
+ <section>
+ <title>What is TestNG?</title>
+ <para><property moreinfo="none">TestNG</property>
("Testing, the Next Generation") is a
+ Java unit testing framework that aims to overcome many limitations of JUnit.
TestNG
+ introduces some new functionalities that make it more powerful and easier to
use, such
+ as:</para>
+ <itemizedlist>
+ <listitem>
+ <para>JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc
annotations)</para>
+ </listitem>
+ <listitem>
+ <para>Flexible test configuration</para>
+ </listitem>
+ <listitem>
+ <para>Support for data-driven testing (with
@DataProvider)</para>
+ </listitem>
+ <listitem>
+ <para>Support for parameters</para>
+ </listitem>
+ <listitem>
+ <para>Allows distribution of tests on slave machines</para>
+ </listitem>
+ <listitem>
+ <para>Powerful execution model (no more TestSuite)</para>
+ </listitem>
+ <listitem>
+ <para>Supported by a variety of tools and plug-ins (Eclipse, IDEA,
Maven,
+ etc...)</para>
+ </listitem>
+ <listitem>
+ <para>Embeds BeanShell for further flexibility</para>
+ </listitem>
+ <listitem>
+ <para>Default JDK functions for runtime and logging (no
dependencies)</para>
+ </listitem>
+ <listitem>
+ <para>Dependent methods for application server
testing</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>More information can be found on home page: <ulink
url="http://testng.org">www.testng.org</ulink></para>
+ </section>
+ <section id="OtherRelevantResourcesOnTheTopic5">
+ <?dbhtml filename="OtherRelevantResourcesOnTheTopic5.html"?>
+ <title>Other relevant resources on the topic</title>
+ <para>
+ <ulink
url="http://www.artima.com/lejava/articles/testng.html">Next...
Testing
+ with TestNG (An Interview with Cedric Beust)</ulink>
+ </para>
+ <para>
+ <ulink
url="http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.ht...:
+ The next generation of unit testing</ulink>
+ </para>
+ <para>
+ <ulink
url="http://dev2dev.bea.com/pub/a/2006/09/testng-categorization.html...
+ Categorization Techniques with TestNG</ulink>
+ </para>
+ <para>
+ <ulink
url="http://www-128.ibm.com/developerworks/java/library/j-testng/&qu...
makes
+ Java unit testing a breeze</ulink>
+ </para>
+ <para>
+ <ulink
url="http://www-128.ibm.com/developerworks/java/library/j-cq08296/in...
+ pursuit of code quality: JUnit 4 vs. TestNG</ulink>
+ </para>
+ </section>
+ <section>
+ <title>How to use the generated Seam-test project to run Seam
tests?</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create a new Seam Web Project with EAR deployment using the
New Seam Project
+ wizard.</para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>After a project is created you will have the generated
Seam-test project that
+ is setup to run TestNG directly against the proper libraries and
server runtime
+ libraries.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Seam-test Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/testng/testng_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Add Seam Action to your project via
<emphasis><property moreinfo="none">File > New > Seam
+ Action</property>.</emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Seam Action Creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/testng/testng_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Fill out the wizard fields. New Seam Action wizard will
create resources and
+ place them in the appropriate folders dependent on EAR project
structure.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>New Seam Action Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/testng/testng_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>When Action is created you will see <property
moreinfo="none">actionPage.xhtml</property> in
+ Package Explorer view. <property
moreinfo="none">ActionBean.java</property> will be
+ automatically opened in Java Editor.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Created Action</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_8.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <itemizedlist>
+ <listitem>
+ <para>Select <property
moreinfo="none">ActionLocalTest.xml</property> in Seam-test project and
run
+ the test with right click <emphasis><property
moreinfo="none">Run As > TestNG
+ Suite</property>.</emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Running TestNG</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/testng/testng_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The test process will start and its output will be written in Console
View.</para>
+
+ <figure float="0">
+ <title>Test is Finished</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_10.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <itemizedlist>
+ <listitem>
+ <para>After running TestNG you will have the test results in
<emphasis>
+ <property
moreinfo="none">test-output</property>
+ </emphasis> folder in Seam-test project (press F5 to refresh
the Package
+ Explorer view). Open <property
moreinfo="none">index.html</property> file with Web Browser or
+ simply use the TestNG view.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The below view shows a successful run of the test.</para>
+
+ <figure float="0">
+ <title>Viewing the Test Results</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_11.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You can see the test results in Web Browser.</para>
+
+ <figure float="0">
+ <title>Test Results in Browser</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_12.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After clicking on <emphasis>
+ <property moreinfo="none">ActionLocal
Tests</property>
+ </emphasis> link you will see the Results for ActionLocal
Tests.</para>
+
+ <figure float="0">
+ <title>Test Information</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_13.png"
scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select a result on the left-hand pane and its details will be
displayed on the
+ right-hand one.</para>
+
+ <figure float="0">
+ <title>ActionLocal Test Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/testng/testng_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Thus with Seam tooling you can easily take advantage of TestNG
framework. As you can
+ see, it generates its own TestNG project as a separate module within which
you can
+ easily monitor the tests execution and their output.</para>
+
+ <para>In conclusion, the main goal of this document is to get you know with
a full featureset
+ that <property moreinfo="none">JBoss Tools</property>
provides to support Seam development. Thus if you have
+ some questions, comments or suggestions on the topic, please fell free to ask
in the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
+ Tools Forum</ulink>. You can also influence on how you want to see
JBoss Tools docs in
+ future leaving your vote on our page <ulink
url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture">here&l...;.
</para>
+
+ <para>A set of movies on Seam tooling is available <ulink
url="http://docs.jboss.org/tools/movies">here</ulink>....
+ </section>
+</chapter>
+
+ <!-- TODO: drools used in this section is not available for eclipse .3.3
&business_application; -->
+
+</book>
Modified: trunk/struts/docs/struts_tools_ref_guide/en/master_output.xml
===================================================================
--- trunk/struts/docs/struts_tools_ref_guide/en/master_output.xml 2009-03-05 18:34:07 UTC
(rev 14042)
+++ trunk/struts/docs/struts_tools_ref_guide/en/master_output.xml 2009-03-05 18:54:45 UTC
(rev 14043)
@@ -26,1237 +26,1237 @@
<!ENTITY strutstutoriallink
"../../struts_tools_tutorial/html_single/index.html">
<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
-]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
- <bookinfo>
- <title>Struts Tools Reference Guide</title>
-
-
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
-
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
-
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
- <releaseinfo>
- Version: 3.0.0.GA
- </releaseinfo>
-
-<abstract>
- <title></title>
- <para>
- <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_too...
version</ulink>
- </para>
-</abstract>
-
-
- </bookinfo>
-
- <toc></toc>
-
-
-<chapter id="intoduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/introduction.xml">
- <?dbhtml filename="introduction.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Introduction</title>
-
- <para>If you prefer to develop web applications using Struts technology JBoss
Tools also meet
- your needs. The professional developer toolset provides all necessary editors and
wizards
- for creating Struts resources that enhances the process of building high-quality
web
- applications.</para>
- <note>
- <title>Note:</title>
- <para>Note that JBoss Tools support the Struts 1.1, 1.2.x
versions.</para>
- </note>
-
- <para>In this guide you will learn how to take advantage of Struts support that
<property moreinfo="none">JBoss Tools</property>
- provide.</para>
-
- <section id="struts_key_features">
- <title>Key Features of Struts Tools</title>
-
- <para>For a start, we propose you to look through the table of main
features of Struts
- Tools:</para>
-
- <table>
-
- <title>Key Functionality for Struts Tools</title>
- <tgroup cols="3">
-
- <colspec align="left" colnum="1"
colwidth="2*"></colspec>
- <colspec colnum="2"
colwidth="4*"></colspec>
- <colspec align="left" colnum="3"
colwidth="2*"></colspec>
-
- <thead>
- <row>
- <entry>Feature</entry>
- <entry>Benefit</entry>
- <entry>Chapter</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><para>Struts
Support</para></entry>
- <entry><para>Step-by-step wizards for creating a new
struts project with a number
- of predefined templates, importing existing ones and adding
struts
- capabilities to non-struts web
projects.</para></entry>
- <entry>
- <link linkend="projects">struts
support</link>
- </entry>
- </row>
-
- <row>
- <entry><para>Support for Struts Configuration
File</para></entry>
- <entry><para>Working on file using three modes:
diagram, tree and source.
- Synchronization between the modes and full control over the
code. Easy
- moving around the diagram using the Diagram Navigator.
Working with
- struts projects that have multiple modules. Possibility to
use Struts
- configuration file debugger allowing to set break points on
struts
- diagram and then launch the server in debug
mode.</para></entry>
- <entry>
- <link
linkend="struts_config_editor">graphical editor for struts</link>
- <link
linkend="config_file_debugger">configuration file debugger</link>
- </entry>
- </row>
-
- <row>
- <entry><para>Support for Struts
modules</para></entry>
- <entry><para>A Struts module (struts-config.xml) is
automatically created while
- creating a new project. There is also possibility to add new
ones or edit
- already existing modules in your existing project or while
importing Struts project.</para></entry>
- <entry>
- <link linkend="modules">modules</link>
- </entry>
- </row>
-
- <row>
- <entry><para>Verification and
Validation</para></entry>
- <entry><para>All occuring errors will be immediately
reported by verification
- feature, no matter in what view you are working. Constant
validation and
- errors checking allows to catch many of the errors during
development
- process that significantly reduces development
time.</para></entry>
- <entry>
- <link
linkend="project_verification">verification and validation</link>
- </entry>
-
- </row>
- </tbody>
- </tgroup>
- </table>
-
- </section>
-
- <section>
- <title>Other relevant resources on the topic</title>
-
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find
<ulink
url="http://docs.jboss.org/tools/">here</ulink>.</p...
- <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
-
- </section>
-
-</chapter>
-
-
-<chapter id="projects"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/projects.xml">
- <?dbhtml filename="projects.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Projects</title>
-
- <para>JBoss Tools provide the following functionality when working with
Struts:</para>
-
- <itemizedlist>
- <listitem>
- <para>Create new <property moreinfo="none">Struts
projects</property></para>
- </listitem>
- <listitem>
- <para>Import (open) existing Struts projects. You can import any
project
- structure</para>
- </listitem>
- <listitem>
- <para>Add <property moreinfo="none">Struts
capabilities</property> to any existing Eclipse
- project</para>
- </listitem>
- <listitem>
- <para>Import and add Struts capabilities to any existing project
created outside
- Eclipse.</para>
- </listitem>
- </itemizedlist>
- <para>Now, we'll focus on all these points more fully.</para>
-
- <section id="CreatingANewStrutsProjec745t">
-
- <title>Creating a New Struts Project</title>
-
-
- <para>JBoss Tools provides a New Struts Project Wizard that radically
simplifies the process
- for getting started with a new Struts project. You just need to follow these
steps:</para>
- <itemizedlist>
- <listitem>
- <para>Select<emphasis>
- <property moreinfo="none">File > New
> Project...</property>
- </emphasis> from the menu bar. Then, select <emphasis>
- <property moreinfo="none">JBoss Tools Web
> Struts > Struts Project</property>
- </emphasis> in this dialog box. Click <emphasis>
- <property moreinfo="none">Next</property>:
</emphasis></para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Selecting Struts Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>On this form, provide the <property
moreinfo="none">Project Name</property>. You can also
- select where to create the project or use the default
path.</para>
- <para>Next to <property moreinfo="none">Struts
Environment</property> set which Struts version to
- use.</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Creating Struts Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>Don't put spaces in project names since some OS could
experience problems
- with their processing and searching these files.</para>
- </tip>
-
- <para>You can select the KickStart template, then the project created will
include a simple
- Hello World type application that is ready to run.</para>
-
- <figure float="0">
- <title>Choosing Struts Template </title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_3_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Next, you register this application with the current servlet
container defined
- for your workspace (JBoss AS, by default) in order to allow you to
test your
- application more easily while still developing it. A new entry will
be added in
- the servlet container configuration file to enable running the
application
- in-place (called null deployment or link deployment). Uncheck the
<emphasis role="italic">
- <property moreinfo="none">"Target
Server"</property>
- </emphasis> check box if for some reason you don't want to
register
- your application at this point.</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Registering The Project at Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>On the next form, you can select the TLD files to include in
this
- project:</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Selecting Tag Libraries</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After the project is created, you should have the following project
structure (if you
- used the KickStart template):</para>
-
- <figure float="0">
- <title>Project Structure</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>If you want to hide the jar files from Web App Libraries in view,
select the
- down-pointing arrow in the upper right corner, select
- <emphasis>Filters...</emphasis>, check the box next to Name
filter patterns
- (matching names will be hidden), and type *.jar into the field. Then,
click OK.
- </para>
- </tip>
- </section>
- <section id="ImportingAnExistingStrutsProjectWithAnyStructure9653">
-
- <title>Importing an Existing Struts Project with Any
Structure</title>
-
- <para>For detailed information on migration projects to JBoss Developer
Studio see <ulink
url="../../Exadel-migration/html_single/index.html">Migration
Guide</ulink>.</para>
-
- </section>
- <section id="AddingStrutsCapabilityToAnExistingWebApplication532">
-
- <title>Adding Struts Capability to an Existing Web
Application</title>
-
- <para>Here, we'll consider how to add Struts functionality (Struts
libraries, tag
- libraries and a Struts configuration file) to any existing Web application
project in
- your Eclipse workspace.</para>
-
- <para>By adding a Struts Nature to your project, you can now edit files
using JBoss Tools
- editors, such as the <link
linkend="struts_config_editor">Struts configuration
- editor</link> and the JBoss Tools JSP editor. To take advantage of this
just right-click
- the project and select <emphasis>
- <property moreinfo="none">JBoss Tools > Add Struts
Capabilities</property>
- </emphasis> from the context menu. This will start the process of
adding all necessary
- libraries and files to make a Web Struts project from your one.</para>
-
- <figure float="0">
- <title>Adding Struts Capabilities</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the wizard you should point to location of your deployment
descriptor file web.xml
- and name of the project.</para>
-
- <figure float="0">
- <title>Choosing Project Location</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>After hitting <emphasis>
- <property moreinfo="none">Next</property>,
</emphasis> you will see the following screen. This
- screen simply means that you need to add at least one Struts module to your
project to
- make this project a Struts project. Adding a Struts module means that a new
- struts-config.xml will be added to your project and registered in the web.xml
file. In
- addition, all required Struts libraries will be added. To add a Struts
module, select
- the <emphasis>
- <property moreinfo="none">Add Struts
Support</property>
- </emphasis> button.</para>
- <figure float="0">
- <title>Project Modules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Here you can select what Struts <property
moreinfo="none">Version</property>, <property
moreinfo="none">Servlet
- Class</property>, <property moreinfo="none">URL
Pattern</property> and <property
moreinfo="none">TLD</property>s to add
- to this project.</para>
-
- <figure float="0">
- <title>Selecting Struts Support Options</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>When done, you will see the default Struts module configuration
information. See how
- to Edit <link linkend="modules">Struts
modules</link>.</para>
-
- <figure float="0">
- <title>Project Configuration Information</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the last screen you can set the different folders for your project
as well as
- register this application with a servlet container. If you want the libraries
(.jar
- files) will be automatically added to your project, click on the checkbox
<emphasis>
- <property moreinfo="none">Add
Libraries</property>.</emphasis></para>
-
- <figure float="0">
- <title>Registering the Project at Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_12.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>When done, you can open end edit the struts-config.xml file using
usefull Struts
- configuration file editor provided by JBDS. (The Struts configuration is
shown below in
- the Tree viewer).</para>
-
- <figure float="0">
- <title>Struts-config.xml File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_13.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
-</chapter>
-
-
-<chapter id="editors"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/editors.xml">
- <?dbhtml filename="editors.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Struts Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Editors</title>
- <para>In this chapter we'll introduce you to featured graphical editors for
specific
- Struts files such as Struts Configuration files, Tiles files and Struts
Validation files.</para>
- <section id="struts_config_editor">
-
- <title>Graphical Editor for Struts Configuration Files</title>
- <para>First, let's dwell on the Struts Configuration file
editor.</para>
- <para>This editor has three views with different representation of
<emphasis>
- <property
moreinfo="none">struts-config.xml</property>: </emphasis>Diagram,
Tree and Source. The
- views can be selected via the tabs at the bottom of the editor. Any changes
made in one
- view are immediately visible when you switch to any other view.</para>
-
- <para>Now, we'll consider every view in more detail.</para>
- <section id="StrutsDiagramMode453">
-
- <title>Diagram View</title>
-
- <para>The Diagram view graphically displays the Web flow of the
application defined in
- the Struts configuration file.</para>
-
- <figure float="0">
- <title>Diagram View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Diagram view allows to edit navigation in your Struts
application. Just by
- right-clicking anywhere on the diagram, you can use a context menu to
create the
- building blocks of a Struts application:</para>
- <itemizedlist>
- <listitem>
- <para>Actions</para>
- </listitem>
- <listitem>
- <para>Global forwards</para>
- </listitem>
- <listitem>
- <para>Global exceptions</para>
- </listitem>
- <listitem>
- <para>JSP Pages</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Diagram Context Menu</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_15.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Along the upper-left side of the editor is a stack of seven icons
for changing the
- behavior of the cursor in the diagram. </para>
-
- <figure float="0">
- <title>Editor Icons</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_16.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The first icon switches to the default regular selection cursor,
the second to the
- marquee selection cursor and the third to the new connection cursor. The
last four
- icons switch the cursor to an insert cursor for each type of Struts build
block
- listed above (and in the order listed).</para>
-
- <para>For instance, clicking on the first of these four icons (the one
with the gears)
- will switch the cursor to insert actions. Clicking anywhere in the
diagram with this
- cursor has the same effect as right-click and selecting <emphasis>
- <property moreinfo="none">Add >
Action...</property>
- </emphasis> from the context menu with the regular cursor active.
It's just
- more efficient to use this cursor if you're adding more than one
action at
- once.</para>
-
-
- </section>
- <section id="StrutsTreeMode42">
-
- <title>Tree View</title>
-
- <para>The Tree view represents the different elements of the Struts
application that are
- organized into functional categories on the left-hand side and a form for
editing
- the properties of currently selected items on the right-hand
side.</para>
-
- <figure float="0">
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also right-click on any node in the category tree and
perform appropriate
- operations through a context menu. For instance, by right-clicking on
the
- action-mappings category node, you can add new actions to the
application.</para>
-
- <figure float="0">
- <title>Tree Context Menu</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_18.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="StrutsSourceMode9655">
-
- <title>Source View</title>
-
- <para>In the Source view, you have complete editing control of the
underlying XML
- coding.</para>
-
- <figure float="0">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_19.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>When working in Source view, you always have all the following
features available:</para>
- <itemizedlist>
- <listitem>
- <para>Content Assist</para>
- </listitem>
- <listitem>
- <para>Open On Selection</para>
- </listitem>
- <listitem>
- <para>File Folding</para>
- </listitem>
- </itemizedlist>
- <para>You can take advantage of <ulink
url="../../jsf/html_single/index.html#CodeAssistAndDynamicCodeAssist42BasedOnProjectData">code
assist</ulink>.</para>
- <figure float="0">
- <title>Code Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_20.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The editor will also immediately flag any errors.</para>
-
- <figure float="0">
- <title>Errors in Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_21.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Finally, you can use the Outline view with the editor to easily
navigate through
- the file.</para>
-
- <figure float="0">
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_22.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Find more information about editor features <ulink
url="../../jsf/html_single/index.html#editors_features">here</ulink>.</para>
- </section>
- </section>
-
- <section id="GraphicalEditorForTilesFiles132">
-
- <title>Graphical Editor for Tiles Files</title>
- <para>Here, you'll know how to make use of the special graphical editor
for Tiles configuration files.</para>
- <para>The editor has three main views: Tree, Diagram and Source.
- The views can be selected via the tabs at the bottom of the editor. Any
changes made in
- one view are immediately visible when you switch to any other
view.</para>
-
- <para>Before we consider each view of the editor, let's look at the way
of creating new Tiles files.</para>
- <section id="CreateNewTilesFile1422">
-
- <title>Create New Tiles File</title>
-
- <para>To create new Tiles files, right click any folder and select
<emphasis>
- <property moreinfo="none">New > Tiles
File</property>. </emphasis></para>
- <figure float="0">
- <title>Creating a New Tiles File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_23.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="StrutsTreeView896">
-
- <title>Tree View</title>
-
- <para>The Tree view represents the different elements of the Tiles file
that are
- organized into functional categories on the left-hand side and a form for
editing
- the properties of currently selected items on the right-hand
side.</para>
- <figure float="0">
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_24.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To edit the file, simply right click any node and select among
the available
- actions.</para>
- <figure float="0">
- <title>Editing in Tiles Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_25.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="StrutsDiagramView4643">
-
- <title>Diagram View</title>
-
- <para>The Diagram view allows you to create complex Tiles files in the
form of a
- diagram.</para>
- <figure float="0">
- <title>Diagram Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_26.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To create new definitions, simply right click anywhere in the
diagram.</para>
- <figure float="0">
- <title>Creating New Definition</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_27.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use the Diagram toolbar to make editing
easier.</para>
- <figure float="0">
- <title>Diagram Toolbar</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_28.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> It contains four icons for changing the cursor state. The first
one is the
- default cursor state for selecting existing nodes. The second icon is
marquee
- selector. The third is used for creating new connections and the last one
is for
- adding definition template to the content.</para>
- </section>
- <section id="StrutsSource75">
-
- <title>Source</title>
-
- <para>The other view of the <property
moreinfo="none">Tiles editor</property> is the Source view that
- gives you full control over the source. Any changes here will immediately
appear in
- other modes when you switch to them.</para>
-
- <para>When working in Source view, you always have all following
features available:</para>
- <itemizedlist>
- <listitem>
- <para>Content Assist</para>
- </listitem>
- <listitem>
- <para>Open On Selection</para>
- </listitem>
- </itemizedlist>
-
- <figure float="0">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_29.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><ulink
url="../../jsf/html_single/index.html#CodeAssistAndDynamicCodeAssist42BasedOnProjectData">Code
- assist</ulink> is available in the Source mode.</para>
- <figure float="0">
- <title>Code Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_30.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Any errors are immediately reported as shown below:</para>
- <figure float="0">
- <title>Errors Reporting</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_31.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use the Outline view together with the editor's
Source mode.
- It provides an easier navigation through the file.</para>
- <figure float="0">
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_32.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
-
- <section id="GraphicalEditorForStrutsValidationFiles86">
-
- <title>Graphical Editor for Struts Validation Files</title>
-
- <para>Providing full support for development Struts applications JBoss
Tools comes with a
- visual validation editor. To open the editor double-click on the validation
file or if you don't have it create a new one.</para>
-
- <para>To create a new validation file, right click any folder in
- Project Explorer and select <emphasis>
- <property moreinfo="none">File > New >
Other...</property>
- </emphasis>from the context menu and then <emphasis>
- <property moreinfo="none">JBoss Tools Web > Struts
> Validation File</property>. </emphasis></para>
- <figure float="0">
- <title>Creating New Validation File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_33.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The validation editor works with five modes: Formsets, Validators,
Constants and
- standard Tree and Source that you can easily switch over using tabs at the
bottom of the
- editor.</para>
- <para>The Formsets view shows forms and their elements on the left side and
the dialogue for
- defining their validation rules on the right side.</para>
- <figure float="0">
- <title>Formsets View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_34.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Constants view let you set constant values for your validation
rules.</para>
- <figure float="0">
- <title>Constansts View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_35.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The validation file can also be viewed in a Tree view.</para>
- <figure float="0">
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_36.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>At any point you have full control over the source by switching to
the Source view.
- Any editing in this view will immediately be available in other views of the
editor.</para>
- <figure float="0">
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_37.png"
scale="85"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also open your own custom or Struts-standard
<emphasis>
- <property
moreinfo="none">validation-rules.xml</property>
- </emphasis> file.</para>
- <para>The Validators view shows the validation rules for a selected
validator. You can of
- course add your own rules.</para>
- <figure float="0">
- <title>Validators View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_38.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Here are the validation rules shown in the Source mode.</para>
- <figure float="0">
- <title>Validation Rules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_39.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-</chapter>
-
-
-<chapter id="modules"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/modules.xml">
- <?dbhtml filename="modules.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Struts Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Modules</title>
-
- <para>JBoss Tools support working with Struts projects that have
- multiple modules. You can easily do the following:</para>
- <itemizedlist>
- <listitem>
- <para>Add new modules</para>
- </listitem>
- <listitem>
- <para>Edit modules for an existing project or during Struts project
- import</para>
- </listitem>
- </itemizedlist>
- <para>Now, let's discuss this functionality in more detail.</para>
- <section id="WhenImportingAStrutsProject432">
-
- <title>When Importing a Struts Project</title>
-
- <para>During Struts project import, if the project has multiple modules,
you
- will see a screen with all existing modules. You can select each
- module and edit its details.</para>
-
- <figure float="0">
- <title>Configuring Project Modules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_40.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="EditingModulesInAnExistingProject1">
-
- <title>Editing Modules in an Existing Project</title>
- <para>To edit modules in an existing project, right click the project and
- select <emphasis>
- <property moreinfo="none">JBoss Tools > Modules
Configuration</property>.
- </emphasis></para>
- <figure float="0">
- <title>Choosing Modules Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_41.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You will see the same screen as above where you will be able to
select
- a module and edit its details.</para>
- <figure float="0">
- <title>Modules Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_42.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="AddingNewModules1">
-
- <title>Adding New Modules</title>
-
- <para>Adding a new module is very simple. First switch to Web Project
view.
- Expand your project to the Configuration folder. Under that folder
- you should see the current modules. Right click on Configuration and
- select <emphasis>
- <property moreinfo="none">New > Struts
Config</property>. </emphasis></para>
- <figure float="0">
- <title>Adding New Modules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_43.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You will see the screen below. You can specify a new module name and
- also add the new Struts configuration file to web.xml file.</para>
- <figure float="0">
- <title>Adding New Modules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_44.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-</chapter>
-
-
-<chapter id="code_generation"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/code_generation.xml">
- <?dbhtml filename="code_generation.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Struts Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Code Generation</title>
-
- <para>JBoss Tools comes with a <property moreinfo="none">code
generation</property>
- feature. You can generate stub code for Struts Actions, FormBeans, Forwards
- and Exceptions.</para>
-
- <para>The code generation that JBoss tooling provides is based on Velocity
templates
- which can be modified for your use. The templates are located at
<emphasis>
- <property moreinfo="none"> {JBossStudioHome} >
templates >
- codegeneration</property>. </emphasis></para>
-
- <para>There are a number of ways to invoke code generation. One is simply
- right-clicking the Struts diagram and selecting <emphasis>
- <property moreinfo="none">Generate Java
Code....</property>
- </emphasis></para>
-
- <figure float="0">
- <title>Selecting Generate Java Code</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_45.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On this screen you can select for which elements to generate code. If
you
- select Next you will be able to specify more options for each of the
- categories you selected.</para>
-
- <figure float="0">
- <title>Generate - Step 1</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_46.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>Please be careful not to override your existing files.</para>
- </tip>
-
- <para>When generation is complete, a result window will appear letting you know
how
- many classes were generated:</para>
-
- <figure float="0">
- <title>Generation Finished</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_47.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You don't always have to generate code for all elements at once. You
- can invoke generation for just an individual Struts artifact as well.
- Right-click an element on the diagram of the Struts configuration file and
- select <emphasis>
- <property moreinfo="none">Generate Java
Code...</property>
- </emphasis> from the context menu.</para>
-
- <figure float="0">
- <title>Generation For Individual Struts Artifact</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_48.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The same can be done from within the Tree viewer for the editor of the
Struts
- configuration file.</para>
-
- <figure float="0">
- <title>Generation in Struts Config Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_49.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-</chapter>
-
-<chapter id="config_file_debugger"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/config_file_debugger.xml">
- <?dbhtml filename="config_file_debugger.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Struts Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Struts Configuration File Debugger</title>
-
- <para>JBoss Tools come with <property moreinfo="none">Struts
configuration file
- debugger</property>. It allows you to set break points on Struts diagram
and
- then simply launch the server in debug mode.</para>
-
- <para>Simply right click an Action or a page and select Add <emphasis>
- <property moreinfo="none">Breakpoint</property>.
</emphasis></para>
- <figure float="0">
- <title>Adding Breakpoint</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_50.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-</chapter>
-
-<chapter id="page_links_recognizer"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/page_links_recognizer.xml">
- <?dbhtml filename="page_links_recognizer.html"?>
-
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Customizable Page Links Recognizer</title>
-
- <para><property moreinfo="none">Custom page
links</property> allow you to define custom Struts page
- links that will be recognizable in the Struts application diagram. You can
- define these links by selecting <emphasis>
- <property moreinfo="none">Window >
Preferences</property>
- </emphasis> from the menu bar and then selecting <emphasis>
- <property moreinfo="none">JBoss Tools > Web >
Struts > Customization</property>
- </emphasis> from the Preferences dialog box.</para>
- <figure float="0">
- <title>Customization Panel</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts/struts_51.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-</chapter>
-
-<chapter id="project_verification"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/project_verification.xml">
- <?dbhtml filename="project_verification.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Struts Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Struts Project Verification</title>
-
- <para>In this section we'll consider one more functionality that JBoss
Tools provide for Struts
- projects, namely adjusting projects verification.</para>
-
- <para>To configure Struts project verification select <emphasis>
- <property moreinfo="none">Window >
Preferences</property>
- </emphasis> from the menu bar, select <emphasis>
- <property moreinfo="none">JBoss Tools > Web >
Verification</property>
- </emphasis> from the Preferences dialog box and then expand the
- Struts Rules node.</para>
- <figure float="0">
- <title>Struts Rules</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Suppose you are working in the Source viewer for a Struts
- configuration file as shown below:</para>
- <figure float="0">
- <title>Struts Configuration File</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>While typing a class name or entering it from the graphical editor,
- you might make a minor typo (like <emphasis role="italic">
- <property
moreinfo="none">"sample.GreetingAction1"</property>
- </emphasis> instead of <emphasis role="italic">
- <property
moreinfo="none">"sample.GreetingAction"</property>
- </emphasis>). After saving the file,
- <property moreinfo="none">verification</property> checks to
make sure everything is
- correct and finds the error below:</para>
- <figure float="0">
- <title>Error Reporting</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/verif_valid/verif_valid_10.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Notice that the Package Explorer View shows a marked folder and a
- marked file where the error is.</para>
- <para>You can place the cursor over the line with the error to view a
- detailed error message:</para>
- <figure float="0">
- <title>Error Message</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_11.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The verification also checks to make sure you have specified the
- correct JSP page for the forward:</para>
- <figure float="0">
- <title>JSP Page Verification</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/verif_valid/verif_valid_12.png"
scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Once you place the cursor over the line, you can see the error
- message:</para>
- <figure float="0">
- <title>Error Message</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_13.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You can always invoke the verification by switching to the Diagram
- viewer, right-clicking and selecting <emphasis>
- <property moreinfo="none">Verify</property>
- </emphasis> from the context menu:</para>
- <figure float="0">
- <title>Verify Command</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/verif_valid/verif_valid_14.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-</chapter>
-
-<chapter id="rel_resources_links"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/rel_resources_links.xml">
- <?dbhtml filename="rel_resources_links.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Struts Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Relevant Resources Links</title>
-
- <para>Find out necessary information on <ulink
url="http://struts.apache.org/">Struts
- technology</ulink> if you don't know
enough.</para>
-
- <para>In summary, this reference should help you to get familiar with those
parts of
- <property moreinfo="none">JBoss
Tools</property> which are meant for development with Struts
- technology. If you've carefully gone through the document, you should
know
- now how to create/import Struts project or enable Struts capabilities for
an
- existing web project as well as organize and edit all necessary staff for
your
- Struts application using a set of views and editors provided by
<property moreinfo="none">JBoss
- Tools</property>.</para>
-
- <para>If you'd like to contribute your feedback is always appreciated.
You can
- leave your questions and suggestions on our <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
-</chapter>
-
-</book>
+]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Struts Tools Reference Guide</title>
+
+
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 3.0.0.GA
+ </releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_too...
version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+<chapter id="intoduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/introduction.xml">
+ <?dbhtml filename="introduction.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <para>If you prefer to develop web applications using Struts technology JBoss
Tools also meet
+ your needs. The professional developer toolset provides all necessary editors and
wizards
+ for creating Struts resources that enhances the process of building high-quality
web
+ applications.</para>
+ <note>
+ <title>Note:</title>
+ <para>Note that JBoss Tools support the Struts 1.1, 1.2.x
versions.</para>
+ </note>
+
+ <para>In this guide you will learn how to take advantage of Struts support that
<property moreinfo="none">JBoss Tools</property>
+ provide.</para>
+
+ <section id="struts_key_features">
+ <title>Key Features of Struts Tools</title>
+
+ <para>For a start, we propose you to look through the table of main
features of Struts
+ Tools:</para>
+
+ <table>
+
+ <title>Key Functionality for Struts Tools</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1"
colwidth="2*"></colspec>
+ <colspec colnum="2"
colwidth="4*"></colspec>
+ <colspec align="left" colnum="3"
colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><para>Struts
Support</para></entry>
+ <entry><para>Step-by-step wizards for creating a new
struts project with a number
+ of predefined templates, importing existing ones and adding
struts
+ capabilities to non-struts web
projects.</para></entry>
+ <entry>
+ <link linkend="projects">struts
support</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry><para>Support for Struts Configuration
File</para></entry>
+ <entry><para>Working on file using three modes:
diagram, tree and source.
+ Synchronization between the modes and full control over the
code. Easy
+ moving around the diagram using the Diagram Navigator.
Working with
+ struts projects that have multiple modules. Possibility to
use Struts
+ configuration file debugger allowing to set break points on
struts
+ diagram and then launch the server in debug
mode.</para></entry>
+ <entry>
+ <link
linkend="struts_config_editor">graphical editor for struts</link>
+ <link
linkend="config_file_debugger">configuration file debugger</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry><para>Support for Struts
modules</para></entry>
+ <entry><para>A Struts module (struts-config.xml) is
automatically created while
+ creating a new project. There is also possibility to add new
ones or edit
+ already existing modules in your existing project or while
importing Struts project.</para></entry>
+ <entry>
+ <link linkend="modules">modules</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry><para>Verification and
Validation</para></entry>
+ <entry><para>All occuring errors will be immediately
reported by verification
+ feature, no matter in what view you are working. Constant
validation and
+ errors checking allows to catch many of the errors during
development
+ process that significantly reduces development
time.</para></entry>
+ <entry>
+ <link
linkend="project_verification">verification and validation</link>
+ </entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find
<ulink
url="http://docs.jboss.org/tools/">here</ulink>.</p...
+ <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
+
+ </section>
+
+</chapter>
+
+
+<chapter id="projects"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/projects.xml">
+ <?dbhtml filename="projects.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Projects</title>
+
+ <para>JBoss Tools provide the following functionality when working with
Struts:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create new <property moreinfo="none">Struts
projects</property></para>
+ </listitem>
+ <listitem>
+ <para>Import (open) existing Struts projects. You can import any
project
+ structure</para>
+ </listitem>
+ <listitem>
+ <para>Add <property moreinfo="none">Struts
capabilities</property> to any existing Eclipse
+ project</para>
+ </listitem>
+ <listitem>
+ <para>Import and add Struts capabilities to any existing project
created outside
+ Eclipse.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Now, we'll focus on all these points more fully.</para>
+
+ <section id="CreatingANewStrutsProjec745t">
+
+ <title>Creating a New Struts Project</title>
+
+
+ <para>JBoss Tools provides a New Struts Project Wizard that radically
simplifies the process
+ for getting started with a new Struts project. You just need to follow these
steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select<emphasis>
+ <property moreinfo="none">File > New
> Project...</property>
+ </emphasis> from the menu bar. Then, select <emphasis>
+ <property moreinfo="none">JBoss Tools Web
> Struts > Struts Project</property>
+ </emphasis> in this dialog box. Click <emphasis>
+ <property moreinfo="none">Next</property>:
</emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Selecting Struts Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>On this form, provide the <property
moreinfo="none">Project Name</property>. You can also
+ select where to create the project or use the default
path.</para>
+ <para>Next to <property moreinfo="none">Struts
Environment</property> set which Struts version to
+ use.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Creating Struts Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>Don't put spaces in project names since some OS could
experience problems
+ with their processing and searching these files.</para>
+ </tip>
+
+ <para>You can select the KickStart template, then the project created will
include a simple
+ Hello World type application that is ready to run.</para>
+
+ <figure float="0">
+ <title>Choosing Struts Template </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_3_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Next, you register this application with the current servlet
container defined
+ for your workspace (JBoss AS, by default) in order to allow you to
test your
+ application more easily while still developing it. A new entry will
be added in
+ the servlet container configuration file to enable running the
application
+ in-place (called null deployment or link deployment). Uncheck the
<emphasis role="italic">
+ <property moreinfo="none">"Target
Server"</property>
+ </emphasis> check box if for some reason you don't want to
register
+ your application at this point.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Registering The Project at Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>On the next form, you can select the TLD files to include in
this
+ project:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Selecting Tag Libraries</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After the project is created, you should have the following project
structure (if you
+ used the KickStart template):</para>
+
+ <figure float="0">
+ <title>Project Structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>If you want to hide the jar files from Web App Libraries in view,
select the
+ down-pointing arrow in the upper right corner, select
+ <emphasis>Filters...</emphasis>, check the box next to Name
filter patterns
+ (matching names will be hidden), and type *.jar into the field. Then,
click OK.
+ </para>
+ </tip>
+ </section>
+ <section id="ImportingAnExistingStrutsProjectWithAnyStructure9653">
+
+ <title>Importing an Existing Struts Project with Any
Structure</title>
+
+ <para>For detailed information on migration projects to JBoss Developer
Studio see <ulink
url="../../Exadel-migration/html_single/index.html">Migration
Guide</ulink>.</para>
+
+ </section>
+ <section id="AddingStrutsCapabilityToAnExistingWebApplication532">
+
+ <title>Adding Struts Capability to an Existing Web
Application</title>
+
+ <para>Here, we'll consider how to add Struts functionality (Struts
libraries, tag
+ libraries and a Struts configuration file) to any existing Web application
project in
+ your Eclipse workspace.</para>
+
+ <para>By adding a Struts Nature to your project, you can now edit files
using JBoss Tools
+ editors, such as the <link
linkend="struts_config_editor">Struts configuration
+ editor</link> and the JBoss Tools JSP editor. To take advantage of this
just right-click
+ the project and select <emphasis>
+ <property moreinfo="none">JBoss Tools > Add Struts
Capabilities</property>
+ </emphasis> from the context menu. This will start the process of
adding all necessary
+ libraries and files to make a Web Struts project from your one.</para>
+
+ <figure float="0">
+ <title>Adding Struts Capabilities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the wizard you should point to location of your deployment
descriptor file web.xml
+ and name of the project.</para>
+
+ <figure float="0">
+ <title>Choosing Project Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After hitting <emphasis>
+ <property moreinfo="none">Next</property>,
</emphasis> you will see the following screen. This
+ screen simply means that you need to add at least one Struts module to your
project to
+ make this project a Struts project. Adding a Struts module means that a new
+ struts-config.xml will be added to your project and registered in the web.xml
file. In
+ addition, all required Struts libraries will be added. To add a Struts
module, select
+ the <emphasis>
+ <property moreinfo="none">Add Struts
Support</property>
+ </emphasis> button.</para>
+ <figure float="0">
+ <title>Project Modules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here you can select what Struts <property
moreinfo="none">Version</property>, <property
moreinfo="none">Servlet
+ Class</property>, <property moreinfo="none">URL
Pattern</property> and <property
moreinfo="none">TLD</property>s to add
+ to this project.</para>
+
+ <figure float="0">
+ <title>Selecting Struts Support Options</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When done, you will see the default Struts module configuration
information. See how
+ to Edit <link linkend="modules">Struts
modules</link>.</para>
+
+ <figure float="0">
+ <title>Project Configuration Information</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the last screen you can set the different folders for your project
as well as
+ register this application with a servlet container. If you want the libraries
(.jar
+ files) will be automatically added to your project, click on the checkbox
<emphasis>
+ <property moreinfo="none">Add
Libraries</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Registering the Project at Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When done, you can open end edit the struts-config.xml file using
usefull Struts
+ configuration file editor provided by JBDS. (The Struts configuration is
shown below in
+ the Tree viewer).</para>
+
+ <figure float="0">
+ <title>Struts-config.xml File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts/struts_13.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+</chapter>
+
+
+<chapter id="editors"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/editors.xml">
+ <?dbhtml filename="editors.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Struts Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Editors</title>
+ <para>In this chapter we'll introduce you to featured graphical editors for
specific
+ Struts files such as Struts Configuration files, Tiles files and Struts
Validation files.</para>
+ <section id="struts_config_editor">
+
+ <title>Graphical Editor for Struts Configuration Files</title>
+ <para>First, let's dwell on the Struts Configuration file
editor.</para>
+ <para>This editor has three views with different representation of
<emphasis>
+ <property
moreinfo="none">struts-config.xml</property>: </emphasis>Diagram,
Tree and Source. The
+ views can be selected via the tabs at the bottom of the editor. Any changes
made in one
+ view are immediately visible when you switch to any other view.</para>
+
+ <para>Now, we'll consider every view in more detail.</para>
+ <section id="StrutsDiagramMode453">
+
+ <title>Diagram View</title>
+
+ <para>The Diagram view graphically displays the Web flow of the
application defined in
+ the Struts configuration file.</para>
+
+ <figure float="0">
+ <title>Diagram View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Diagram view allows to edit navigation in your Struts
application. Just by
+ right-clicking anywhere on the diagram, you can use a context menu to
create the
+ building blocks of a Struts application:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Actions</para>
+ </listitem>
+ <listitem>
+ <para>Global forwards</para>
+ </listitem>
+ <listitem>
+ <para>Global exceptions</para>
+ </listitem>
+ <listitem>
+ <para>JSP Pages</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Diagram Context Menu</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Along the upper-left side of the editor is a stack of seven icons
for changing the
+ behavior of the cursor in the diagram. </para>
+
+ <figure float="0">
+ <title>Editor Icons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first icon switches to the default regular selection cursor,
the second to the
+ marquee selection cursor and the third to the new connection cursor. The
last four
+ icons switch the cursor to an insert cursor for each type of Struts build
block
+ listed above (and in the order listed).</para>
+
+ <para>For instance, clicking on the first of these four icons (the one
with the gears)
+ will switch the cursor to insert actions. Clicking anywhere in the
diagram with this
+ cursor has the same effect as right-click and selecting <emphasis>
+ <property moreinfo="none">Add >
Action...</property>
+ </emphasis> from the context menu with the regular cursor active.
It's just
+ more efficient to use this cursor if you're adding more than one
action at
+ once.</para>
+
+
+ </section>
+ <section id="StrutsTreeMode42">
+
+ <title>Tree View</title>
+
+ <para>The Tree view represents the different elements of the Struts
application that are
+ organized into functional categories on the left-hand side and a form for
editing
+ the properties of currently selected items on the right-hand
side.</para>
+
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also right-click on any node in the category tree and
perform appropriate
+ operations through a context menu. For instance, by right-clicking on
the
+ action-mappings category node, you can add new actions to the
application.</para>
+
+ <figure float="0">
+ <title>Tree Context Menu</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="StrutsSourceMode9655">
+
+ <title>Source View</title>
+
+ <para>In the Source view, you have complete editing control of the
underlying XML
+ coding.</para>
+
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When working in Source view, you always have all the following
features available:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Content Assist</para>
+ </listitem>
+ <listitem>
+ <para>Open On Selection</para>
+ </listitem>
+ <listitem>
+ <para>File Folding</para>
+ </listitem>
+ </itemizedlist>
+ <para>You can take advantage of <ulink
url="../../jsf/html_single/index.html#CodeAssistAndDynamicCodeAssist42BasedOnProjectData">code
assist</ulink>.</para>
+ <figure float="0">
+ <title>Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts/struts_20.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The editor will also immediately flag any errors.</para>
+
+ <figure float="0">
+ <title>Errors in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts/struts_21.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Finally, you can use the Outline view with the editor to easily
navigate through
+ the file.</para>
+
+ <figure float="0">
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Find more information about editor features <ulink
url="../../jsf/html_single/index.html#editors_features">here</ulink>.</para>
+ </section>
+ </section>
+
+ <section id="GraphicalEditorForTilesFiles132">
+
+ <title>Graphical Editor for Tiles Files</title>
+ <para>Here, you'll know how to make use of the special graphical editor
for Tiles configuration files.</para>
+ <para>The editor has three main views: Tree, Diagram and Source.
+ The views can be selected via the tabs at the bottom of the editor. Any
changes made in
+ one view are immediately visible when you switch to any other
view.</para>
+
+ <para>Before we consider each view of the editor, let's look at the way
of creating new Tiles files.</para>
+ <section id="CreateNewTilesFile1422">
+
+ <title>Create New Tiles File</title>
+
+ <para>To create new Tiles files, right click any folder and select
<emphasis>
+ <property moreinfo="none">New > Tiles
File</property>. </emphasis></para>
+ <figure float="0">
+ <title>Creating a New Tiles File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="StrutsTreeView896">
+
+ <title>Tree View</title>
+
+ <para>The Tree view represents the different elements of the Tiles file
that are
+ organized into functional categories on the left-hand side and a form for
editing
+ the properties of currently selected items on the right-hand
side.</para>
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To edit the file, simply right click any node and select among
the available
+ actions.</para>
+ <figure float="0">
+ <title>Editing in Tiles Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="StrutsDiagramView4643">
+
+ <title>Diagram View</title>
+
+ <para>The Diagram view allows you to create complex Tiles files in the
form of a
+ diagram.</para>
+ <figure float="0">
+ <title>Diagram Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To create new definitions, simply right click anywhere in the
diagram.</para>
+ <figure float="0">
+ <title>Creating New Definition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_27.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use the Diagram toolbar to make editing
easier.</para>
+ <figure float="0">
+ <title>Diagram Toolbar</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_28.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> It contains four icons for changing the cursor state. The first
one is the
+ default cursor state for selecting existing nodes. The second icon is
marquee
+ selector. The third is used for creating new connections and the last one
is for
+ adding definition template to the content.</para>
+ </section>
+ <section id="StrutsSource75">
+
+ <title>Source</title>
+
+ <para>The other view of the <property
moreinfo="none">Tiles editor</property> is the Source view that
+ gives you full control over the source. Any changes here will immediately
appear in
+ other modes when you switch to them.</para>
+
+ <para>When working in Source view, you always have all following
features available:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Content Assist</para>
+ </listitem>
+ <listitem>
+ <para>Open On Selection</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_29.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><ulink
url="../../jsf/html_single/index.html#CodeAssistAndDynamicCodeAssist42BasedOnProjectData">Code
+ assist</ulink> is available in the Source mode.</para>
+ <figure float="0">
+ <title>Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts/struts_30.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Any errors are immediately reported as shown below:</para>
+ <figure float="0">
+ <title>Errors Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts/struts_31.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use the Outline view together with the editor's
Source mode.
+ It provides an easier navigation through the file.</para>
+ <figure float="0">
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts/struts_32.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="GraphicalEditorForStrutsValidationFiles86">
+
+ <title>Graphical Editor for Struts Validation Files</title>
+
+ <para>Providing full support for development Struts applications JBoss
Tools comes with a
+ visual validation editor. To open the editor double-click on the validation
file or if you don't have it create a new one.</para>
+
+ <para>To create a new validation file, right click any folder in
+ Project Explorer and select <emphasis>
+ <property moreinfo="none">File > New >
Other...</property>
+ </emphasis>from the context menu and then <emphasis>
+ <property moreinfo="none">JBoss Tools Web > Struts
> Validation File</property>. </emphasis></para>
+ <figure float="0">
+ <title>Creating New Validation File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_33.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The validation editor works with five modes: Formsets, Validators,
Constants and
+ standard Tree and Source that you can easily switch over using tabs at the
bottom of the
+ editor.</para>
+ <para>The Formsets view shows forms and their elements on the left side and
the dialogue for
+ defining their validation rules on the right side.</para>
+ <figure float="0">
+ <title>Formsets View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_34.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Constants view let you set constant values for your validation
rules.</para>
+ <figure float="0">
+ <title>Constansts View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_35.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The validation file can also be viewed in a Tree view.</para>
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_36.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>At any point you have full control over the source by switching to
the Source view.
+ Any editing in this view will immediately be available in other views of the
editor.</para>
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts/struts_37.png"
scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also open your own custom or Struts-standard
<emphasis>
+ <property
moreinfo="none">validation-rules.xml</property>
+ </emphasis> file.</para>
+ <para>The Validators view shows the validation rules for a selected
validator. You can of
+ course add your own rules.</para>
+ <figure float="0">
+ <title>Validators View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts/struts_38.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Here are the validation rules shown in the Source mode.</para>
+ <figure float="0">
+ <title>Validation Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_39.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+
+<chapter id="modules"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/modules.xml">
+ <?dbhtml filename="modules.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Struts Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Modules</title>
+
+ <para>JBoss Tools support working with Struts projects that have
+ multiple modules. You can easily do the following:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add new modules</para>
+ </listitem>
+ <listitem>
+ <para>Edit modules for an existing project or during Struts project
+ import</para>
+ </listitem>
+ </itemizedlist>
+ <para>Now, let's discuss this functionality in more detail.</para>
+ <section id="WhenImportingAStrutsProject432">
+
+ <title>When Importing a Struts Project</title>
+
+ <para>During Struts project import, if the project has multiple modules,
you
+ will see a screen with all existing modules. You can select each
+ module and edit its details.</para>
+
+ <figure float="0">
+ <title>Configuring Project Modules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_40.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="EditingModulesInAnExistingProject1">
+
+ <title>Editing Modules in an Existing Project</title>
+ <para>To edit modules in an existing project, right click the project and
+ select <emphasis>
+ <property moreinfo="none">JBoss Tools > Modules
Configuration</property>.
+ </emphasis></para>
+ <figure float="0">
+ <title>Choosing Modules Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_41.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You will see the same screen as above where you will be able to
select
+ a module and edit its details.</para>
+ <figure float="0">
+ <title>Modules Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_42.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="AddingNewModules1">
+
+ <title>Adding New Modules</title>
+
+ <para>Adding a new module is very simple. First switch to Web Project
view.
+ Expand your project to the Configuration folder. Under that folder
+ you should see the current modules. Right click on Configuration and
+ select <emphasis>
+ <property moreinfo="none">New > Struts
Config</property>. </emphasis></para>
+ <figure float="0">
+ <title>Adding New Modules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_43.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You will see the screen below. You can specify a new module name and
+ also add the new Struts configuration file to web.xml file.</para>
+ <figure float="0">
+ <title>Adding New Modules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_44.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+
+<chapter id="code_generation"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/code_generation.xml">
+ <?dbhtml filename="code_generation.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Struts Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Code Generation</title>
+
+ <para>JBoss Tools comes with a <property moreinfo="none">code
generation</property>
+ feature. You can generate stub code for Struts Actions, FormBeans, Forwards
+ and Exceptions.</para>
+
+ <para>The code generation that JBoss tooling provides is based on Velocity
templates
+ which can be modified for your use. The templates are located at
<emphasis>
+ <property moreinfo="none"> {JBossStudioHome} >
templates >
+ codegeneration</property>. </emphasis></para>
+
+ <para>There are a number of ways to invoke code generation. One is simply
+ right-clicking the Struts diagram and selecting <emphasis>
+ <property moreinfo="none">Generate Java
Code....</property>
+ </emphasis></para>
+
+ <figure float="0">
+ <title>Selecting Generate Java Code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_45.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On this screen you can select for which elements to generate code. If
you
+ select Next you will be able to specify more options for each of the
+ categories you selected.</para>
+
+ <figure float="0">
+ <title>Generate - Step 1</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_46.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>Please be careful not to override your existing files.</para>
+ </tip>
+
+ <para>When generation is complete, a result window will appear letting you know
how
+ many classes were generated:</para>
+
+ <figure float="0">
+ <title>Generation Finished</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_47.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You don't always have to generate code for all elements at once. You
+ can invoke generation for just an individual Struts artifact as well.
+ Right-click an element on the diagram of the Struts configuration file and
+ select <emphasis>
+ <property moreinfo="none">Generate Java
Code...</property>
+ </emphasis> from the context menu.</para>
+
+ <figure float="0">
+ <title>Generation For Individual Struts Artifact</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_48.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The same can be done from within the Tree viewer for the editor of the
Struts
+ configuration file.</para>
+
+ <figure float="0">
+ <title>Generation in Struts Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_49.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</chapter>
+
+<chapter id="config_file_debugger"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/config_file_debugger.xml">
+ <?dbhtml filename="config_file_debugger.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Struts Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Struts Configuration File Debugger</title>
+
+ <para>JBoss Tools come with <property moreinfo="none">Struts
configuration file
+ debugger</property>. It allows you to set break points on Struts diagram
and
+ then simply launch the server in debug mode.</para>
+
+ <para>Simply right click an Action or a page and select Add <emphasis>
+ <property moreinfo="none">Breakpoint</property>.
</emphasis></para>
+ <figure float="0">
+ <title>Adding Breakpoint</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_50.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</chapter>
+
+<chapter id="page_links_recognizer"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/page_links_recognizer.xml">
+ <?dbhtml filename="page_links_recognizer.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Customizable Page Links Recognizer</title>
+
+ <para><property moreinfo="none">Custom page
links</property> allow you to define custom Struts page
+ links that will be recognizable in the Struts application diagram. You can
+ define these links by selecting <emphasis>
+ <property moreinfo="none">Window >
Preferences</property>
+ </emphasis> from the menu bar and then selecting <emphasis>
+ <property moreinfo="none">JBoss Tools > Web >
Struts > Customization</property>
+ </emphasis> from the Preferences dialog box.</para>
+ <figure float="0">
+ <title>Customization Panel</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts/struts_51.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</chapter>
+
+<chapter id="project_verification"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/project_verification.xml">
+ <?dbhtml filename="project_verification.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Struts Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Struts Project Verification</title>
+
+ <para>In this section we'll consider one more functionality that JBoss
Tools provide for Struts
+ projects, namely adjusting projects verification.</para>
+
+ <para>To configure Struts project verification select <emphasis>
+ <property moreinfo="none">Window >
Preferences</property>
+ </emphasis> from the menu bar, select <emphasis>
+ <property moreinfo="none">JBoss Tools > Web >
Verification</property>
+ </emphasis> from the Preferences dialog box and then expand the
+ Struts Rules node.</para>
+ <figure float="0">
+ <title>Struts Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Suppose you are working in the Source viewer for a Struts
+ configuration file as shown below:</para>
+ <figure float="0">
+ <title>Struts Configuration File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>While typing a class name or entering it from the graphical editor,
+ you might make a minor typo (like <emphasis role="italic">
+ <property
moreinfo="none">"sample.GreetingAction1"</property>
+ </emphasis> instead of <emphasis role="italic">
+ <property
moreinfo="none">"sample.GreetingAction"</property>
+ </emphasis>). After saving the file,
+ <property moreinfo="none">verification</property> checks to
make sure everything is
+ correct and finds the error below:</para>
+ <figure float="0">
+ <title>Error Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_10.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Notice that the Package Explorer View shows a marked folder and a
+ marked file where the error is.</para>
+ <para>You can place the cursor over the line with the error to view a
+ detailed error message:</para>
+ <figure float="0">
+ <title>Error Message</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The verification also checks to make sure you have specified the
+ correct JSP page for the forward:</para>
+ <figure float="0">
+ <title>JSP Page Verification</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_12.png"
scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once you place the cursor over the line, you can see the error
+ message:</para>
+ <figure float="0">
+ <title>Error Message</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can always invoke the verification by switching to the Diagram
+ viewer, right-clicking and selecting <emphasis>
+ <property moreinfo="none">Verify</property>
+ </emphasis> from the context menu:</para>
+ <figure float="0">
+ <title>Verify Command</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/verif_valid/verif_valid_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</chapter>
+
+<chapter id="rel_resources_links"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_ref_guide/en/modules/rel_resources_links.xml">
+ <?dbhtml filename="rel_resources_links.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Struts Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Relevant Resources Links</title>
+
+ <para>Find out necessary information on <ulink
url="http://struts.apache.org/">Struts
+ technology</ulink> if you don't know
enough.</para>
+
+ <para>In summary, this reference should help you to get familiar with those
parts of
+ <property moreinfo="none">JBoss
Tools</property> which are meant for development with Struts
+ technology. If you've carefully gone through the document, you should
know
+ now how to create/import Struts project or enable Struts capabilities for
an
+ existing web project as well as organize and edit all necessary staff for
your
+ Struts application using a set of views and editors provided by
<property moreinfo="none">JBoss
+ Tools</property>.</para>
+
+ <para>If you'd like to contribute your feedback is always appreciated.
You can
+ leave your questions and suggestions on our <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
+</chapter>
+
+</book>
Modified: trunk/struts/docs/struts_tools_tutorial/en/master_output.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/master_output.xml 2009-03-05 18:34:07 UTC
(rev 14042)
+++ trunk/struts/docs/struts_tools_tutorial/en/master_output.xml 2009-03-05 18:54:45 UTC
(rev 14043)
@@ -22,1319 +22,1319 @@
<!ENTITY strutsreflink
"../../struts_tools_ref_guide/html_single/index.html">
<!ENTITY strutstutoriallink
"../../struts_tools_tutorial/html_single/index.html">
-]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
-
- <bookinfo>
- <title>Struts Tools Tutorial</title>
-
-
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
-
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
-
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2009</year>
- <holder>JBoss, a division of Red Hat</holder>
- </copyright>
- <releaseinfo>
- Version: 3.0.0.GA
- </releaseinfo>
-
-<abstract>
- <title></title>
- <para>
- <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_too...
version</ulink>
- </para>
-</abstract>
-
-
- </bookinfo>
-
- <toc></toc>
-
-
-<chapter id="introduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/introduction.xml"
xreflabel="introduction">
- <?dbhtml filename="introduction.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
- <title>Introduction</title>
- <para>The following chapters describe how to deal with classic/old style of
Struts development. We
- recommend users to use <ulink
url="../../seam/html_single/index.html">JBoss Seam</ulink> to
- simplify development, but until then you can read about classical Struts usage
here.</para>
-
- <para>We are going to show you how to create a simple <emphasis>
- <property moreinfo="none">Struts application</property>
- </emphasis> using the JBoss Tools. The completed application will ask a user to
enter
- a name and click a button. The resulting new page will display the familiar message,
- "Hello <name>!"</para>
- <para>This document will show you how to create such an application from the
beginning, along the
- way demonstrating some of the powerful features of JBoss Tools. With the help of our
tutorial you will design the
- application, generate stub code for the application, fill in the stub coding, compile
the
- application, and finally run it all from inside the Eclipse.</para>
-
- <section>
- <title>Other relevant resources on the topic</title>
-
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find
<ulink
url="http://docs.jboss.org/tools/">here</ulink>.</p...
- <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
-
- </section>
-
-</chapter>
-
-
-<chapter id="struts_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml"
xreflabel="struts_application">
- <?dbhtml filename="struts_application.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Struts</keyword>
- <keyword>Struts Application</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Creating a Simple Struts Application</title>
-
- <para>Firstly, we assume that you have already launched Eclipse with JBoss
Tools installed and
- also that the <property moreinfo="none">Web Development
perspective</property> is the current perspective. (If not, make it
- active by selecting <emphasis>
- <property moreinfo="none">Window > Open Perspective
> Other > Web
- Development</property>
- </emphasis> from the menu bar.)</para>
-
- <section id="StartingUp">
- <title>Starting Up</title>
- <para>We are first going to create a new project for the
application.</para>
- <itemizedlist>
- <listitem>
- <para>Go to the menu bar and select <emphasis>
- <property moreinfo="none">File > New >
Project...</property>
- </emphasis>.</para>
- </listitem>
- <listitem>
- <para>Select <emphasis>
- <property moreinfo="none">JBoss Tools Web >
Struts > Struts Project</property>
- </emphasis> in the New Project dialog box</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Next </property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Enter "StrutsHello" as the project
name</para>
- </listitem>
- <listitem>
- <para>Leave everything else as is, and click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> again</para>
- </listitem>
- <listitem>
- <para>Make sure that <emphasis>
- <property
moreinfo="none">struts-bean.tld</property>
- </emphasis>, <emphasis>
- <property
moreinfo="none">struts-html.tld</property>
- </emphasis>, and <emphasis>
- <property
moreinfo="none">struts-logic.tld</property>
- </emphasis> are checked in the list of included tag libraries and
then click <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>A "StrutsHello" node should appear in the upper-left
Package
- Explorer view.</para>
- <itemizedlist>
- <listitem>
- <para>Click the plus sign next to <emphasis>
- <property
moreinfo="none">StrutsHello</property>
- </emphasis> to reveal the child nodes</para>
- </listitem>
- <listitem>
- <para>Click the plus sign next to <emphasis>
- <property
moreinfo="none">WebContent</property>
- </emphasis> under StrutsHello</para>
- </listitem>
- <listitem>
- <para>Click the plus sign next to <emphasis>
- <property moreinfo="none">WEB-INF</property>
- </emphasis> under WebContent</para>
- </listitem>
- <listitem>
- <para>Then, double-click on the <emphasis>
- <property
moreinfo="none">struts-config.xml</property>
- </emphasis> node to display a diagram of the Struts application
configuration
- file in the editing area</para>
- </listitem>
- </itemizedlist>
- <para>At this point, its empty except for the background grid
lines.</para>
- </section>
-
- <section id="CreatingtheApplicationComponents">
- <?dbhtml filename="CreatingtheApplicationComponents.html"?>
- <title>Creating the Application Components</title>
- <para>Now, we will design the application by creating the individual
components as
- placeholders first. (We dont have to complete all of the details inside the
components
- until afterwards.)</para>
- <section id="CreatingJSPPagePlaceholders">
- <title>Creating JSP Page Placeholders</title>
- <para>Next, let's create and place two JSP pages. We will not write
any code
- for the files, but only create them as placeholders so that we can create
links to
- them in the diagram. We will write the code a little bit
later.</para>
- <section id="CreatingthePagePlaceholders">
- <title>Creating the Page Placeholders</title>
- <itemizedlist>
- <listitem>
- <para>Bring the Web Projects view to the front of the
Package Explorer view
- by selecting the <emphasis>
- <property moreinfo="none">Web
Projects</property>
- </emphasis> tab next to that tab.</para>
- </listitem>
- <listitem>
- <para>Right-click the <emphasis>
- <property moreinfo="none">StrutsHello
> WEB-ROOT (WebContent)</property>
- </emphasis> folder in the Web Projects view and select
<emphasis>
- <property moreinfo="none">New >
Folder...</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Enter <emphasis>
- <property
moreinfo="none">pages</property>
- </emphasis> for a folder name and click
<emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
-
- <listitem>
- <para>We will keep our presentation files in this
folder</para>
- </listitem>
-
- <listitem>
- <para>Right-click the pages folder and select
<emphasis>
- <property moreinfo="none">New >
Fila > JSP...</property>
- </emphasis>
- </para>
- </listitem>
- <listitem>
- <para>For Name type in <emphasis>
- <property
moreinfo="none">inputname</property>
- </emphasis> (the JSP extension will be automatically
added to the file),
- for Template select <emphasis>
- <property
moreinfo="none">StrutsForm</property>
- </emphasis> and then click on the <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>Right-click the pages folder again and select
<emphasis>
- <property moreinfo="none">New >
File > JSP...</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>For Name type in <emphasis>
- <property
moreinfo="none">greeting</property>
- </emphasis>, for Template leave as Blank, and then
click on the <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button</para>
- </listitem>
- </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>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">struts-config.xml</property>
- </emphasis> tab in the Editing area to bring the
diagram to the
- front</para>
- </listitem>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">inputname.jsp</property>
- </emphasis> page in the Web Projects view, drag it onto
the diagram, and
- drop it</para>
- </listitem>
- <listitem><para>Click on the <emphasis>
- <property
moreinfo="none">greeting.jsp</property>
- </emphasis> page in the Web Projects view, drag it onto the
diagram, and
- drop it to the right of the <emphasis>
- <property
moreinfo="none">/pages/inputname.jsp</property>
- </emphasis> icon with some extra
space</para></listitem>
- </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>
- <itemizedlist>
- <listitem>
- <para>Right-click between the two icons and select
<emphasis>
- <property moreinfo="none">Add >
Action</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Enter the following values:</para>
- </listitem>
- </itemizedlist>
- <table>
- <title>Action values</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>path</entry>
- <entry>/greeting</entry>
- </row>
- <row>
- <entry>name</entry>
- <entry>GetNameForm</entry>
- </row>
- <row>
- <entry>scope</entry>
- <entry>request</entry>
- </row>
- <row>
- <entry>type</entry>
- <entry>sample.GreetingAction</entry>
- </row>
- <row>
- <entry>validate</entry>
- <entry><leave blank></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>("GetNameForm" is the name for a form bean that we will
create
- later.)</para>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <para>The <emphasis>
- <property moreinfo="none">/greeting</property>
- </emphasis> action should appear in four places, in the diagram,
under the
- action-mappings node, under the struts-config.xml node in Tree view, in
Web Projects
- view and 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>
- </section>
- <section id="CreatingaLink">
- <title>Creating a Link</title>
- <para>Let's now create a link from the inputname.jsp page to the
action.</para>
- <itemizedlist>
- <listitem>
- <para>On the left-hand side of the diagram in the column of
icons, click on this
- icon:</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Create New Connection Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_application/struts_application_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>In the connect-the-components mode you are in now, click
on the <emphasis>
- <property
moreinfo="none">/pages/inputname.jsp</property>
- </emphasis> icon in the diagram and then click on the
<emphasis>
- <property
moreinfo="none">/greeting</property>
- </emphasis> action</para>
- </listitem>
- </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>
- <itemizedlist>
- <listitem>
- <para>On the left-hand side of the diagram in the column of
icons, click on this
- icon, again:</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Create New Connection Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_application/struts_application_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">/greeting</property>
- </emphasis> action icon in the diagram and then click on
the <emphasis>
- <property
moreinfo="none">pages/greeting.jsp</property>
- </emphasis> icon</para>
- </listitem>
- <listitem>
- <para>That's 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 name. If you
don't
- like it, you can easily change it</para>
- </listitem>
- <listitem>
- <para>Select the <emphasis>
- <property
moreinfo="none">Tree</property>
- </emphasis> tab at the bottom of the editor window (between
Diagram and
- Source)</para>
- </listitem>
- <listitem>
- <para>Expand the <emphasis>
- <property
moreinfo="none">struts-config.xml/action-mappings//greeting</property>
- </emphasis> 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 <emphasis>
- <property
moreinfo="none">Diagram</property>
- </emphasis> tab at the bottom of the editor window and see
how the diagram
- is also updated to reflect the change</para>
- </listitem>
- </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>
- <itemizedlist>
- <listitem>
- <para>Somewhere in the top-left corner of diagram, right-click
and select <emphasis>
- <property moreinfo="none"> Add >
Global Forward...</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Enter <emphasis>
- <property
moreinfo="none">getName</property>
- </emphasis> in the Name field</para>
- </listitem>
- <listitem>
- <para>Select the <emphasis>
- <property
moreinfo="none">Change...</property>
- </emphasis>button for Path</para>
- </listitem>
- <listitem>
- <para>In the Edit Path window, switch to the <emphasis>
- <property
moreinfo="none">Pages</property>
- </emphasis> tab</para>
- </listitem>
- <listitem>
- <para>Expand the <emphasis>
- <property moreinfo="none">StrutsHello
> WEB-ROOT (WebContent) > pages</property>
- </emphasis> node and then select the inputname.jsp
page</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Ok</property>
- </emphasis>.</para>
- </listitem>
- <listitem>
- <para>Leave the rest of the fields blank and click
<emphasis>
- <property
moreinfo="none">OK</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>A forward object now appears on the diagram and also in the
global-forwards folder
- in the Outline view.</para>
- <itemizedlist>
- <listitem>
- <para>Tidy up the diagram, by clicking and dragging around each
icon, so that
- the diagram looks something like this:</para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>Diagram View</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_application/struts_application_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <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>
- <itemizedlist>
- <listitem>
- <para>Switch to the Tree viewer in the editor for the
struts-config.xml file, by
- selecting the <emphasis>
- <property
moreinfo="none">Tree</property>
- </emphasis> tab at the bottom of the editor
window</para>
- </listitem>
- <listitem>
- <para>Right-click <emphasis>
- <property moreinfo="none">struts-config.xml
> form-beans</property>
- </emphasis> and select Create Form Bean</para>
- </listitem>
- <listitem>
- <para>Enter <emphasis>
- <property
moreinfo="none">GetNameForm</property>
- </emphasis> in the name field and <emphasis>
- <property
moreinfo="none">sample.GetNameForm</property>
- </emphasis> for type</para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>To save your changes to struts-config.xml, select
<emphasis>
- <property moreinfo="none">File >
Save</property>
- </emphasis> from the menu bar</para>
- </listitem>
- </itemizedlist>
- <para>Note the disappearance of the asterisk next to the name,
struts-config.xml.</para>
- </section>
- </section>
-</chapter>
-
-<chapter id="generating_stub"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/generating_stub.xml"
xreflabel="generating_stub">
- <?dbhtml filename="generating_stub.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Struts</keyword>
- <keyword>Struts Application</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Generating Stub Coding</title>
- <para>We are done with designing the application through the diagram. Now
we need to write
- code for the action component. We also need to write an action class for the
<emphasis>
- <property moreinfo="none">/greeting</property>
- </emphasis> mapping along with a FormBean. To aid in the coding phase,
JBoss Developer
- Studio can generate Java class stubs for all of the components shown in the
diagram.</para>
- <itemizedlist>
- <listitem>
- <para>Switch back to the diagram, by selecting the
<emphasis>
- <property moreinfo="none">Diagram</property>
- </emphasis> tab at the bottom of the editor window</para>
- </listitem>
- <listitem>
- <para>Right-click a blank space in the diagram and select
<emphasis>
- <property moreinfo="none">Generate Java
Code</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Leave everything as is in the dialog box and click
<emphasis>
- <property moreinfo="none">Generate</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>You should see a screen that says:</para>
- <para>Generated classes: 2</para>
- <para>Actions: 1</para>
- <para>Form beans: 1</para>
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>The Java files will be generated in a <emphasis>
- <property moreinfo="none">JavaSource >
sample</property>
- </emphasis> 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>
- </chapter>
-
-<chapter id="coding_files"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/coding_files.xml"
xreflabel="coding_files">
- <?dbhtml filename="coding_files.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Struts</keyword>
- <keyword>Struts Application</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Coding the Various Files</title>
- <para>We will now code both the Java stub classes just generated, the JSP
files left in as
- placeholders from previous steps, and a new start JSP page we will have to
create.</para>
- <section id="JavaStubClasses">
- <title>Java Stub Classes</title>
- <itemizedlist>
- <listitem>
- <para>To finish the two Java classes, switch to the
<emphasis>
- <property moreinfo="none">Package
Explorer</property>
- </emphasis> view and expand the <emphasis>
- <property moreinfo="none">JavaSource >
sample</property>
- </emphasis> folder</para>
- </listitem>
- </itemizedlist>
- <section id="GetNameForm.java">
- <title>GetNameForm.java</title>
- <itemizedlist>
- <listitem>
- <para>Double-click <emphasis>
- <property
moreinfo="none">GetNameForm.java</property>
- </emphasis> for editing</para>
- </listitem>
-
- <listitem>
- <para>You are looking at a Java stub class that was
generated by JBoss
- 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>
- </itemizedlist>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[private String name = "";
- private String greetName = "";
-]]></programlisting>
-
- <itemizedlist>
- <listitem>
- <para>Inside the reset method, delete the TO DO and throw
lines and
- add:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[this.name = "";
- this.greetName = "";
-]]></programlisting>
-
- <itemizedlist>
- <listitem>
- <para>Inside the validate method, delete the TO DO and
throw lines and
- add:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[ActionErrors errors = new ActionErrors();
- return errors;
-]]></programlisting>
-
- <itemizedlist>
- <listitem>
- <para>Right-click and select <emphasis>
- <property moreinfo="none">Source >
Generate Getters and Setters...</property>
- </emphasis>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
<emphasis>
- <property
moreinfo="none">OK</property>
- </emphasis> button</para>
- </listitem>
- </itemizedlist>
- <para>The final GetNameForm.java file should look like
this:</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[package sample;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.struts.action.ActionErrors;
-import org.apache.struts.action.ActionMapping;
-
-public class GetNameForm extends org.apache.struts.action.ActionForm
-{
-
- private String name = "";
- private String greetName = "";
-
- public String getName()
- {
- return name;
- }
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getGreetName()
- {
- return greetName;
- }
-
- public void setGreetName(String greetName)
- {
- this.greetName = greetName;
- }
-
- public GetNameForm()
- {
- }
-
- public void reset(ActionMapping actionMapping, HttpServletRequest request)
- {
- this.name = "";
- this.greetName = "";
- }
-
- public ActionErrors validate(ActionMapping actionMapping,
- HttpServletRequest request)
- {
- ActionErrors errors = new ActionErrors();
- return errors;
- }
-}
-]]></programlisting>
-
- <itemizedlist>
- <listitem>
- <para>Save the file</para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="GreetingAction.java">
- <title>GreetingAction.java</title>
- <itemizedlist>
- <listitem>
- <para>Open GreetingAction.java for editing</para>
- </listitem>
- <listitem>
- <para>Inside the execute method, delete the TO DO lines and
add the
- following:</para>
- </listitem>
- </itemizedlist>
-
- <programlisting format="linespecific"
role="JAVA"><![CDATA[String name = ((GetNameForm)form).getName();
-String greeting = "Hello, "+name+"!";
-((GetNameForm)form).setName(greeting);
-return mapping.findForward(FORWARD_sayHello);
-]]></programlisting>
-
- <para>The final version of GreetingAction.java should look like
this:</para>
-
- <programlisting format="linespecific"
role="JAVA"><![CDATA[package sample;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionForward;
-import org.apache.struts.action.ActionMapping;
-
-public class GreetingAction extends org.apache.struts.action.Action
-{
-
- // Global Forwards
- public static final String GLOBAL_FORWARD_getName = "getName";
-
- // Local Forwards
- public static final String FORWARD_sayHello = "sayHello";
-
- public GreetingAction()
- {
- }
- public ActionForward execute(ActionMapping mapping, ActionForm form,
- HttpServletRequest request, HttpServletResponse response) throws Exception
- {
- String name = ((GetNameForm)form).getName();
- String greeting = "Hello, "+name+"!";
- ((GetNameForm)form).setName(greeting);
- return mapping.findForward(FORWARD_sayHello);
- }
-}
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Save the file</para>
- </listitem>
- <listitem>
- <para>Close the editors for the two Java
files</para>
- </listitem>
- </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>
- <section id="JSPPages">
- <title>JSP Pages</title>
- <section id="inputname.jsp">
- <title>inputname.jsp</title>
- <para>In this page, the user will enter any name and click the
<emphasis>
- <property
moreinfo="none">submit</property>
- </emphasis> button. Then, the greeting action will be called
through the form.</para>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">inputname.jsp</property>
- </emphasis> tab in the Editing area to bring its editor
forward</para>
- </listitem>
- <listitem>
- <para>In the Web Projects view, expand <emphasis>
- <property moreinfo="none">StrutsHello
> Configuration > default
- > struts-config.xml >
action-mappings</property>
- </emphasis> and select <emphasis>
- <property
moreinfo="none">/greeting</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Drag it and drop it between the quotes for the
<emphasis role="italic">
- <property
moreinfo="none">"action"</property>
- </emphasis> attribute to the <emphasis
role="bold">
- <property
moreinfo="none"><html:form></property>
- </emphasis> element in the Source pane of the
editor</para>
- </listitem>
- <listitem>
- <para>Then type this text on a new line just below this
line:</para>
- <programlisting format="linespecific"
role="XML"><![CDATA[Input name:
- ]]></programlisting>
- </listitem>
-
- <listitem>
- <para>Select the <emphasis>
- <property
moreinfo="none">Visual</property>
- </emphasis> pane of the editor</para>
- </listitem>
- <listitem>
- <para>Then, in the JBoss Tools Palette, expand the
<emphasis>
- <property moreinfo="none">Struts
Form</property>
- </emphasis> library, select <emphasis>
- <property
moreinfo="none">text</property>
- </emphasis>, and drag it onto the box
- <note>
- <title>Note:</title>
- <para>By default there are only four groups on the
JBoss Tools
- Palette. If you wish to make some group visible click
the <emphasis>
- <property
moreinfo="none">Show/Hide</property>
- </emphasis> button on the top of palette and in
the prompted
- dialog check the group (or groups) you want to be
shown.</para>
- </note>
- </para>
- </listitem>
- </itemizedlist>
- <figure float="0">
- <title>JBoss Tools Palette</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_application/struts_application_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>In the Insert Tag dialog box, type in name for
property and select <emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>In the StrutsForm library in the JBoss Tools Palette,
select <emphasis>
- <property
moreinfo="none">submit</property>
- </emphasis>, and drag it to right after the text box in
the Visual pane
- of the editor</para>
- </listitem>
- <listitem>
- <para>Right-click the <emphasis>
- <property
moreinfo="none">submit</property>
- </emphasis> button and select <emphasis
role="bold">
- <property
moreinfo="none"><html:submit></property>
- </emphasis> Attributes from the context
menu</para>
- </listitem>
- <listitem>
- <para>In the Attributes dialog box, select the
<emphasis>
- <property
moreinfo="none">value</property>
- </emphasis> field and type in "Say Hello!"
for its
- value</para>
- </listitem>
- </itemizedlist>
- <para>After tidying the page source, the Editor window for the file
should look
- something like this:</para>
- <figure float="0">
- <title>Editor Window</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_application/struts_application_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="greeting.jsp">
- <title>greeting.jsp</title>
- <para>Next, we will fill in the result page.</para>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property
moreinfo="none">greeting.jsp</property>
- </emphasis> tab in the Editing area to bring its editor
forward</para>
- </listitem>
- <listitem>
- <para>Type in the following code:</para>
- </listitem>
- </itemizedlist>
- <programlisting format="linespecific"
role="XML"><![CDATA[<html>
-<head>
- <title>Greeting</title>
-</head>
- <body>
- <p>
- </p>
- </body>
-</html>
-]]></programlisting>
-
- <para>To complete editing of this file, we will use macros from the
JBoss Tools
- Palette. This palette is a view that should be available to the right
of the
- editing area.</para>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property moreinfo="none">Struts
Common</property>
- </emphasis> folder in the JBoss Tools 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 JBoss Tools
- Palette</para>
- </listitem>
- </itemizedlist>
- <para>This will insert the following line at the top of the
file:</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[
-<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>Click on the <emphasis>
- <property moreinfo="none">Struts
Bean</property>
- </emphasis> folder in the JBoss Tools Palette to open
it</para>
- </listitem>
- <listitem>
- <para>Position the cursor inside the <emphasis
role="bold">
- <property
moreinfo="none"><p></property>
- </emphasis> element</para>
- </listitem>
- <listitem>
- <para>Click on write in the JBoss Tools
Palette</para>
- </listitem>
- <listitem>
- <para>Type in "GetNameForm" for the <emphasis
role="italic">
- <property
moreinfo="none">"name"</property>
- </emphasis> attribute and add a <emphasis
role="italic">
- <property
moreinfo="none">"property"</property>
- </emphasis> attribute with "greetName" as
its
- value</para>
- </listitem>
- </itemizedlist>
- <para>The editor should now look like this:</para>
- <figure float="0">
- <title>Editor Window</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_application/struts_application_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <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>
- <itemizedlist>
- <listitem>
- <para>In the Web Projects view, right-click on
<emphasis>
- <property moreinfo="none">StrutsHello
> WEB-ROOT(WebContent)</property>
- </emphasis> node and select <emphasis>
- <property moreinfo="none">New >
File > JSP..</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Type index for Name and click on the
<emphasis>
- <property
moreinfo="none">Finish</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>On the JBoss Tools Palette, select the
<emphasis>
- <property moreinfo="none">Struts
Common</property>
- </emphasis> folder of macros by clicking on it in the
palette</para>
- </listitem>
- <listitem>
- <para>Click on the logic taglib icon</para>
- </listitem>
- <listitem>
- <para>Press the <emphasis>
- <property
moreinfo="none">Enter</property>
- </emphasis> key in the editor to go to the next
line</para>
- </listitem>
- <listitem>
- <para>Back on the palette, select the <emphasis>
- <property moreinfo="none">Struts
Logic</property>
- </emphasis> 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>
- </itemizedlist>
- <para>The finished code for the page is shown below:</para>
- <programlisting format="linespecific"
role="JAVA"><![CDATA[<%@ taglib
uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
-<logic:redirect forward="getName"/>
-]]></programlisting>
- <itemizedlist>
- <listitem>
- <para>To save all the edits to files, select
<emphasis>
- <property
moreinfo="none">File>Save All</property>
- </emphasis> from the menu bar</para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
- </chapter>
-
-<chapter id="compiling_and_running"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/compiling_and_running.xml"
xreflabel="compiling_and_running">
- <?dbhtml filename="compiling_and_running.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Struts</keyword>
- <keyword>Struts Application</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Compiling the Classes and Running the Application</title>
-
- <para>As this is the Eclipse environment, no explicit compilation step is
required. By
- default, Eclipse compiles as you go.</para>
-
- <para>Thus at this point everything is ready for running our application
without having to leave JBoss
- Developer Studio by using the JBoss Application Server engine that comes with
the JBoss
- Developer Studio. For controlling JBoss AS within JBoss Developer Studio,
there is JBoss
- Server view.</para>
- <figure float="0">
- <title>JBoss Server Panel</title>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_application/struts_application_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Start up JBoss AS by clicking on the icon in JBoss Server
view. (If JBoss AS
- is already running, stop it by clicking on the red icon and then
start it again.
- Remember, the Struts run-time requires restarting the servlet engine
when any
- changes have been made.)</para>
- </listitem>
- <listitem>
- <para>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.</para>
- </listitem>
- </itemizedlist>
- <para>The browser should appear with the application started.</para>
- </chapter>
-
-<chapter id="struts_validation"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/struts_validation.xml"
xreflabel="struts_validation">
- <?dbhtml filename="struts_validation.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Struts</keyword>
- <keyword>Struts Validation</keyword>
- </keywordset>
- </chapterinfo>
-<title>Struts Validation Examples</title>
-
-<para><property moreinfo="none">Validation</property> of
input is an important part of any Web application. All Apache Jakarta frameworks,
-including Struts, can use a common Jakarta Validation Framework for streamlining this
aspect of Web
-application development. The Validation Framework allows you to define validation rules
and then apply these rules on the client-side or the server-side.</para>
-
- <para>JBoss Developer Studio makes using the <property
moreinfo="none">Validation Framework</property> in Struts even easier
with the help of a specialized editor for the XML files that controls validation in a
project. In this document, we'll show you how this all works by creating some simple
client-side validation and server-side validation examples.</para>
-
-<section id="StartingPoint">
-<?dbhtml filename="StartingPoint.html"?>
-<title>Starting Point</title>
-<para>The example assumes that you have already created our sample
"StrutsHello" application from the
-Getting Started Guide for Creating a Struts Application. You should have the JBoss
Developer Studio perspective
- open on this StrutsHello project.</para>
-</section>
-
-<section id="DefiningTheValidationRule">
-<?dbhtml filename="DefiningTheValidationRule.html"?>
-<title>Defining the Validation Rule</title>
-<para>In these steps you will set up the validation that can be used for either
client-side or
-server side validation. You need to enable validation as a part of the project, define an
error message, and tie it into an appropriate part of the application.</para>
-
-<itemizedlist>
-<listitem><para>Right-click on a "plug-ins" node under the
<emphasis><property moreinfo="none">StrutsHello >
Configuration > default >
struts-config.xml</property></emphasis> node in the Web Projects view and
select <emphasis><property moreinfo="none">Create Special Plugin
> Validators</property></emphasis> from the context
menu</para></listitem>
-<listitem><para>Further down in the Web Projects view, right-click on the
-<emphasis><property moreinfo="none">StrutsHello >
ResourceBundles</property></emphasis> node and select
<emphasis><property moreinfo="none"> New > Properties
File...</property></emphasis>from the context
menu</para></listitem>
-<listitem><para>In the dialog box, click on the <emphasis><property
moreinfo="none">Browse...</property></emphasis>button next to the
Folder field, expand the
- JavaSource folder in this next dialog box, select the sample subfolder, and click on
the <emphasis><property
moreinfo="none">OK</property></emphasis>
button</para></listitem>
- <listitem><para>Back in the first dialog box, type in
"applResources" for the Name field and click on the <emphasis><property
moreinfo="none">Finish</property></emphasis>
button</para></listitem>
-<listitem><para>Right-click on a newly created file and select
<emphasis><property moreinfo="none">Add > Default Error
Messages</property></emphasis>
- from the context menu</para></listitem>
-
-<listitem><para>Drag up the sample.applResources icon until you can drop it
on the resources folder under struts-config.xml</para></listitem>
-<listitem><para>Select<emphasis><property
moreinfo="none"> File > Save </property></emphasis>All
from the menu bar</para></listitem>
-<listitem><para>Select validation.xml under the <emphasis><property
moreinfo="none">StrutsHello >
Validation</property></emphasis> node and double-click it to open it with the
JBoss Tools XML Editor</para></listitem>
-<listitem><para>Here you must create a
Formset.</para></listitem>
-<listitem><para>In the validation.xml file editor click the button
<emphasis><property moreinfo="none">Create
Formset</property></emphasis> on the panel <emphasis><property
moreinfo="none">Formsets</property></emphasis></para></listitem>
-<listitem><para>In the dialog <emphasis><property
moreinfo="none">Add Formset</property></emphasis> fill the fields
<emphasis><property
moreinfo="none">Language</property></emphasis> and
<emphasis><property
moreinfo="none">Country</property></emphasis> or just leave them
empty to create a default formset. Click <emphasis><property
moreinfo="none">OK</property></emphasis></para></listitem>
-</itemizedlist>
-<figure float="0">
- <title>Create Formset</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_validation/struts_validation.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<itemizedlist>
-<listitem><para>Expand the "form-beans" node under the
<emphasis><property moreinfo="none">StrutsHello >
Configuration > default > struts-config.xml
node.</property></emphasis> Then, drag the form bean "GetNameForm"
and drop it onto a formset in the <property
moreinfo="none">XML</property> Editor</para></listitem>
-<listitem><para>In the Validation Editor, expand the formset node,
right-click GetNameForm, and select <emphasis><property
moreinfo="none">Create Field...</property></emphasis> from the
context menu</para></listitem>
-<listitem><para>Enter a name for Property in the dialog box. A new property
will be created:</para></listitem>
-</itemizedlist>
-<figure float="0">
- <title>New Property Is Added</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_validation/struts_validation_2.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<itemizedlist>
-<listitem><para>In the Properties view for the name field to the right of the
"tree" for the validation.xml file, click on the <emphasis><property
moreinfo="none">Change...</property></emphasis>button next to the
Depends entry field</para></listitem>
-<listitem><para>In the displayed double list, select
<emphasis><property
moreinfo="none">required</property></emphasis> from the left list
and then click <emphasis><property
moreinfo="none">Add</property></emphasis></para></listitem>
- <listitem><para>Click <emphasis><property
moreinfo="none">Ok</property></emphasis></para></listitem>
-<listitem><para>Right-click name and select <emphasis><property
moreinfo="none">Add Arg...</property></emphasis> from the context
menu</para></listitem>
-<listitem><para>In the Add Arg dialog box, click on the
<emphasis><property
moreinfo="none">Change...</property></emphasis>button next to the
<emphasis><property
moreinfo="none">Key</property></emphasis>
field</para></listitem>
- <listitem><para>In the Key dialog box that appears now, click on the
<emphasis><property
moreinfo="none">Add</property></emphasis>
button</para></listitem>
- <listitem><para>Enter "name.required" in the Name field, and
enter a person's name in the Value field</para></listitem>
- <listitem><para>Click <emphasis><property
moreinfo="none">Finish</property></emphasis>, then
<emphasis><property
moreinfo="none">Ok</property></emphasis>, and then
<emphasis><property
moreinfo="none">Ok</property></emphasis>
again</para></listitem>
-<listitem><para>Select <emphasis><property
moreinfo="none">File > Save All</property></emphasis> from
the menu bar</para></listitem>
-</itemizedlist>
-</section>
-
-<section id="Client-SideValidation">
-<?dbhtml filename="Client-SideValidation.html"?>
-<title>Client-Side Validation</title>
-<para>Client-side <property
moreinfo="none">validation</property> uses a scripting language (like
JavaScript) running in the client browser to actually do the <property
moreinfo="none">validation</property>. In a Struts application using
the <property moreinfo="none">Validation</property> Framework,
however, you don't actually have to do any of the script coding. The <property
moreinfo="none">Validation</property> 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>
-<itemizedlist>
-<listitem><para>Double-click inputname.jsp under <emphasis><property
moreinfo="none">StrutsHello > WEB-ROOT(WebContent) >
pages</property></emphasis> 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 JBoss Tools Palette view to the right, open the
Struts 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
<emphasis><property moreinfo="none">StrutsHello >
Configuration > default > struts-config.xml >
form-beans</property></emphasis> node, drag it, and drop it between the quotes
in the editor</para></listitem>
-<listitem><para>Modify the <emphasis role="bold"><property
moreinfo="none"><html:form></property></emphasis>
tag by inserting this attribute:</para></listitem>
-</itemizedlist>
-<programlisting format="linespecific"
role="XML"><![CDATA[onsubmit="return validateGetNameForm(this)"
-]]></programlisting>
-<para></para>
-<para>The file should now look like this:</para>
-<programlisting format="linespecific" role="XML"><![CDATA[
-<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
-<html:html>
-<head>
- <title>Input name</title>
- <html:javascript formName="GetNameForm"/>
-</head>
-<body>
- <html:form action="/greeting.do" onsubmit="return
- <para>validateGetNameForm(this)"></para>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><b>Input name:</b></td>
- </tr>
- <tr>
- <td>
- <html:text property="name" />
- <html:submit value=" Say Hello! " />
- </td>
- </tr>
- </table>
- </html:form>
-</body>
-</html:html>
-]]></programlisting>
-<itemizedlist>
-<listitem><para>Select<emphasis><property
moreinfo="none"> File > Save </property></emphasis>from
the menu bar</para></listitem>
-<listitem><para>Start JBoss Application Server by clicking on its icon (a
right-pointing arrow) in the toolbar</para></listitem>
-<listitem><para>Click the Run icon or right click your project folder and
select <emphasis><property moreinfo="none">Run As > Run on
Server</property></emphasis></para></listitem>
-</itemizedlist>
-<figure float="0">
- <title>Run Icon</title>
-<mediaobject>
- <imageobject>
- <imagedata
fileref="images/struts_validation/struts_validation_1.png"></imagedata>
- </imageobject>
-</mediaobject>
-</figure>
-<itemizedlist><listitem><para>In the browser window, click on the
"Say Hello!" button without having entered any name in the
form</para></listitem></itemizedlist>
-<para>A JavaScript error message should be displayed in an alert box.</para>
-</section>
-<section id="Server-SideValidation">
-<?dbhtml filename="Server-SideValidation.html"?>
-<title>Server Side Validation</title>
-<para>Server side validation does the validation inside the application on the
server. In a Struts application using the Validation Framework, you still don't have
to do any of the actual validation coding. The Validation Framework handles this. You will
though have to make a few changes to the JSP file you modified for client-side validation
along with a change to an action and a few changes to the form bean class.</para>
-</section>
-
-<section id="EditingTheJSPFile">
-<?dbhtml filename="EditingTheJSPFile.html"?>
-<title>Editing the JSP File</title>
-<itemizedlist>
-<listitem><para>Reopen inputname.jsp for
editing</para></listitem>
-<listitem><para>Delete the <emphasis
role="italic"><property
moreinfo="none">"onsubmit"</property></emphasis>
attribute in the <emphasis role="bold"><property
moreinfo="none"><html:form></property></emphasis>
element that you put in for client-side validation</para></listitem>
-
-<listitem><para>Add an <emphasis role="bold"><property
moreinfo="none"><html:errors></property></emphasis>
tag after the <emphasis role="bold"><property
moreinfo="none"><html:form></property></emphasis>
tag</para></listitem>
-</itemizedlist>
-<para>The JSP file should now look like this:</para>
-
-<programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib uri="/WEB-INF/struts-html.tld"
prefix="html" %>
-<html:html>
-<head>
- <title>Input name</title>
- <html:javascript formName="GetNameForm"/>
-</head>
-<body>
- <html:form action="/greeting.do">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><b>Input name:</b></td>
- </tr>
- <tr>
- <td>
- <html:text property="name" />
- <html:submit value=" Say Hello! " />
- </td>
- </tr>
- </table>
- </html:form>
- <html:errors />
-</body>
-</html:html>
-]]></programlisting>
-
-</section>
-
-<section id="EditingTheAction">
-<?dbhtml filename="EditingTheAction.html"?>
-<title>Editing the Action</title>
-<itemizedlist>
-<listitem><para>In the Web Projects view, expand the node under the
<emphasis><property moreinfo="none">StrutsHello >
Configuration > default > struts-config.xml >
action-mappings</property></emphasis> node, right-click the
<emphasis><property
moreinfo="none">/greeting</property></emphasis> action, and then
select <emphasis><property
moreinfo="none">Properties...</property></emphasis>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 <property
moreinfo="none">...</property> button</para></listitem>
-
- <listitem><para>In the dialog box, make sure the Pages tab is selected,
select <emphasis><property moreinfo="none">StrutsHello >
WEB-ROOT(WebContent) > pages >
inputname.jsp</property></emphasis>, click the <emphasis><property
moreinfo="none">Ok</property></emphasis> button, and then click
on the <emphasis><property
moreinfo="none">Close</property></emphasis>
button</para></listitem>
-</itemizedlist>
-</section>
-<section id="EditingTheFormBean">
-<?dbhtml filename="EditingTheFormBean.html"?>
-
-<title>Editing the Form Bean</title>
-<itemizedlist>
-<listitem><para>Right-click the <emphasis><property
moreinfo="none">/greeting</property></emphasis> 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 from:
<emphasis><property
moreinfo="none">org.apache.struts.action.ActionForm</property></emphasis>
to <emphasis><property
moreinfo="none">org.apache.struts.validator.ValidatorForm</property></emphasis></para></listitem>
-<listitem><para>Comment out a validate method</para></listitem>
-</itemizedlist>
-<para>The file should now look like this:</para>
-<programlisting format="linespecific"
role="JAVA"><![CDATA[package sample;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.struts.action.ActionErrors;
-import org.apache.struts.action.ActionMapping;
-public class GetNameForm extends
-
-org.apache.struts.validator.ValidatorForm
-{
-
- private String name = "";
-
- /**
- * @return Returns the name.
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * @param name The name to set.
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- public GetNameForm ()
- {
- }
-
- public void reset(ActionMapping actionMapping,
- HttpServletRequest request)
- {
- this.name = "";
- }
-
- // public ActionErrors validate(ActionMapping actionMapping,
- HttpServletRequest request)
- {
- // ActionErrors errors = new ActionErrors();
- // return errors;
- // }
- }
-]]></programlisting>
-
-<itemizedlist>
-<listitem><para>Select <emphasis><property
moreinfo="none">File > Save All </property></emphasis>from
the menu bar</para></listitem>
-<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>
-</itemizedlist>
-<para>The error message should appear in a refreshed version of the
form.</para>
-</section>
-
-</chapter>
-
-<chapter id="relevant_resources"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/relevant_resources.xml"
xreflabel="relevant_resources">
- <?dbhtml filename="relevant_resources.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Struts</keyword>
- <keyword>Struts Application</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Other Relevant Resources on the topic</title>
-
- <para>Our reference: <ulink
url="../../struts_tools_ref_guide/html_single/index.html">Struts Tools
Reference Guide</ulink></para>
- <para>Apache Struts: <ulink
url="http://struts.apache.org/">Struts Technology</ulink></para>
- <para>Struts 2: <ulink
url="http://struts.apache.org/2.x/">Apache Struts
2</ulink></para>
- <para>Get Started: <ulink
url="http://struts.apache.org/2.x/docs/home.html">Struts Getting
- Started</ulink></para>
- <para>Struts on IBM: <ulink
url="http://www.ibm.com/developerworks/library/j-struts/">St... -
- An open-source MVC implementation</ulink></para>
- <para>FAQ: <ulink
url="http://struts.apache.org/2.x/docs/faqs.html">Struts
FAQ</ulink></para>
- <para>Download: <ulink
url="http://struts.apache.org/download.cgi#struts206">Release of Apache
- Struts</ulink></para>
-
- <para>Thus, this tutorial should help you to execute the hole development
circle for building a
- sample Struts-based Web application using <property
moreinfo="none">JBoss Tools</property> bundle of Eclipse
- plugins starting from organizing a new Struts project and ending with the running
and
- deploying it onto the <property moreinfo="none">JBoss
Server</property>.</para>
-
- <para>To find out all the features of <property
moreinfo="none">JBoss Tools</property> for working with Struts
- refer to our <ulink
url="../../struts_tools_ref_guide/html_single/index.html">Struts Tools
Reference Guide</ulink>. If you
- still have questions you are always welcome on <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
- Tools Forum</ulink>.</para>
-</chapter>
-
-
-
-</book>
+]><book
xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>Struts Tools Tutorial</title>
+
+
<author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+
<author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2009</year>
+ <holder>JBoss, a division of Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 3.0.0.GA
+ </releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_too...
version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+<chapter id="introduction"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/introduction.xml"
xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Introduction</title>
+ <para>The following chapters describe how to deal with classic/old style of
Struts development. We
+ recommend users to use <ulink
url="../../seam/html_single/index.html">JBoss Seam</ulink> to
+ simplify development, but until then you can read about classical Struts usage
here.</para>
+
+ <para>We are going to show you how to create a simple <emphasis>
+ <property moreinfo="none">Struts application</property>
+ </emphasis> using the JBoss Tools. The completed application will ask a user to
enter
+ a name and click a button. The resulting new page will display the familiar message,
+ "Hello <name>!"</para>
+ <para>This document will show you how to create such an application from the
beginning, along the
+ way demonstrating some of the powerful features of JBoss Tools. With the help of our
tutorial you will design the
+ application, generate stub code for the application, fill in the stub coding, compile
the
+ application, and finally run it all from inside the Eclipse.</para>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find
<ulink
url="http://docs.jboss.org/tools/">here</ulink>.</p...
+ <para>The latest documentation builds are available <ulink
url="http://download.jboss.org/jbosstools/nightly-docs/">her...
+
+ </section>
+
+</chapter>
+
+
+<chapter id="struts_application"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml"
xreflabel="struts_application">
+ <?dbhtml filename="struts_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Struts</keyword>
+ <keyword>Struts Application</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating a Simple Struts Application</title>
+
+ <para>Firstly, we assume that you have already launched Eclipse with JBoss
Tools installed and
+ also that the <property moreinfo="none">Web Development
perspective</property> is the current perspective. (If not, make it
+ active by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective
> Other > Web
+ Development</property>
+ </emphasis> from the menu bar.)</para>
+
+ <section id="StartingUp">
+ <title>Starting Up</title>
+ <para>We are first going to create a new project for the
application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Go to the menu bar and select <emphasis>
+ <property moreinfo="none">File > New >
Project...</property>
+ </emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss Tools Web >
Struts > Struts Project</property>
+ </emphasis> in the New Project dialog box</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next </property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Enter "StrutsHello" as the project
name</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is, and click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> again</para>
+ </listitem>
+ <listitem>
+ <para>Make sure that <emphasis>
+ <property
moreinfo="none">struts-bean.tld</property>
+ </emphasis>, <emphasis>
+ <property
moreinfo="none">struts-html.tld</property>
+ </emphasis>, and <emphasis>
+ <property
moreinfo="none">struts-logic.tld</property>
+ </emphasis> are checked in the list of included tag libraries and
then click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>A "StrutsHello" node should appear in the upper-left
Package
+ Explorer view.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property
moreinfo="none">StrutsHello</property>
+ </emphasis> to reveal the child nodes</para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property
moreinfo="none">WebContent</property>
+ </emphasis> under StrutsHello</para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property moreinfo="none">WEB-INF</property>
+ </emphasis> under WebContent</para>
+ </listitem>
+ <listitem>
+ <para>Then, double-click on the <emphasis>
+ <property
moreinfo="none">struts-config.xml</property>
+ </emphasis> node to display a diagram of the Struts application
configuration
+ file in the editing area</para>
+ </listitem>
+ </itemizedlist>
+ <para>At this point, its empty except for the background grid
lines.</para>
+ </section>
+
+ <section id="CreatingtheApplicationComponents">
+ <?dbhtml filename="CreatingtheApplicationComponents.html"?>
+ <title>Creating the Application Components</title>
+ <para>Now, we will design the application by creating the individual
components as
+ placeholders first. (We dont have to complete all of the details inside the
components
+ until afterwards.)</para>
+ <section id="CreatingJSPPagePlaceholders">
+ <title>Creating JSP Page Placeholders</title>
+ <para>Next, let's create and place two JSP pages. We will not write
any code
+ for the files, but only create them as placeholders so that we can create
links to
+ them in the diagram. We will write the code a little bit
later.</para>
+ <section id="CreatingthePagePlaceholders">
+ <title>Creating the Page Placeholders</title>
+ <itemizedlist>
+ <listitem>
+ <para>Bring the Web Projects view to the front of the
Package Explorer view
+ by selecting the <emphasis>
+ <property moreinfo="none">Web
Projects</property>
+ </emphasis> tab next to that tab.</para>
+ </listitem>
+ <listitem>
+ <para>Right-click the <emphasis>
+ <property moreinfo="none">StrutsHello
> WEB-ROOT (WebContent)</property>
+ </emphasis> folder in the Web Projects view and select
<emphasis>
+ <property moreinfo="none">New >
Folder...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Enter <emphasis>
+ <property
moreinfo="none">pages</property>
+ </emphasis> for a folder name and click
<emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>We will keep our presentation files in this
folder</para>
+ </listitem>
+
+ <listitem>
+ <para>Right-click the pages folder and select
<emphasis>
+ <property moreinfo="none">New >
Fila > JSP...</property>
+ </emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>For Name type in <emphasis>
+ <property
moreinfo="none">inputname</property>
+ </emphasis> (the JSP extension will be automatically
added to the file),
+ for Template select <emphasis>
+ <property
moreinfo="none">StrutsForm</property>
+ </emphasis> and then click on the <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Right-click the pages folder again and select
<emphasis>
+ <property moreinfo="none">New >
File > JSP...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For Name type in <emphasis>
+ <property
moreinfo="none">greeting</property>
+ </emphasis>, for Template leave as Blank, and then
click on the <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ </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>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">struts-config.xml</property>
+ </emphasis> tab in the Editing area to bring the
diagram to the
+ front</para>
+ </listitem>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">inputname.jsp</property>
+ </emphasis> page in the Web Projects view, drag it onto
the diagram, and
+ drop it</para>
+ </listitem>
+ <listitem><para>Click on the <emphasis>
+ <property
moreinfo="none">greeting.jsp</property>
+ </emphasis> page in the Web Projects view, drag it onto the
diagram, and
+ drop it to the right of the <emphasis>
+ <property
moreinfo="none">/pages/inputname.jsp</property>
+ </emphasis> icon with some extra
space</para></listitem>
+ </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>
+ <itemizedlist>
+ <listitem>
+ <para>Right-click between the two icons and select
<emphasis>
+ <property moreinfo="none">Add >
Action</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Enter the following values:</para>
+ </listitem>
+ </itemizedlist>
+ <table>
+ <title>Action values</title>
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>path</entry>
+ <entry>/greeting</entry>
+ </row>
+ <row>
+ <entry>name</entry>
+ <entry>GetNameForm</entry>
+ </row>
+ <row>
+ <entry>scope</entry>
+ <entry>request</entry>
+ </row>
+ <row>
+ <entry>type</entry>
+ <entry>sample.GreetingAction</entry>
+ </row>
+ <row>
+ <entry>validate</entry>
+ <entry><leave blank></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>("GetNameForm" is the name for a form bean that we will
create
+ later.)</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The <emphasis>
+ <property moreinfo="none">/greeting</property>
+ </emphasis> action should appear in four places, in the diagram,
under the
+ action-mappings node, under the struts-config.xml node in Tree view, in
Web Projects
+ view and 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>
+ </section>
+ <section id="CreatingaLink">
+ <title>Creating a Link</title>
+ <para>Let's now create a link from the inputname.jsp page to the
action.</para>
+ <itemizedlist>
+ <listitem>
+ <para>On the left-hand side of the diagram in the column of
icons, click on this
+ icon:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create New Connection Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_application/struts_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the connect-the-components mode you are in now, click
on the <emphasis>
+ <property
moreinfo="none">/pages/inputname.jsp</property>
+ </emphasis> icon in the diagram and then click on the
<emphasis>
+ <property
moreinfo="none">/greeting</property>
+ </emphasis> action</para>
+ </listitem>
+ </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>
+ <itemizedlist>
+ <listitem>
+ <para>On the left-hand side of the diagram in the column of
icons, click on this
+ icon, again:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create New Connection Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_application/struts_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">/greeting</property>
+ </emphasis> action icon in the diagram and then click on
the <emphasis>
+ <property
moreinfo="none">pages/greeting.jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ <listitem>
+ <para>That's 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 name. If you
don't
+ like it, you can easily change it</para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property
moreinfo="none">Tree</property>
+ </emphasis> tab at the bottom of the editor window (between
Diagram and
+ Source)</para>
+ </listitem>
+ <listitem>
+ <para>Expand the <emphasis>
+ <property
moreinfo="none">struts-config.xml/action-mappings//greeting</property>
+ </emphasis> 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 <emphasis>
+ <property
moreinfo="none">Diagram</property>
+ </emphasis> tab at the bottom of the editor window and see
how the diagram
+ is also updated to reflect the change</para>
+ </listitem>
+ </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>
+ <itemizedlist>
+ <listitem>
+ <para>Somewhere in the top-left corner of diagram, right-click
and select <emphasis>
+ <property moreinfo="none"> Add >
Global Forward...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Enter <emphasis>
+ <property
moreinfo="none">getName</property>
+ </emphasis> in the Name field</para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property
moreinfo="none">Change...</property>
+ </emphasis>button for Path</para>
+ </listitem>
+ <listitem>
+ <para>In the Edit Path window, switch to the <emphasis>
+ <property
moreinfo="none">Pages</property>
+ </emphasis> tab</para>
+ </listitem>
+ <listitem>
+ <para>Expand the <emphasis>
+ <property moreinfo="none">StrutsHello
> WEB-ROOT (WebContent) > pages</property>
+ </emphasis> node and then select the inputname.jsp
page</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Ok</property>
+ </emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>Leave the rest of the fields blank and click
<emphasis>
+ <property
moreinfo="none">OK</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>A forward object now appears on the diagram and also in the
global-forwards folder
+ in the Outline view.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Tidy up the diagram, by clicking and dragging around each
icon, so that
+ the diagram looks something like this:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Diagram View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_application/struts_application_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <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>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to the Tree viewer in the editor for the
struts-config.xml file, by
+ selecting the <emphasis>
+ <property
moreinfo="none">Tree</property>
+ </emphasis> tab at the bottom of the editor
window</para>
+ </listitem>
+ <listitem>
+ <para>Right-click <emphasis>
+ <property moreinfo="none">struts-config.xml
> form-beans</property>
+ </emphasis> and select Create Form Bean</para>
+ </listitem>
+ <listitem>
+ <para>Enter <emphasis>
+ <property
moreinfo="none">GetNameForm</property>
+ </emphasis> in the name field and <emphasis>
+ <property
moreinfo="none">sample.GetNameForm</property>
+ </emphasis> for type</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>To save your changes to struts-config.xml, select
<emphasis>
+ <property moreinfo="none">File >
Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ <para>Note the disappearance of the asterisk next to the name,
struts-config.xml.</para>
+ </section>
+ </section>
+</chapter>
+
+<chapter id="generating_stub"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/generating_stub.xml"
xreflabel="generating_stub">
+ <?dbhtml filename="generating_stub.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Struts</keyword>
+ <keyword>Struts Application</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Generating Stub Coding</title>
+ <para>We are done with designing the application through the diagram. Now
we need to write
+ code for the action component. We also need to write an action class for the
<emphasis>
+ <property moreinfo="none">/greeting</property>
+ </emphasis> mapping along with a FormBean. To aid in the coding phase,
JBoss Developer
+ Studio can generate Java class stubs for all of the components shown in the
diagram.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch back to the diagram, by selecting the
<emphasis>
+ <property moreinfo="none">Diagram</property>
+ </emphasis> tab at the bottom of the editor window</para>
+ </listitem>
+ <listitem>
+ <para>Right-click a blank space in the diagram and select
<emphasis>
+ <property moreinfo="none">Generate Java
Code</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Leave everything as is in the dialog box and click
<emphasis>
+ <property moreinfo="none">Generate</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>You should see a screen that says:</para>
+ <para>Generated classes: 2</para>
+ <para>Actions: 1</para>
+ <para>Form beans: 1</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>The Java files will be generated in a <emphasis>
+ <property moreinfo="none">JavaSource >
sample</property>
+ </emphasis> 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>
+ </chapter>
+
+<chapter id="coding_files"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/coding_files.xml"
xreflabel="coding_files">
+ <?dbhtml filename="coding_files.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Struts</keyword>
+ <keyword>Struts Application</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Coding the Various Files</title>
+ <para>We will now code both the Java stub classes just generated, the JSP
files left in as
+ placeholders from previous steps, and a new start JSP page we will have to
create.</para>
+ <section id="JavaStubClasses">
+ <title>Java Stub Classes</title>
+ <itemizedlist>
+ <listitem>
+ <para>To finish the two Java classes, switch to the
<emphasis>
+ <property moreinfo="none">Package
Explorer</property>
+ </emphasis> view and expand the <emphasis>
+ <property moreinfo="none">JavaSource >
sample</property>
+ </emphasis> folder</para>
+ </listitem>
+ </itemizedlist>
+ <section id="GetNameForm.java">
+ <title>GetNameForm.java</title>
+ <itemizedlist>
+ <listitem>
+ <para>Double-click <emphasis>
+ <property
moreinfo="none">GetNameForm.java</property>
+ </emphasis> for editing</para>
+ </listitem>
+
+ <listitem>
+ <para>You are looking at a Java stub class that was
generated by JBoss
+ 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>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[private String name = "";
+ private String greetName = "";
+]]></programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para>Inside the reset method, delete the TO DO and throw
lines and
+ add:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[this.name = "";
+ this.greetName = "";
+]]></programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para>Inside the validate method, delete the TO DO and
throw lines and
+ add:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[ActionErrors errors = new ActionErrors();
+ return errors;
+]]></programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para>Right-click and select <emphasis>
+ <property moreinfo="none">Source >
Generate Getters and Setters...</property>
+ </emphasis>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
<emphasis>
+ <property
moreinfo="none">OK</property>
+ </emphasis> button</para>
+ </listitem>
+ </itemizedlist>
+ <para>The final GetNameForm.java file should look like
this:</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[package sample;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionMapping;
+
+public class GetNameForm extends org.apache.struts.action.ActionForm
+{
+
+ private String name = "";
+ private String greetName = "";
+
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getGreetName()
+ {
+ return greetName;
+ }
+
+ public void setGreetName(String greetName)
+ {
+ this.greetName = greetName;
+ }
+
+ public GetNameForm()
+ {
+ }
+
+ public void reset(ActionMapping actionMapping, HttpServletRequest request)
+ {
+ this.name = "";
+ this.greetName = "";
+ }
+
+ public ActionErrors validate(ActionMapping actionMapping,
+ HttpServletRequest request)
+ {
+ ActionErrors errors = new ActionErrors();
+ return errors;
+ }
+}
+]]></programlisting>
+
+ <itemizedlist>
+ <listitem>
+ <para>Save the file</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="GreetingAction.java">
+ <title>GreetingAction.java</title>
+ <itemizedlist>
+ <listitem>
+ <para>Open GreetingAction.java for editing</para>
+ </listitem>
+ <listitem>
+ <para>Inside the execute method, delete the TO DO lines and
add the
+ following:</para>
+ </listitem>
+ </itemizedlist>
+
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[String name = ((GetNameForm)form).getName();
+String greeting = "Hello, "+name+"!";
+((GetNameForm)form).setName(greeting);
+return mapping.findForward(FORWARD_sayHello);
+]]></programlisting>
+
+ <para>The final version of GreetingAction.java should look like
this:</para>
+
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[package sample;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+public class GreetingAction extends org.apache.struts.action.Action
+{
+
+ // Global Forwards
+ public static final String GLOBAL_FORWARD_getName = "getName";
+
+ // Local Forwards
+ public static final String FORWARD_sayHello = "sayHello";
+
+ public GreetingAction()
+ {
+ }
+ public ActionForward execute(ActionMapping mapping, ActionForm form,
+ HttpServletRequest request, HttpServletResponse response) throws Exception
+ {
+ String name = ((GetNameForm)form).getName();
+ String greeting = "Hello, "+name+"!";
+ ((GetNameForm)form).setName(greeting);
+ return mapping.findForward(FORWARD_sayHello);
+ }
+}
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Save the file</para>
+ </listitem>
+ <listitem>
+ <para>Close the editors for the two Java
files</para>
+ </listitem>
+ </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>
+ <section id="JSPPages">
+ <title>JSP Pages</title>
+ <section id="inputname.jsp">
+ <title>inputname.jsp</title>
+ <para>In this page, the user will enter any name and click the
<emphasis>
+ <property
moreinfo="none">submit</property>
+ </emphasis> button. Then, the greeting action will be called
through the form.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">inputname.jsp</property>
+ </emphasis> tab in the Editing area to bring its editor
forward</para>
+ </listitem>
+ <listitem>
+ <para>In the Web Projects view, expand <emphasis>
+ <property moreinfo="none">StrutsHello
> Configuration > default
+ > struts-config.xml >
action-mappings</property>
+ </emphasis> and select <emphasis>
+ <property
moreinfo="none">/greeting</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Drag it and drop it between the quotes for the
<emphasis role="italic">
+ <property
moreinfo="none">"action"</property>
+ </emphasis> attribute to the <emphasis
role="bold">
+ <property
moreinfo="none"><html:form></property>
+ </emphasis> element in the Source pane of the
editor</para>
+ </listitem>
+ <listitem>
+ <para>Then type this text on a new line just below this
line:</para>
+ <programlisting format="linespecific"
role="XML"><![CDATA[Input name:
+ ]]></programlisting>
+ </listitem>
+
+ <listitem>
+ <para>Select the <emphasis>
+ <property
moreinfo="none">Visual</property>
+ </emphasis> pane of the editor</para>
+ </listitem>
+ <listitem>
+ <para>Then, in the JBoss Tools Palette, expand the
<emphasis>
+ <property moreinfo="none">Struts
Form</property>
+ </emphasis> library, select <emphasis>
+ <property
moreinfo="none">text</property>
+ </emphasis>, and drag it onto the box
+ <note>
+ <title>Note:</title>
+ <para>By default there are only four groups on the
JBoss Tools
+ Palette. If you wish to make some group visible click
the <emphasis>
+ <property
moreinfo="none">Show/Hide</property>
+ </emphasis> button on the top of palette and in
the prompted
+ dialog check the group (or groups) you want to be
shown.</para>
+ </note>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>JBoss Tools Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_application/struts_application_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the Insert Tag dialog box, type in name for
property and select <emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In the StrutsForm library in the JBoss Tools Palette,
select <emphasis>
+ <property
moreinfo="none">submit</property>
+ </emphasis>, and drag it to right after the text box in
the Visual pane
+ of the editor</para>
+ </listitem>
+ <listitem>
+ <para>Right-click the <emphasis>
+ <property
moreinfo="none">submit</property>
+ </emphasis> button and select <emphasis
role="bold">
+ <property
moreinfo="none"><html:submit></property>
+ </emphasis> Attributes from the context
menu</para>
+ </listitem>
+ <listitem>
+ <para>In the Attributes dialog box, select the
<emphasis>
+ <property
moreinfo="none">value</property>
+ </emphasis> field and type in "Say Hello!"
for its
+ value</para>
+ </listitem>
+ </itemizedlist>
+ <para>After tidying the page source, the Editor window for the file
should look
+ something like this:</para>
+ <figure float="0">
+ <title>Editor Window</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_application/struts_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="greeting.jsp">
+ <title>greeting.jsp</title>
+ <para>Next, we will fill in the result page.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property
moreinfo="none">greeting.jsp</property>
+ </emphasis> tab in the Editing area to bring its editor
forward</para>
+ </listitem>
+ <listitem>
+ <para>Type in the following code:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"
role="XML"><![CDATA[<html>
+<head>
+ <title>Greeting</title>
+</head>
+ <body>
+ <p>
+ </p>
+ </body>
+</html>
+]]></programlisting>
+
+ <para>To complete editing of this file, we will use macros from the
JBoss Tools
+ Palette. This palette is a view that should be available to the right
of the
+ editing area.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Struts
Common</property>
+ </emphasis> folder in the JBoss Tools 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 JBoss Tools
+ Palette</para>
+ </listitem>
+ </itemizedlist>
+ <para>This will insert the following line at the top of the
file:</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[
+<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Struts
Bean</property>
+ </emphasis> folder in the JBoss Tools Palette to open
it</para>
+ </listitem>
+ <listitem>
+ <para>Position the cursor inside the <emphasis
role="bold">
+ <property
moreinfo="none"><p></property>
+ </emphasis> element</para>
+ </listitem>
+ <listitem>
+ <para>Click on write in the JBoss Tools
Palette</para>
+ </listitem>
+ <listitem>
+ <para>Type in "GetNameForm" for the <emphasis
role="italic">
+ <property
moreinfo="none">"name"</property>
+ </emphasis> attribute and add a <emphasis
role="italic">
+ <property
moreinfo="none">"property"</property>
+ </emphasis> attribute with "greetName" as
its
+ value</para>
+ </listitem>
+ </itemizedlist>
+ <para>The editor should now look like this:</para>
+ <figure float="0">
+ <title>Editor Window</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_application/struts_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <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>
+ <itemizedlist>
+ <listitem>
+ <para>In the Web Projects view, right-click on
<emphasis>
+ <property moreinfo="none">StrutsHello
> WEB-ROOT(WebContent)</property>
+ </emphasis> node and select <emphasis>
+ <property moreinfo="none">New >
File > JSP..</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type index for Name and click on the
<emphasis>
+ <property
moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>On the JBoss Tools Palette, select the
<emphasis>
+ <property moreinfo="none">Struts
Common</property>
+ </emphasis> folder of macros by clicking on it in the
palette</para>
+ </listitem>
+ <listitem>
+ <para>Click on the logic taglib icon</para>
+ </listitem>
+ <listitem>
+ <para>Press the <emphasis>
+ <property
moreinfo="none">Enter</property>
+ </emphasis> key in the editor to go to the next
line</para>
+ </listitem>
+ <listitem>
+ <para>Back on the palette, select the <emphasis>
+ <property moreinfo="none">Struts
Logic</property>
+ </emphasis> 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>
+ </itemizedlist>
+ <para>The finished code for the page is shown below:</para>
+ <programlisting format="linespecific"
role="JAVA"><![CDATA[<%@ taglib
uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
+<logic:redirect forward="getName"/>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>To save all the edits to files, select
<emphasis>
+ <property
moreinfo="none">File>Save All</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+ </chapter>
+
+<chapter id="compiling_and_running"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/compiling_and_running.xml"
xreflabel="compiling_and_running">
+ <?dbhtml filename="compiling_and_running.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Struts</keyword>
+ <keyword>Struts Application</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Compiling the Classes and Running the Application</title>
+
+ <para>As this is the Eclipse environment, no explicit compilation step is
required. By
+ default, Eclipse compiles as you go.</para>
+
+ <para>Thus at this point everything is ready for running our application
without having to leave JBoss
+ Developer Studio by using the JBoss Application Server engine that comes with
the JBoss
+ Developer Studio. For controlling JBoss AS within JBoss Developer Studio,
there is JBoss
+ Server view.</para>
+ <figure float="0">
+ <title>JBoss Server Panel</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_application/struts_application_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Start up JBoss AS by clicking on the icon in JBoss Server
view. (If JBoss AS
+ is already running, stop it by clicking on the red icon and then
start it again.
+ Remember, the Struts run-time requires restarting the servlet engine
when any
+ changes have been made.)</para>
+ </listitem>
+ <listitem>
+ <para>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.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The browser should appear with the application started.</para>
+ </chapter>
+
+<chapter id="struts_validation"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/struts_validation.xml"
xreflabel="struts_validation">
+ <?dbhtml filename="struts_validation.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Struts</keyword>
+ <keyword>Struts Validation</keyword>
+ </keywordset>
+ </chapterinfo>
+<title>Struts Validation Examples</title>
+
+<para><property moreinfo="none">Validation</property> of
input is an important part of any Web application. All Apache Jakarta frameworks,
+including Struts, can use a common Jakarta Validation Framework for streamlining this
aspect of Web
+application development. The Validation Framework allows you to define validation rules
and then apply these rules on the client-side or the server-side.</para>
+
+ <para>JBoss Developer Studio makes using the <property
moreinfo="none">Validation Framework</property> in Struts even easier
with the help of a specialized editor for the XML files that controls validation in a
project. In this document, we'll show you how this all works by creating some simple
client-side validation and server-side validation examples.</para>
+
+<section id="StartingPoint">
+<?dbhtml filename="StartingPoint.html"?>
+<title>Starting Point</title>
+<para>The example assumes that you have already created our sample
"StrutsHello" application from the
+Getting Started Guide for Creating a Struts Application. You should have the JBoss
Developer Studio perspective
+ open on this StrutsHello project.</para>
+</section>
+
+<section id="DefiningTheValidationRule">
+<?dbhtml filename="DefiningTheValidationRule.html"?>
+<title>Defining the Validation Rule</title>
+<para>In these steps you will set up the validation that can be used for either
client-side or
+server side validation. You need to enable validation as a part of the project, define an
error message, and tie it into an appropriate part of the application.</para>
+
+<itemizedlist>
+<listitem><para>Right-click on a "plug-ins" node under the
<emphasis><property moreinfo="none">StrutsHello >
Configuration > default >
struts-config.xml</property></emphasis> node in the Web Projects view and
select <emphasis><property moreinfo="none">Create Special Plugin
> Validators</property></emphasis> from the context
menu</para></listitem>
+<listitem><para>Further down in the Web Projects view, right-click on the
+<emphasis><property moreinfo="none">StrutsHello >
ResourceBundles</property></emphasis> node and select
<emphasis><property moreinfo="none"> New > Properties
File...</property></emphasis>from the context
menu</para></listitem>
+<listitem><para>In the dialog box, click on the <emphasis><property
moreinfo="none">Browse...</property></emphasis>button next to the
Folder field, expand the
+ JavaSource folder in this next dialog box, select the sample subfolder, and click on
the <emphasis><property
moreinfo="none">OK</property></emphasis>
button</para></listitem>
+ <listitem><para>Back in the first dialog box, type in
"applResources" for the Name field and click on the <emphasis><property
moreinfo="none">Finish</property></emphasis>
button</para></listitem>
+<listitem><para>Right-click on a newly created file and select
<emphasis><property moreinfo="none">Add > Default Error
Messages</property></emphasis>
+ from the context menu</para></listitem>
+
+<listitem><para>Drag up the sample.applResources icon until you can drop it
on the resources folder under struts-config.xml</para></listitem>
+<listitem><para>Select<emphasis><property
moreinfo="none"> File > Save </property></emphasis>All
from the menu bar</para></listitem>
+<listitem><para>Select validation.xml under the <emphasis><property
moreinfo="none">StrutsHello >
Validation</property></emphasis> node and double-click it to open it with the
JBoss Tools XML Editor</para></listitem>
+<listitem><para>Here you must create a
Formset.</para></listitem>
+<listitem><para>In the validation.xml file editor click the button
<emphasis><property moreinfo="none">Create
Formset</property></emphasis> on the panel <emphasis><property
moreinfo="none">Formsets</property></emphasis></para></listitem>
+<listitem><para>In the dialog <emphasis><property
moreinfo="none">Add Formset</property></emphasis> fill the fields
<emphasis><property
moreinfo="none">Language</property></emphasis> and
<emphasis><property
moreinfo="none">Country</property></emphasis> or just leave them
empty to create a default formset. Click <emphasis><property
moreinfo="none">OK</property></emphasis></para></listitem>
+</itemizedlist>
+<figure float="0">
+ <title>Create Formset</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_validation/struts_validation.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<itemizedlist>
+<listitem><para>Expand the "form-beans" node under the
<emphasis><property moreinfo="none">StrutsHello >
Configuration > default > struts-config.xml
node.</property></emphasis> Then, drag the form bean "GetNameForm"
and drop it onto a formset in the <property
moreinfo="none">XML</property> Editor</para></listitem>
+<listitem><para>In the Validation Editor, expand the formset node,
right-click GetNameForm, and select <emphasis><property
moreinfo="none">Create Field...</property></emphasis> from the
context menu</para></listitem>
+<listitem><para>Enter a name for Property in the dialog box. A new property
will be created:</para></listitem>
+</itemizedlist>
+<figure float="0">
+ <title>New Property Is Added</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_validation/struts_validation_2.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<itemizedlist>
+<listitem><para>In the Properties view for the name field to the right of the
"tree" for the validation.xml file, click on the <emphasis><property
moreinfo="none">Change...</property></emphasis>button next to the
Depends entry field</para></listitem>
+<listitem><para>In the displayed double list, select
<emphasis><property
moreinfo="none">required</property></emphasis> from the left list
and then click <emphasis><property
moreinfo="none">Add</property></emphasis></para></listitem>
+ <listitem><para>Click <emphasis><property
moreinfo="none">Ok</property></emphasis></para></listitem>
+<listitem><para>Right-click name and select <emphasis><property
moreinfo="none">Add Arg...</property></emphasis> from the context
menu</para></listitem>
+<listitem><para>In the Add Arg dialog box, click on the
<emphasis><property
moreinfo="none">Change...</property></emphasis>button next to the
<emphasis><property
moreinfo="none">Key</property></emphasis>
field</para></listitem>
+ <listitem><para>In the Key dialog box that appears now, click on the
<emphasis><property
moreinfo="none">Add</property></emphasis>
button</para></listitem>
+ <listitem><para>Enter "name.required" in the Name field, and
enter a person's name in the Value field</para></listitem>
+ <listitem><para>Click <emphasis><property
moreinfo="none">Finish</property></emphasis>, then
<emphasis><property
moreinfo="none">Ok</property></emphasis>, and then
<emphasis><property
moreinfo="none">Ok</property></emphasis>
again</para></listitem>
+<listitem><para>Select <emphasis><property
moreinfo="none">File > Save All</property></emphasis> from
the menu bar</para></listitem>
+</itemizedlist>
+</section>
+
+<section id="Client-SideValidation">
+<?dbhtml filename="Client-SideValidation.html"?>
+<title>Client-Side Validation</title>
+<para>Client-side <property
moreinfo="none">validation</property> uses a scripting language (like
JavaScript) running in the client browser to actually do the <property
moreinfo="none">validation</property>. In a Struts application using
the <property moreinfo="none">Validation</property> Framework,
however, you don't actually have to do any of the script coding. The <property
moreinfo="none">Validation</property> 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>
+<itemizedlist>
+<listitem><para>Double-click inputname.jsp under <emphasis><property
moreinfo="none">StrutsHello > WEB-ROOT(WebContent) >
pages</property></emphasis> 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 JBoss Tools Palette view to the right, open the
Struts 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
<emphasis><property moreinfo="none">StrutsHello >
Configuration > default > struts-config.xml >
form-beans</property></emphasis> node, drag it, and drop it between the quotes
in the editor</para></listitem>
+<listitem><para>Modify the <emphasis role="bold"><property
moreinfo="none"><html:form></property></emphasis>
tag by inserting this attribute:</para></listitem>
+</itemizedlist>
+<programlisting format="linespecific"
role="XML"><![CDATA[onsubmit="return validateGetNameForm(this)"
+]]></programlisting>
+<para></para>
+<para>The file should now look like this:</para>
+<programlisting format="linespecific" role="XML"><![CDATA[
+<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
+<html:html>
+<head>
+ <title>Input name</title>
+ <html:javascript formName="GetNameForm"/>
+</head>
+<body>
+ <html:form action="/greeting.do" onsubmit="return
+ <para>validateGetNameForm(this)"></para>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>Input name:</b></td>
+ </tr>
+ <tr>
+ <td>
+ <html:text property="name" />
+ <html:submit value=" Say Hello! " />
+ </td>
+ </tr>
+ </table>
+ </html:form>
+</body>
+</html:html>
+]]></programlisting>
+<itemizedlist>
+<listitem><para>Select<emphasis><property
moreinfo="none"> File > Save </property></emphasis>from
the menu bar</para></listitem>
+<listitem><para>Start JBoss Application Server by clicking on its icon (a
right-pointing arrow) in the toolbar</para></listitem>
+<listitem><para>Click the Run icon or right click your project folder and
select <emphasis><property moreinfo="none">Run As > Run on
Server</property></emphasis></para></listitem>
+</itemizedlist>
+<figure float="0">
+ <title>Run Icon</title>
+<mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/struts_validation/struts_validation_1.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<itemizedlist><listitem><para>In the browser window, click on the
"Say Hello!" button without having entered any name in the
form</para></listitem></itemizedlist>
+<para>A JavaScript error message should be displayed in an alert box.</para>
+</section>
+<section id="Server-SideValidation">
+<?dbhtml filename="Server-SideValidation.html"?>
+<title>Server Side Validation</title>
+<para>Server side validation does the validation inside the application on the
server. In a Struts application using the Validation Framework, you still don't have
to do any of the actual validation coding. The Validation Framework handles this. You will
though have to make a few changes to the JSP file you modified for client-side validation
along with a change to an action and a few changes to the form bean class.</para>
+</section>
+
+<section id="EditingTheJSPFile">
+<?dbhtml filename="EditingTheJSPFile.html"?>
+<title>Editing the JSP File</title>
+<itemizedlist>
+<listitem><para>Reopen inputname.jsp for
editing</para></listitem>
+<listitem><para>Delete the <emphasis
role="italic"><property
moreinfo="none">"onsubmit"</property></emphasis>
attribute in the <emphasis role="bold"><property
moreinfo="none"><html:form></property></emphasis>
element that you put in for client-side validation</para></listitem>
+
+<listitem><para>Add an <emphasis role="bold"><property
moreinfo="none"><html:errors></property></emphasis>
tag after the <emphasis role="bold"><property
moreinfo="none"><html:form></property></emphasis>
tag</para></listitem>
+</itemizedlist>
+<para>The JSP file should now look like this:</para>
+
+<programlisting format="linespecific"
role="XML"><![CDATA[<%@ taglib uri="/WEB-INF/struts-html.tld"
prefix="html" %>
+<html:html>
+<head>
+ <title>Input name</title>
+ <html:javascript formName="GetNameForm"/>
+</head>
+<body>
+ <html:form action="/greeting.do">
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>Input name:</b></td>
+ </tr>
+ <tr>
+ <td>
+ <html:text property="name" />
+ <html:submit value=" Say Hello! " />
+ </td>
+ </tr>
+ </table>
+ </html:form>
+ <html:errors />
+</body>
+</html:html>
+]]></programlisting>
+
+</section>
+
+<section id="EditingTheAction">
+<?dbhtml filename="EditingTheAction.html"?>
+<title>Editing the Action</title>
+<itemizedlist>
+<listitem><para>In the Web Projects view, expand the node under the
<emphasis><property moreinfo="none">StrutsHello >
Configuration > default > struts-config.xml >
action-mappings</property></emphasis> node, right-click the
<emphasis><property
moreinfo="none">/greeting</property></emphasis> action, and then
select <emphasis><property
moreinfo="none">Properties...</property></emphasis>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 <property
moreinfo="none">...</property> button</para></listitem>
+
+ <listitem><para>In the dialog box, make sure the Pages tab is selected,
select <emphasis><property moreinfo="none">StrutsHello >
WEB-ROOT(WebContent) > pages >
inputname.jsp</property></emphasis>, click the <emphasis><property
moreinfo="none">Ok</property></emphasis> button, and then click
on the <emphasis><property
moreinfo="none">Close</property></emphasis>
button</para></listitem>
+</itemizedlist>
+</section>
+<section id="EditingTheFormBean">
+<?dbhtml filename="EditingTheFormBean.html"?>
+
+<title>Editing the Form Bean</title>
+<itemizedlist>
+<listitem><para>Right-click the <emphasis><property
moreinfo="none">/greeting</property></emphasis> 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 from:
<emphasis><property
moreinfo="none">org.apache.struts.action.ActionForm</property></emphasis>
to <emphasis><property
moreinfo="none">org.apache.struts.validator.ValidatorForm</property></emphasis></para></listitem>
+<listitem><para>Comment out a validate method</para></listitem>
+</itemizedlist>
+<para>The file should now look like this:</para>
+<programlisting format="linespecific"
role="JAVA"><![CDATA[package sample;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionMapping;
+public class GetNameForm extends
+
+org.apache.struts.validator.ValidatorForm
+{
+
+ private String name = "";
+
+ /**
+ * @return Returns the name.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public GetNameForm ()
+ {
+ }
+
+ public void reset(ActionMapping actionMapping,
+ HttpServletRequest request)
+ {
+ this.name = "";
+ }
+
+ // public ActionErrors validate(ActionMapping actionMapping,
+ HttpServletRequest request)
+ {
+ // ActionErrors errors = new ActionErrors();
+ // return errors;
+ // }
+ }
+]]></programlisting>
+
+<itemizedlist>
+<listitem><para>Select <emphasis><property
moreinfo="none">File > Save All </property></emphasis>from
the menu bar</para></listitem>
+<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>
+</itemizedlist>
+<para>The error message should appear in a refreshed version of the
form.</para>
+</section>
+
+</chapter>
+
+<chapter id="relevant_resources"
xml:base="file:///home/ochikvina/WORK/for_compare/trunk/struts/docs/struts_tools_tutorial/en/modules/relevant_resources.xml"
xreflabel="relevant_resources">
+ <?dbhtml filename="relevant_resources.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Struts</keyword>
+ <keyword>Struts Application</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Other Relevant Resources on the topic</title>
+
+ <para>Our reference: <ulink
url="../../struts_tools_ref_guide/html_single/index.html">Struts Tools
Reference Guide</ulink></para>
+ <para>Apache Struts: <ulink
url="http://struts.apache.org/">Struts Technology</ulink></para>
+ <para>Struts 2: <ulink
url="http://struts.apache.org/2.x/">Apache Struts
2</ulink></para>
+ <para>Get Started: <ulink
url="http://struts.apache.org/2.x/docs/home.html">Struts Getting
+ Started</ulink></para>
+ <para>Struts on IBM: <ulink
url="http://www.ibm.com/developerworks/library/j-struts/">St... -
+ An open-source MVC implementation</ulink></para>
+ <para>FAQ: <ulink
url="http://struts.apache.org/2.x/docs/faqs.html">Struts
FAQ</ulink></para>
+ <para>Download: <ulink
url="http://struts.apache.org/download.cgi#struts206">Release of Apache
+ Struts</ulink></para>
+
+ <para>Thus, this tutorial should help you to execute the hole development
circle for building a
+ sample Struts-based Web application using <property
moreinfo="none">JBoss Tools</property> bundle of Eclipse
+ plugins starting from organizing a new Struts project and ending with the running
and
+ deploying it onto the <property moreinfo="none">JBoss
Server</property>.</para>
+
+ <para>To find out all the features of <property
moreinfo="none">JBoss Tools</property> for working with Struts
+ refer to our <ulink
url="../../struts_tools_ref_guide/html_single/index.html">Struts Tools
Reference Guide</ulink>. If you
+ still have questions you are always welcome on <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&...
+ Tools Forum</ulink>.</para>
+</chapter>
+
+
+
+</book>