Author: ochikvina
Date: 2009-03-05 11:40:57 -0500 (Thu, 05 Mar 2009)
New Revision: 14035
Added:
trunk/jsf/docs/jsf_tools_ref_guide/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-640 - adding master-output.xml;
Added: trunk/jsf/docs/jsf_tools_ref_guide/en/master_output.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/master_output.xml (rev
0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/master_output.xml 2009-03-05 16:40:57 UTC (rev
14035)
@@ -0,0 +1,1987 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[
+<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY jsf_support SYSTEM "modules/jsf_support.xml">
+<!ENTITY projects SYSTEM "modules/projects.xml">
+<!ENTITY jsf_config_file SYSTEM "modules/jsf_config_file.xml">
+<!ENTITY managed_beans SYSTEM "modules/managed_beans.xml">
+<!ENTITY creation_and_registration SYSTEM
"modules/creation_and_registration.xml">
+<!ENTITY jsf_project_verification SYSTEM
"modules/jsf_project_verification.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink
"../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink
"../../struts_tools_ref_guide/html_single/index.html">
+<!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>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>