JBoss Tools SVN: r19343 - branches/jbosstools-3.1.0.RC1/ws/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:20:58 -0500 (Wed, 16 Dec 2009)
New Revision: 19343
Modified:
branches/jbosstools-3.1.0.RC1/ws/docs/reference/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating master_output.xml;
Modified: branches/jbosstools-3.1.0.RC1/ws/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/ws/docs/reference/en/master_output.xml 2009-12-16 15:20:35 UTC (rev 19342)
+++ branches/jbosstools-3.1.0.RC1/ws/docs/reference/en/master_output.xml 2009-12-16 15:20:58 UTC (rev 19343)
@@ -7,683 +7,698 @@
<!ENTITY preference SYSTEM "modules/preference.xml">
<!ENTITY webproject SYSTEM "modules/webproject.xml">
<!ENTITY client SYSTEM "modules/client.xml">
-]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
-
- <bookinfo>
- <title>JBoss WS User Guide</title>
-
- <corpauthor diffmk:change="added">
- <inlinemediaobject diffmk:change="added">
- <imageobject diffmk:change="added" role="fo">
- <imagedata diffmk:change="added" fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
- </imageobject>
- <imageobject diffmk:change="added" role="html">
- <imagedata diffmk:change="added"></imagedata>
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
- <author><firstname>Denny</firstname><surname>Xu</surname><email>dxu(a)redhat.com</email></author>
- <author><firstname>Grid</firstname><surname>Qian</surname><email>fqian(a)redhat.com</email></author>
- <pubdate>July 2008</pubdate>
- <copyright>
- <year>2008</year>
- <year>2009</year>
- <holder><diffmk:wrapper diffmk:change="changed">JBoss by Red Hat</diffmk:wrapper></holder>
- </copyright>
- <releaseinfo><diffmk:wrapper diffmk:change="changed">
- Version: 1.1.0.M2
- </diffmk:wrapper></releaseinfo>
-<abstract>
- <title></title>
- <para>
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/ws_ref_guide/pdf/WS_...">PDF version</ulink>
- </para>
-</abstract>
-
-
- </bookinfo>
-
- <toc></toc>
-
-<chapter id="overview" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/ws/docs/reference/en/modules/overview.xml">
- <title>JBossWS Runtime Overview</title>
-
- <para>JBossWS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5).</para>
- <para>JBossWS integrates with most current JBoss Application Server releases as well as earlier ones, that did implement the J2EE 1.4 specifications. Even though JAX-RPC, the web service specification for J2EE 1.4, is still supported JBossWS does put a clear focus on JAX-WS.</para>
-
-<section diffmk:change="added">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Features of JBossWS</diffmk:wrapper></title>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">For a start, we propose you to look through the table of main features of JBossWS Runtime:</diffmk:wrapper></para>
-
- <table diffmk:change="added">
-
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Functionality for JBossWS</diffmk:wrapper></title>
- <tgroup cols="2" diffmk:change="added">
-
- <colspec align="left" colnum="1" colwidth="2*" diffmk:change="added"></colspec>
- <colspec colnum="2" colwidth="4*" diffmk:change="added"></colspec>
-
-
- <thead diffmk:change="added">
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Feature</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Benefit</diffmk:wrapper></entry>
-
- </row>
- </thead>
-
- <tbody diffmk:change="added">
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JAX-RPC and JAX-WS support</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBossWS implements both the JAX-WS and JAX-RPC specifications.</diffmk:wrapper></para></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">EJB 2.1, EJB3 and JSE endpoints</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBossWS supports EJB 2.1, EJB3 and JSE as Web Service Endpoints.</diffmk:wrapper></para></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">WS-Security 1.0 for XML Encryption/Signature of the SOAP message</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">WS-Security standardizes authorization, encryption, and digital signature processing of web services.</diffmk:wrapper></para></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss AS</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss Application Server 5 (JavaEE 5 compliant) web service stack.</diffmk:wrapper></para></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Support for MTOM/XOP and SwA-Ref</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Message Transmission Optimization Mechanism (MTOM) and XML-binary Optimized Packaging (XOP) more efficiently serialize XML Infosets that have certain types of content.</diffmk:wrapper></para></entry>
-
- </row>
-
- </tbody>
-
- </tgroup>
- </table>
-
-
-</section>
-
-
-
-</chapter>
-
-<chapter id="create_ws_topdown" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/ws/docs/reference/en/modules/topdown.xml">
- <?dbhtml filename="topdown.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Web Service</keyword>
- <keyword>JBossWS Web Service runtime</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Creating a Web Service using JBossWS runtime</title>
- <para>In this chapter we provide you with the necessary steps to create a Web Service using
- JBossWS runtime. First you need to create a Dynamic Web project:</para>
-
- <section id="createproject">
- <title>Creating a Dynamic Web project</title>
-
- <para>Before creating a web service, you should have a Dynamic Web Project created:</para>
- <figure float="0">
- <title>Dynamic Web Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_webproject_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Create a Web project by selecting <emphasis>
- <property moreinfo="none">New > Project... > Dynamic Web project</property></emphasis>. Enter the following information: </para>
- <itemizedlist>
- <listitem>
- <para>Project Name: enter a project name</para>
- </listitem>
- <listitem>
- <para><diffmk:wrapper diffmk:change="added">Target runtime: any server depending on your installation. If it is not listed,
- click </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> button and browse to the location where it is installed to. You may set </diffmk:wrapper><emphasis>
- <property moreinfo="none">Target Runtime</property>
- </emphasis> to <emphasis>
- <property moreinfo="none">None</property></emphasis>, in this case, you should add <link linkend="addfacet">JBoss Web Service
- facet to the project</link>.</para>
- <figure float="0">
- <title>Dynamic Web Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_webproject_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para><diffmk:wrapper diffmk:change="added">Configuration: You may add </diffmk:wrapper><link diffmk:change="added" linkend="addfacet"><diffmk:wrapper diffmk:change="added">JBoss Web Service
- facet to the project</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> by clicking </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Modify...</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> button. The opened page is like </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Figure 2.4</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
- </listitem>
- <listitem diffmk:change="added">
- <para diffmk:change="added">Configure Web Module values:</para>
- <figure float="0">
- <title>Web Module Settings Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_webproject_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <para><diffmk:wrapper diffmk:change="added">If you added the JBoss Web Service facet to the project, now the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Finish</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> button is disable. You must click </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Next</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> button to set more information about the JBoss Web Service facet. The page is like </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="added">Figure 2.5</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. Then click on the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Finish</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> button.</diffmk:wrapper></para>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If you didn't add the JBoss Web Service facet to the project, click on the </diffmk:wrapper><property diffmk:change="added" moreinfo="none">Finish</property><diffmk:wrapper diffmk:change="changed"> button. Next you will need to add JBoss Web Service facet to the project.</diffmk:wrapper></para>
- </section>
-
- <section id="addfacet">
- <title>Configure JBoss Web Service facet settings</title>
- <para><diffmk:wrapper diffmk:change="changed">If you have already created a new Dynamic Web project and not set the JBoss Web Service facet to the project, the next step is to add JBoss Web
- Service facet to the project. Right-click on the project, select its </diffmk:wrapper><emphasis><property moreinfo="none">Properties</property></emphasis> and then find <emphasis>Project Facets</emphasis><diffmk:wrapper diffmk:change="added"> in the tree-view on the left-side of the project properties dialog.
- Tick on the check box for JBoss Web Services. You will see what like this: </diffmk:wrapper></para>
- <figure diffmk:change="added" float="0" id="figure_addfacet_0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Choose JBoss Web Service Facet</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/topdown/jbossws_facet_0.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">At the bottom-left of the right-side of the project properties dialog, there is a error link: </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Further configuration required...</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> . You must click the link to set more information about JBoss Web Service facet.</diffmk:wrapper></para>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click on the </diffmk:wrapper><emphasis><property moreinfo="none">Further configuration required...</property></emphasis> link. In the opened window</para>
- <figure float="0" id="figure_addfacet">
- <title>Configure JBoss Web Service Facet</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_facet.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Server Supplied JBossWS Runtime: If you have already set a JBoss runtime to the
- project's target runtime, you may choose <emphasis>
- <property moreinfo="none">Server Supplied JBossWS Runtime</property>
- </emphasis> and then click <emphasis>
- <property moreinfo="none">Ok</property>
- </emphasis> to finish the configuration of JBoss Web Service facet. </para>
- <para>If the project has no <emphasis>
- <property moreinfo="none">Target Runtime</property>
- </emphasis> settings, you should check the second radio button and specify a JBossWS
- runtime from the list. You also can create a new JBossWS runtime, click on the <emphasis>
- <property moreinfo="none">New...</property>
- </emphasis> button will bring you to another dialog to configure new JBossWS runtime.</para>
- <figure float="0" id="figure_addfacet1">
- <title>Configure JBossWS Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_newruntime.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>See how to configure a new JBossWS runtime <link linkend="preference">here</link>.</para>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">After setting the information about JBoss Web Service facet, for saving the result, you should click the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Apply</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> or </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">OK</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> button at the bottom-right of the right-side of the project properties dialog.</diffmk:wrapper></para>
- </section>
-
-
- <section id="topdownwebservice">
- <title>Creating a Web Service from a WSDL document using JBossWS runtime</title>
- <para>In this chapter we provide you with the necessary steps to create a Web Service from a
- WSDL document using JBossWS runtime.</para>
- <para>At first, please make sure that you have already created a dynamic Web project with
- JBoss Web Service facet installed. </para>
- <para>See how to make it <link linkend="createproject">here</link> and <link linkend="addfacet">here</link>.</para>
-
- <para>To create a Web Service using JBossWS runtime select<emphasis>
- <property moreinfo="none">File > New > Other > Web Services > Web Service</property>
- </emphasis> to run Web Service creation wizard. </para>
- <para>Let's get through the wizard step-by-step:</para>
- <figure float="0" id="figure_create_ws_topdown">
- <title>New Web Service Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_ws_creation1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>First, please select <property moreinfo="none">Top down Java bean Web Service</property> from the Web
- Service type list, and select a WSDL document from workspace, click on the Server name
- link on the page will bring you to another dialog. Here you can specify the server to a
- JBoss Server and Web Service runtime to JBossWS runtime:</para>
- <figure float="0" id="figure_create_ws_topdown_setserver">
- <title>Select Server and Web Service runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_ws_creation1_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click on the <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button to see the next wizard view opened:</para>
-
- <figure float="0" id="figure_create_ws_topdown1">
- <title>New Web Service Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_ws_creation1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click on the <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> button to proceed:</para>
- <figure float="0" id="figure_create_ws_topdown_codegen">
- <title>New Web Service Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_ws_creation2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>On this page, the default package name comes from the namespace of the WSDL document,
- you also can change it to any valid package name you want. JAX-WS specification should be
- set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime. You can
- specify a catalog file and binding files if you have them. If you want the wizard to
- generate empty implementation classes for the Web Service, check the <emphasis>
- <property moreinfo="none">Generate default Web Service implementation classes</property>
- </emphasis> check box. If you want to update the default Web.xml file with the Web Service
- servlets configured, check the <emphasis>
- <property moreinfo="none">Update the default Web.xml</property>
- </emphasis> check box. Click on the <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> or on the <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button to generate code.</para>
-
- <para>Once the Web Service code is generated, you can view the implementation class and add
- business logic to each method.</para>
- <figure float="0" id="figure_impl_code">
- <title>The generated implementation Java code</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_ws_Impl_code_view.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>View the Web.xml file:</para>
- <figure float="0" id="figure_webxml">
- <title>Web.xml</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_ws_webxml.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-<para>In the next chapter you will find out how to create a Web service from a Java bean.</para>
- </section>
-
- <section id="bottomupws" role="updated">
- <title>Creating a Web service from a Java bean using JBossWS runtime</title>
- <para>The Web Service wizard assists you in creating a new Web service, configuring it for
- deployment, and then deploying it to the server.</para>
- <para>To create a Web service from a bean using JBoss WS:</para>
- <para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
- <para>Create <link linkend="createproject">a Dynamic Web project</link>.</para>
- <para>Add <link linkend="addfacet">JBossWS Facet</link> to Web project.</para>
- <para>Create a Web Service from a java bean: </para>
- <itemizedlist>
- <listitem>
- <para>Switch to the Java EE perspective <emphasis>
- <property moreinfo="none">Window > Open Perspective > Java EE</property></emphasis>.</para>
- </listitem>
- <listitem>
- <para>In the Project Explorer view, select the bean that you created or imported into
- the source folder of your Web project.</para>
- <figure float="0">
- <title>Select the Bean Created</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_bottomup.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">File > New > Other</property></emphasis>. Select Web Services in order to display various Web service wizards.
- Select the Web Service wizard. Click on the <property moreinfo="none">Next</property> button.</para>
- <figure float="0">
- <title>New Web Service</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_bottomup_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>On the first Web Service wizard page: select <property moreinfo="none">Bottom up Java bean Web
- service</property> as your Web service type, and select the Java bean from which
- the service will be created:</para>
- <figure float="0">
- <title>Set Web Service Common values</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_bottomup_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Select the stages of Web service development that you want to complete using
- the slider: </para>
- <itemizedlist>
- <listitem>
- <para>Develop: this will develop the WSDL definition and implementation of
- the Web service. This includes such tasks as creating modules that will
- contain generated code, WSDL files, deployment descriptors, and Java
- files when appropriate.</para>
- </listitem>
- <listitem>
- <para>Assemble: this ensures the project that will host the Web service or
- client gets associated to an EAR when required by the target application
- server.</para>
- </listitem>
- <listitem>
- <para>Deploy: this will create the deployment code for the service.</para>
- </listitem>
- <listitem>
- <para>Install: this will install and configure the Web module and EARs on
- the target server.</para>
- </listitem>
- <listitem>
- <para>Start: this will start the server once the service has been installed
- on it. The server-config.wsdd file will be generated.</para>
- </listitem>
- <listitem>
- <para>Test: this will provide various options for testing the service, such
- as using the Web Service Explorer or sample JSPs.</para>
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- <para>Select your server: the default server is displayed. If you want to deploy
- your service to a different server click the link to specify a different server.
- </para>
- </listitem>
- <listitem>
- <para>Select your runtime: ensure the JBoss WS runtime is selected.</para>
- </listitem>
- <listitem>
- <para>Select the service project: the project selected in your workspace is
- displayed. To select a different project click on the project link. If you are
- deploying to JBoss Application Server you will also be asked to select the EAR
- associated with the project. Ensure that the project selected as the Client Web
- Project is different from the Service Web Project, or the service will be
- overwritten by the client's generated artifacts.</para>
- </listitem>
- <listitem>
- <para>If you want to create a client, select the type of proxy to be generated
- and repeat the above steps for the client. The better way is to create a web
- service client project separately.</para>
- </listitem>
- </itemizedlist>
- <para>Click on the <property moreinfo="none">Next</property> button.</para>
- </listitem>
- <listitem>
- <para>On the JBoss Web Service Code Generation Configuration page, set the following
- values:</para>
- <figure float="0">
- <title>Set Web Service values for Code Generation</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_bottomup_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Generate WSDL file: select it, you will get a generated WSDL file in your
- project. But this wsdl's services' address location values are not a real
- address. </para>
- </listitem>
- <listitem>
- <para>After the Web service has been created, the following option can become
- available depending on the options you selected: Update the default web.xm
- file. If selected, you may test the web service by Explorer.</para>
- </listitem>
- </itemizedlist>
- <para>Click on the <property moreinfo="none">Next</property> button.</para>
- </listitem>
- <listitem>
- <para>On this page, the project is deployed to the server. You can start the server and
- test the web service. If you want to publish the web service to a UDDI registry, you
- may click the <property moreinfo="none">Next</property> button to publish it. If not, you may click
- the <property moreinfo="none">Finish</property> button.</para>
- <figure float="0">
- <title>Start a Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_bottomup_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <para>After the Web Service has been created, the following options may become available
- depending on the options selected:</para>
- <itemizedlist>
- <listitem>
- <para>the generated web services code</para>
- </listitem>
- <listitem>
- <para>If you selected to generate a WSDL file, you will get the file in your project's wsdl folder.</para>
- <figure float="0">
- <title>The Generated HelloWorldService.wsdl File in the wsdl Folder</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_bottomup_6.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>If you selected to update the default web.xml, you will test the web service in
- the browser. Open the Explorer, input the url for the web service according to
- web.xml plus <property moreinfo="none">?wsdl.</property>, you will get the WSDL file from Explorer. </para>
- <figure float="0">
- <title>The Updated web.xml file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/topdown/jbossws_bottomup_5.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <para>In the next chapter you will be able to create a Web Service Client from a WSDL document using JBoss WS.</para>
-
- </section>
-
-</chapter>
-
-
-<chapter id="client" revisionflag="added" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/ws/docs/reference/en/modules/client.xml">
- <title>Creating a Web Service Client from a WSDL Document using JBoss WS</title>
- <para>To create a Web Service Client from a WSDL Document using JBoss WS you need to fulfil the following steps:</para>
- <para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
- <para><link linkend="createproject">Create a Dynamic Web project</link>.</para>
- <para><link linkend="addfacet">Add JBossWS Facet to Web project</link>.</para>
- <para>Then you can create a Web Service Client from a WSDL document: </para>
- <itemizedlist>
- <listitem>
- <para>Switch to the Java EE perspective <emphasis><property moreinfo="none">Window > Open Perspective > Java EE</property></emphasis>.</para>
- </listitem>
- <listitem>
- <para>Click <emphasis><property moreinfo="none">File > New > Other</property></emphasis>. Select Web Services in order to display the various Web service wizards. Select the Web Service Client wizard. Click on the <property moreinfo="none">Next</property> button.</para>
- <figure float="0">
- <title>New Web Service Client</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/client/jbossws_client.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>The first and the second Web Service Client wizard pages are the same as for <link linkend="topdownwebservice">Web Service from a WSDL document</link>.</para>
- <figure float="0">
- <title>Set Web Service Common values</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/client/jbossws_client_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <figure float="0">
- <title>Set Web Service values related to WSDL file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/client/jbossws_client_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The only difference is:</para>
- <itemizedlist>
- <listitem>
- <para><property moreinfo="none">Client Type:</property> Support of Java Proxy only.</para>
- </listitem>
- </itemizedlist>
- <para>Click on the <property moreinfo="none">Finish</property> button.</para>
- </listitem>
- </itemizedlist>
- <para>After the Web Service Client has been created, the following may occur depending on the options you selected:</para>
- <itemizedlist>
- <listitem>
- <para> the generated web service and client codes</para>
- </listitem>
- <listitem>
- <para>a client sample class.</para>
- <figure float="0">
- <title>Client Sample Class</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/client/jbossws_client_3.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <para>JBoss WS use a Java class to test Web Service. A client sample class will be generated, you may run this client as a java application to call a web service.</para>
-</chapter>
-
-
-<chapter id="preference" revisionflag="added" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/ws/docs/reference/en/modules/preference.xml">
- <title>JBoss WS and development environment</title>
-
- <para>In this chapter you will learn how to change JBossWS preferences and how to set default server and runtime.</para>
- <section id="jbosswspreference">
-
-
- <title>JBossWS Preferences</title>
-
- <para>In this section you will know how JBossWS preferences can be modified during the
- development process.</para>
-
- <para>JBossWS preferences can be set on the JBossWS preference page. Click on
- <emphasis><property moreinfo="none">Window > Preferences > JBoss Tools > Web > JBossWS
- Preferences</property>.</emphasis></para>
-
- <para>On this page you can manage the JBossWS 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>JBossWS Preferences Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/preference/Jbossws_preference.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Clicking on <emphasis>
- <property moreinfo="none">Add</property>
- </emphasis> or <emphasis>
- <property moreinfo="none">Edit</property>
- </emphasis> button will open the form where you can configure a new JBossWS runtime and
- change the path to JBossWS runtime home folder, modify the name and version of the
- existing JBossWS runtime settings. Press <property moreinfo="none">Finish</property> to apply the
- changes.</para>
-
- <figure float="0">
- <title>Edit JBossWS Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/preference/Jbossws_preference_new.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
-
- <para>WS container allows Source and JavaDoc locations to be set via the Properties dialog on each contained .jar: right-click on any .jar file in the Project Explorer view, select <emphasis><property moreinfo="none">Properties</property></emphasis>. Choose <emphasis><property moreinfo="none">Java Source Attachment</property></emphasis> and select location (folder, JAR or zip) containing new source for the chosen .jar using one of the suggested options (workspace, external folder or file) or enter the path manually:</para>
-
- <figure float="0">
- <title>Classpath Container: Java Source Attachment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/preference/jbossws_container1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click on <emphasis><property moreinfo="none">Apply</property></emphasis> and then on <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
- <para>To change JavaDoc Location choose <emphasis><property moreinfo="none">Javadoc Location</property></emphasis> and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called <emphasis><property moreinfo="none">package-list</property></emphasis>:</para>
-
- <figure float="0">
- <title>Classpath Container: Javadoc Location</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/preference/jbossws_container2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click on <emphasis><property moreinfo="none">Apply</property></emphasis> and then on <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
-
-
-
-
-
-
- </section>
- <section id="serverruntime">
- <title>Default Server and Runtime</title>
- <para>Open <emphasis>
- <property moreinfo="none">Window > Preferences > Web Services > Server and Runtime</property></emphasis>. On this page, you can specify a default server and runtime.</para>
- <para>For ease of use, the better way is to set runtime to JBoss WS.</para>
- <para>After server and runtime are specified, click on the <property moreinfo="none">Apply</property> button
- to save the values.</para>
- <figure float="0">
- <title></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/preference/jbossws_server_runtime.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the whole, this guide covers the fundamental concepts of work with tooling for
- <property moreinfo="none">JBossWS</property>. It describes how to easily create a Web Service and a Web Service Client using
- JBossWS Runtime and adjust JBossWS and development environment as well.</para>
-
- <para>If the information on JBossWS tools in this guide isn't enough for you, ask
- questions on our <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">forum</ulink>. Your comments and suggestions are also welcome.</para>
- </section>
-</chapter>
-
-</book>
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JBoss WS User Guide</title>
+
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author><firstname>Denny</firstname><surname>Xu</surname><email>dxu(a)redhat.com</email></author>
+ <author><firstname>Grid</firstname><surname>Qian</surname><email>fqian(a)redhat.com</email></author>
+ <pubdate>July 2008</pubdate>
+ <copyright>
+ <year>2008</year>
+ <year>2009</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 1.1.0.CR1
+ </diffmk:wrapper></releaseinfo>
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/ws_ref_guide/pdf/WS_...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="overview" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/ws/docs/reference/en/modules/overview.xml">
+ <title>JBossWS Runtime Overview</title>
+
+ <para>JBossWS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5).</para>
+ <para>JBossWS integrates with most current JBoss Application Server releases as well as earlier ones, that did implement the J2EE 1.4 specifications. Even though JAX-RPC, the web service specification for J2EE 1.4, is still supported JBossWS does put a clear focus on JAX-WS.</para>
+
+<section>
+ <title>Key Features of JBossWS</title>
+ <para>For a start, we propose you to look through the table of main features of JBossWS Runtime:</para>
+
+ <table>
+
+ <title>Key Functionality for JBossWS</title>
+ <tgroup cols="2">
+
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry><para>JAX-RPC and JAX-WS support</para></entry>
+ <entry><para>JBossWS implements both the JAX-WS and JAX-RPC specifications.</para></entry>
+
+ </row>
+
+ <row>
+ <entry><para>EJB 2.1, EJB3 and JSE endpoints</para></entry>
+ <entry><para>JBossWS supports EJB 2.1, EJB3 and JSE as Web Service Endpoints.</para></entry>
+
+ </row>
+
+ <row>
+ <entry><para>WS-Security 1.0 for XML Encryption/Signature of the SOAP message</para></entry>
+ <entry><para>WS-Security standardizes authorization, encryption, and digital signature processing of web services.</para></entry>
+
+ </row>
+
+ <row>
+ <entry><para>JBoss AS</para></entry>
+ <entry><para>JBoss Application Server 5 (JavaEE 5 compliant) web service stack.</para></entry>
+
+ </row>
+
+ <row>
+ <entry><para>Support for MTOM/XOP and SwA-Ref</para></entry>
+ <entry><para>Message Transmission Optimization Mechanism (MTOM) and XML-binary Optimized Packaging (XOP) more efficiently serialize XML Infosets that have certain types of content.</para></entry>
+
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+
+</section>
+<section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>You can find some extra information on:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/community/wiki/JBossWS-FAQ#Tools">JBossWS Tools Wiki FAQ.</ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+
+ </section>
+
+
+
+
+</chapter>
+
+<chapter id="create_ws_topdown" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/ws/docs/reference/en/modules/topdown.xml">
+ <?dbhtml filename="topdown.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Web Service</keyword>
+ <keyword>JBossWS Web Service runtime</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating a Web Service using JBossWS runtime</title>
+ <para>In this chapter we provide you with the necessary steps to create a Web Service using
+ JBossWS runtime. First you need to create a Dynamic Web project:</para>
+
+ <section id="createproject">
+ <title>Creating a Dynamic Web project</title>
+
+ <para>Before creating a web service, you should have a Dynamic Web Project created:</para>
+ <figure float="0">
+ <title>Dynamic Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_webproject_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Create a Web project by selecting <emphasis>
+ <property moreinfo="none">New > Project... > Dynamic Web project</property></emphasis>. Enter the following information: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Project Name: enter a project name</para>
+ </listitem>
+ <listitem>
+ <para>Target runtime: any server depending on your installation. If it is not listed,
+ click <property moreinfo="none">New</property> button and browse to the location where it is installed to. You may set <emphasis>
+ <property moreinfo="none">Target Runtime</property>
+ </emphasis> to <emphasis>
+ <property moreinfo="none">None</property></emphasis>, in this case, you should add <link linkend="addfacet">JBoss Web Service
+ facet to the project</link>.</para>
+ <figure float="0">
+ <title>Dynamic Web Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_webproject_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Configuration: You may add <link linkend="addfacet">JBoss Web Service
+ facet to the project</link> by clicking <property moreinfo="none">Modify...</property> button. The opened page is like <property moreinfo="none">Figure 2.4</property>.</para>
+ </listitem>
+ <listitem>
+ <para>Configure Web Module values:</para>
+ <figure float="0">
+ <title>Web Module Settings Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_webproject_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>If you added the JBoss Web Service facet to the project, now the <property moreinfo="none">Finish</property> button is disable. You must click <property moreinfo="none">Next</property> button to set more information about the JBoss Web Service facet. The page is like <property moreinfo="none">Figure 2.5</property>. Then click on the <property moreinfo="none">Finish</property> button.</para>
+ <para>If you didn't add the JBoss Web Service facet to the project, click on the <property moreinfo="none">Finish</property> button. Next you will need to add JBoss Web Service facet to the project.</para>
+ </section>
+
+ <section id="addfacet">
+ <title>Configure JBoss Web Service facet settings</title>
+ <para>If you have already created a new Dynamic Web project and not set the JBoss Web Service facet to the project, the next step is to add JBoss Web
+ Service facet to the project. Right-click on the project, select its <emphasis><property moreinfo="none">Properties</property></emphasis> and then find <emphasis>Project Facets</emphasis> in the tree-view on the left-side of the project properties dialog.
+ Tick on the check box for JBoss Web Services. You will see what like this: </para>
+ <figure float="0" id="figure_addfacet_0">
+ <title>Choose JBoss Web Service Facet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_facet_0.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>At the bottom-left of the right-side of the project properties dialog, there is a error link: <emphasis><property moreinfo="none">Further configuration required...</property></emphasis> . You must click the link to set more information about JBoss Web Service facet.</para>
+ <para>Click on the <emphasis><property moreinfo="none">Further configuration required...</property></emphasis> link. In the opened window</para>
+ <figure float="0" id="figure_addfacet">
+ <title>Configure JBoss Web Service Facet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_facet.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Server Supplied JBossWS Runtime: If you have already set a JBoss runtime to the
+ project's target runtime, you may choose <emphasis>
+ <property moreinfo="none">Server Supplied JBossWS Runtime</property>
+ </emphasis> and then click <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> to finish the configuration of JBoss Web Service facet. </para>
+ <para>If the project has no <emphasis>
+ <property moreinfo="none">Target Runtime</property>
+ </emphasis> settings, you should check the second radio button and specify a JBossWS
+ runtime from the list. You also can create a new JBossWS runtime, click on the <emphasis>
+ <property moreinfo="none">New...</property>
+ </emphasis> button will bring you to another dialog to configure new JBossWS runtime.</para>
+ <figure float="0" id="figure_addfacet1">
+ <title>Configure JBossWS Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_newruntime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>See how to configure a new JBossWS runtime <link linkend="preference">here</link>.</para>
+ <para>After setting the information about JBoss Web Service facet, for saving the result, you should click the <property moreinfo="none">Apply</property> or <property moreinfo="none">OK</property> button at the bottom-right of the right-side of the project properties dialog.</para>
+ </section>
+
+
+ <section id="topdownwebservice">
+ <title>Creating a Web Service from a WSDL document using JBossWS runtime</title>
+ <para>In this chapter we provide you with the necessary steps to create a Web Service from a
+ WSDL document using JBossWS runtime.</para>
+ <para>At first, please make sure that you have already created a dynamic Web project with
+ JBoss Web Service facet installed. </para>
+ <para>See how to make it <link linkend="createproject">here</link> and <link linkend="addfacet">here</link>.</para>
+
+ <para>To create a Web Service using JBossWS runtime select<emphasis>
+ <property moreinfo="none">File > New > Other > Web Services > Web Service</property>
+ </emphasis> to run Web Service creation wizard. </para>
+ <para>Let's get through the wizard step-by-step:</para>
+ <figure float="0" id="figure_create_ws_topdown">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_ws_creation1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>First, please select <property moreinfo="none">Top down Java bean Web Service</property> from the Web
+ Service type list, and select a WSDL document from workspace, click on the Server name
+ link on the page will bring you to another dialog. Here you can specify the server to a
+ JBoss Server and Web Service runtime to JBossWS runtime:</para>
+ <figure float="0" id="figure_create_ws_topdown_setserver">
+ <title>Select Server and Web Service runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_ws_creation1_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to see the next wizard view opened:</para>
+
+ <figure float="0" id="figure_create_ws_topdown1">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_ws_creation1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button to proceed:</para>
+ <figure float="0" id="figure_create_ws_topdown_codegen">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_ws_creation2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On this page, the default package name comes from the namespace of the WSDL document,
+ you also can change it to any valid package name you want. JAX-WS specification should be
+ set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime. You can
+ specify a catalog file and binding files if you have them. If you want the wizard to
+ generate empty implementation classes for the Web Service, check the <emphasis>
+ <property moreinfo="none">Generate default Web Service implementation classes</property>
+ </emphasis> check box. If you want to update the default Web.xml file with the Web Service
+ servlets configured, check the <emphasis>
+ <property moreinfo="none">Update the default Web.xml</property>
+ </emphasis> check box. Click on the <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> or on the <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to generate code.</para>
+
+ <para>Once the Web Service code is generated, you can view the implementation class and add
+ business logic to each method.</para>
+ <figure float="0" id="figure_impl_code">
+ <title>The generated implementation Java code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_ws_Impl_code_view.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>View the Web.xml file:</para>
+ <figure float="0" id="figure_webxml">
+ <title>Web.xml</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_ws_webxml.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+<para>In the next chapter you will find out how to create a Web service from a Java bean.</para>
+ </section>
+
+ <section id="bottomupws">
+ <title>Creating a Web service from a Java bean using JBossWS runtime</title>
+ <para>The Web Service wizard assists you in creating a new Web service, configuring it for
+ deployment, and then deploying it to the server.</para>
+ <para>To create a Web service from a bean using JBoss WS:</para>
+ <para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
+ <para>Create <link linkend="createproject">a Dynamic Web project</link>.</para>
+ <para>Add <link linkend="addfacet">JBossWS Facet</link> to Web project.</para>
+ <para>Create a Web Service from a java bean: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to the Java EE perspective <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Java EE</property></emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>In the Project Explorer view, select the bean that you created or imported into
+ the source folder of your Web project.</para>
+ <figure float="0">
+ <title>Select the Bean Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_bottomup.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">File > New > Other</property></emphasis>. Select Web Services in order to display various Web service wizards.
+ Select the Web Service wizard. Click on the <property moreinfo="none">Next</property> button.</para>
+ <figure float="0">
+ <title>New Web Service</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_bottomup_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>On the first Web Service wizard page: select <property moreinfo="none">Bottom up Java bean Web
+ service</property> as your Web service type, and select the Java bean from which
+ the service will be created:</para>
+ <figure float="0">
+ <title>Set Web Service Common values</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_bottomup_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select the stages of Web service development that you want to complete using
+ the slider: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Develop: this will develop the WSDL definition and implementation of
+ the Web service. This includes such tasks as creating modules that will
+ contain generated code, WSDL files, deployment descriptors, and Java
+ files when appropriate.</para>
+ </listitem>
+ <listitem>
+ <para>Assemble: this ensures the project that will host the Web service or
+ client gets associated to an EAR when required by the target application
+ server.</para>
+ </listitem>
+ <listitem>
+ <para>Deploy: this will create the deployment code for the service.</para>
+ </listitem>
+ <listitem>
+ <para>Install: this will install and configure the Web module and EARs on
+ the target server.</para>
+ </listitem>
+ <listitem>
+ <para>Start: this will start the server once the service has been installed
+ on it. The server-config.wsdd file will be generated.</para>
+ </listitem>
+ <listitem>
+ <para>Test: this will provide various options for testing the service, such
+ as using the Web Service Explorer or sample JSPs.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Select your server: the default server is displayed. If you want to deploy
+ your service to a different server click the link to specify a different server.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Select your runtime: ensure the JBoss WS runtime is selected.</para>
+ </listitem>
+ <listitem>
+ <para>Select the service project: the project selected in your workspace is
+ displayed. To select a different project click on the project link. If you are
+ deploying to JBoss Application Server you will also be asked to select the EAR
+ associated with the project. Ensure that the project selected as the Client Web
+ Project is different from the Service Web Project, or the service will be
+ overwritten by the client's generated artifacts.</para>
+ </listitem>
+ <listitem>
+ <para>If you want to create a client, select the type of proxy to be generated
+ and repeat the above steps for the client. The better way is to create a web
+ service client project separately.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Click on the <property moreinfo="none">Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the JBoss Web Service Code Generation Configuration page, set the following
+ values:</para>
+ <figure float="0">
+ <title>Set Web Service values for Code Generation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_bottomup_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Generate WSDL file: select it, you will get a generated WSDL file in your
+ project. But this wsdl's services' address location values are not a real
+ address. </para>
+ </listitem>
+ <listitem>
+ <para>After the Web service has been created, the following option can become
+ available depending on the options you selected: Update the default web.xm
+ file. If selected, you may test the web service by Explorer.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Click on the <property moreinfo="none">Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para>On this page, the project is deployed to the server. You can start the server and
+ test the web service. If you want to publish the web service to a UDDI registry, you
+ may click the <property moreinfo="none">Next</property> button to publish it. If not, you may click
+ the <property moreinfo="none">Finish</property> button.</para>
+ <figure float="0">
+ <title>Start a Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_bottomup_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>After the Web Service has been created, the following options may become available
+ depending on the options selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para>the generated web services code</para>
+ </listitem>
+ <listitem>
+ <para>If you selected to generate a WSDL file, you will get the file in your project's wsdl folder.</para>
+ <figure float="0">
+ <title>The Generated HelloWorldService.wsdl File in the wsdl Folder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_bottomup_6.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>If you selected to update the default web.xml, you will test the web service in
+ the browser. Open the Explorer, input the url for the web service according to
+ web.xml plus <property moreinfo="none">?wsdl.</property>, you will get the WSDL file from Explorer. </para>
+ <figure float="0">
+ <title>The Updated web.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/topdown/jbossws_bottomup_5.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>In the next chapter you will be able to create a Web Service Client from a WSDL document using JBoss WS.</para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="client" revisionflag="added" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/ws/docs/reference/en/modules/client.xml">
+ <title>Creating a Web Service Client from a WSDL Document using JBoss WS</title>
+ <para>To create a Web Service Client from a WSDL Document using JBoss WS you need to fulfil the following steps:</para>
+ <para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
+ <para><link linkend="createproject">Create a Dynamic Web project</link>.</para>
+ <para><link linkend="addfacet">Add JBossWS Facet to Web project</link>.</para>
+ <para>Then you can create a Web Service Client from a WSDL document: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to the Java EE perspective <emphasis><property moreinfo="none">Window > Open Perspective > Java EE</property></emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis><property moreinfo="none">File > New > Other</property></emphasis>. Select Web Services in order to display the various Web service wizards. Select the Web Service Client wizard. Click on the <property moreinfo="none">Next</property> button.</para>
+ <figure float="0">
+ <title>New Web Service Client</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/client/jbossws_client.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>The first and the second Web Service Client wizard pages are the same as for <link linkend="topdownwebservice">Web Service from a WSDL document</link>.</para>
+ <figure float="0">
+ <title>Set Web Service Common values</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/client/jbossws_client_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Set Web Service values related to WSDL file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/client/jbossws_client_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The only difference is:</para>
+ <itemizedlist>
+ <listitem>
+ <para><property moreinfo="none">Client Type:</property> Support of Java Proxy only.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Click on the <property moreinfo="none">Finish</property> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>After the Web Service Client has been created, the following may occur depending on the options you selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para> the generated web service and client codes</para>
+ </listitem>
+ <listitem>
+ <para>a client sample class.</para>
+ <figure float="0">
+ <title>Client Sample Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/client/jbossws_client_3.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>JBoss WS use a Java class to test Web Service. A client sample class will be generated, you may run this client as a java application to call a web service.</para>
+</chapter>
+
+
+<chapter id="preference" revisionflag="added" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/ws/docs/reference/en/modules/preference.xml">
+ <title>JBoss WS and development environment</title>
+
+ <para>In this chapter you will learn how to change JBossWS preferences and how to set default server and runtime.</para>
+ <section id="jbosswspreference">
+
+
+ <title>JBossWS Preferences</title>
+
+ <para>In this section you will know how JBossWS preferences can be modified during the
+ development process.</para>
+
+ <para>JBossWS preferences can be set on the JBossWS preference page. Click on
+ <emphasis><property moreinfo="none">Window > Preferences > JBoss Tools > Web > JBossWS
+ Preferences</property>.</emphasis></para>
+
+ <para>On this page you can manage the JBossWS 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>JBossWS Preferences Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preference/Jbossws_preference.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Clicking on <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">Edit</property>
+ </emphasis> button will open the form where you can configure a new JBossWS runtime and
+ change the path to JBossWS runtime home folder, modify the name and version of the
+ existing JBossWS runtime settings. Press <property moreinfo="none">Finish</property> to apply the
+ changes.</para>
+
+ <figure float="0">
+ <title>Edit JBossWS Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preference/Jbossws_preference_new.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+
+ <para>WS container allows Source and JavaDoc locations to be set via the Properties dialog on each contained .jar: right-click on any .jar file in the Project Explorer view, select <emphasis><property moreinfo="none">Properties</property></emphasis>. Choose <emphasis><property moreinfo="none">Java Source Attachment</property></emphasis> and select location (folder, JAR or zip) containing new source for the chosen .jar using one of the suggested options (workspace, external folder or file) or enter the path manually:</para>
+
+ <figure float="0">
+ <title>Classpath Container: Java Source Attachment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preference/jbossws_container1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on <emphasis><property moreinfo="none">Apply</property></emphasis> and then on <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
+ <para>To change JavaDoc Location choose <emphasis><property moreinfo="none">Javadoc Location</property></emphasis> and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called <emphasis><property moreinfo="none">package-list</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>Classpath Container: Javadoc Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preference/jbossws_container2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on <emphasis><property moreinfo="none">Apply</property></emphasis> and then on <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
+
+
+
+
+
+
+ </section>
+ <section id="serverruntime">
+ <title>Default Server and Runtime</title>
+ <para>Open <emphasis>
+ <property moreinfo="none">Window > Preferences > Web Services > Server and Runtime</property></emphasis>. On this page, you can specify a default server and runtime.</para>
+ <para>For ease of use, the better way is to set runtime to JBoss WS.</para>
+ <para>After server and runtime are specified, click on the <property moreinfo="none">Apply</property> button
+ to save the values.</para>
+ <figure float="0">
+ <title>Specifing a default server and runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preference/jbossws_server_runtime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the whole, this guide covers the fundamental concepts of work with tooling for
+ <property moreinfo="none">JBossWS</property>. It describes how to easily create a Web Service and a Web Service Client using
+ JBossWS Runtime and adjust JBossWS and development environment as well.</para>
+
+ <para>If the information on JBossWS tools in this guide isn't enough for you, ask
+ questions on our <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">forum</ulink>. Your comments and suggestions are also welcome.</para>
+ </section>
+</chapter>
+
+</book>
15 years
JBoss Tools SVN: r19342 - branches/jbosstools-3.1.0.RC1/ws/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:20:35 -0500 (Wed, 16 Dec 2009)
New Revision: 19342
Modified:
branches/jbosstools-3.1.0.RC1/ws/docs/reference/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating the plugin version;
Modified: branches/jbosstools-3.1.0.RC1/ws/docs/reference/en/master.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/ws/docs/reference/en/master.xml 2009-12-16 15:20:05 UTC (rev 19341)
+++ branches/jbosstools-3.1.0.RC1/ws/docs/reference/en/master.xml 2009-12-16 15:20:35 UTC (rev 19342)
@@ -33,7 +33,7 @@
<holder>JBoss by Red Hat</holder>
</copyright>
<releaseinfo>
- Version: 1.1.0.M2
+ Version: 1.1.0.CR1
</releaseinfo>
<abstract>
<title/>
15 years
JBoss Tools SVN: r19341 - branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:20:05 -0500 (Wed, 16 Dec 2009)
New Revision: 19341
Modified:
branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating master_output.xml;
Modified: branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en/master_output.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en/master_output.xml 2009-12-16 15:19:37 UTC (rev 19340)
+++ branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en/master_output.xml 2009-12-16 15:20:05 UTC (rev 19341)
@@ -22,1371 +22,1371 @@
<!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>
- <corpauthor>
- <inlinemediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
- </imageobject>
- <imageobject role="html">
- <imagedata></imagedata>
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
- <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 by Red Hat</holder>
- </copyright>
- <releaseinfo><diffmk:wrapper diffmk:change="changed">
- Version: 3.1.0.M2
- </diffmk:wrapper></releaseinfo>
-
-<abstract>
- <title></title>
- <para>
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_tools_tutoria...">PDF 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><diffmk:wrapper diffmk:change="added">Key Features Struts Tools</diffmk:wrapper></title>
-
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">For a start, we propose you to look through the table of main features of Struts
- Tools:</diffmk:wrapper></para>
- <table diffmk:change="added">
-
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Functionality of Struts Tools</diffmk:wrapper></title>
- <tgroup cols="2" diffmk:change="added">
-
- <colspec align="left" colnum="1" colwidth="2*" diffmk:change="added"></colspec>
- <colspec colnum="2" colwidth="4*" diffmk:change="added"></colspec>
-
-
- <thead diffmk:change="added">
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Feature</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Benefit</diffmk:wrapper></entry>
-
- </row>
- </thead>
- <tbody diffmk:change="added">
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Struts Support</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">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.</diffmk:wrapper></para></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Support for Struts Configuration File</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">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.</diffmk:wrapper></para></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Support for Struts modules</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">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.</diffmk:wrapper></para></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Verification and Validation</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">All occurring 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.</diffmk:wrapper></para></entry>
-
-
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
-
-
-
- <section diffmk:change="added">
- <title diffmk:change="added">Other relevant resources on the topic</title>
-
- <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at<ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
- <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
-
- </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 <property moreinfo="none">JBoss Tools</property> 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 > Struts Project</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Next enter "StrutsHello" as the project name</para>
- </listitem>
- <listitem>
- <para>Leave everything else as it is, and click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>If you have server runtime already defined, just pass to next point. Otherwise in the <emphasis>
- <property moreinfo="none">Runtime</property></emphasis> section click the <emphasis>
- <property moreinfo="none">New</property></emphasis> button and target at needed server runtime environment. Click <emphasis>
- <property moreinfo="none">Finish</property>.</emphasis></para>
- </listitem>
- <listitem>
- <para>Click <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis></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 hit <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
- <para>A "StrutsHello" node should appear in the <property moreinfo="none">Package
- Explorer view</property>.</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 <emphasis>
- <property moreinfo="none">StrutsHello</property></emphasis></para>
- </listitem>
- <listitem>
- <para>Click the plus sign next to <emphasis>
- <property moreinfo="none">WEB-INF</property>
- </emphasis> under <emphasis>
- <property moreinfo="none">WebContent</property></emphasis></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 don't 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 <property moreinfo="none">Web Projects view</property> to the front of the <property moreinfo="none">Package Explorer view</property>
- 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 <property moreinfo="none">Web Projects view</property> 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 <emphasis>
- <property moreinfo="none">pages</property></emphasis> folder and select <emphasis>
- <property moreinfo="none">New > File > 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 <emphasis>
- <property moreinfo="none">pages</property></emphasis> 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 <emphasis>
- <property moreinfo="none">Blank</property>,</emphasis> 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 <property moreinfo="none">Web Projects view</property>, 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 <property moreinfo="none">Web Projects view</property>, 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">New > 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
- <emphasis>
- <property moreinfo="none">action-mappings</property></emphasis> node, under the <emphasis>
- <property moreinfo="none">struts-config.xml</property></emphasis> node in Tree view, in <property moreinfo="none">Web Projects
- view</property> and in the <property moreinfo="none">Outline view</property>. Also, note the asterisk to the right of the name,
- <emphasis>
- <property moreinfo="none">struts-config.xml</property>,</emphasis> in the <property moreinfo="none">Outline view</property> 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 <emphasis>
- <property moreinfo="none">inputname.jsp</property></emphasis> page to the action.</para>
- <itemizedlist>
- <listitem>
- <para>On the left-hand side of the diagram in the column of icons, click on the Create New Connection
- icon( <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/struts_application/struts_application_1.png"></imagedata>
- </imageobject>
- </inlinemediaobject>).</para>
- </listitem>
- </itemizedlist>
- <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
- the Create New Connection
- icon( <inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/struts_application/struts_application_1.png"></imagedata>
- </imageobject>
- </inlinemediaobject>), again.</para>
- </listitem>
- </itemizedlist>
-
- <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 <emphasis>
- <property moreinfo="none">greeting.jsp</property></emphasis> 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 <emphasis>
- <property moreinfo="none">Name</property></emphasis> 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">New > Global Forward</property>
- </emphasis></para>
- </listitem>
- <listitem>
- <para>Enter <emphasis>
- <property moreinfo="none">getName</property>
- </emphasis> in the <emphasis>
- <property moreinfo="none">Name</property></emphasis> 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 <emphasis>
- <property moreinfo="none">struts-config.xml</property></emphasis> 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, <emphasis>
- <property moreinfo="none">struts-config.xml</property>.</emphasis></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 <property moreinfo="none">Package Explorer view</property> 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
- Tools. 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 = "";
-]]></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 = "";
-]]></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 box for <emphasis>
- <property moreinfo="none">name</property>,</emphasis>
- select First method for Insertion point, and click on the <emphasis>
- <property moreinfo="none">OK</property>
- </emphasis> button</para>
- </listitem>
- </itemizedlist>
- <para>The final <emphasis>
- <property moreinfo="none">GetNameForm.java</property></emphasis> 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 = "";
-
- public String getName()
- {
- return name;
- }
- 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>Save the file</para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="GreetingAction.java">
- <title>GreetingAction.java</title>
- <itemizedlist>
- <listitem>
- <para>Open <emphasis>
- <property moreinfo="none">GreetingAction.java</property></emphasis> 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 <emphasis>
- <property moreinfo="none">GreetingAction.java</property></emphasis> 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
- <code><html:form></code>
- 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 <property moreinfo="none">JBoss Tools Palette</property>, 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
- <code><html:submit></code>
- 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 <property moreinfo="none">JBoss Tools
- Palette</property>. 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 <property moreinfo="none">JBoss Tools Palette</property> to open it</para>
- </listitem>
- <listitem>
- <para>Position the cursor at the beginning of the <emphasis>
- <property moreinfo="none">greeting.jsp</property></emphasis> file in the
- Source pane and then click on <emphasis>
- <property moreinfo="none">bean taglib</property></emphasis> in the <property moreinfo="none">JBoss Tools
- Palette</property></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 <property moreinfo="none">JBoss Tools Palette</property> to open it</para>
- </listitem>
- <listitem>
- <para>Position the cursor inside the
- <code><p></code>
- element</para>
- </listitem>
- <listitem>
- <para>Click on <emphasis>
- <property moreinfo="none">write</property></emphasis> in the <property moreinfo="none">JBoss Tools Palette</property></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 "name" 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 <emphasis>
- <property moreinfo="none">index.jsp</property></emphasis> 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 <emphasis>
- <property moreinfo="none">index</property></emphasis> for Name and click on the <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button</para>
- </listitem>
- <listitem>
- <para>On the <property moreinfo="none">JBoss Tools Palette</property>, 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 <emphasis>
- <property moreinfo="none">logic taglib</property></emphasis> 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 <emphasis>
- <property moreinfo="none">redirect</property></emphasis></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 <code><html:form></code> 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" prefix="html" %>
-
-<html:html >
- <head>
- <html:javascript formName="GetNameForm"/>
- <title></title>
- </head>
- <body>
- <html:form action="/greeting.do" onsubmit="return validateGetNameForm(this)">
- Input name:<html:text property="name"/><html:submit value="Say Hello!"/>
- </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(<inlinemediaobject> <imageobject>
- <imagedata fileref="images/struts_validation/struts_validation_1.png"></imagedata>
- </imageobject></inlinemediaobject>) or right click your project folder and select <emphasis><property moreinfo="none">Run As > Run on Server</property></emphasis></para></listitem>
-</itemizedlist>
-
-<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 <code><html:form></code> element that you put in for client-side validation</para></listitem>
-
-<listitem><para>Add an <code><html:errors/></code> tag after the
- <code><html:form></code>
- 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" prefix="html" %>
-<html:html >
-<head>
- <html:javascript formName="GetNameForm"/>
- <title></title>
- </head>
- <body>
- <html:form action="/greeting.do" >Input name:<html:text property="name"/>
- <html:submit value="Say Hello!"/>
- </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/">Struts -
- 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&f=201">JBoss
- Tools Forum</ulink>.</para>
-</chapter>
-
-
-
-</book>
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>Struts Tools Tutorial</title>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <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 by Red Hat</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 3.1.0.CR1
+ </diffmk:wrapper></releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_tools_tutoria...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/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>Key Features 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 of Struts Tools</title>
+ <tgroup cols="2">
+
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</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>
+
+ </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>
+
+ </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>
+
+ </row>
+
+ <row>
+ <entry><para>Verification and Validation</para></entry>
+ <entry><para>All occurring 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>
+
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at<ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="struts_application" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/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 <property moreinfo="none">JBoss Tools</property> 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 > Struts Project</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Next enter "StrutsHello" as the project name</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as it is, and click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>If you have server runtime already defined, just pass to next point. Otherwise in the <emphasis>
+ <property moreinfo="none">Runtime</property></emphasis> section click the <emphasis>
+ <property moreinfo="none">New</property></emphasis> button and target at needed server runtime environment. Click <emphasis>
+ <property moreinfo="none">Finish</property>.</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis></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 hit <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>A "StrutsHello" node should appear in the <property moreinfo="none">Package
+ Explorer view</property>.</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 <emphasis>
+ <property moreinfo="none">StrutsHello</property></emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property moreinfo="none">WEB-INF</property>
+ </emphasis> under <emphasis>
+ <property moreinfo="none">WebContent</property></emphasis></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 don't 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 <property moreinfo="none">Web Projects view</property> to the front of the <property moreinfo="none">Package Explorer view</property>
+ 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 <property moreinfo="none">Web Projects view</property> 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 <emphasis>
+ <property moreinfo="none">pages</property></emphasis> folder and select <emphasis>
+ <property moreinfo="none">New > File > 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 <emphasis>
+ <property moreinfo="none">pages</property></emphasis> 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 <emphasis>
+ <property moreinfo="none">Blank</property>,</emphasis> 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 <property moreinfo="none">Web Projects view</property>, 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 <property moreinfo="none">Web Projects view</property>, 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">New > 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
+ <emphasis>
+ <property moreinfo="none">action-mappings</property></emphasis> node, under the <emphasis>
+ <property moreinfo="none">struts-config.xml</property></emphasis> node in Tree view, in <property moreinfo="none">Web Projects
+ view</property> and in the <property moreinfo="none">Outline view</property>. Also, note the asterisk to the right of the name,
+ <emphasis>
+ <property moreinfo="none">struts-config.xml</property>,</emphasis> in the <property moreinfo="none">Outline view</property> 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 <emphasis>
+ <property moreinfo="none">inputname.jsp</property></emphasis> page to the action.</para>
+ <itemizedlist>
+ <listitem>
+ <para>On the left-hand side of the diagram in the column of icons, click on the Create New Connection
+ icon( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts_application/struts_application_1.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>).</para>
+ </listitem>
+ </itemizedlist>
+ <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
+ the Create New Connection
+ icon( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts_application/struts_application_1.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>), again.</para>
+ </listitem>
+ </itemizedlist>
+
+ <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 <emphasis>
+ <property moreinfo="none">greeting.jsp</property></emphasis> 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 <emphasis>
+ <property moreinfo="none">Name</property></emphasis> 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">New > Global Forward</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Enter <emphasis>
+ <property moreinfo="none">getName</property>
+ </emphasis> in the <emphasis>
+ <property moreinfo="none">Name</property></emphasis> 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 <emphasis>
+ <property moreinfo="none">struts-config.xml</property></emphasis> 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, <emphasis>
+ <property moreinfo="none">struts-config.xml</property>.</emphasis></para>
+ </section>
+ </section>
+</chapter>
+
+<chapter id="generating_stub" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/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 <property moreinfo="none">Package Explorer view</property> 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/jbosstools-3.1.0.CR1/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
+ Tools. 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 = "";
+]]></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 = "";
+]]></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 box for <emphasis>
+ <property moreinfo="none">name</property>,</emphasis>
+ select First method for Insertion point, and click on the <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> button</para>
+ </listitem>
+ </itemizedlist>
+ <para>The final <emphasis>
+ <property moreinfo="none">GetNameForm.java</property></emphasis> 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 = "";
+
+ public String getName()
+ {
+ return name;
+ }
+ 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>Save the file</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="GreetingAction.java">
+ <title>GreetingAction.java</title>
+ <itemizedlist>
+ <listitem>
+ <para>Open <emphasis>
+ <property moreinfo="none">GreetingAction.java</property></emphasis> 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 <emphasis>
+ <property moreinfo="none">GreetingAction.java</property></emphasis> 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
+ <code><html:form></code>
+ 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 <property moreinfo="none">JBoss Tools Palette</property>, 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
+ <code><html:submit></code>
+ 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 <property moreinfo="none">JBoss Tools
+ Palette</property>. 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 <property moreinfo="none">JBoss Tools Palette</property> to open it</para>
+ </listitem>
+ <listitem>
+ <para>Position the cursor at the beginning of the <emphasis>
+ <property moreinfo="none">greeting.jsp</property></emphasis> file in the
+ Source pane and then click on <emphasis>
+ <property moreinfo="none">bean taglib</property></emphasis> in the <property moreinfo="none">JBoss Tools
+ Palette</property></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 <property moreinfo="none">JBoss Tools Palette</property> to open it</para>
+ </listitem>
+ <listitem>
+ <para>Position the cursor inside the
+ <code><p></code>
+ element</para>
+ </listitem>
+ <listitem>
+ <para>Click on <emphasis>
+ <property moreinfo="none">write</property></emphasis> in the <property moreinfo="none">JBoss Tools Palette</property></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 "name" 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 <emphasis>
+ <property moreinfo="none">index.jsp</property></emphasis> 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 <emphasis>
+ <property moreinfo="none">index</property></emphasis> for Name and click on the <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>On the <property moreinfo="none">JBoss Tools Palette</property>, 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 <emphasis>
+ <property moreinfo="none">logic taglib</property></emphasis> 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 <emphasis>
+ <property moreinfo="none">redirect</property></emphasis></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/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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 <code><html:form></code> 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" prefix="html" %>
+
+<html:html >
+ <head>
+ <html:javascript formName="GetNameForm"/>
+ <title></title>
+ </head>
+ <body>
+ <html:form action="/greeting.do" onsubmit="return validateGetNameForm(this)">
+ Input name:<html:text property="name"/><html:submit value="Say Hello!"/>
+ </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(<inlinemediaobject> <imageobject>
+ <imagedata fileref="images/struts_validation/struts_validation_1.png"></imagedata>
+ </imageobject></inlinemediaobject>) or right click your project folder and select <emphasis><property moreinfo="none">Run As > Run on Server</property></emphasis></para></listitem>
+</itemizedlist>
+
+<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 <code><html:form></code> element that you put in for client-side validation</para></listitem>
+
+<listitem><para>Add an <code><html:errors/></code> tag after the
+ <code><html:form></code>
+ 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" prefix="html" %>
+<html:html >
+<head>
+ <html:javascript formName="GetNameForm"/>
+ <title></title>
+ </head>
+ <body>
+ <html:form action="/greeting.do" >Input name:<html:text property="name"/>
+ <html:submit value="Say Hello!"/>
+ </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/jbosstools-3.1.0.CR1/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/">Struts -
+ 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&f=201">JBoss
+ Tools Forum</ulink>.</para>
+</chapter>
+
+
+
+</book>
15 years
JBoss Tools SVN: r19340 - branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:19:37 -0500 (Wed, 16 Dec 2009)
New Revision: 19340
Modified:
branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating the plugin version;
Modified: branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en/master.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en/master.xml 2009-12-16 15:19:17 UTC (rev 19339)
+++ branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_tutorial/en/master.xml 2009-12-16 15:19:37 UTC (rev 19340)
@@ -49,7 +49,7 @@
<holder>JBoss by Red Hat</holder>
</copyright>
<releaseinfo>
- Version: 3.1.0.M2
+ Version: 3.1.0.CR1
</releaseinfo>
<abstract>
15 years
JBoss Tools SVN: r19339 - branches/jbosstools-3.1.0.RC1/jsf/docs/jsf_tools_tutorial/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:19:17 -0500 (Wed, 16 Dec 2009)
New Revision: 19339
Modified:
branches/jbosstools-3.1.0.RC1/jsf/docs/jsf_tools_tutorial/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating master_output.xml;
Modified: branches/jbosstools-3.1.0.RC1/jsf/docs/jsf_tools_tutorial/en/master_output.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/jsf/docs/jsf_tools_tutorial/en/master_output.xml 2009-12-16 15:18:55 UTC (rev 19338)
+++ branches/jbosstools-3.1.0.RC1/jsf/docs/jsf_tools_tutorial/en/master_output.xml 2009-12-16 15:19:17 UTC (rev 19339)
@@ -23,847 +23,847 @@
<!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>
- <corpauthor diffmk:change="added">
- <inlinemediaobject diffmk:change="added">
- <imageobject diffmk:change="added" role="fo">
- <imagedata diffmk:change="added" fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
- </imageobject>
- <imageobject diffmk:change="added" role="html">
- <imagedata diffmk:change="added"></imagedata>
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
- <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><diffmk:wrapper diffmk:change="changed">JBoss by Red Hat</diffmk:wrapper></holder>
- </copyright>
-
- <releaseinfo><diffmk:wrapper diffmk:change="changed">
- Version: 3.1.0.M2
- </diffmk:wrapper></releaseinfo>
-
-
-<abstract>
- <title></title>
- <para>
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_tools_tutoria...">PDF 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 diffmk:change="added"><title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Features of JSF Tools</diffmk:wrapper></title>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Here, we provide you with a key functionality which is integrated in JSF tooling.</diffmk:wrapper></para>
-
- <table diffmk:change="added">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Functionality for JSF Tools</diffmk:wrapper></title>
- <tgroup cols="2" diffmk:change="added">
-
- <colspec align="left" colnum="1" colwidth="2*" diffmk:change="added"></colspec>
- <colspec colnum="2" colwidth="4*" diffmk:change="added"></colspec>
-
-
- <thead diffmk:change="added">
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Feature</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Benefit</diffmk:wrapper></entry>
-
- </row>
- </thead>
- <tbody diffmk:change="added">
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">JSF and Facelets support</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">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.</diffmk:wrapper></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Flexible and customizable project template management</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Jump-start development with out-of-the-box templates or easily
- customized templates for re-use.</diffmk:wrapper></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Support for JSF Configuration File</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">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.</diffmk:wrapper></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Support for Managed Beans</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Adding new managed beans, generating code for attributes, properties
- and getter/setter methods.</diffmk:wrapper></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Support for Custom Converters and Validators</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Fast creating of custom converters and validators with tree view of
- faces-config.xml file.</diffmk:wrapper></entry>
-
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Verification and Validation</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">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.</diffmk:wrapper></entry>
-
- </row>
- </tbody>
- </tgroup>
- </table>
-
- </section>
-
-
- <section>
- <title>Other relevant resources on the topic</title>
- <para><diffmk:wrapper diffmk:change="changed">All JBoss Developer Studio/JBoss Tools release documentation you can find at </diffmk:wrapper><ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
- <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
- </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 (<inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/jsf_application/jsf_application_3.png"></imagedata>
- </imageobject>
- </inlinemediaobject>) to get an arrow cursor with a two-pronged plug at the arrow's bottom.</para>
- </listitem>
- </itemizedlist>
-
- <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">
-Please enter name:
-<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(<inlinemediaobject>
- <imageobject>
- <imagedata fileref="images/jsf_application/jsf_application_10.png"></imagedata>
- </imageobject>
- </inlinemediaobject>) or right click your project folder and select <emphasis>
- <property moreinfo="none">Run As > Run on Server</property>
- </emphasis>:</para>
- </listitem>
- </itemizedlist>
-
- <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.html">JSF
- 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">JSF
- FAQ</ulink></para>
- <para>Download: <ulink url="http://java.sun.com/javaee/javaserverfaces/download.html">JavaServer
- 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&f=201">JBoss
- Tools Forum</ulink>.</para>
-</chapter>
-
-</book>
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JSF Tools Tutorial</title>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <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 by Red Hat</holder>
+ </copyright>
+
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 3.1.0.CR1
+ </diffmk:wrapper></releaseinfo>
+
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_tools_tutoria...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/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>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="2">
+
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</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>
+
+ </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>
+
+ </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>
+
+ </row>
+
+ <row>
+ <entry>Support for Managed Beans</entry>
+ <entry>Adding new managed beans, generating code for attributes, properties
+ and getter/setter methods.</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>
+
+ </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>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at <ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
+ </section>
+
+</chapter>
+
+
+<chapter id="jsf_application" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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 (<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_3.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>) to get an arrow cursor with a two-pronged plug at the arrow's bottom.</para>
+ </listitem>
+ </itemizedlist>
+
+ <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/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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">
+Please enter name:
+<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/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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(<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_10.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>) or right click your project folder and select <emphasis>
+ <property moreinfo="none">Run As > Run on Server</property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+
+ <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/jbosstools-3.1.0.CR1/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.html">JSF
+ 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">JSF
+ FAQ</ulink></para>
+ <para>Download: <ulink url="http://java.sun.com/javaee/javaserverfaces/download.html">JavaServer
+ 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&f=201">JBoss
+ Tools Forum</ulink>.</para>
+</chapter>
+
+</book>
15 years
JBoss Tools SVN: r19338 - branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:18:55 -0500 (Wed, 16 Dec 2009)
New Revision: 19338
Modified:
branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating master_output.xml;
Modified: branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en/master_output.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en/master_output.xml 2009-12-16 15:18:33 UTC (rev 19337)
+++ branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en/master_output.xml 2009-12-16 15:18:55 UTC (rev 19338)
@@ -26,1302 +26,1302 @@
<!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>
-
- <corpauthor diffmk:change="added">
- <inlinemediaobject diffmk:change="added">
- <imageobject diffmk:change="added" role="fo">
- <imagedata diffmk:change="added" fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
- </imageobject>
- <imageobject diffmk:change="added" role="html">
- <imagedata diffmk:change="added"></imagedata>
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
- <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><diffmk:wrapper diffmk:change="changed">JBoss by Red Hat</diffmk:wrapper></holder>
- </copyright>
- <releaseinfo><diffmk:wrapper diffmk:change="changed">
- Version: 3.1.0.M2
- </diffmk:wrapper></releaseinfo>
-
-<abstract>
- <title></title>
- <para>
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_tools_ref_gui...">PDF 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 occurring 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><diffmk:wrapper diffmk:change="changed">All JBoss Developer Studio/JBoss Tools documentation you can find on</diffmk:wrapper><ulink url="http://docs.jboss.org/tools/"><diffmk:wrapper diffmk:change="changed">JBoss Tools project page </diffmk:wrapper></ulink>.</para>
- <para><diffmk:wrapper diffmk:change="changed">The latest documentation builds are available on</diffmk:wrapper><ulink url="http://download.jboss.org/jbosstools/nightly-docs/"><diffmk:wrapper diffmk:change="changed">nightly docs page</diffmk:wrapper></ulink>.</para>
-
- </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 useful 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>
-
- <section diffmk:change="added">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Relevant Resources Links</diffmk:wrapper></title>
-
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can find more in-depth explanation on how to work with special wizards, editors and views that can
- be used in various scenarios while developing Struts applications in our </diffmk:wrapper><ulink diffmk:change="added" url="../../jsf/html_single/index.html"><diffmk:wrapper diffmk:change="added">Visual Web Tools guide</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
- </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><diffmk:wrapper diffmk:change="changed">In this chapter we'll introduce you to featured graphical editors for specific
- Struts files such as Struts Configuration files, Tiles files, Struts Validation files and web.xml.</diffmk:wrapper></para>
-
- <section diffmk:change="added" id="webxml_editor">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Web.xml Editor</diffmk:wrapper></title>
-
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">web.xml</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> file inside the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">WEB-INF</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> folder is a deployment descriptor file for a Web Application. It
- describes the servlets and other components and deployment properties that make up your application.</diffmk:wrapper></para>
-
- <para diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> add the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">web.xml</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> file to created Struts project automatically and provides a special editor for its editing.
- See the Visual Web Tools guide that gives a descriptive information on the </diffmk:wrapper><ulink diffmk:change="added" url="../../jsf/html_single/index.html#GraphicalWebApplicationFileEditor"><diffmk:wrapper diffmk:change="added">web.xml editor</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
- </section>
-
- <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><diffmk:wrapper diffmk:change="changed">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.</diffmk:wrapper></para>
-
- <figure float="0">
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_17.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para><diffmk:wrapper diffmk:change="changed">You can 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.</diffmk:wrapper></para>
-
- <figure float="0">
- <title>Tree Context Menu</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_18.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Let's consider the tree on the left more closely.</diffmk:wrapper></para>
-
- <itemizedlist diffmk:change="added">
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Under the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">data-sources</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> node you can create a Data Source object that will be configured
- and made available as a servlet context attribute.</diffmk:wrapper></para></listitem>
-
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">form-beans</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> node is meant for creating a set of form bean descriptors for this module.
- Every created element under this node is a JavaBean that implements the org.apache.struts.action.ActionForm class.
- Use the Properties editor on the right to adjust properties specific to every created form-bean.</diffmk:wrapper></para></listitem>
-
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">global-exceptions</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> node is intended for registering the handlers for the exceptions
- that might be thrown by an Action object.</diffmk:wrapper></para></listitem>
-
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Use the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">global-forwards</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> node to add, edit or delete a global forwards that represent
- ActionForward objects available to all Action objects as a return value.</diffmk:wrapper></para></listitem>
-
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">controller</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> node allows you to configure the controller properties.</diffmk:wrapper></para></listitem>
-
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Under the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">resources</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> node you can add, delete, or edit message resources.</diffmk:wrapper></para></listitem>
-
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Under the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">plug-ins</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> node you can define a Struts plug-in. Right-click the node, select </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Create Plug-in</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">
- and specify the plug-ib </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Id</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">ClassName</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> by pointing to the Java class which implements the org.apache.struts.action.PlugIn interface. </diffmk:wrapper></para></listitem>
-
- </itemizedlist>
- </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"><diffmk:wrapper diffmk:change="changed">in the editor features chapter</diffmk:wrapper></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&f=201">Forum</ulink>.</para>
- <para>We hope, this guide helped you to get started with the JBoss Struts Tools. Besides, for additional information you are welcome on <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
-</chapter>
-
-</book>
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Struts Tools Reference Guide</title>
+
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <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 by Red Hat</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 3.1.0.CR1
+ </diffmk:wrapper></releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/struts_tools_ref_gui...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+<chapter id="intoduction" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/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 occurring 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 on<ulink url="http://docs.jboss.org/tools/">JBoss Tools project page </ulink>.</para>
+ <para>The latest documentation builds are available on<ulink url="http://download.jboss.org/jbosstools/nightly-docs/">nightly docs page</ulink>.</para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="projects" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/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 useful 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>
+
+ <section>
+ <title>Relevant Resources Links</title>
+
+ <para>You can find more in-depth explanation on how to work with special wizards, editors and views that can
+ be used in various scenarios while developing Struts applications in our <ulink url="../../jsf/html_single/index.html">Visual Web Tools guide</ulink>.</para>
+ </section>
+</chapter>
+
+
+<chapter id="editors" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/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, Struts Validation files and web.xml.</para>
+
+ <section id="webxml_editor">
+ <title>Web.xml Editor</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none">web.xml</property></emphasis> file inside the <emphasis>
+ <property moreinfo="none">WEB-INF</property></emphasis> folder is a deployment descriptor file for a Web Application. It
+ describes the servlets and other components and deployment properties that make up your application.</para>
+
+ <para><property moreinfo="none">JBoss Tools</property> add the <emphasis>
+ <property moreinfo="none">web.xml</property></emphasis> file to created Struts project automatically and provides a special editor for its editing.
+ See the Visual Web Tools guide that gives a descriptive information on the <ulink url="../../jsf/html_single/index.html#GraphicalWebApplicationFileEditor">web.xml editor</ulink>.</para>
+ </section>
+
+ <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 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>
+
+ <para>Let's consider the tree on the left more closely.</para>
+
+ <itemizedlist>
+ <listitem><para>Under the <emphasis>
+ <property moreinfo="none">data-sources</property></emphasis> node you can create a Data Source object that will be configured
+ and made available as a servlet context attribute.</para></listitem>
+
+ <listitem><para>The <emphasis>
+ <property moreinfo="none">form-beans</property></emphasis> node is meant for creating a set of form bean descriptors for this module.
+ Every created element under this node is a JavaBean that implements the org.apache.struts.action.ActionForm class.
+ Use the Properties editor on the right to adjust properties specific to every created form-bean.</para></listitem>
+
+ <listitem><para>The <emphasis>
+ <property moreinfo="none">global-exceptions</property></emphasis> node is intended for registering the handlers for the exceptions
+ that might be thrown by an Action object.</para></listitem>
+
+ <listitem><para>Use the <emphasis>
+ <property moreinfo="none">global-forwards</property></emphasis> node to add, edit or delete a global forwards that represent
+ ActionForward objects available to all Action objects as a return value.</para></listitem>
+
+ <listitem><para>The <emphasis>
+ <property moreinfo="none">controller</property></emphasis> node allows you to configure the controller properties.</para></listitem>
+
+ <listitem><para>Under the <emphasis>
+ <property moreinfo="none">resources</property></emphasis> node you can add, delete, or edit message resources.</para></listitem>
+
+ <listitem><para>Under the <emphasis>
+ <property moreinfo="none">plug-ins</property></emphasis> node you can define a Struts plug-in. Right-click the node, select <emphasis>
+ <property moreinfo="none">Create Plug-in</property></emphasis>
+ and specify the plug-ib <emphasis>
+ <property moreinfo="none">Id</property></emphasis> and <emphasis>
+ <property moreinfo="none">ClassName</property></emphasis> by pointing to the Java class which implements the org.apache.struts.action.PlugIn interface. </para></listitem>
+
+ </itemizedlist>
+ </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">in the editor features chapter</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/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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/jbosstools-3.1.0.CR1/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&f=201">Forum</ulink>.</para>
+ <para>We hope, this guide helped you to get started with the JBoss Struts Tools. Besides, for additional information you are welcome on <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
+</chapter>
+
+</book>
15 years
JBoss Tools SVN: r19337 - branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:18:33 -0500 (Wed, 16 Dec 2009)
New Revision: 19337
Modified:
branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating the plugin version;
Modified: branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en/master.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en/master.xml 2009-12-16 15:17:59 UTC (rev 19336)
+++ branches/jbosstools-3.1.0.RC1/struts/docs/struts_tools_ref_guide/en/master.xml 2009-12-16 15:18:33 UTC (rev 19337)
@@ -52,7 +52,7 @@
<holder>JBoss by Red Hat</holder>
</copyright>
<releaseinfo>
- Version: 3.1.0.M2
+ Version: 3.1.0.CR1
</releaseinfo>
<abstract>
15 years
JBoss Tools SVN: r19336 - branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:17:59 -0500 (Wed, 16 Dec 2009)
New Revision: 19336
Modified:
branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating master_output.xml;
Modified: branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en/master_output.xml 2009-12-16 15:16:48 UTC (rev 19335)
+++ branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en/master_output.xml 2009-12-16 15:17:59 UTC (rev 19336)
@@ -8,907 +8,1125 @@
<!ENTITY smooksformeditor_graphicaltab SYSTEM "modules/smooksformeditor_graphicalpage.xml">
<!ENTITY smooksformeditor_configurationtab SYSTEM "modules/smooksformeditor_configurationpage.xml">
<!ENTITY smooksformeditor_sourcetab SYSTEM "modules/smooksformeditor_sourcepage.xml">
-]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
-
- <bookinfo>
-
- <title>Smooks Dev Tools Reference Guide</title>
- <corpauthor>
- <inlinemediaobject>
- <imageobject role="fo">
- <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
- </imageobject>
- <imageobject role="html">
- <imagedata></imagedata>
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
- <author>
- <firstname>Xue(Dart)</firstname>
- <surname>Peng</surname>
- </author>
-
- <pubdate>November 2008</pubdate>
- <copyright>
- <year>2009</year>
- <holder>JBoss by Red Hat</holder>
- </copyright>
- <releaseinfo><diffmk:wrapper diffmk:change="changed">
- Version: 1.1.0.M2
- </diffmk:wrapper></releaseinfo>
-
- <abstract>
- <title></title>
- <para>
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/smooks/pdf/Smooks_Re...">PDF version</ulink>
- </para>
- </abstract>
-
-
- </bookinfo>
- <toc></toc>
-
-<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/smooks/docs/reference/en/modules/introduction.xml">
- <?dbhtml filename="introduction.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Smooks</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
- <title>Introduction</title>
- <para><diffmk:wrapper diffmk:change="changed">This chapter gives you a short introduction to Smooks, Smooks tools and its installation.</diffmk:wrapper></para>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">First, have a look at the key features of Smooks tools:</diffmk:wrapper></para>
- <section diffmk:change="added">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Features of Smooks Tools</diffmk:wrapper></title>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Here, we provide you with a key functionality which is integrated in Smooks tools.</diffmk:wrapper></para>
- <table diffmk:change="added">
-
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Functionality for Smooks Tools</diffmk:wrapper></title>
- <tgroup cols="3" diffmk:change="added">
-
- <colspec align="left" colnum="1" colwidth="2*" diffmk:change="added"></colspec>
- <colspec colnum="2" colwidth="4*" diffmk:change="added"></colspec>
- <colspec align="left" colnum="3" colwidth="2*" diffmk:change="added"></colspec>
-
- <thead diffmk:change="added">
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Feature</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Benefit</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Chapter</diffmk:wrapper></entry>
- </row>
- </thead>
-
- <tbody diffmk:change="added">
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Smooks Configuration File Wizard</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Smooks tools allows to create/edit the Smooks configuration file for Java2Java data transformation.</diffmk:wrapper></para></entry>
- <entry diffmk:change="added">
- <link diffmk:change="added" linkend="config_file_wizzard"><diffmk:wrapper diffmk:change="added">Smooks Configuration File Wizard</diffmk:wrapper></link>
- </entry>
- </row>
-
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Smooks Editor</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Smooks Editor helps configure the created Smooks configuration file.</diffmk:wrapper></para></entry>
- <entry diffmk:change="added">
- <link diffmk:change="added" linkend="quickstart_formeditor"><diffmk:wrapper diffmk:change="added">Smooks Editor</diffmk:wrapper></link>
- </entry>
- </row>
-
- </tbody>
-
- </tgroup>
- </table>
-
-
-
- </section>
-
-
-
- <section>
- <title>What is Smooks?</title>
-
- <para><property moreinfo="none">Smooks</property> is a Java Framework/Engine for processing XML and non XML
- data (CSV, EDI, Java, JSON etc).</para>
- <para></para>
- <para>
- <orderedlist continuation="restarts" inheritnum="inherit" numeration="upperroman">
- <listitem>
- <para><emphasis role="bold">Transformation</emphasis>: Perform a wide range of
- Data Transforms. Supports many different Source and Result types
- -XML/CSV/EDI/Java/JSON to XML/CSV/EDI/Java/JSON.</para>
- </listitem>
- <listitem>
- <para><emphasis role="bold">Java Binding</emphasis>: Bind into a Java Object
- Model from any data source (CSV, EDI, XML, Java, JSON etc). </para>
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">Huge Message Processing</emphasis>: Process huge
- messages (GBs) - Split, Transform and Route message fragments to JMS, File,
- Database etc destinations. Route multiple message formats to multiple
- destinations in a single pass over a message. </para>
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">Message Enrichment</emphasis>: Enrich a message with
- data from a Database, or other Datasources. </para>
- </listitem>
-
- <listitem>
- <para><emphasis role="bold">Combine</emphasis>: Combine the above features in
- different ways e.g. add Message Enrichment as part of a Splitting and
- Routing process. </para>
- </listitem>
- </orderedlist>
- </para>
- <figure float="0">
- <title>Smooks</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/introduction/introduction1.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para> For More informations about <property moreinfo="none">Smooks</property>, please visit <ulink url="http://www.smooks.org">Smooks official site</ulink>.</para>
- </section>
- <section>
- <title>What is Smooks Tools?</title>
-
- <para>Smooks tools is a set of graphical tools for editing Smooks configuration file
- based on Eclipse.</para>
- <figure float="0">
- <title>Smooks Form editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/introduction/introduction2.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section>
- <title>How to install Smooks dev tools?</title>
-
- <para> The Smooks tools was included by the <property moreinfo="none">JBoss Tools</property> since 3.0.0
- Beta1 version. You can download the <property moreinfo="none">JBoss Tools</property> from <ulink url="http://jboss.org/tools/download.html">JBoss download site</ulink>.</para>
- <para> Smooks tools (<property moreinfo="none">JBoss Tools</property>) run with the latest Eclipse and
- other required plug-ins (GEF, EMF, etc.).</para>
- <para> You should download the latest IDE for Java EE developers from <ulink url="http://www.eclipse.org/downloads/"> Eclipse site</ulink>. It contains many plug-ins (
- GEF, EMF, etc. ) required by Smooks dev tools. </para>
-
- <para>Now let's progress to more advanced topics.</para>
- </section>
-
-</chapter>
-
-
-<chapter id="quickstart" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/smooks/docs/reference/en/modules/quick_start.xml" xreflabel="Quick Start">
- <?dbhtml filename="quick_start.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Smooks</keyword>
- <keyword>JBDS</keyword>
- <keyword>java</keyword>
- </keywordset>
- </chapterinfo>
- <title>Quick Start</title>
- <para> This "Quick Start" will show how to use the <property moreinfo="none">Smooks tools</property> to create/edit the Smooks
- configuration file for Java2Java data transformation.</para>
- <para> This chapter gives you a brief understanding of the <property moreinfo="none">Smooks tools</property>.</para>
- <section>
- <title>Download Smooks Java-to-Java Example</title>
- <para> Visit <ulink url="http://svn.codehaus.org/milyn/tags/Smooks_V1.1.2/smooks-examples/java-to-...">here</ulink> to download the "java-to-java" example project. </para>
- <tip>
- <title>Tip:</title>
-
- <para> The example project is based on Maven, we suggest you to create a new eclipse
- Java project, copy the example code and .jar files from the example project and paste
- them into the eclipse Java project. </para>
- </tip>
- </section>
- <section id="config_file_wizzard">
- <title>Smooks Configuration File Wizard</title>
- <para>Select the Smooks Java-to-Java example project that you created and right-click,
- select the menu <emphasis><property moreinfo="none">New > Other</property>,</emphasis> then find
- <emphasis><property moreinfo="none">Smooks > Smooks Configuration File</property>.</emphasis>
- Click the <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> button. </para>
- <figure float="0">
- <title>Selecting Smooks Configuration File Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start1.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The first wizard page is a file path creation page. Select the <emphasis>
- <property moreinfo="none">src</property>
- </emphasis> folder to be the files container, and input the name
- <emphasis><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">smooks-config.xml</diffmk:wrapper></property>.</emphasis> Click
- <emphasis><property moreinfo="none">Next</property>.</emphasis></para>
- <figure float="0">
- <title>Choosing the configuration file container and the file name</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start2.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><diffmk:wrapper diffmk:change="added">The second wizard page is a Smooks configuration file version choose page.Select appropriate one and click </diffmk:wrapper><emphasis><property moreinfo="none">Finish</property></emphasis><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
- <!--<para> As the quick start introduces how to create/edit the Java-to-Java Smooks
- configuration file, let's select the<emphasis>
- <property>Java-to-Java</property>
- </emphasis> type as the source/target transform data type. </para>
-
- <figure>
- <title>Selecting Data Type</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start3.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the next page you are prompted to choose the source data for transformation.
- Let's select the <property>Order</property> class from the example project as
- the source JavaBean class.</para>
-
- <figure>
- <title>Selecting the Source Data</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start4.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Then the wizard page asks you to choose the target data for transformation. We select
- the <property>ListOrder</property> class as the target JavaBean class.</para>
- <figure>
- <title>Selecting the Target Data</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start5.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para/>
-
- <tip>
- <title>Tip:</title>
- <para>You can omit two these steps and just press
- <emphasis><property>Finish</property>.</emphasis> This will open the empty
- Smooks Configuration file. It's possible to <link
- linkend="graphicaleditor_datalink">select source/target data</link> afterwards
- in the Smooks Graph editor.</para>
- </tip>-->
- </section>
- <section id="quickstart_formeditor">
- <title>Smooks Editor</title>
-
- <para>When all the wizard steps are passed, a new Smooks Configuration file is created and
- the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Smooks Configuration Editor</diffmk:wrapper></property> will be opened automatically:</para>
- <figure float="0">
- <title>Smooks Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start6.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <!--<para> This editor contains several parts: <table>
- <title>The Smooks Editor Parts</title>
- <tgroup cols="2">
-
- <colspec colnum="1" align="left" colwidth="1*"/>
- <colspec colnum="2" colwidth="5*"/>
-
- <thead>
- <row>
- <entry>Editor feature</entry>
- <entry>Functionality</entry>
- </row>
- </thead>
-
- <tbody>
-
- <row>
- <entry>
- <para>Problems area</para>
- </entry>
- <entry>
- <para>If there are any errors when you are editing the file, the
- Problems area displays them</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Source data tree</para>
- </entry>
- <entry>
- <para>The tree displays a structure of the transformed source
- data</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Target data tree</para>
- </entry>
- <entry>
- <para>The tree displays a structure of the transformed target
- data</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Mapping graphical area</para>
- </entry>
- <entry>
- <para>Show the data mapping connection lines</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Source/Target data selection links</para>
- </entry>
- <entry>
- <para>Click the link, and <link linkend="graphicaleditor_datalink"
- >Data Selection wizard</link> is opened helping you to
- choose the source/target data</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </para>-->
- </section>
-
- <section id="graphicaleditor_datalink">
- <title><diffmk:wrapper diffmk:change="changed">Choosing the transform data</diffmk:wrapper></title>
-
- <para><diffmk:wrapper diffmk:change="added">To choose the transform data you should click </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Add</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> button in the Input Data section.</diffmk:wrapper></para>
- <para><diffmk:wrapper diffmk:change="changed">After clicking the button the </diffmk:wrapper><property moreinfo="none">Data Type Selection wizard</property><diffmk:wrapper diffmk:change="changed"> is
- opened, and there are two data types in the list: Java and XML.</diffmk:wrapper></para>
- <note>
- <title>Note</title>
- <para> There will become more and more data types on the list as the development goes on.
- </para>
- </note>
-
- <figure float="0">
- <title>Data Type Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start7.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select the <emphasis>
- <property moreinfo="none">Java</property>
- </emphasis> data type and click <emphasis><property moreinfo="none">Next</property>,</emphasis> you will
- see the JavaBean class selection page:</para>
-
- <figure float="0">
- <title>JavaBean Data Selection</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start8.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para><diffmk:wrapper diffmk:change="changed"> Let's select the Order class from the example project as the source JavaBean class and the ListOrder class as the target JavaBean class.When you selected the necessary java classes, click </diffmk:wrapper><emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis><diffmk:wrapper diffmk:change="changed"> and you should see all added java classes displayed in the Input Data Section
- .</diffmk:wrapper></para>
- <figure float="0">
- <title>Displaying the Structure of the Transformed Data</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start9.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="quickstart_mapping">
- <title>Mapping</title>
-
-
- <para><diffmk:wrapper diffmk:change="changed">How to map the java class just added?</diffmk:wrapper></para>
-
- <para>First, you should know what to transform:</para>
-
- <orderedlist continuation="restarts" inheritnum="inherit" numeration="loweralpha">
- <listitem>
- <para>Bind the <emphasis>
- <property moreinfo="none">"customerName"</property>
- </emphasis> property of the <property moreinfo="none">Order#header</property> to the <emphasis>
- <property moreinfo="none">"customerName"</property>
- </emphasis> property of <property moreinfo="none">LineOrder</property>.</para>
- </listitem>
- <listitem>
- <para>Bind the <emphasis>
- <property moreinfo="none">"customerNumber"</property>
- </emphasis> property of the <property moreinfo="none">Order#header</property> to the <emphasis>
- <property moreinfo="none">"customerId"</property>
- </emphasis> property of <property moreinfo="none">LineOrder</property>.</para>
- </listitem>
- <listitem>
- <para>Bind the <emphasis>
- <property moreinfo="none">"price"</property>
- </emphasis> property of the <property moreinfo="none">OrderItem</property> to the <emphasis>
- <property moreinfo="none">"unitPrice"</property>
- </emphasis> property of <property moreinfo="none">LineItem</property>.</para>
- </listitem>
- <listitem>
- <para>Bind the <emphasis>
- <property moreinfo="none">"productId"</property>
- </emphasis> property of the <property moreinfo="none">OrderItem</property> to the <emphasis>
- <property moreinfo="none">"productCode"</property>
- </emphasis> property of <property moreinfo="none">LineItem</property>.</para>
- </listitem>
- <listitem>
- <para>Bind the <emphasis>
- <property moreinfo="none">"quantity"</property>
- </emphasis> property of the <property moreinfo="none">OrderItem</property> to the <emphasis>
- <property moreinfo="none">"unitQuantity"</property>
- </emphasis> property of <property moreinfo="none">LineItem</property>.</para>
- </listitem>
- </orderedlist>
-
- <para><diffmk:wrapper diffmk:change="added"> Make sense?
- You should right click Resource List , select </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Add Smooks Resource>Java Binding>Bindings</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.
- </diffmk:wrapper></para>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">First of all, you should bind </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Order</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> to </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">LineOrder</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">. To do this one </diffmk:wrapper><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Bindings</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> Item should be added to the Resource List.</diffmk:wrapper></para>
- <figure diffmk:change="added" float="0">
- <title><diffmk:wrapper diffmk:change="changed">Mapping</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata fileref="images/quick_start/quick_start10.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure><para><diffmk:wrapper diffmk:change="changed">Click on it and you should see </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Bindings</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> Section to the right of </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Message Filtering Resources</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.Write </diffmk:wrapper><emphasis diffmk:change="added"> <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">lineOrder</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> in the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Bean id</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> field.</diffmk:wrapper></para>
- <para><diffmk:wrapper diffmk:change="added">Select </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">example.trgmodel.LineOrder</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> in the </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Class</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> field and </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">example.srcmodel.Order</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> in the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Name</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> field.Your </diffmk:wrapper><emphasis diffmk:change="added"> <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Smooks Configuration Editor</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> should look like this: </diffmk:wrapper></para>
- <figure float="0">
- <title><diffmk:wrapper diffmk:change="changed">Mapping</diffmk:wrapper></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start11.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para><diffmk:wrapper diffmk:change="added">Now you should bind two values </diffmk:wrapper><emphasis diffmk:change="added"> <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">"customerNumber"</diffmk:wrapper></property>
- </emphasis><diffmk:wrapper diffmk:change="added"> property of the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Order#header</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> to the </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">"customerId"</diffmk:wrapper></property>
- </emphasis><diffmk:wrapper diffmk:change="added"> property of </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">LineOrder</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.To do this right click your just created </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Bindings Item >Add Smooks Resource>Value</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed">
- .</diffmk:wrapper></para>
-
- <figure float="0">
- <title><diffmk:wrapper diffmk:change="changed"> Mapping Editor</diffmk:wrapper></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start12.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure><note diffmk:change="added">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Please, remember that the root nodes of the source data and target data *MUST* be
- connected.</diffmk:wrapper></para>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">This rule is not only for Java-to-Java, but also is relevant for
- XML-to-Java </diffmk:wrapper></para>
- </note>
- <para><diffmk:wrapper diffmk:change="changed"> Do the same operation with the
- other properties in this and other classes.</diffmk:wrapper></para>
- <para><diffmk:wrapper diffmk:change="changed">It's also necessary to bind </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">orderItems</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> property of the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Order</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> to </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">lineItems</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> property of </diffmk:wrapper><emphasis>
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">LineOrder</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed">.The difference from the previous steps is that the </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">orderItems</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> is presented by the list of </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Order</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">lineItems</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> is the massive of </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">LineItem</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> .To do the binding,you should use </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Wiring Item</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.First you should create a new Binding item. This is a configuration that allows you to construct an object graph .Select </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">example.trgmodel.LineItem[]</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> in the Class field and orderItems in the Name field,in bean Id write lineItems.
- Your Smooks Configuration Editor should look like this:
- </diffmk:wrapper></para>
- <figure float="0">
- <title><diffmk:wrapper diffmk:change="changed"> Creating Wiring Item</diffmk:wrapper></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start13a.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><diffmk:wrapper diffmk:change="changed"> Then you should right click </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">lineOrder</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> binding item</diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">>Add Smooks Resource>Wiring</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed">.Select </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">lineItem</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> in </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Bean id Ref</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.
- </diffmk:wrapper></para>
- <para><diffmk:wrapper diffmk:change="added">The final step is to add new Wiring item to lineOrder </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Binding</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.In the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Bean id Ref</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> select </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">lineItems</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> and in </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Property</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> select </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">lineItems</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
-<!--
- <para>Next, you are going to bind the properties of the <property>OrderItem</property> to
- the properties of the <property>LineItem</property>.</paa>
- <para>Select the <emphasis>
- <property>"price"</property>
- </emphasis> and drag it onto the <emphasis>
- <property>"unitPrice"</property>
- </emphasis> of the other side tree viewer. The Problems area shows an
- error:</para>
- <figure>
- <title>Connection Error 1</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start12.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>How to deal with the error?</para>
- <para>Please click the <emphasis>
- <property>Fix it</property></emphasis> link, a menu is popped-up with several
- resolve methods on it.</para>
- <figure>
- <title>Fixing the Connection Error</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start13.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para> Select the first resolve method: <emphasis>
- 'Connect the "OrderItem" to the
- "LineItem" '.</emphasis> As the result the <emphasis>
- <property>"OrderItem"</property></emphasis> is connected with
- the <emphasis>
- <property>"LineItem"</property>.</emphasis></para>
- <para>But the notify message area still shows some other errors:</para>
- <figure>
- <title>Connection Error 2</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start14.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>OK, let's deal with the fire error. Click the <emphasis>
- <property>Fix it</property></emphasis> link and
- select the first resolve method. The <emphasis>
- <property>"orderItems"</property></emphasis> is connected with
- the <emphasis>
- <property>"lineItems"</property>.</emphasis></para>
-
- <tip>
- <title>Tip:</title>
- <para> Why does the error occur?</para>
- <para> You will find that, if you only connect the property node without connecting the
- parent node of the property, the "connection error" occurs.</para>
- <para>The connection of the "price-to-unitPrice" is the
- "Binding Connection", but it needs an "Instance Creation
- Connection" - the connection of the
- "OrderItem-to-LineItem".</para>
- </tip>
- <para> After that, connect <emphasis>
- <property>"quantity"</property></emphasis> to the <emphasis>
- <property>"unitQuantity"</property></emphasis> and <emphasis>
- <property>"productId"</property></emphasis> to the
- <emphasis>
- <property>"productCode"</property>:</emphasis></para>
- <figure>
- <title>Complete Mapping</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start15.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>-->
- <para>Now, you should save the file and the <property moreinfo="none">Smooks tools</property> generate the correct
- configuration file content.</para>
- <para>OK, let run the test class: <property moreinfo="none">example.Main</property>. (Please, make sure that the Smooks engine
- loads the correct configuration file).</para>
- <para>Success!</para>
- </section>
-</chapter>
-
- <!--&smooksformeditor_graphicaltab;-->
-
-<chapter diffmk:change="added" id="smooksformeditor_configurationtab" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/smooks/docs/reference/en/modules/smooksformeditor_configurationpage.xml" xreflabel="Smooks Configuration Editor Page">
- <?dbhtml filename="smooks_form_editor_configurationtab.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Smooks</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
- <title><diffmk:wrapper diffmk:change="changed">Smooks Design Page</diffmk:wrapper></title>
- <para><diffmk:wrapper diffmk:change="changed">In this section you will explore the details of Smooks Design Page usage.</diffmk:wrapper></para>
- <para><property moreinfo="none"><diffmk:wrapper diffmk:change="added">Smooks Design Page</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> is one tab of the </diffmk:wrapper><property diffmk:change="added" moreinfo="none">Smooks Editor</property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></para>
- <figure float="0">
- <title><diffmk:wrapper diffmk:change="changed">Design Page</diffmk:wrapper></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/config_page/config_page1.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><diffmk:wrapper diffmk:change="added">This page consists of 3 sections: Message Filtering Resources, Input Data and the section devoted to the configurations of a selected in a Message Filtering Resources section Item.</diffmk:wrapper></para>
- <para><diffmk:wrapper diffmk:change="added"> You can bind classes </diffmk:wrapper><link diffmk:change="added" linkend="quickstart_mapping"><diffmk:wrapper diffmk:change="added">using Bindings item
- </diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> on the Design page of the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Smooks Editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></para>
- <para><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Resource list</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> item in </diffmk:wrapper><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Message Filtering Resources</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> corresponds to the root element of the </diffmk:wrapper><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">smooks-config.xml</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> file.You can configurate the next four properties using corresponding fields:</diffmk:wrapper></para>
- <itemizedlist diffmk:change="added">
- <listitem diffmk:change="added"><para><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">default-selector</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">:Defines the selector that will be applied to all resource-config elements in the </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">smooks-config.xml</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">, where a selector is not defined. </diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">default-selector-namespace</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">:Defines the default selector namespace. </diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">default-target-profile</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">: Defines the default target profile that will be applied to all resources in the smooks-config.xml. </diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">default-condition-ref</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">:The condition is applied to resources where an empty "condition" element (i.e. </diffmk:wrapper><code diffmk:change="added"><diffmk:wrapper diffmk:change="added"><condition/></diffmk:wrapper></code><diffmk:wrapper diffmk:change="added">)is defined.The condition element does not reference a globally defined condition. </diffmk:wrapper></para></listitem>
- </itemizedlist>
- <para><diffmk:wrapper diffmk:change="added"> The configuration editor also edits the </diffmk:wrapper><link diffmk:change="added" linkend="configurationpage_parsetype"><diffmk:wrapper diffmk:change="added">Smooks parse
- type</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> and manages the </diffmk:wrapper><link diffmk:change="added" linkend="configurationpage_importfile"><diffmk:wrapper diffmk:change="added">Import
- Files</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
- <section diffmk:change="added" id="selector-dialog">
- <title><diffmk:wrapper diffmk:change="changed">Selector generate dialog</diffmk:wrapper></title>
- <para><diffmk:wrapper diffmk:change="added">Using </diffmk:wrapper><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Selector generate dialog</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> you can allow the user to select a node for generation </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">"selector"</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> for smooks-config file.
- To open the dialog you should left click </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Browse</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> button in </diffmk:wrapper><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Default Selector</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> section.
- </diffmk:wrapper></para>
- <figure float="0">
- <title><diffmk:wrapper diffmk:change="changed">Selector generate dialog</diffmk:wrapper></title>
- <mediaobject>
- <imageobject>
- <imagedata diffmk:change="added" fileref="images/config_page/config_page2a.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><diffmk:wrapper diffmk:change="added"> When the dialog is opened you should click </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">"Click to add input data"</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">to set the selector.
- In the opened </diffmk:wrapper><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Data Type Selection</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> Wizard you should choose the type of the file and the file itself you want to load to the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Selector generate dialog</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.After that your dialog should look nearly like that:</diffmk:wrapper></para>
- <figure diffmk:change="added" float="0">
- <title><diffmk:wrapper diffmk:change="changed">Selector generate dialog</diffmk:wrapper></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/config_page/config_page2b.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><diffmk:wrapper diffmk:change="added">The final step is to choose the node you want to make a selector for </diffmk:wrapper><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">smooks-config.xml</diffmk:wrapper></property></emphasis>.</para>
- </section>
- <section id="configurationpage_parsetype">
-
- <title>Smooks Parse Type</title>
- <para><diffmk:wrapper diffmk:change="added">If your config file doesn't contain </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Global Parametres</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> item yet, you should add it by right click </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Resource List>Add Smooks Resource>Global Parametres</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.After this step you should add </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Param</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> to just created </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Global Parametres</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper></para>
- <figure float="0">
- <title>Smooks Parse Types</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/config_page/config_page2.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><diffmk:wrapper diffmk:change="added">Then left click </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Param</diffmk:wrapper></property>
- </emphasis><diffmk:wrapper diffmk:change="added">and in the Param section, you will see a set of text fields: </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Name</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed">,</diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Type</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Text</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Name</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> value is required. To set a parse type you should write SAX/DOM to the
- </diffmk:wrapper><emphasis diffmk:change="added">
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Text</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> field.</diffmk:wrapper></para>
-
- <figure float="0">
- <title><diffmk:wrapper diffmk:change="changed">Smooks Parse Types</diffmk:wrapper></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/config_page/config_page3.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><diffmk:wrapper diffmk:change="changed">To apply changes to the </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">smooks-config.xml</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> click </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Save</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed"> button (</diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Ctrl+S</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="changed">). </diffmk:wrapper></para>
- </section>
- <section diffmk:change="added" id="configurationpage_importfile">
-
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Import Data</diffmk:wrapper></title>
- <para><diffmk:wrapper diffmk:change="changed"> Right click </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Resource List>Add Smooks Resource>Import Smooks Configuration</diffmk:wrapper></property>
- </emphasis><diffmk:wrapper diffmk:change="added">, then you should see a new </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Import Smooks Configuration</diffmk:wrapper></property>
- </emphasis><diffmk:wrapper diffmk:change="changed">item in the list (see the figure below).</diffmk:wrapper></para>
-
- <figure float="0">
- <title><diffmk:wrapper diffmk:change="changed">Import Data</diffmk:wrapper></title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/config_page/config_page3a.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para><diffmk:wrapper diffmk:change="changed">Left click the added item and to the left of </diffmk:wrapper><emphasis>
- <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Message Filtering Resources Import Smooks Configuration </diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> section should appear. Click the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Browse</diffmk:wrapper></property>
- </emphasis><diffmk:wrapper diffmk:change="added"> button and select the file you want to import. </diffmk:wrapper></para>
- <para><diffmk:wrapper diffmk:change="added">Click </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Save</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and the </diffmk:wrapper><code diffmk:change="added"><diffmk:wrapper diffmk:change="added"><import></diffmk:wrapper></code><diffmk:wrapper diffmk:change="added"> tag with the corresponding file path as a </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">file</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> property will be added to the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">smooks-config.xml</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
- </section>
- <!--<section id="configurationpage_datedecoder">
- <title>Date Decoder Detail Page</title>
-
- <para>Date Decoder is a resourceConfig element in the Smooks configuration file. It
- describes how to transform the "Date" type.</para>
- <para> Click the <emphasis>
- <property>New</property>
- </emphasis> button to open the <property>New Resource Type wizard</property>
- dialog.</para>
- <figure>
- <title>Resource Type Selection Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/config_page/config_page4.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>There are several resource type on the list. Select the <emphasis>
- <property>Date Decoder</property>
- </emphasis> and click the <emphasis>
- <property>Finish</property>
- </emphasis> button, a new <emphasis>
- <property>Date Decoder</property>
- </emphasis> item was added and shown on the resource type list.</para>
- <para> There are several parameters in the <emphasis>
- <property>Date Decoder</property>
- </emphasis> resourceConfig element:</para>
-
- <para>
-
- <itemizedlist>
- <listitem>
- <para>Format</para>
- </listitem>
-
- <listitem>
- <para>Locale-Language</para>
-
- </listitem>
-
- <listitem>
- <para>Locale-Country</para>
-
- </listitem>
- </itemizedlist>
- </para>
-
- <para> You can modify the parameters of the <emphasis>
- <property>Date Decoder</property></emphasis> item with the left detail page.</para>
-
- <figure>
- <title>Date Decoder Detail Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/config_page/config_page1.png" scale="90"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> When you defined a new <emphasis>
- <property>Date Decoder</property></emphasis>, then you can use the <link
- linkend="graphicalpage_propertiesview">JavaBean Properties</link> GUI to set
- it to be the "Java type".</para>
- <para>Now when we've learnt Smooks Configuration Editor Page, let's have a look at one more Smooks Editor Page - Smooks Source Editor Page and investigate its functionality</para>
-
-
- <para> The XML fragment generated by Smooks tools for the "Date
- Decoder": </para> <para> <programlisting> <![CDATA[<resource-config
- selector="decoder:DateLong">
- <resource>org.milyn.javabean.decoders.DateDecoder</resource> <param
- name="locale-language">en</param> <param name="format">yyy-MM-dd
- HH:mm:ss</param> <param name="locale-country">IE</param>
- </resource-config>]]> </programlisting> </para>
-
- </section>
-
- <section id="configurationpage_documenttype"> <title>Document Type
- Detail Page</title> <para> </para> </section> <section
- id="configurationpage_unhandleresourceconfig"> <title>Unhandle
- ResourceConfig</title> </section>
- -->
-</chapter>
-
-
-<chapter id="smooksformeditor_sourcetab" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/smooks/docs/reference/en/modules/smooksformeditor_sourcepage.xml" xreflabel="Smooks Source Editor Page">
- <?dbhtml filename="smooks_form_editor_sourcetab.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Smooks</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
- <title>Smooks Source Editor Page</title>
- <para><diffmk:wrapper diffmk:change="changed">This section provides information about Smooks Source Editor Page.</diffmk:wrapper></para>
- <section>
- <title>XML Source Editor</title>
- <para>You can use this editor to edit the Smooks Configuration file directly. </para>
- <figure float="0">
- <title>Graphical Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/source_editor/source_editor1.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section>
- <title>Error Messages GUI</title>
- <para>If the <property moreinfo="none">Smooks tools</property> can't understand the configuration
- file or the configuration file is illegal (XML structure isn't right for Smooks
- Configuration file, etc.), the error is underlined.</para>
- <figure float="0">
- <title>Graphical Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/source_editor/source_editor2.png" scale="90"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <!--note>
- <title>Tip:</title>
- <para> When the error message panel is displayed, other editors ( Graphical Editor,
- Configuration Editor ) are disabled. </para>
- <para> You can't edit the configuration file with other editors until file becomes
- valid. </para>
- </note-->
- <para>We hope, our guide will help you to get started with JBoss Smooks Tools. Besides, for additional information you are welcome on <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
- </section>
-</chapter>
-
-</book>
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+
+ <title>Smooks Dev Tools Reference Guide</title>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author>
+ <firstname>Xue(Dart)</firstname>
+ <surname>Peng</surname>
+ </author>
+
+ <pubdate>November 2008</pubdate>
+ <copyright>
+ <year>2009</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 1.1.0.CR1
+ </diffmk:wrapper></releaseinfo>
+
+ <abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/smooks/pdf/Smooks_Re...">PDF version</ulink>
+ </para>
+ </abstract>
+
+
+ </bookinfo>
+ <toc></toc>
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/smooks/docs/reference/en/modules/introduction.xml">
+ <?dbhtml filename="introduction.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Smooks</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Introduction</title>
+ <para>This chapter gives you a short introduction to Smooks, Smooks tools and its installation.</para>
+ <para>First, have a look at the key features of Smooks tools:</para>
+ <section>
+ <title>Key Features of Smooks Tools</title>
+ <para>Here, we provide you with a key functionality which is integrated in Smooks tools.</para>
+ <table>
+
+ <title>Key Functionality for Smooks 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>Smooks Configuration File Wizard</para></entry>
+ <entry><para>Smooks tools allows to create/edit the Smooks configuration file for Java2Java data transformation.</para></entry>
+ <entry>
+ <link linkend="config_file_wizzard">Smooks Configuration File Wizard</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry><para>Smooks Editor</para></entry>
+ <entry><para>Smooks Editor helps configure the created Smooks configuration file.</para></entry>
+ <entry>
+ <link linkend="quickstart_formeditor">Smooks Editor</link>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+
+
+ </section>
+
+
+
+ <section>
+ <title>What is Smooks?</title>
+
+ <para><property moreinfo="none">Smooks</property> is a Java Framework/Engine for processing XML and non XML
+ data (CSV, EDI, Java, JSON etc).</para>
+ <para></para>
+ <para>
+ <orderedlist continuation="restarts" inheritnum="inherit" numeration="upperroman">
+ <listitem>
+ <para><emphasis role="bold">Transformation</emphasis>: Perform a wide range of
+ Data Transforms. Supports many different Source and Result types
+ -XML/CSV/EDI/Java/JSON to XML/CSV/EDI/Java/JSON.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Java Binding</emphasis>: Bind into a Java Object
+ Model from any data source (CSV, EDI, XML, Java, JSON etc). </para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">Huge Message Processing</emphasis>: Process huge
+ messages (GBs) - Split, Transform and Route message fragments to JMS, File,
+ Database etc destinations. Route multiple message formats to multiple
+ destinations in a single pass over a message. </para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">Message Enrichment</emphasis>: Enrich a message with
+ data from a Database, or other Datasources. </para>
+ </listitem>
+
+ <listitem>
+ <para><emphasis role="bold">Combine</emphasis>: Combine the above features in
+ different ways e.g. add Message Enrichment as part of a Splitting and
+ Routing process. </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ <figure float="0">
+ <title>Smooks</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/introduction/introduction1.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> For More informations about <property moreinfo="none">Smooks</property>, please visit <ulink url="http://www.smooks.org">Smooks official site</ulink>.</para>
+ </section>
+ <section>
+ <title>What is Smooks Tools?</title>
+
+ <para>Smooks tools is a set of graphical tools for editing Smooks configuration file
+ based on Eclipse.</para>
+ <figure float="0">
+ <title>Smooks Form editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/introduction/introduction2.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>How to install Smooks dev tools?</title>
+
+ <para> The Smooks tools was included by the <property moreinfo="none">JBoss Tools</property> since 3.0.0
+ Beta1 version. You can download the <property moreinfo="none">JBoss Tools</property> from <ulink url="http://jboss.org/tools/download.html">JBoss download site</ulink>.</para>
+ <para> Smooks tools (<property moreinfo="none">JBoss Tools</property>) run with the latest Eclipse and
+ other required plug-ins (GEF, EMF, etc.).</para>
+ <para> You should download the latest IDE for Java EE developers from <ulink url="http://www.eclipse.org/downloads/"> Eclipse site</ulink>. It contains many plug-ins (
+ GEF, EMF, etc. ) required by Smooks dev tools. </para>
+
+ <para>Now let's progress to more advanced topics.</para>
+ </section>
+
+</chapter>
+
+
+<chapter id="quickstart" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/smooks/docs/reference/en/modules/quick_start.xml" xreflabel="Quick Start">
+ <?dbhtml filename="quick_start.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Smooks</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>java</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Quick Start</title>
+ <para> This "Quick Start" will show how to use the <property moreinfo="none">Smooks tools</property> to create/edit the Smooks
+ configuration file for Java2Java data transformation.</para>
+ <para> This chapter gives you a brief understanding of the <property moreinfo="none">Smooks tools</property>.</para>
+ <section>
+ <title>Download Smooks Java-to-Java Example</title>
+ <para> Visit <ulink url="http://www.blogjava.net/Files/reloadcn/smooks_java_java.zip">smooks examples page</ulink> to download the "java-to-java" example project. </para>
+ <tip>
+ <title>Tip:</title>
+
+ <para> The example project is based on Maven, we suggest you to create a new eclipse
+ Java project, copy the example code and .jar files from the example project and paste
+ them into the eclipse Java project. </para>
+ </tip>
+ </section>
+ <section>
+ <title>Mapping rules</title>
+ <para>At the begining of working with Smooks tools,
+ we need to understand the Java-to-Java mapping rules of this example.
+ The transform input Java class is <emphasis><property moreinfo="none">example.sourcemodel.Order</property></emphasis> , its structure looks like this :
+ </para>
+ <figure float="0">
+ <title>Order class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/sourcemodel_structured.jpg"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Let's describe the structure of <emphasis><property moreinfo="none">example.sourcemodel.Order</property></emphasis> in short:</para>
+ <itemizedlist>
+ <listitem><para>Order class contains a <property moreinfo="none">Header</property> class and a <property moreinfo="none">List</property> class.</para></listitem>
+ <listitem><para>The <property moreinfo="none">Header</property> class has <property moreinfo="none">customerName</property>,<property moreinfo="none">customerNumber</property>,<property moreinfo="none">priority</property> as properties.</para></listitem>
+ <listitem><para>In Order class the objects of the OrderItem class are stored in the List.</para></listitem>
+ <listitem><para>OrderItem has <property moreinfo="none">price</property>,<property moreinfo="none">productId</property>,<property moreinfo="none">quantity</property> as its properties.</para></listitem>
+ </itemizedlist>
+ <para>Let's look at the transform target Java class : <emphasis><property moreinfo="none">LineOrder</property></emphasis>.</para>
+ <para>On the screen below you can see its structure:</para>
+ <figure float="0">
+ <title>LineOrder class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/targetmodel_structured.jpg"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem><para><property moreinfo="none">LineOrder</property> class contains 3 properties:<property moreinfo="none">customerId</property>,<property moreinfo="none">customerName</property>,<property moreinfo="none">priority</property> and an array of lineItems.</para></listitem>
+ <listitem><para>The <property moreinfo="none">Header</property> class has <property moreinfo="none">customerName</property>,<property moreinfo="none">customerNumber</property>,<property moreinfo="none">priority</property> as its properties.</para></listitem>
+ <listitem><para>OrderItem objects are stored in a List.</para></listitem>
+ </itemizedlist>
+ <para>Now it's the time to define the mapping rules to transform the input source java class to the target java class:</para>
+ <itemizedlist>
+ <listitem><para>Each instance of the Order class should be mapped with an instance of the LineOrder class.</para></listitem>
+ <listitem><para>The value of <property moreinfo="none">customerName</property> of the Header class should be assigned to the <property moreinfo="none">customerName</property> property of a LineOrder instance.</para></listitem>
+ <listitem><para>The value of <property moreinfo="none">customerNumber</property> of the Header class should be assigned to the <property moreinfo="none">customerId</property> property of a LineOrder instance.</para></listitem>
+ <listitem><para>The value of <property moreinfo="none">priority</property> of the Header class should be assigned to the <property moreinfo="none">priority</property> property of LineOrder instance.</para></listitem>
+ <listitem><para>For the <property moreinfo="none">orderitems</property> List of the Order instance, it's necessary to map a new lineItems array instance of LineOrder ,
+ and each OrderItem instance in the orderItems List should be transformed to a LineItem instance,
+ those instances will be put into the lineItems array.</para></listitem>
+ <listitem><para>The value of <property moreinfo="none">productId</property> of the OrderItem instance should be assigned to the 'productCode' of LineItem.</para></listitem>
+ <listitem><para>The value of <property moreinfo="none">price</property> of OrderItem should be assigned to the <property moreinfo="none">unitPrice</property> of LineItem.</para></listitem>
+
+ </itemizedlist>
+ </section>
+
+ <section id="config_file_wizzard">
+ <title>Smooks Configuration File Wizard</title>
+ <para>Select the Smooks Java-to-Java example project that you created and right-click,
+ select the menu <emphasis><property moreinfo="none">New > Other</property>,</emphasis> then find
+ <emphasis><property moreinfo="none">Smooks > Smooks Configuration File</property>.</emphasis>
+ Click the <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button. </para>
+ <figure float="0">
+ <title>Selecting Smooks Configuration File Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start1.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The first wizard page is a file path creation page. Select the <emphasis>
+ <property moreinfo="none">src</property>
+ </emphasis> folder to be the files container, and input the name
+ <emphasis><property moreinfo="none">smooks-config.xml</property>.</emphasis> Click
+ <emphasis><property moreinfo="none">Next</property>.</emphasis></para>
+ <figure float="0">
+ <title>Choosing the configuration file container and the file name</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start2.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="changed">The second wizard page is allows you to select Smooks configuration file version. Select the appropriate one and click </diffmk:wrapper><emphasis><property moreinfo="none">Finish</property></emphasis><diffmk:wrapper diffmk:change="changed"> to complete the wizard.</diffmk:wrapper></para>
+
+
+
+ <!--<para> As the quick start introduces how to create/edit the Java-to-Java Smooks
+ configuration file, let's select the<emphasis>
+ <property>Java-to-Java</property>
+ </emphasis> type as the source/target transform data type. </para>
+
+ <figure>
+ <title>Selecting Data Type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start3.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next page you are prompted to choose the source data for transformation.
+ Let's select the <property>Order</property> class from the example project as
+ the source JavaBean class.</para>
+
+ <figure>
+ <title>Selecting the Source Data</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start4.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Then the wizard page asks you to choose the target data for transformation. We select
+ the <property>ListOrder</property> class as the target JavaBean class.</para>
+ <figure>
+ <title>Selecting the Target Data</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start5.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para/>
+
+ <tip>
+ <title>Tip:</title>
+ <para>You can omit two these steps and just press
+ <emphasis><property>Finish</property>.</emphasis> This will open the empty
+ Smooks Configuration file. It's possible to <link
+ linkend="graphicaleditor_datalink">select source/target data</link> afterwards
+ in the Smooks Graph editor.</para>
+ </tip>-->
+ </section>
+ <section id="quickstart_formeditor">
+ <title>Smooks Editor</title>
+
+ <para>When all the wizard steps are passed, a new Smooks Configuration file is created and
+ the <property moreinfo="none">Smooks Configuration Editor</property> will be opened automatically:</para>
+ <figure float="0">
+ <title>Smooks Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start6.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On the bottom of this editor there are 5 tabs, they are :
+
+ Overview, Reader, Message Filter, Graph, Source.</para>
+ <section id="graphicaleditor_datalink">
+ <title>Adding the input data</title>
+ <para>At first, we need to add the Order class as the input data.
+ To do this, click the Reader tab, swich to the Reader/Input editor page</para>
+
+ <!--<para> This editor contains several parts: <table>
+ <title>The Smooks Editor Parts</title>
+ <tgroup cols="2">
+
+ <colspec colnum="1" align="left" colwidth="1*"/>
+ <colspec colnum="2" colwidth="5*"/>
+
+ <thead>
+ <row>
+ <entry>Editor feature</entry>
+ <entry>Functionality</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>Problems area</para>
+ </entry>
+ <entry>
+ <para>If there are any errors when you are editing the file, the
+ Problems area displays them</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Source data tree</para>
+ </entry>
+ <entry>
+ <para>The tree displays a structure of the transformed source
+ data</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Target data tree</para>
+ </entry>
+ <entry>
+ <para>The tree displays a structure of the transformed target
+ data</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Mapping graphical area</para>
+ </entry>
+ <entry>
+ <para>Show the data mapping connection lines</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Source/Target data selection links</para>
+ </entry>
+ <entry>
+ <para>Click the link, and <link linkend="graphicaleditor_datalink"
+ >Data Selection wizard</link> is opened helping you to
+ choose the source/target data</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>-->
+
+
+ <para>To choose the transform data you should open <emphasis>
+ <property moreinfo="none">Reader</property></emphasis> tab and click <emphasis>
+ <property moreinfo="none">Add</property></emphasis> button in the Input Data section.</para>
+ <figure float="0">
+ <title>Input Data section</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_6a.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After clicking the button the <property moreinfo="none">Data Type Selection wizard</property> is
+ opened, and there are many data types in the list: Java, XML etc.</para>
+ <note>
+ <title>Note</title>
+ <para> There will become more and more data types on the list as the development goes on.
+ </para>
+ </note>
+
+ <figure float="0">
+ <title>Data Type Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start7.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select the <emphasis>
+ <property moreinfo="none">Java</property>
+ </emphasis> data type and click <emphasis><property moreinfo="none">Next</property>,</emphasis> you will
+ see the JavaBean class selection page:</para>
+
+ <figure float="0">
+ <title>JavaBean Data Selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start8.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Let's select the Order class from the example project as the source JavaBean class.After that click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> and you should see the just added java class, being displayed in the Input Data Section.
+ </para>
+ <figure float="0">
+ <title>Displaying the Structure of the Transformed Data</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start9.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Adding the target Bean</title>
+ <para>After adding the input data, let's switch to the Message Filter page:</para>
+ <figure float="0">
+ <title>Displaying the Structure of the Transformed Data</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start9a.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property moreinfo="none">Add</property> button, the <property moreinfo="none">Add Child</property> wizard page will be shown, let's select the <property moreinfo="none">Java Binding v1.2 -> Bean v1.2</property> and click <emphasis><property moreinfo="none">OK</property></emphasis> to add the Bean :
+ </para>
+ <figure float="0">
+ <title>Add Child wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start9b.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then we can find on the Message Filter page the <property moreinfo="none">Bean v1.2</property> item added, click on it ,a Bean v1.2 section should appear to the right of the page.
+ The section represents a GUI for editing <property moreinfo="none">Bean v1.2</property> properties:</para>
+ <figure float="0">
+ <title>Bean v1.2 section</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start9c.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You should input <property moreinfo="none">
+ lineOrder</property> as the Bean's id in the "Bean Id" field.Then you should click <property moreinfo="none">Browse</property> button
+ near the <property moreinfo="none">Class</property> textfield and select LineOrder as the Bean's class.</para>
+ <note>
+ <para>
+ When you enter a value for the <property moreinfo="none">Class</property> text field,
+ you can type 'Alt + /' and the content assist pop dialog will be shown,
+ so it's will increase the efficiency. If 'Alt + /' doesn't work,
+ try to use the 'Ctrl + space'('Key Assist' of Eclipse).
+ </para>
+ </note>
+ <para>Let's click the <property moreinfo="none">Add Binding</property> link at the bottom of this page,
+ it will show a dialog to ask the binding of what Bean properties you will prefer to add.
+ Select all and click OK, you will see a list of Binding elements added under the Bean item.</para>
+ <para>Then you should add an array of beans called <property moreinfo="none">lineItems</property> and a Bean LineItem.These two classes and Id values are:</para>
+ <para>Array Bean:</para>
+ <itemizedlist>
+ <listitem><para>BeanId : lineItems;</para></listitem>
+ <listitem><para>Class : example.trgmodel.LineItem[]</para></listitem>
+ </itemizedlist>
+ <para>LineItem Bean :</para>
+ <itemizedlist>
+ <listitem><para>BeanId : lineItem;</para></listitem>
+ <listitem><para>Class : example.trgmodel.LineItem</para></listitem>
+ </itemizedlist>
+ <note>
+ <para>
+ In Smooks , to be an array of Beans , the class value should end with '[]'. This means that this bean is an array type.
+
+ </para>
+ </note>
+ <para>To finish this work, use the <property moreinfo="none">Add Binding</property> link to add all the bindings for the Bean.</para>
+ </section>
+
+
+ </section>
+ <section id="quickstart_mapping">
+ <title>Mapping</title>
+
+
+ <para>How to map the java class just added?</para>
+
+ <para>First, you should know what to transform:</para>
+
+ <orderedlist continuation="restarts" inheritnum="inherit" numeration="loweralpha">
+ <listitem>
+ <para>Bind the <emphasis>
+ <property moreinfo="none">"customerName"</property>
+ </emphasis> property of the <property moreinfo="none">Order#header</property> to the <emphasis>
+ <property moreinfo="none">"customerName"</property>
+ </emphasis> property of <property moreinfo="none">LineOrder</property>.</para>
+ </listitem>
+ <listitem>
+ <para>Bind the <emphasis>
+ <property moreinfo="none">"customerNumber"</property>
+ </emphasis> property of the <property moreinfo="none">Order#header</property> to the <emphasis>
+ <property moreinfo="none">"customerId"</property>
+ </emphasis> property of <property moreinfo="none">LineOrder</property>.</para>
+ </listitem>
+ <listitem>
+ <para>Bind the <emphasis>
+ <property moreinfo="none">"price"</property>
+ </emphasis> property of the <property moreinfo="none">OrderItem</property> to the <emphasis>
+ <property moreinfo="none">"unitPrice"</property>
+ </emphasis> property of <property moreinfo="none">LineItem</property>.</para>
+ </listitem>
+ <listitem>
+ <para>Bind the <emphasis>
+ <property moreinfo="none">"productId"</property>
+ </emphasis> property of the <property moreinfo="none">OrderItem</property> to the <emphasis>
+ <property moreinfo="none">"productCode"</property>
+ </emphasis> property of <property moreinfo="none">LineItem</property>.</para>
+ </listitem>
+ <listitem>
+ <para>Bind the <emphasis>
+ <property moreinfo="none">"quantity"</property>
+ </emphasis> property of the <property moreinfo="none">OrderItem</property> to the <emphasis>
+ <property moreinfo="none">"unitQuantity"</property>
+ </emphasis> property of <property moreinfo="none">LineItem</property>.</para>
+ </listitem>
+ </orderedlist>
+
+ <para> Make sense?
+ You should open Design tab and click Add button. In opened Add Child Wizard,please, select <emphasis>
+ <property moreinfo="none">Add Smooks Resource>Java Binding>Bindings</property></emphasis>.
+ </para>
+ <para>First of all, you should bind <emphasis>
+ <property moreinfo="none">Order</property></emphasis> to <emphasis>
+ <property moreinfo="none">LineOrder</property></emphasis>. To do this one <emphasis>
+ <property moreinfo="none">Bindings</property></emphasis> Item should be added to the Resource List.</para>
+ <figure float="0">
+ <title>Mapping</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start10.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure><para>Click on it and you should see <emphasis>
+ <property moreinfo="none">Bindings</property></emphasis> Section to the right of <emphasis>
+ <property moreinfo="none">Message Filtering Resources</property></emphasis>.Write <emphasis> <property moreinfo="none">lineOrder</property></emphasis> in the <emphasis>
+ <property moreinfo="none">Bean id</property></emphasis> field.</para>
+ <para>Select <emphasis>
+ <property moreinfo="none">example.trgmodel.LineOrder</property></emphasis> in the <emphasis>
+ <property moreinfo="none">Class</property></emphasis> field and <emphasis>
+ <property moreinfo="none">example.srcmodel.Order</property></emphasis> in the <emphasis>
+ <property moreinfo="none">Name</property></emphasis> field.Your <emphasis> <property moreinfo="none">Smooks Configuration Editor</property></emphasis> should look like this: </para>
+ <figure float="0">
+ <title>Mapping</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start11.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now you should bind two values <emphasis> <property moreinfo="none">"customerNumber"</property>
+ </emphasis> property of the <property moreinfo="none">Order#header</property> to the <emphasis>
+ <property moreinfo="none">"customerId"</property>
+ </emphasis> property of <property moreinfo="none">LineOrder</property>.To do this right click your just created <emphasis>
+ <property moreinfo="none">Bindings Item >Add Smooks Resource>Value</property></emphasis>
+ .</para>
+
+ <figure float="0">
+ <title> Mapping Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start12.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure><note>
+ <title>Note:</title>
+ <para>Please, remember that the root nodes of the source data and target data *MUST* be
+ connected.</para>
+ <para>This rule is not only for Java-to-Java, but also is relevant for
+ XML-to-Java </para>
+ </note>
+ <para> Do the same operation with the
+ other properties in this and other classes.</para>
+ <para>It's also necessary to bind <emphasis>
+ <property moreinfo="none">orderItems</property></emphasis> property of the <emphasis>
+ <property moreinfo="none">Order</property></emphasis> to <emphasis>
+ <property moreinfo="none">lineItems</property></emphasis> property of <emphasis>
+ <property moreinfo="none">LineOrder</property></emphasis>.The difference from the previous steps is that the <emphasis>
+ <property moreinfo="none">orderItems</property></emphasis> is presented by the list of <emphasis>
+ <property moreinfo="none">Order</property></emphasis> and <emphasis>
+ <property moreinfo="none">lineItems</property></emphasis> is the massive of <emphasis>
+ <property moreinfo="none">LineItem</property></emphasis> .To do the binding,you should use <emphasis>
+ <property moreinfo="none">Wiring Item</property></emphasis>.First you should create a new Binding item. This is a configuration that allows you to construct an object graph .Select <emphasis>
+ <property moreinfo="none">example.trgmodel.LineItem[]</property></emphasis> in the Class field and orderItems in the Name field,in bean Id write lineItems.
+ Your Smooks Configuration Editor should look like this:
+ </para>
+ <figure float="0">
+ <title> Creating Wiring Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start13a.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Then you should right click <emphasis>
+ <property moreinfo="none">lineOrder</property></emphasis> binding item<emphasis>
+ <property moreinfo="none">>Add Smooks Resource>Wiring</property></emphasis>.Select <emphasis>
+ <property moreinfo="none">lineItem</property></emphasis> in <emphasis>
+ <property moreinfo="none">Bean id Ref</property></emphasis>.
+ </para>
+ <para>The final step is to add new Wiring item to lineOrder <property moreinfo="none">Binding</property>.In the <property moreinfo="none">Bean id Ref</property> select <emphasis>
+ <property moreinfo="none">lineItems</property></emphasis> and in <emphasis>
+ <property moreinfo="none">Property</property></emphasis> select <emphasis>
+ <property moreinfo="none">lineItems</property></emphasis>.</para>
+<!--
+ <para>Next, you are going to bind the properties of the <property>OrderItem</property> to
+ the properties of the <property>LineItem</property>.</paa>
+ <para>Select the <emphasis>
+ <property>"price"</property>
+ </emphasis> and drag it onto the <emphasis>
+ <property>"unitPrice"</property>
+ </emphasis> of the other side tree viewer. The Problems area shows an
+ error:</para>
+ <figure>
+ <title>Connection Error 1</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start12.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>How to deal with the error?</para>
+ <para>Please click the <emphasis>
+ <property>Fix it</property></emphasis> link, a menu is popped-up with several
+ resolve methods on it.</para>
+ <figure>
+ <title>Fixing the Connection Error</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start13.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Select the first resolve method: <emphasis>
+ 'Connect the "OrderItem" to the
+ "LineItem" '.</emphasis> As the result the <emphasis>
+ <property>"OrderItem"</property></emphasis> is connected with
+ the <emphasis>
+ <property>"LineItem"</property>.</emphasis></para>
+ <para>But the notify message area still shows some other errors:</para>
+ <figure>
+ <title>Connection Error 2</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start14.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>OK, let's deal with the fire error. Click the <emphasis>
+ <property>Fix it</property></emphasis> link and
+ select the first resolve method. The <emphasis>
+ <property>"orderItems"</property></emphasis> is connected with
+ the <emphasis>
+ <property>"lineItems"</property>.</emphasis></para>
+
+ <tip>
+ <title>Tip:</title>
+ <para> Why does the error occur?</para>
+ <para> You will find that, if you only connect the property node without connecting the
+ parent node of the property, the "connection error" occurs.</para>
+ <para>The connection of the "price-to-unitPrice" is the
+ "Binding Connection", but it needs an "Instance Creation
+ Connection" - the connection of the
+ "OrderItem-to-LineItem".</para>
+ </tip>
+ <para> After that, connect <emphasis>
+ <property>"quantity"</property></emphasis> to the <emphasis>
+ <property>"unitQuantity"</property></emphasis> and <emphasis>
+ <property>"productId"</property></emphasis> to the
+ <emphasis>
+ <property>"productCode"</property>:</emphasis></para>
+ <figure>
+ <title>Complete Mapping</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start15.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>-->
+ <para>Now, you should save the file and the <property moreinfo="none">Smooks tools</property> generate the correct
+ configuration file content.</para>
+ <para>OK, let run the test class: <property moreinfo="none">example.Main</property>. (Please, make sure that the Smooks engine
+ loads the correct configuration file).</para>
+ <para>Success!</para>
+ </section>
+</chapter>
+
+ <!--&smooksformeditor_graphicaltab;-->
+
+<chapter id="smooksformeditor_configurationtab" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/smooks/docs/reference/en/modules/smooksformeditor_configurationpage.xml" xreflabel="Smooks Configuration Editor Page">
+ <?dbhtml filename="smooks_form_editor_configurationtab.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Smooks</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Smooks Design Page</title>
+ <para>In this section you will explore the details of Smooks Design Page usage.</para>
+ <para><property moreinfo="none">Smooks Design Page</property> is one tab of the <property moreinfo="none">Smooks Editor</property>. </para>
+ <figure float="0">
+ <title>Design Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page1.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This page consists of 3 sections: Message Filtering Resources, Input Data and the section devoted to the configurations of a selected in a Message Filtering Resources section Item.</para>
+ <para> You can bind classes <link linkend="quickstart_mapping">using Bindings item
+ </link> on the Design page of the <property moreinfo="none">Smooks Editor</property>. </para>
+ <para><emphasis>
+ <property moreinfo="none">Resource list</property></emphasis> item in <emphasis>
+ <property moreinfo="none">Message Filtering Resources</property></emphasis> corresponds to the root element of the <emphasis>
+ <property moreinfo="none">smooks-config.xml</property></emphasis> file.You can configurate the next four properties using corresponding fields:</para>
+ <itemizedlist>
+ <listitem><para><emphasis>
+ <property moreinfo="none">default-selector</property></emphasis>:Defines the selector that will be applied to all resource-config elements in the <emphasis>
+ <property moreinfo="none">smooks-config.xml</property></emphasis>, where a selector is not defined. </para></listitem>
+ <listitem><para><emphasis>
+ <property moreinfo="none">default-selector-namespace</property></emphasis>:Defines the default selector namespace. </para></listitem>
+ <listitem><para><emphasis>
+ <property moreinfo="none">default-target-profile</property></emphasis>: Defines the default target profile that will be applied to all resources in the smooks-config.xml. </para></listitem>
+ <listitem><para><emphasis>
+ <property moreinfo="none">default-condition-ref</property></emphasis>:The condition is applied to resources where an empty "condition" element (i.e. <code><condition/></code>)is defined.The condition element does not reference a globally defined condition. </para></listitem>
+ </itemizedlist>
+ <para> The configuration editor also edits the <link linkend="configurationpage_parsetype">Smooks parse
+ type</link> and manages the <link linkend="configurationpage_importfile">Import
+ Files</link>.</para>
+ <section id="selector-dialog">
+ <title>Selector generate dialog</title>
+ <para>Using <emphasis>
+ <property moreinfo="none">Selector generate dialog</property></emphasis> you can allow the user to select a node for generation <property moreinfo="none">"selector"</property> for smooks-config file.
+ To open the dialog you should left click <property moreinfo="none">Browse</property> button in <emphasis>
+ <property moreinfo="none">Default Selector</property></emphasis> section.
+ </para>
+ <figure float="0">
+ <title>Selector generate dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page2a.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> When the dialog is opened you should click <property moreinfo="none">"Click to add input data"</property>to set the selector.
+ In the opened <emphasis>
+ <property moreinfo="none">Data Type Selection</property></emphasis> Wizard you should choose the type of the file and the file itself you want to load to the <emphasis>
+ <property moreinfo="none">Selector generate dialog</property></emphasis>.After that your dialog should look nearly like that:</para>
+ <figure float="0">
+ <title>Selector generate dialog after adding Input Data</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page2b.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The final step is to choose the node you want to make a selector for <emphasis>
+ <property moreinfo="none">smooks-config.xml</property></emphasis>.</para>
+ </section>
+ <section id="configurationpage_parsetype">
+
+ <title>Smooks Parse Type</title>
+ <para>If your config file doesn't contain <emphasis>
+ <property moreinfo="none">Global Parametres</property></emphasis> item yet, you should add it by right click <emphasis>
+ <property moreinfo="none">Resource List>Add Smooks Resource>Global Parametres</property></emphasis>.After this step you should add <emphasis>
+ <property moreinfo="none">Param</property></emphasis> to just created <emphasis>
+ <property moreinfo="none">Global Parametres</property></emphasis>. </para>
+ <figure float="0">
+ <title>Adding Param to created Global Parametres</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page2.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then left click <emphasis>
+ <property moreinfo="none">Param</property>
+ </emphasis>and in the Param section, you will see a set of text fields: <emphasis>
+ <property moreinfo="none">Name</property></emphasis>,<emphasis>
+ <property moreinfo="none">Type</property></emphasis> and <emphasis>
+ <property moreinfo="none">Text</property></emphasis>.<emphasis>
+ <property moreinfo="none">Name</property></emphasis> value is required. To set a parse type you should write SAX/DOM to the
+ <emphasis>
+ <property moreinfo="none">Text</property></emphasis> field.</para>
+
+ <figure float="0">
+ <title>Filling Param section field Name and Text Value for set a Parse Type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page3.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>To apply changes to the <emphasis>
+ <property moreinfo="none">smooks-config.xml</property></emphasis> click <emphasis>
+ <property moreinfo="none">Save</property></emphasis> button (<emphasis>
+ <property moreinfo="none">Ctrl+S</property></emphasis>). </para>
+ </section>
+ <section id="configurationpage_importfile">
+
+ <title>Import Smooks Configuration page</title>
+ <para> Right click <emphasis>
+ <property moreinfo="none">Resource List>Add Smooks Resource>Import Smooks Configuration</property>
+ </emphasis>, then you should see a new <emphasis>
+ <property moreinfo="none">Import Smooks Configuration</property>
+ </emphasis>item in the list (see the figure below).</para>
+
+ <figure float="0">
+ <title>Import Data</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page3a.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Left click the added item and to the left of <emphasis>
+ <property moreinfo="none">Message Filtering Resources Import Smooks Configuration </property></emphasis> section should appear. Click the <emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button and select the file you want to import(see <link linkend="file_selection">File selection</link> section). </para>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property></emphasis> and the <code><import></code> tag with the corresponding file path as a <emphasis>
+ <property moreinfo="none">file</property></emphasis> property will be added to the <emphasis>
+ <property moreinfo="none">smooks-config.xml</property></emphasis>.</para>
+ </section>
+ <section id="file_selection">
+ <title>File selection</title>
+ <para>Some attributes in Smooks elements should store path to a file as a value
+ (e.g. attribute <emphasis><property moreinfo="none">"mappingModel"</property></emphasis> of the element <emphasis><property moreinfo="none">"edi:reader"</property></emphasis>).
+ You can see a Browse button near the fields, that set such a value to the attribute
+ (e.g. <emphasis><property moreinfo="none">"Mapping Model"</property></emphasis> field set a value to the <emphasis><property moreinfo="none">"mappingModel"</property></emphasis> attribute).
+ </para>
+ <figure float="0">
+ <title>EDI:Reader element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page6.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ When you click <emphasis><property moreinfo="none">Browse</property></emphasis>, the dialog prompts you click one of two buttons:
+ <emphasis><property moreinfo="none">Browse File System</property></emphasis> and <emphasis><property moreinfo="none">Browse WorkSpace</property></emphasis>.
+ </para>
+ <figure float="0">
+ <title>Browse dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page7.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Using the buttons you can locate the file you need. If you click <emphasis>
+ <property moreinfo="none">Browse File System</property></emphasis> button you specify the path of, or browse to, a file system directory.
+ </para>
+ <figure float="0">
+ <title>Browse file system</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page8.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ If you click <emphasis><property moreinfo="none">Browse WorkSpace</property></emphasis> button, you specify the path of, or browse to, a workspace relative working directory.
+ </para>
+ <figure float="0">
+ <title>Browse Workspace</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page9.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <!--<section id="configurationpage_datedecoder">
+ <title>Date Decoder Detail Page</title>
+
+ <para>Date Decoder is a resourceConfig element in the Smooks configuration file. It
+ describes how to transform the "Date" type.</para>
+ <para> Click the <emphasis>
+ <property>New</property>
+ </emphasis> button to open the <property>New Resource Type wizard</property>
+ dialog.</para>
+ <figure>
+ <title>Resource Type Selection Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page4.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>There are several resource type on the list. Select the <emphasis>
+ <property>Date Decoder</property>
+ </emphasis> and click the <emphasis>
+ <property>Finish</property>
+ </emphasis> button, a new <emphasis>
+ <property>Date Decoder</property>
+ </emphasis> item was added and shown on the resource type list.</para>
+ <para> There are several parameters in the <emphasis>
+ <property>Date Decoder</property>
+ </emphasis> resourceConfig element:</para>
+
+ <para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Format</para>
+ </listitem>
+
+ <listitem>
+ <para>Locale-Language</para>
+
+ </listitem>
+
+ <listitem>
+ <para>Locale-Country</para>
+
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para> You can modify the parameters of the <emphasis>
+ <property>Date Decoder</property></emphasis> item with the left detail page.</para>
+
+ <figure>
+ <title>Date Decoder Detail Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/config_page/config_page1.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> When you defined a new <emphasis>
+ <property>Date Decoder</property></emphasis>, then you can use the <link
+ linkend="graphicalpage_propertiesview">JavaBean Properties</link> GUI to set
+ it to be the "Java type".</para>
+ <para>Now when we've learnt Smooks Configuration Editor Page, let's have a look at one more Smooks Editor Page - Smooks Source Editor Page and investigate its functionality</para>
+
+
+ <para> The XML fragment generated by Smooks tools for the "Date
+ Decoder": </para> <para> <programlisting> <![CDATA[<resource-config
+ selector="decoder:DateLong">
+ <resource>org.milyn.javabean.decoders.DateDecoder</resource> <param
+ name="locale-language">en</param> <param name="format">yyy-MM-dd
+ HH:mm:ss</param> <param name="locale-country">IE</param>
+ </resource-config>]]> </programlisting> </para>
+
+ </section>
+
+ <section id="configurationpage_documenttype"> <title>Document Type
+ Detail Page</title> <para> </para> </section> <section
+ id="configurationpage_unhandleresourceconfig"> <title>Unhandle
+ ResourceConfig</title> </section>
+ -->
+</chapter>
+
+
+<chapter id="smooksformeditor_sourcetab" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/smooks/docs/reference/en/modules/smooksformeditor_sourcepage.xml" xreflabel="Smooks Source Editor Page">
+ <?dbhtml filename="smooks_form_editor_sourcetab.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Smooks</keyword>
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Smooks Source Editor Page</title>
+ <para>This section provides information about Smooks Source Editor Page.</para>
+ <section>
+ <title>XML Source Editor</title>
+ <para>You can use this editor to edit the Smooks Configuration file directly. </para>
+ <figure float="0">
+ <title>Graphical Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/source_editor/source_editor1.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Error underlining in Graphical Editor</title>
+ <para>If the <property moreinfo="none">Smooks tools</property> can't understand the configuration
+ file or the configuration file is illegal (XML structure isn't right for Smooks
+ Configuration file, etc.), the error is underlined.</para>
+ <figure float="0">
+ <title>Graphical Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/source_editor/source_editor2.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <!--note>
+ <title>Tip:</title>
+ <para> When the error message panel is displayed, other editors ( Graphical Editor,
+ Configuration Editor ) are disabled. </para>
+ <para> You can't edit the configuration file with other editors until file becomes
+ valid. </para>
+ </note-->
+
+
+
+ </section>
+
+ <section>
+ <title>Smooks Configuration File Validator</title>
+ <para>Smooks configuration file validator will validate your Smooks configuration file. Just right-click on the file and then click on the <property moreinfo="none">Validate</property> button. The validator can be enabled/disabled in <emphasis><property moreinfo="none">Window -> Preferences -> Validation</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>Validation: Smooks Configuration File Validator</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/source_editor/smooks_conf_validator.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can set up your Smooks validator to include, exclude groups to validate and specify rules for validation. Just click on the <property moreinfo="none">Settings</property> button and use the options provided:</para>
+
+ <figure float="0">
+ <title>Smooks Configuration File Validator Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/source_editor/smooks_conf_validator_settings.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>We hope, our guide will help you to get started with JBoss Smooks Tools. Besides, for additional information you are welcome on <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
+
+ </section>
+
+
+
+
+</chapter>
+
+</book>
15 years
JBoss Tools SVN: r19335 - branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:16:48 -0500 (Wed, 16 Dec 2009)
New Revision: 19335
Modified:
branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating the plugin version;
Modified: branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en/master.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en/master.xml 2009-12-16 15:15:51 UTC (rev 19334)
+++ branches/jbosstools-3.1.0.RC1/smooks/docs/reference/en/master.xml 2009-12-16 15:16:48 UTC (rev 19335)
@@ -35,7 +35,7 @@
<holder>JBoss by Red Hat</holder>
</copyright>
<releaseinfo>
- Version: 1.1.0.M2
+ Version: 1.1.0.CR1
</releaseinfo>
<abstract>
15 years
JBoss Tools SVN: r19334 - branches/jbosstools-3.1.0.RC1/seam/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-16 10:15:51 -0500 (Wed, 16 Dec 2009)
New Revision: 19334
Modified:
branches/jbosstools-3.1.0.RC1/seam/docs/reference/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-989 - updating master_output.xml;
Modified: branches/jbosstools-3.1.0.RC1/seam/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/seam/docs/reference/en/master_output.xml 2009-12-16 15:15:28 UTC (rev 19333)
+++ branches/jbosstools-3.1.0.RC1/seam/docs/reference/en/master_output.xml 2009-12-16 15:15:51 UTC (rev 19334)
@@ -9,6 +9,7 @@
<!ENTITY menus_and_actions SYSTEM "modules/seam_menus_and_actions.xml">
<!ENTITY seam_wizards SYSTEM "modules/seam_wizards.xml">
<!ENTITY generate_entities SYSTEM "modules/generate_entities.xml">
+<!ENTITY seam_refactoring SYSTEM "modules/seam_refactoring.xml">
<!ENTITY seam_editors SYSTEM "modules/seam_editors.xml">
<!ENTITY seam_view SYSTEM "modules/seam_view.xml">
<!ENTITY seam_preferences SYSTEM "modules/seam_preferences.xml">
@@ -37,13 +38,13 @@
<bookinfo>
<title>Seam Dev Tools Reference Guide</title>
- <corpauthor diffmk:change="added">
- <inlinemediaobject diffmk:change="added">
- <imageobject diffmk:change="added" role="fo">
- <imagedata diffmk:change="added" fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
</imageobject>
- <imageobject diffmk:change="added" role="html">
- <imagedata diffmk:change="added"></imagedata>
+ <imageobject role="html">
+ <imagedata></imagedata>
</imageobject>
</inlinemediaobject>
</corpauthor>
@@ -57,10 +58,10 @@
<copyright>
<year>2007</year>
<year>2009</year>
- <holder><diffmk:wrapper diffmk:change="changed">JBoss by Red Hat</diffmk:wrapper></holder>
+ <holder>JBoss by Red Hat</holder>
</copyright>
<releaseinfo><diffmk:wrapper diffmk:change="changed">
- Version: 3.1.0.M2
+ Version: 3.1.0.CR1
</diffmk:wrapper></releaseinfo>
<abstract>
@@ -75,7 +76,7 @@
<toc></toc>
-<chapter id="intro" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/intro.xml" xreflabel="intro">
+<chapter id="intro" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/intro.xml" xreflabel="intro">
<?dbhtml filename="intro.html"?>
<chapterinfo>
<keywordset>
@@ -91,98 +92,98 @@
<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><diffmk:wrapper diffmk:change="changed"> is a fully featured application framework on top of Java EE
+ <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 frameworks 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.</diffmk:wrapper></para>
+ applications with many component frameworks.</para>
</section>
- <section><title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Features of JBoss Seam</diffmk:wrapper></title>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">For a start, we propose you to look through the table of main features of JBoss Seam:</diffmk:wrapper></para>
+ <section><title>Key Features of JBoss Seam</title>
+ <para>For a start, we propose you to look through the table of main features of JBoss Seam:</para>
- <table diffmk:change="added">
+ <table>
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Key Functionality for JBoss Seam</diffmk:wrapper></title>
- <tgroup cols="3" diffmk:change="added">
+ <title>Key Functionality for JBoss Seam</title>
+ <tgroup cols="3">
- <colspec align="left" colnum="1" colwidth="2*" diffmk:change="added"></colspec>
- <colspec colnum="2" colwidth="4*" diffmk:change="added"></colspec>
- <colspec align="left" colnum="3" colwidth="2*" diffmk:change="added"></colspec>
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+ <colspec align="left" colnum="3" colwidth="2*"></colspec>
- <thead diffmk:change="added">
- <row diffmk:change="added">
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Feature</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Benefit</diffmk:wrapper></entry>
- <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Chapter</diffmk:wrapper></entry>
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
</row>
</thead>
- <tbody diffmk:change="added">
+ <tbody>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Integrated JSF with EJB 3.0</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss Seam combines the component models of EJB3 and JSF, eliminating glue code, and thus, letting the developer think about the business problem.</diffmk:wrapper></para></entry>
+ <row>
+ <entry><para>Integrated JSF with EJB 3.0</para></entry>
+ <entry><para>JBoss Seam combines the component models of EJB3 and JSF, eliminating glue code, and thus, letting the developer think about the business problem.</para></entry>
</row>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Integrated AJAX</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Developer can add AJAX capability to the user interface of his application without the need to write any JavaScript code as Seam supports JBoss RichFaces and ICEfaces - the best open source JSF-based AJAX solutions.</diffmk:wrapper></para></entry>
+ <row>
+ <entry><para>Integrated AJAX</para></entry>
+ <entry><para>Developer can add AJAX capability to the user interface of his application without the need to write any JavaScript code as Seam supports JBoss RichFaces and ICEfaces - the best open source JSF-based AJAX solutions.</para></entry>
</row>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Bijection</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Bijection allows auto-assembly of stateful components by the container. It even allows a component to safely and easily manipulate the value of a context variable, just by assigning it to an attribute of the component.</diffmk:wrapper></para></entry>
+ <row>
+ <entry><para>Bijection</para></entry>
+ <entry><para>Bijection allows auto-assembly of stateful components by the container. It even allows a component to safely and easily manipulate the value of a context variable, just by assigning it to an attribute of the component.</para></entry>
</row>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">New Seam Project wizard</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">An easy step-by-step wizard to create a standalone Seam Web Project with a form to create runtime and server instances in order to get started creating, running, and debugging J2EE (only) applications. You may also add JSF capabilities.</diffmk:wrapper></para></entry>
- <entry diffmk:change="added">
- <link diffmk:change="added" linkend="create_seam"><diffmk:wrapper diffmk:change="added">New Seam Project wizard</diffmk:wrapper></link>
+ <row>
+ <entry><para>New Seam Project wizard</para></entry>
+ <entry><para>An easy step-by-step wizard to create a standalone Seam Web Project with a form to create runtime and server instances in order to get started creating, running, and debugging J2EE (only) applications. You may also add JSF capabilities.</para></entry>
+ <entry>
+ <link linkend="create_seam">New Seam Project wizard</link>
</entry>
</row>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Seam component generations options </diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">All the Seam component generations options known from Seam-gen are available as wizards (with sensible auto-defaulting) for creating various common Seam components.</diffmk:wrapper></para></entry>
- <entry diffmk:change="added">
- <link diffmk:change="added" linkend="seam_wizards"><diffmk:wrapper diffmk:change="added">Seam Wizards</diffmk:wrapper></link>
+ <row>
+ <entry><para>Seam component generations options </para></entry>
+ <entry><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></entry>
+ <entry>
+ <link linkend="seam_wizards">Seam Wizards</link>
</entry>
</row>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Seam Editors</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Visual Page Editor, Seam Pages Editor and Seam Components Editor provide you with a range of great possibilities and will be helpful when working with JBoss Seam.</diffmk:wrapper></para></entry>
- <entry diffmk:change="added">
- <link diffmk:change="added" linkend="seam_editors"><diffmk:wrapper diffmk:change="added">Seam Editors</diffmk:wrapper></link>
+ <row>
+ <entry><para>Seam Editors</para></entry>
+ <entry><para>Visual Page Editor, Seam Pages Editor and Seam Components Editor provide you with a range of great possibilities and will be helpful when working with JBoss Seam.</para></entry>
+ <entry>
+ <link linkend="seam_editors">Seam Editors</link>
</entry>
</row>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Seam Validator</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">A configured Seam Validator provides validation of various possible problematic definitions.</diffmk:wrapper></para></entry>
- <entry diffmk:change="added">
- <link diffmk:change="added" linkend="SeamValidation"><diffmk:wrapper diffmk:change="added">Seam Validation</diffmk:wrapper></link>
+ <row>
+ <entry><para>Seam Validator</para></entry>
+ <entry><para>A configured Seam Validator provides validation of various possible problematic definitions.</para></entry>
+ <entry>
+ <link linkend="SeamValidation">Seam Validation</link>
</entry>
</row>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">CRUD Database Application Generation</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss Seam allows adding CRUD support to a Seam Web application.</diffmk:wrapper></para></entry>
- <entry diffmk:change="added">
- <link diffmk:change="added" linkend="crud_database_application"><diffmk:wrapper diffmk:change="added">CRUD Database Application</diffmk:wrapper></link>
+ <row>
+ <entry><para>CRUD Database Application Generation</para></entry>
+ <entry><para>JBoss Seam allows adding CRUD support to a Seam Web application.</para></entry>
+ <entry>
+ <link linkend="crud_database_application">CRUD Database Application</link>
</entry>
</row>
- <row diffmk:change="added">
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">TestNG Framework</diffmk:wrapper></para></entry>
- <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">TestNG ("Testing, the Next Generation") is a Java unit testing framework that aims to overcome many limitations of JUnit.</diffmk:wrapper></para></entry>
- <entry diffmk:change="added">
- <link diffmk:change="added" linkend="testNG"><diffmk:wrapper diffmk:change="added">Using TestNG project</diffmk:wrapper></link>
+ <row>
+ <entry><para>TestNG Framework</para></entry>
+ <entry><para>TestNG ("Testing, the Next Generation") is a Java unit testing framework that aims to overcome many limitations of JUnit.</para></entry>
+ <entry>
+ <link linkend="testNG">Using TestNG project</link>
</entry>
</row>
@@ -200,7 +201,7 @@
</section>
- <section diffmk:change="added">
+ <section>
<title>Installation into Eclipse</title>
<para>Here, we are going to explain how to install Seam plugin into Eclipse.</para>
@@ -215,12 +216,15 @@
<para>The <ulink url="http://seamframework.org/">Seam Framework</ulink> - Next generation enterprise Java development.</para>
<para>All JBoss Developer Studio/JBoss Tools release documentation you can find at<ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
+ <para>There is some extra information on <ulink url="http://www.jboss.org/community/wiki/JBossSeam">JBoss Wiki. </ulink></para>
<para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
+ <para>You can find a set of screencasts on how to search/find references and use Seam refactoring tools in the following Max Andersen's
+ <ulink url="http://in.relation.to/12524.lace">blog post</ulink>.</para>
</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">
+<chapter id="create_seam" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/creating_new_seam.xml" xreflabel="create_seam">
<?dbhtml filename="create_new_seam.html"?>
<chapterinfo>
<keywordset>
@@ -230,14 +234,13 @@
</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>
+ <para><diffmk:wrapper diffmk:change="changed">In this chapter we provide you with the necessary steps to start working with Seam
+ Framework.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">At first, we suggest to set the specific Seam perspective that combines a number of
+ different views and editors needed for work with resources concerned. For that select
+ </diffmk:wrapper><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>
@@ -246,10 +249,9 @@
</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>
-
+ <property moreinfo="none">Open Web Browser</property></emphasis><diffmk:wrapper diffmk:change="changed"> action is directly available in the
+ </diffmk:wrapper><property moreinfo="none">Seam perspective</property>.</para>
<figure float="0">
<title>Embedded Web Browser Button</title>
<mediaobject>
@@ -258,11 +260,10 @@
</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><diffmk:wrapper diffmk:change="changed">The best way to get started with Seam is to create a simple Seam Project and
+ experiment with it.</diffmk:wrapper></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
@@ -271,9 +272,8 @@
<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>
-
+ <para><diffmk:wrapper diffmk:change="changed">Let's get through the wizard step-by-step. First, you should enter a name and a
+ location directory for your new project.</diffmk:wrapper></para>
<figure float="0" id="figure_create_seam1">
<title>New Seam Project Wizard</title>
<mediaobject>
@@ -282,18 +282,15 @@
</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
+ </emphasis> button in the <property moreinfo="none">Target Runtime</property><diffmk:wrapper diffmk:change="changed"> 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>
+ runtime appropriate for your project configuration. Let's create one more JBoss 4.2
+ Runtime. Hence, after choosing it click on </diffmk:wrapper><emphasis>
<property moreinfo="none">Next</property>
</emphasis> button.</para>
-
<figure float="0">
<title>Specifying Target Runtime</title>
<mediaobject>
@@ -302,13 +299,11 @@
</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>
@@ -317,24 +312,19 @@
</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>
+ </emphasis> returns you to the <link linkend="figure_create_seam1"><diffmk:wrapper diffmk:change="changed">New Seam Project
+ wizard page</diffmk:wrapper></link>.</para>
+ <para><diffmk:wrapper diffmk:change="changed">The next step is to define a Server by clicking on </diffmk:wrapper><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>
+ <para><diffmk:wrapper diffmk:change="changed">All declared runtimes are listed in the combo-box under the servers view. Here, you
+ can indicate a server runtime that you need. Click </diffmk:wrapper><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>
@@ -343,24 +333,20 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>Next page allows you to verify the information for chosen server. Leave everything as
- it is and click on <emphasis>
+ <para><diffmk:wrapper diffmk:change="changed">Next page allows you to verify the information for a chosen server. Leave everything as
+ it is and click on </diffmk:wrapper><emphasis>
<property moreinfo="none">Next</property>
</emphasis>.</para>
-
<figure float="0">
- <title>Specifying Server Configurations</title>
+ <title>JBoss Runtime Summary</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>
@@ -369,19 +355,15 @@
</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
+ <para><diffmk:wrapper diffmk:change="changed">We suggest that you look through </diffmk:wrapper><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>
@@ -390,7 +372,6 @@
</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
@@ -398,21 +379,16 @@
<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
+ <title><diffmk:wrapper diffmk:change="changed">Selecting the Project Facets</diffmk:wrapper></title>
+ <para>The <property moreinfo="none">Project Facets wizard</property><diffmk:wrapper diffmk:change="changed"> allows you to enable or disable
+ specific facets which define necessary features for the project. When you
switch to this wizard form, all critical facets are already checked for the chosen
- Configuration.</para>
-
+ Configuration.</diffmk:wrapper></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>
@@ -421,12 +397,10 @@
</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>
@@ -435,39 +409,47 @@
</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>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> button. If more than one runtime is checked here, the </diffmk:wrapper><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>
-
+ </emphasis><diffmk:wrapper diffmk:change="changed"> button won't be dimmed yet. Thus, you can make use of it to mark primary
+ runtime.</diffmk:wrapper></para>
<figure float="0">
- <title>Runtime Manipulations</title>
+ <title><diffmk:wrapper diffmk:change="changed">Setting Runtime</diffmk:wrapper></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 diffmk:change="added" id="configureJava">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Java application building configuration</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">With this wizard you can define Java source directories which will be generated on
+ build path. Also you can specify a default output folder. If you are agree with default
+ values, press </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Next</diffmk:wrapper></property></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Java application building Wizard</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/create_new_seam/create_seam_16a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </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
+ <para><diffmk:wrapper diffmk:change="changed"> As we deal with a Dynamic Web Application, we should at 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>
-
+ kind of application contains Web resources. Thus, it's important to indicate the content
+ directory. The wizard will put all those values itself, so you can leave everything as
+ is.</diffmk:wrapper></para>
<figure float="0">
<title>Web Module Settings</title>
<mediaobject>
@@ -480,17 +462,13 @@
<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>
-
+ <para><diffmk:wrapper diffmk:change="changed">This wizard helps you to add JSF capabilities to your project. </diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">Choose </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Library provided by Target Runtime</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> from Library Type list if you'd like to use a default JSF implementation
+ given by the present runtime.</diffmk:wrapper></para>
<figure float="0">
<title>Adding JSF Capabilities to Web Project</title>
<mediaobject>
@@ -499,46 +477,65 @@
</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>
+ <para><diffmk:wrapper diffmk:change="added">In case if you prefer to use your custom JSF implementation, choose </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">User
+ Library</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> Item from Library Type list. In User Library list you can check
+ required library.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Using Custom JSF implementation Library </diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/create_new_seam/create_seam_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added"> If a new library is required, click </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Manage libraries...</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> ( </diffmk:wrapper><inlinemediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/create_new_seam/create_seam_17a.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject><diffmk:wrapper diffmk:change="added">) button. Then you should click </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">New</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Using Custom JSF implementation Library </diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/create_new_seam/create_seam_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added"> Here, it's necessary to type a </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Library Name</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper></para>
<figure float="0">
- <title>Create JSF Implementation Library</title>
+ <title><diffmk:wrapper diffmk:change="changed">Entering New User Library Name</diffmk:wrapper></title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/create_new_seam/create_seam_17.png"></imagedata>
+ <imagedata fileref="images/create_new_seam/create_seam_23.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>
-
+ <para><diffmk:wrapper diffmk:change="changed">To add proper </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Library JARs</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, click </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Add JARs...</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ button and select the JARs on your hard drive. </diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Selection Library JARs</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/create_new_seam/create_seam_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can download necessary JSF implementation libraries provided by Sun and Apache Foundation as well. Click </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Download...</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> (</diffmk:wrapper><inlinemediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/create_new_seam/create_seam_23a.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject><diffmk:wrapper diffmk:change="added">) button and choose one of proposed libraries.</diffmk:wrapper></para>
<figure float="0">
- <title>Create JSF Implementation Component Library</title>
+ <title><diffmk:wrapper diffmk:change="changed">Download JSF Implementation Library</diffmk:wrapper></title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/create_new_seam/create_seam_18.png"></imagedata>
+ <imagedata fileref="images/create_new_seam/create_seam_24.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>
@@ -547,14 +544,11 @@
</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>
+ <para><diffmk:wrapper diffmk:change="changed">Since we are arranging the Seam Web project, the last step we should do is to
+ adjust project configurations associated with the Seam.</diffmk:wrapper></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">
@@ -565,7 +559,6 @@
</imageobject>
</mediaobject>
</figure>
-
<itemizedlist>
<listitem>
<para>Create Seam runtime and define Seam home folder.</para>
@@ -573,11 +566,10 @@
</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
+ </emphasis> button in the <property moreinfo="none">General</property><diffmk:wrapper diffmk:change="changed"> section. Note, in the
+ wizard shown below you can create a Seam runtime only for the version that was
+ selected in the </diffmk:wrapper><link linkend="projectFacets">Project Facets</link> wizard (version 1.2
in our case).</para>
-
<figure float="0">
<title>Seam Runtime Creation</title>
<mediaobject>
@@ -586,7 +578,6 @@
</imageobject>
</mediaobject>
</figure>
-
<itemizedlist>
<listitem>
<para>Select EAR or WAR deployment by checking a necessary radio button.</para>
@@ -597,25 +588,21 @@
</emphasis></para>
</listitem>
</itemizedlist>
-
<figure float="0">
- <title>Seam Runtime Creation</title>
+ <title>Database Type Selecting</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>
@@ -624,7 +611,6 @@
</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>
@@ -638,13 +624,11 @@
</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>
+ <para><diffmk:wrapper diffmk:change="changed">On the dialog you'll be asked to enter its name and description. And then
+ you should select a proper driver and adjust connection details. Press </diffmk:wrapper><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>
@@ -653,14 +637,12 @@
</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>
-
+ <para>In the <property moreinfo="none">Code Generation</property><diffmk:wrapper diffmk:change="changed"> section the wizard has already provided the
+ names for your </diffmk:wrapper><property moreinfo="none">Session Bean</property>, <property moreinfo="none">Entity Bean</property> and
+ <property moreinfo="none">Test</property><diffmk:wrapper diffmk:change="changed"> packages. Of course, you can change them on others
+ of your choice.</diffmk:wrapper></para>
<figure float="0">
<title>Code Generation Section</title>
<mediaobject>
@@ -669,117 +651,174 @@
</imageobject>
</mediaobject>
</figure>
-
<para>Click on <emphasis>
<property moreinfo="none">Finish</property>
</emphasis> to generate a project.</para>
-
<para></para>
</section>
</chapter>
-<chapter diffmk:change="added" id="create_mavenized_seam" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/creating_mavenized_seam.xml" xreflabel="create_mavenized_seam">
+<chapter id="mavenized_seam" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/creating_mavenized_seam.xml" xreflabel="mavenized_seam">
<?dbhtml filename="create_mavenized_seam.html"?>
- <chapterinfo diffmk:change="added">
- <keywordset diffmk:change="added">
- <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss Tools</diffmk:wrapper></keyword>
- <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">Seam</diffmk:wrapper></keyword>
- <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBDS</diffmk:wrapper></keyword>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBDS</keyword>
</keywordset>
</chapterinfo>
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Creating Maven ready Seam project</diffmk:wrapper></title>
-
- <para diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools 3.1 M2</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> comes with new Jboss Maven Integration plug-in. It makes the Seam Wizard capable of creating
- Maven ready projects to let Maven get the libraries instead of using the Seam runtime. The Jboss Maven Integration requires </diffmk:wrapper><ulink diffmk:change="added" url="http://m2eclipse.sonatype.org/"><diffmk:wrapper diffmk:change="added">m2eclipse</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> to be installed.</diffmk:wrapper></para>
-
- <note diffmk:change="added">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">For M2 release of </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Jboss Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> it is important to use m2eclipse </diffmk:wrapper><ulink diffmk:change="added" url="http://m2eclipse.sonatype.org/update/"><diffmk:wrapper diffmk:change="added">stable updatesite</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> or the </diffmk:wrapper><ulink diffmk:change="added" url="http://m2eclipse.sonatype.org/releases/0.9.9.200906081351"><diffmk:wrapper diffmk:change="added">latest integration build</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> that M2 was
- developed against. If you want to use the latest development release of m2eclipse you need to use the </diffmk:wrapper><ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/updates/nightly/trunk/"><diffmk:wrapper diffmk:change="added">nightly builds</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> of
- </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <title>Maven Integration for Seam Projects</title>
+ <para>Starting from 3.1 M2 version <property moreinfo="none">JBoss Tools</property> includes new Jboss Maven Integration plug-in which for now allows
+ to create mavenized Seam projects and enable Seam tools support for imported Maven projects.</para>
+
+ <para>The Jboss Maven Integration requires <ulink url="http://m2eclipse.sonatype.org/">m2eclipse</ulink> to be installed.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>For M2 release of <property moreinfo="none">Jboss Tools</property> it is important to use m2eclipse <ulink url="http://m2eclipse.sonatype.org/update/">stable updatesite</ulink> or the <ulink url="http://m2eclipse.sonatype.org/releases/0.9.9.200906081351">latest integration build</ulink> that M2 was
+ developed against. If you want to use the latest development release of m2eclipse you need to use the <ulink url="http://download.jboss.org/jbosstools/updates/nightly/trunk/">nightly builds</ulink> of
+ <property moreinfo="none">JBoss Tools</property>.</para>
</note>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To create a mavenized Seam project you should perform the following steps:</diffmk:wrapper></para>
+ <section id="create_mavenized_project">
+ <title>Creating Maven ready Seam project</title>
+
+ <para>Maven Integration makes the Seam Wizard capable of creating
+ Maven ready projects to let Maven get the libraries instead of using the Seam runtime.</para>
- <itemizedlist diffmk:change="added">
- <listitem diffmk:change="added">
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Navigate to </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">File > New Seam Project</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> Give the project a meaningful name, specify a target runtime and server
- and select the proper configuration for your Seam project:</diffmk:wrapper></para>
+ <para>To create a mavenized Seam project you should perform the following steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Navigate to <emphasis>
+ <property moreinfo="none">File > New Seam Project</property>.</emphasis> Give the project a meaningful name, specify a target runtime and server
+ and select the proper configuration for your Seam project:</para>
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Starting the Mavenized Seam Project</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/create_mavenized_seam/createMavenizedSeamProject.png"></imagedata>
+ <figure float="0">
+ <title>Starting the Mavenized Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/create_mavenized_seam/createMavenizedSeamProject.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
</listitem>
- <listitem diffmk:change="added">
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Modify</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> button to enable the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Jboss Maven Integration</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> facet:</diffmk:wrapper></para>
+ <listitem>
+ <para>Click the <emphasis>
+ <property moreinfo="none">Modify</property></emphasis> button to enable the <emphasis>
+ <property moreinfo="none">Jboss Maven Integration</property></emphasis> facet:</para>
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Enabling the Jboss Maven Integration Facet</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/create_mavenized_seam/jbossMavenIntegrationFacet.png"></imagedata>
+ <figure float="0">
+ <title>Enabling the Jboss Maven Integration Facet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/create_mavenized_seam/jbossMavenIntegrationFacet.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
</listitem>
- <listitem diffmk:change="added">
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">On the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss M2 capabilities</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> page you'll be prompted to add the following maven properties:
+ <listitem>
+ <para>On the <property moreinfo="none">JBoss M2 capabilities</property> page you'll be prompted to add the following maven properties:
groupId, artifactId, version, packaging, name and description. Here it's possible to set a maven version of Seam
and also decide whether to remove WTP classpath containers (where the path starts with org.eclipse.jst).
- </diffmk:wrapper></para>
+ </para>
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Adjusting JBoss M2 Capabilities</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/create_mavenized_seam/jbossM2capabilities.png"></imagedata>
+ <figure float="0">
+ <title>Adjusting JBoss M2 Capabilities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/create_mavenized_seam/jbossM2capabilities.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
</listitem>
- <listitem diffmk:change="added">
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">On the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Seam Facet</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> page configure the Seam Facet settings and click </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Finish</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">:</diffmk:wrapper></emphasis></para>
+ <listitem>
+ <para>On the <property moreinfo="none">Seam Facet</property> page configure the Seam Facet settings and click <emphasis>
+ <property moreinfo="none">Finish</property>:</emphasis></para>
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Seam Facet Settings</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/create_mavenized_seam/seamFacetPage.png"></imagedata>
+ <figure float="0">
+ <title>Seam Facet Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/create_mavenized_seam/seamFacetPage.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
</listitem>
</itemizedlist>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The organized Seam project contains five projects with the Maven nature, builder, Maven classpath and the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">pom.xml</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> files added:
- projectname, projectname-ear, projectname-ejb, projectname-parent and projectname-test.</diffmk:wrapper></para>
+ <para>The organized Seam project contains five projects with the Maven nature, builder, Maven classpath and the <emphasis>
+ <property moreinfo="none">pom.xml</property></emphasis> files added:
+ projectname, projectname-ear, projectname-ejb, projectname-parent and projectname-test.</para>
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Mavenized Seam Project</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/create_mavenized_seam/mavenizedProjectStructure.png"></imagedata>
+ <figure float="0">
+ <title>Mavenized Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/create_mavenized_seam/mavenizedProjectStructure.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
+ </section>
+
+ <section id="import_maven_project">
+ <title>Existing Maven Projects Import</title>
+
+ <para>Maven Integration includes the Seam Maven configurator which is called when importing a project, changing
+ <emphasis>
+ <property moreinfo="none">pom.xml</property></emphasis> and/or calling <emphasis>
+ <property moreinfo="none">Maven > Update Project Configuration</property>.</emphasis> When importing a Maven Seam project, the Seam Maven configurator
+ picks up the settings set up in <emphasis>
+ <property moreinfo="none">pom.xml</property></emphasis> and adds to the project the following:</para>
+
+ <itemizedlist>
+ <listitem><para>Seam nature</para></listitem>
+ <listitem><para>Seam facet and dependent facets to the EJB, EAR and WAR projects</para></listitem>
+ <listitem><para>JBoss Maven Integration facet if the Maven project contains a dependency with the
+ org.jboss.seam groupId and an artifactId starting with 'jboss-seam'</para></listitem>
+ <listitem><para>other required facets (Web Module, Java, JSF, etc.)</para></listitem>
+ </itemizedlist>
+
+ <para>If the Seam version from <emphasis>
+ <property moreinfo="none">pom.xml</property></emphasis> matches a version of a Seam runtime configured in the workspace,
+ Seam configurator will set that runtime, otherwise no Seam runtime will be set and you'll have to set it manually under
+ <link linkend="project_pref">Seam Settings in the project preferences</link>.</para>
+
+ <para>Seam configurator recognizes the Seam artifacts in the following way: the view folder is a web content folder from the WAR project,
+ the source folder is the first Eclipse source folder. If there is a folder containing "hot" in the name, it will be chosen as the action source folder.
+ Package is the first package that has children or doesn't have any subpackage.
+ </para>
+
+ <para>Configuring the Seam when importing a Maven project as well as a Seam Runtime, Seam artifacts and some facets could be suspended
+ in the JBoss Maven Integration preferences (<emphasis>
+ <property moreinfo="none">Window > Preferences > JBoss Tools > JBoss Maven Integration</property></emphasis>).</para>
+
+ <figure float="0">
+ <title>JBoss Maven Integration Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/create_mavenized_seam/configure_maven_integration.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Relevant Resources Links</title>
+
+ <para>In the <ulink url="http://in.relation.to/Bloggers/UsingMavenWithJBossTools">Using Maven with JBoss Tools</ulink>
+ article written by Max Andersen you'll find references to the
+ screencasts on how to use the examples of mavenized Seam projects provided by <property moreinfo="none">JBoss Tools</property>.</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">
+<chapter id="directory_str" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/directory_structure.xml" xreflabel="directory_str">
<?dbhtml filename="directory_structure.html"?>
<chapterinfo>
<keywordset>
@@ -983,7 +1022,7 @@
</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">
+<chapter id="menus_and_actions" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/seam_menus_and_actions.xml" xreflabel="menus_and_actions">
<?dbhtml filename="seam_menus_and_actions.html"?>
<chapterinfo>
<keywordset>
@@ -1337,8 +1376,8 @@
</imageobject>
</mediaobject>
</figure>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can also open Seam Component from the other component where the required one is declared in </diffmk:wrapper><code diffmk:change="added"><diffmk:wrapper diffmk:change="added">@In </diffmk:wrapper></code><diffmk:wrapper diffmk:change="added"> by using
- </diffmk:wrapper><link diffmk:change="added" linkend="OpenOn"><diffmk:wrapper diffmk:change="added">OpenOn</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> (</diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Ctrl + left click</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> and select </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Open Declaration of Seam Component for seam_component in Seam_class.java</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> ).</diffmk:wrapper></para>
+ <para>You can also open Seam Component from the other component where the required one is declared in <code>@In </code> by using
+ <link linkend="OpenOn">OpenOn</link> (<property moreinfo="none">Ctrl + left click</property> and select <property moreinfo="none">Open Declaration of Seam Component for seam_component in Seam_class.java</property> ).</para>
</section>
</section>
@@ -1346,7 +1385,7 @@
</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">
+<chapter id="seam_wizards" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/seam_wizards.xml" xreflabel="seam_wizards">
<?dbhtml filename="seam_wizards.html"?>
<chapterinfo>
<keywordset>
@@ -1688,7 +1727,7 @@
</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">
+<chapter id="generate_entities" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/generate_entities.xml" xreflabel="generate_entities">
<?dbhtml filename="generate_entities.html"?>
<chapterinfo>
<keywordset>
@@ -1701,8 +1740,8 @@
<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>
+ <para><diffmk:wrapper diffmk:change="changed">Generate Entities is available directly from Eclipse using Hibernate Tools plugin for the standard seam-gen generation.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">The wizard generates a set of CRUD Seam components and web pages based on existing tables in a database or on existing entities in your application.</diffmk:wrapper></para>
<figure float="0">
@@ -1714,32 +1753,37 @@
</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>
+ <para><diffmk:wrapper diffmk:change="added">By default, the generation mode is set to </diffmk:wrapper><emphasis diffmk:change="added"><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Reverse engineer from database</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added">
+ The reverse engineering from a database could be described in four steps:</diffmk:wrapper></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><diffmk:wrapper diffmk:change="added">On basis of this metainfomation the Entity classes are generated into
+ </diffmk:wrapper><literal diffmk:change="added" moreinfo="none">org.domain.project.entity</literal> package</para></listitem>
+ <listitem><para>For the entities from step 2 the classes <property moreinfo="none">EntityList</property> and <property moreinfo="none">EntityHome</property><diffmk:wrapper diffmk:change="added"> are generated
+ into </diffmk:wrapper><literal diffmk:change="added" moreinfo="none">org.domain.project.session</literal> 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
+
+ <note diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The entities are generated from a database based on the console configuration that is created automatically during a Seam project creation.
+ (Read more about </diffmk:wrapper><ulink diffmk:change="added" url="../../hibernatetools/html_single/index.html#console_conf"><diffmk:wrapper diffmk:change="added">console configuration</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">). The created console configuration is based on the
+ connection profile set on the </diffmk:wrapper><link diffmk:change="added" linkend="seamFacet"><diffmk:wrapper diffmk:change="added">Seam Facets wizard page</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> while creating a project.
+ Configured connection profile settings are hold in the generated </diffmk:wrapper><literal diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">hibernate-console.properties</diffmk:wrapper></literal><diffmk:wrapper diffmk:change="added">. To change the connection
+ profile, double-click the console configuration. It could be found in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Hibernate Configurations</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> view
+ (</diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Window > Show view > Other > Hibernate > Hibernate Configurations</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">
+ or just switch to the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Hibernate</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> perspective).</diffmk:wrapper></para>
+ </note>
+ <para><diffmk:wrapper diffmk:change="added">
+ Checking the </diffmk:wrapper><emphasis diffmk:change="added"><property moreinfo="none">Use existing entities</property></emphasis> 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">
+ <chapter id="seam_editors" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/seam_editors.xml" xreflabel="seam_editors">
<?dbhtml filename="seam_editors.html"?>
<chapterinfo>
<keywordset>
@@ -1750,40 +1794,40 @@
</chapterinfo>
<title>Seam Editors</title>
-
-
+
+
<para>This chapter tells about Seam Editors and their features.</para>
-
+
<section>
<title>Visual Page Editor</title>
<para>Visual Page Editor fits perfectly for authoring view Seam pages. The major features of VPE are listed in <link linkend="SeamEditors">Main Features of Seam Editors</link> </para>
<para>You can also read more about Visual Page Editor in <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/html/editors.htm...">Visual Page Editor</ulink> chapter of "Visual Web Tools Reference Guide".</para>
</section>
-
-
-
-
+
+
+
+
<section>
<title>Seam Pages Editor</title>
-
-
+
+
<para>
<property moreinfo="none">Seam Pages Editor</property> provides a handy way to edit the <property moreinfo="none">pages.xml</property> file.
-
+
</para>
-
+
<para>
You can edit the pages.xml file in three modes: Graphical, Tree and Source.
-
+
</para>
<para>
Seam Pages Editor supports synchronization with Package Explorer.This means that while renaming files in the Package Explorer all the changes immediately affect the pages.xml file.
-
+
</para>
<section>
<title>Graphical Mode</title>
-
-
+
+
<para>Graphical mode provides you with a set of visual tools to organize your project pageflow, exception handling etc.</para>
<figure float="0">
<title>Seam Pages Editor: Graphical View</title>
@@ -1793,22 +1837,22 @@
</imageobject>
</mediaobject>
</figure>
-
+
<para>The Graphical part of the editor has some visual elements. The table below shows graphical representation of the elements and explains their meanings. </para>
<table>
- <title>Pages Editor: Graphical View. Visual elements</title>
+ <title>Pages Editor: Graphical View. Visual elements</title>
<tgroup cols="2">
<thead>
<row>
<entry>Element</entry>
-
+
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
- <entry>
+ <entry>
<mediaobject>
<imageobject>
<imagedata fileref="images/seam_editors/element_page.png"></imagedata>
@@ -1819,9 +1863,9 @@
<page>
</code> element.
</para></entry>
- </row>
+ </row>
<row>
- <entry>
+ <entry>
<mediaobject>
<imageobject>
<imagedata fileref="images/seam_editors/element_param.png"></imagedata>
@@ -1833,26 +1877,26 @@
<imagedata fileref="images/seam_editors/icon_plus.png"></imagedata>
</imageobject>
</inlinemediaobject>)
-
-
+
+
on the <code>
<page>
</code> element reveals a box that lists the parameters for the page.</para>
</entry>
-
- </row>
-
+
+ </row>
+
<row>
<entry> <mediaobject>
<imageobject>
<imagedata fileref="images/seam_editors/element_page2.png"></imagedata>
</imageobject>
</mediaobject></entry>
- <entry>
+ <entry>
<para>A red cross in the upper left corner of the page box indicates that the view-id is not found in the project.</para>
</entry>
- </row>
-
+ </row>
+
<row>
<entry><mediaobject>
<imageobject>
@@ -1860,12 +1904,12 @@
</imageobject>
</mediaobject></entry>
<entry> <para>
- A gray box with a dashed border represents a page that has navigation
+ A gray box with a dashed border represents a page that has navigation
(navigation rule) to but the page is not defined in the page.xml file.
</para></entry>
- </row>
-
-
+ </row>
+
+
<row>
<entry> <mediaobject>
<imageobject>
@@ -1873,30 +1917,30 @@
</imageobject>
</mediaobject></entry>
<entry> <para>An <code><exception></code> is represented by a blue box with a orange diamond.</para></entry>
- </row>
-
-
-
-
-
+ </row>
+
+
+
+
+
</tbody>
</tgroup>
</table>
-
-
- <para>Pageflow relations are shown with gray arrows, when you select a relationship the arrow is changed to orange. </para>
-
-
-
- <para>On the lefthand side of the Graphical view of <property moreinfo="none">Seam Page Editor</property> you can find a toolbar with a set of icons for the most frequently used commands. </para>
+
+ <para>Pageflow relations are shown with gray arrows, when you select a relationship the arrow is changed to orange. </para>
+
+
+
+ <para>On the lefthand side of the Graphical view of <property moreinfo="none">Seam Page Editor</property> you can find a toolbar with a set of icons for the most frequently used commands. </para>
+
<table>
- <title>Pages Editor: Graphical View. Commands Icons</title>
+ <title>Pages Editor: Graphical View. Commands Icons</title>
<tgroup cols="2">
<thead>
<row>
<entry>Icon Image</entry>
-
+
<entry>Command</entry>
</row>
</thead>
@@ -1908,12 +1952,12 @@
<imagedata fileref="images/seam_editors/icon_select.png"></imagedata>
</imageobject>
</inlinemediaobject>
-
+
</entry>
<entry>Select a page element</entry>
-
- </row>
-
+
+ </row>
+
<row>
<entry><inlinemediaobject>
<imageobject>
@@ -1921,9 +1965,9 @@
</imageobject>
</inlinemediaobject></entry>
<entry>Marquee a page item</entry>
- </row>
-
-
+ </row>
+
+
<row>
<entry>
<inlinemediaobject>
@@ -1931,31 +1975,31 @@
<imagedata fileref="images/seam_editors/icon_new_link.png"></imagedata>
</imageobject>
</inlinemediaobject>
-
+
</entry>
<entry>Add a page relationship</entry>
- </row>
-
-
+ </row>
+
+
<row>
<entry>
<inlinemediaobject>
<imageobject>
<imagedata fileref="images/seam_editors/icon_exception.png"></imagedata>
</imageobject>
- </inlinemediaobject>
-
+ </inlinemediaobject>
+
</entry>
<entry>Add an exception rule</entry>
- </row>
-
+ </row>
+
</tbody>
</tgroup>
- </table>
-
+ </table>
+
<para>Context menus are also available when you click either on an item or a blank space.</para>
-
-
+
+
<para>A context menu called on a blank space of the diagram provides the following options:</para>
<itemizedlist>
<listitem><para><emphasis role="bold">Page</emphasis> creates a new page element on the diagram</para></listitem>
@@ -1966,28 +2010,28 @@
<para>Rightclicking on a selected
<code><page></code>
element calls a context menu where you can choose the following options if you click on the <emphasis role="bold">New</emphasis> menu item: </para>
-
-
-
+
+
+
<itemizedlist>
<listitem><para><emphasis role="bold">Rule</emphasis> opens the <property moreinfo="none">Add Navigation Rule</property> dialog in which you can browse your project for a view page to set the view-id in the navigation rule and specify <emphasis role="bold">render</emphasis> or <emphasis role="bold">redirect</emphasis> navigation options </para></listitem>
- <listitem><para><emphasis role="bold">Param</emphasis> calls a dialog box where you can define a parameter (using the
- <code><param></code>
- tag) for the
+ <listitem><para><emphasis role="bold">Param</emphasis> calls a dialog box where you can define a parameter (using the
+ <code><param></code>
+ tag) for the
<code><page></code>
element</para></listitem>
</itemizedlist>
-
-
+
+
<section>
<title>Seam Pages Diagram Preferences</title>
-
-
-
- <para>In order to customize the layout of Diagram you can go to
+
+
+
+ <para>In order to customize the layout of Diagram you can go to
<property moreinfo="none">Window > Preferences > JBoss Tools > Web > Seam > Editors > Seam Pages Diagram</property>.
</para>
-
+
<figure float="0">
<title>Preferences of Seam Pages Diagram</title>
<mediaobject>
@@ -1998,15 +2042,15 @@
</figure>
</section>
</section>
-
-
+
+
<section>
<title>Tree Mode</title>
-
+
<para>Tree Mode provides a wider range of options and way to edit and modify the pages.xml file.</para>
-
-
-
+
+
+
<figure float="0">
<title>Seam Pages Editor: Tree View</title>
<mediaobject>
@@ -2015,19 +2059,19 @@
</imageobject>
</mediaobject>
</figure>
-
+
<para>
In this mode all elements and attributes of the page.xml
file can be viewed and edited in a visual, user friendly way.
</para>
-
+
</section>
-
-
+
+
<section>
<title>Outline Support for Seam Pages Editor</title>
-
-
+
+
<para>Seam Pages Editor provides <property moreinfo="none">Outline</property> view support.
You can explore the pages.xml using Outline view in two modes: <property moreinfo="none">Tree</property> ( <inlinemediaobject>
<imageobject>
@@ -2038,11 +2082,11 @@
<imagedata fileref="images/seam_editors/outline_navigation.png"></imagedata>
</imageobject>
</inlinemediaobject> ).</para>
-
+
<para>
- The Diagram Navigation mode of Outline view gives a birds-view of the layout to allow quick navigation for large-scale applications.
+ The Diagram Navigation mode of Outline view gives a birds-view of the layout to allow quick navigation for large-scale applications.
</para>
-
+
<figure float="0">
<title>Outline view: Diagram Navigation mode</title>
<mediaobject>
@@ -2051,12 +2095,12 @@
</imageobject>
</mediaobject>
</figure>
-
-
+
+
<para>The Tree mode shows a tree for every element in the pages.xml file. You can get a quick overview of the whole file. When selecting an element in the Outline view the related element is highlighted in the Graphical, Tree or Source page of Seam Pages Editor.</para>
-
-
-
+
+
+
<figure float="0">
<title>Outline view: Tree mode</title>
<mediaobject>
@@ -2065,28 +2109,28 @@
</imageobject>
</mediaobject>
</figure>
-
-
-
-
+
+
+
+
</section>
-
-
+
+
</section>
-
-
-
-
+
+
+
+
<section>
-
-
+
+
<title>Seam Components 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>
@@ -2095,10 +2139,10 @@
</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>
@@ -2111,11 +2155,11 @@
</imageobject>
</mediaobject>
</figure>
-
+
</section>
-
-
-
+
+
+
<section id="SeamEditors">
<title>Main Features of Seam Editors</title>
@@ -2199,18 +2243,18 @@
</figure>
</section>
-
+
</section>
<section>
<title>Content Assist for Page Descriptors</title>
-
- <para>Content Assist ( CA ) is available for Page Descriptors,
- <property moreinfo="none">.page.xml</property> and <property moreinfo="none">page.xml</property> files.
- Content Assist lets you easily compose a Page Descriptor file by suggesting elements and attributes. The suggestions are context dependent, which means that CA provides only the elements, attributes and in some cases values for the attributes, suitable in a particular place of your Page Descriptor.
-
+
+ <para>Content Assist ( CA ) is available for Page Descriptors,
+ <property moreinfo="none">.page.xml</property> and <property moreinfo="none">page.xml</property> files.
+ Content Assist lets you easily compose a Page Descriptor file by suggesting elements and attributes. The suggestions are context dependent, which means that CA provides only the elements, attributes and in some cases values for the attributes, suitable in a particular place of your Page Descriptor.
+
</para>
<para>
- Seam Pages Editor also supports code completion in EL-expressions suggesting you possible bean properties and methods.
+ Seam Pages Editor also supports code completion in EL-expressions suggesting you possible bean properties and methods.
</para>
</section>
<section id="OpenOn">
@@ -2229,39 +2273,39 @@
</imageobject>
</mediaobject>
</figure>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">OpenOn is available for the following files:</diffmk:wrapper></para>
- <itemizedlist diffmk:change="added">
- <listitem diffmk:change="added">
- <para diffmk:change="added">
- <link diffmk:change="added" linkend="xmlFiles"><diffmk:wrapper diffmk:change="added">XML files</diffmk:wrapper></link>
+ <para>OpenOn is available for the following files:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <link linkend="xmlFiles">XML files</link>
</para>
</listitem>
- <listitem diffmk:change="added">
- <para diffmk:change="added">
- <link diffmk:change="added" linkend="xhtmlFiles"><diffmk:wrapper diffmk:change="added">JSP/XHTML Pages</diffmk:wrapper></link>
+ <listitem>
+ <para>
+ <link linkend="xhtmlFiles">JSP/XHTML Pages</link>
</para>
</listitem>
- <listitem diffmk:change="added">
- <para diffmk:change="added"> <link diffmk:change="added" linkend="javaFiles"><diffmk:wrapper diffmk:change="added">Java files</diffmk:wrapper></link></para>
+ <listitem>
+ <para> <link linkend="javaFiles">Java files</link></para>
</listitem>
</itemizedlist>
- <note diffmk:change="added">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
-
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">In this section were described only use cases special for Seam applications.For general information please read
- </diffmk:wrapper><ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/html/editors.htm..."><diffmk:wrapper diffmk:change="added">OpenOn section in Visual Web Tools Reference Guide</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <note>
+ <title>Note:</title>
+
+ <para>In this section were described only use cases special for Seam applications.For general information please read
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/html/editors.htm...">OpenOn section in Visual Web Tools Reference Guide</ulink>.</para>
</note>
- <itemizedlist diffmk:change="added">
- <listitem diffmk:change="added" id="xhtmlFiles"> <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Using OpenOn in .xhtml files you can open:</diffmk:wrapper></para>
- <itemizedlist diffmk:change="added">
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">components or properties resolved using an EL expression;</diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">all actions described in pages.xml;</diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">other .xhtml files that paths are specified in a current file;</diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">image files that paths are set in the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">value</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> property.The files will be opened in the default system graphical editor.</diffmk:wrapper></para></listitem>
+ <itemizedlist>
+ <listitem id="xhtmlFiles"> <para>Using OpenOn in .xhtml files you can open:</para>
+ <itemizedlist>
+ <listitem><para>components or properties resolved using an EL expression;</para></listitem>
+ <listitem><para>all actions described in pages.xml;</para></listitem>
+ <listitem><para>other .xhtml files that paths are specified in a current file;</para></listitem>
+ <listitem><para>image files that paths are set in the <emphasis>
+ <property moreinfo="none">value</property></emphasis> property.The files will be opened in the default system graphical editor.</para></listitem>
</itemizedlist>
</listitem>
- <listitem diffmk:change="added" id="xmlFiles">
+ <listitem id="xmlFiles">
<para>OpenOn is also supported in Page Descriptors (<property moreinfo="none">.page.xml</property> and <property moreinfo="none">pages.xml</property>). OpenOn allows you to navigate to Java beans as well as to view pages.
You can <property moreinfo="none">Ctrl + left click</property> on a bean or on view page file (e.g. XTML file) to navigate to the file you clicked on. </para>
@@ -2273,61 +2317,61 @@
</imageobject>
</mediaobject>
</figure>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If you use Rule-based authorization with Drools in your Seam application you can apply OpenOn
- in </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">components.xml</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> to open the files containing rule definitions in the </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">"rule-files"</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> tag.
- </diffmk:wrapper></para>
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">OpenOn in components.xml file</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/seam_editors/seam_editors_2c.png"></imagedata>
+ <para>If you use Rule-based authorization with Drools in your Seam application you can apply OpenOn
+ in <emphasis>
+ <property moreinfo="none">components.xml</property></emphasis> to open the files containing rule definitions in the <emphasis>
+ <property moreinfo="none">"rule-files"</property></emphasis> tag.
+ </para>
+ <figure float="0">
+ <title>OpenOn in components.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2c.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can also use OpenOn to open jBPM components that are described in Seam component descriptor.
- Two places where it works are available: </diffmk:wrapper></para>
- <itemizedlist diffmk:change="added">
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">inside </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added"><component></diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> definition;</diffmk:wrapper></para>
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">OpenOn in components.xml file</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/seam_editors/seam_editors_2d.png"></imagedata>
+ <para>You can also use OpenOn to open jBPM components that are described in Seam component descriptor.
+ Two places where it works are available: </para>
+ <itemizedlist>
+ <listitem><para>inside <emphasis>
+ <property moreinfo="none"><component></property></emphasis> definition;</para>
+ <figure float="0">
+ <title>OpenOn in components.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2d.png"></imagedata>
</imageobject>
</mediaobject>
</figure></listitem>
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">inside </diffmk:wrapper><emphasis diffmk:change="added">
- <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">jbpm</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> tags;</diffmk:wrapper></para>
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">OpenOn in components.xml file</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/seam_editors/seam_editors_2e.png"></imagedata>
+ <listitem><para>inside <emphasis>
+ <property moreinfo="none">jbpm</property></emphasis> tags;</para>
+ <figure float="0">
+ <title>OpenOn in components.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2e.png"></imagedata>
</imageobject>
</mediaobject>
</figure></listitem>
</itemizedlist>
- </listitem>
- <listitem diffmk:change="added" id="javaFiles">
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">
- OpenOn is also supported in seam components where </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added"> In annotation</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> is presented.
- After pressing </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Ctrl + left click</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> on the seam component specified in </diffmk:wrapper><code diffmk:change="added"><diffmk:wrapper diffmk:change="added">@In </diffmk:wrapper></code><diffmk:wrapper diffmk:change="added"> you will get the possibility to open the file where the component is declarated as well as
- all of the seam components where it is used in the next declarations:</diffmk:wrapper></para>
- <itemizedlist diffmk:change="added">
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">@Out</diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">@DataModel</diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">@Role</diffmk:wrapper></para></listitem>
- <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">@Roles</diffmk:wrapper></para></listitem>
+ </listitem>
+ <listitem id="javaFiles">
+ <para>
+ OpenOn is also supported in seam components where <property moreinfo="none"> In annotation</property> is presented.
+ After pressing <property moreinfo="none">Ctrl + left click</property> on the seam component specified in <code>@In </code> you will get the possibility to open the file where the component is declarated as well as
+ all of the seam components where it is used in the next declarations:</para>
+ <itemizedlist>
+ <listitem><para>@Out</para></listitem>
+ <listitem><para>@DataModel</para></listitem>
+ <listitem><para>@Role</para></listitem>
+ <listitem><para>@Roles</para></listitem>
</itemizedlist>
-
- <figure diffmk:change="added" float="0">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">OpenOn in Seam Component</diffmk:wrapper></title>
- <mediaobject diffmk:change="added">
- <imageobject diffmk:change="added">
- <imagedata diffmk:change="added" fileref="images/seam_editors/seam_editors_2b.png"></imagedata>
+
+ <figure float="0">
+ <title>OpenOn in Seam Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_2b.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
@@ -2376,16 +2420,52 @@
<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>
+ <emphasis><property moreinfo="none">Validation</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Enabling the Validation Builder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/validator1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The validations can be run manually by clicking
+ <emphasis><property moreinfo="none">Validate</property></emphasis> via the context menu on your project (folder or file inside your project) which will
+ execute all the active WTP validations. Following to the project's preferences under <emphasis>
+ <property moreinfo="none">Validation</property></emphasis> it's possible to enable/disable any validator.
+ </para>
+
+ <para>It's also possible to turn off the validation for some resource (a file, folder) inside your project via the <emphasis>
+ <property moreinfo="none">Exclude Validation</property></emphasis> context menu option.</para>
+
+ <figure float="0">
+ <title>Excluding Validation for the WebContent Folder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/validator2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As a result, if you've turned off the validation for a folder (or file), it is put to the excluded group of the Validation filters and be ignored during the validation.</para>
+
+ <figure float="0">
+ <title>Validation Filters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/validator3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
</section>
</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">
+<chapter id="seam_view" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/seam_view.xml" xreflabel="seam_view">
<?dbhtml filename="seam_view.html"?>
<chapterinfo>
<keywordset>
@@ -2394,126 +2474,126 @@
<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>
+ <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>
+ <title>Label Scope Presentation of Seam Components</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>
+ <title>Node Scope Presentation of Seam Components</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>
+ <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>
+ <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>
+ <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.
+
+ <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 Customizations</title>
- <mediaobject>
+ <title>Available Seam Component View Customizations</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>
+ <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">
+<chapter id="seam_preferences" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/seam_preferences.xml" xreflabel="seam_preferences">
<!-- mark as new -->
<?dbhtml filename="seam_preferences.html"?>
<chapterinfo>
@@ -2561,11 +2641,11 @@
</imageobject>
</mediaobject>
</figure>
- <tip diffmk:change="added">
- <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Tip:</diffmk:wrapper></title>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If you try to delete the Seam Runtime that is already in use by some project in the current workspace, then a warning message will appear. To confirm the removal press </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">OK</diffmk:wrapper></property>
+ <tip>
+ <title>Tip:</title>
+ <para>If you try to delete the Seam Runtime that is already in use by some project in the current workspace, then a warning message will appear. To confirm the removal press <property moreinfo="none">OK</property>
</para>
- <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Besides, when you right-click on your Seam project with deleted runtime in Project Explorer and select</diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added"> Properties > Seam Settings</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> the error message "Runtime <runtime_name> does not exist" will appear. </diffmk:wrapper></para>
+ <para>Besides, when you right-click on your Seam project with deleted runtime in Project Explorer and select<property moreinfo="none"> Properties > Seam Settings</property> the error message "Runtime <runtime_name> does not exist" will appear. </para>
</tip>
<section id="validator_pref">
@@ -2595,9 +2675,9 @@
</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>
- <note diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">There are references made between each EL and variable name, so you can revalidate a particular EL if a context variable was changed. This makes parsing of each resource with referenced ELs much faster.</diffmk:wrapper></para></note>
-
-
+ <note><para>There are references made between each EL and variable name, so you can revalidate a particular EL if a context variable was changed. This makes parsing of each resource with referenced ELs much faster.</para></note>
+
+
<figure float="0">
<title>Severity Preference for EL Syntax</title>
<mediaobject>
@@ -2607,11 +2687,15 @@
</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
+ <para>The <emphasis>
+ <property moreinfo="none">Revalidate unresolved ELs automatically</property></emphasis> option is enabled by default.
+ If necessary, you can uncheck it. It may increase a performance for big complex projects.</para>
+
+ <para>In the upper right corner of the Seam Validator preferences page there is a <emphasis><property moreinfo="none">Configure Project
+ Specific Settings</property></emphasis> 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
+ have different validator settings for each project. Check the <emphasis><property moreinfo="none">Show only
+ projects with project specific settings</property></emphasis> if you want to see the
projects that have been already set. Click on <property moreinfo="none">Ok</property>.</para>
<figure float="0">
@@ -2681,7 +2765,7 @@
Seam Runtime, and then configure the folders as you want.</para>
<figure float="0">
- <title>Properties for Seam Project</title>
+ <title>Properties for Seam Project when Seam runtime is not selected</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/seam_preferences/seam_preferences2_2.png"></imagedata>
@@ -2691,8 +2775,8 @@
<tip>
<title>Tip:</title>
- <para>On the figure above fields for configuring Seam artifacts are dimmed because Seam
- Runtime is not selected.</para>
+ <para><diffmk:wrapper diffmk:change="changed">On the figure above fields for configuring Seam artifacts are unavailable because Seam
+ Runtime is not selected.</diffmk:wrapper></para>
</tip>
<para>In Seam Wizards (New Action, Form, Entity, Conversation, Generate Entities) you can
@@ -2700,7 +2784,7 @@
the upper right corner of each wizard.</para>
<figure float="0">
- <title>Settings Link</title>
+ <title>Quick Setting Link In Seam Wizards</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/seam_preferences/seam_preferences2_1.png"></imagedata>
@@ -2722,9 +2806,9 @@
<para>To enable it, you should call the context menu for a Seam project and select <emphasis><property moreinfo="none">JBoss
Tools > Add Custom Capabilities</property>.</emphasis> Then check the needed modules and press
<emphasis><property moreinfo="none">Finish</property>.</emphasis></para>
-
+
<figure float="0">
- <title>Adding Custom Capabilities to Seam Project</title>
+ <title> Custom Capabilities be added to Seam Project</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/seam_preferences/addCustomCapabilities.png"></imagedata>
@@ -2733,7 +2817,7 @@
</figure>
<para>The next page displays all the updates that have been made to the project.</para>
-
+
<figure float="0">
<title>Adding Custom Capabilities to Seam Project</title>
<mediaobject>
@@ -2742,137 +2826,214 @@
</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"?>
+<chapter id="seam_refactoring" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/seam_refactoring.xml" xreflabel="seam_refactoring">
+ <?dbhtml filename="seam_refactoring.html"?>
<chapterinfo>
<keywordset>
- <keyword>EAR</keyword>
- <keyword>Seam</keyword>
- <keyword></keyword>
- <keyword></keyword>
+ <keyword>Seam refactoring tools
+ </keyword>
+ <keyword>seam</keyword>
+ <keyword>rename</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>
-
+ <title><diffmk:wrapper diffmk:change="changed">Seam Refactoring Tools</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="added">The goal of Seam components refactoring is to make system-wide code changes without affecting the behavior of the program.
+ The Seam module of </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> provides assistance in easily code refactoring.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">Starting from Jboss Tools M4 refactoring functionality became also available for managed beans, method and properties used in ELs.
+ Thus now Seam refactoring tools include the next refactoring operations:</diffmk:wrapper></para>
+
+ <itemizedlist>
+ <listitem><para><link diffmk:change="added" linkend="renaming_seam_components"><diffmk:wrapper diffmk:change="added">Renaming Seam components</diffmk:wrapper></link></para></listitem>
+ <listitem><para><link diffmk:change="added" linkend="renaming_seam_context_vars"><diffmk:wrapper diffmk:change="added">Renaming Seam context variables in EL</diffmk:wrapper></link></para></listitem>
+ </itemizedlist>
+
+ <para><diffmk:wrapper diffmk:change="added">Refactoring commands are available from the context menus of several views and editors and use a standard Eclipse refactoring wizard.
+ For details, see </diffmk:wrapper><link diffmk:change="added" linkend="RefactornigWizard"><diffmk:wrapper diffmk:change="added">"Using the Refactoring Wizard"</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> later in this chapter.</diffmk:wrapper></para>
+
+ <note diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="added">Seam refactoring could be only performed in the file that is not marked as </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Read only</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> in its properties.</diffmk:wrapper></para>
+ </note>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Properties View for Java File</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/seam_refactoring/seam_refactor10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="RefactornigWizard">
+ <title><diffmk:wrapper diffmk:change="changed">Using the Refactorinig Wizard</diffmk:wrapper></title>
+ <para>This wizard is opened always when the user clicks <property moreinfo="none">Rename Seam Component</property>/<property moreinfo="none">Rename Seam Context Variable</property>/<property moreinfo="none">Rename</property> command in any
+ of the mentioned views.
+ </para>
+
+ <figure float="0">
+ <title>Refactoring Seam wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Seam Components name</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> field you should enter a new name of the component,
+ then click </diffmk:wrapper><property moreinfo="none">Next</property> and follow the next wizard steps:
+ </para>
+
+ <figure float="0">
+ <title>Navigating between the differences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">As you see, when performing a refactoring operation, you can preview all of the changes resulting from a refactoring
+ action before you choose to carry them out.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The view represents two windows: one with the original source code and the other with refactored one.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">With the help of
+ </diffmk:wrapper><inlinemediaobject> <imageobject>
+ <imagedata fileref="images/seam_refactoring/butt1.png"></imagedata>
+ </imageobject></inlinemediaobject>,
+ <inlinemediaobject> <imageobject>
+ <imagedata fileref="images/seam_refactoring/butt2.png"></imagedata>
+ </imageobject></inlinemediaobject>,
+ <inlinemediaobject> <imageobject>
+ <imagedata fileref="images/seam_refactoring/butt3.png"></imagedata>
+ </imageobject></inlinemediaobject>,
+ <inlinemediaobject> <imageobject>
+ <imagedata fileref="images/seam_refactoring/butt4.png"></imagedata>
+ </imageobject></inlinemediaobject><diffmk:wrapper diffmk:change="changed"> buttons you can quickly navigate between the differences in the code.
+ If you don't agree with some changes you can't undo them but you can remove the class from the list of classes that need refactoring.
+ </diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>List of classes that need refactoring
+ </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To apply the changes click <emphasis><property moreinfo="none">Finish</property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Renaming the selected seam component also corrects all references to the
+ component (also in other files in the project). Renaming a type doesn't allow to rename
+ similarly named variables and methods.
+ </diffmk:wrapper></para>
+ </section>
+
+ <section id="renaming_seam_components">
+ <title><diffmk:wrapper diffmk:change="changed">Renaming Seam Components</diffmk:wrapper></title>
+
+ <para>Renaming a Seam component could be performed in the:</para>
+
+ <itemizedlist>
+ <listitem><para><link linkend="JavaEditor">Java editor</link></para></listitem>
+ <listitem><para><link linkend="SeamComponents">Seam Components view</link></para></listitem>
+ <listitem><para><link linkend="components_xml_editor">Tree view of the components.xml editor</link></para></listitem>
+ </itemizedlist>
+
+ <section id="JavaEditor">
+ <title><diffmk:wrapper diffmk:change="changed">Renaming Seam Components in the Java Editor</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">If you want to rename certain seam component using Java Editor,first of all it's necessary to open it.
+ If you don't know ,where the seam component is declared,use </diffmk:wrapper><link linkend="open_seam_component">Open Seam Components icon</link><diffmk:wrapper diffmk:change="changed">.
+
+ </diffmk:wrapper></para>
+ <para>To open the rename Seam Component command in Java Editor it's necessary to left click the file <emphasis><property moreinfo="none">>Seam Refactor>Rename Seam Component</property></emphasis><diffmk:wrapper diffmk:change="changed">.
+ </diffmk:wrapper></para>
+ <figure float="0">
+ <title>Opening Refactoring wizard in Java Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="SeamComponents">
+ <title><diffmk:wrapper diffmk:change="changed">Renaming Seam Components in the Seam Components View</diffmk:wrapper></title>
+ <para>To open <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Refactoring</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> wizard in the </diffmk:wrapper><property moreinfo="none">Seam Components</property><diffmk:wrapper diffmk:change="changed"> view
+ you should left click the component you wants to open and choose </diffmk:wrapper><property moreinfo="none">Rename Seam Component</property> option.</para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Opening Refactoring Wizard in Seam Components View</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="components_xml_editor">
+ <title><diffmk:wrapper diffmk:change="changed">Renaming Seam Components in the Seam Components Editor</diffmk:wrapper></title>
+ <para>When you open <literal diffmk:change="added" moreinfo="none">components.xml</literal><diffmk:wrapper diffmk:change="added"> file using </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBossTools XML Editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">, open the
+ </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Refactoring</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> wizard in the Tree tab by left-clicking the component in
+ </diffmk:wrapper><property moreinfo="none">components</property><diffmk:wrapper diffmk:change="changed"> area and choosing </diffmk:wrapper><property moreinfo="none">Rename</property><diffmk:wrapper diffmk:change="changed"> option.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Opening Refactoring Wizard in </diffmk:wrapper><emphasis><property moreinfo="none">components.xml</property></emphasis><diffmk:wrapper diffmk:change="changed"> File</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ <section diffmk:change="added" id="renaming_seam_context_vars">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Renaming Seam Context Variables in EL</diffmk:wrapper></title>
+
+ <para><diffmk:wrapper diffmk:change="added">Renaming a Seam context variables in EL could be executed in </diffmk:wrapper><literal diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">.java</diffmk:wrapper></literal><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper><literal diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">.xml</diffmk:wrapper></literal><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper><literal diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">.jsp</diffmk:wrapper></literal><diffmk:wrapper diffmk:change="added">,
+ </diffmk:wrapper><literal diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">.xhtml</diffmk:wrapper></literal><diffmk:wrapper diffmk:change="added"> and </diffmk:wrapper><literal diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">.properties</diffmk:wrapper></literal><diffmk:wrapper diffmk:change="added"> files in Seam projects using
+ the context menu command </diffmk:wrapper><emphasis diffmk:change="added"><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Seam Refactor > Rename Seam Context Variable</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Refactoring Seam Context Variable in .properties File</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Opening Refactoring wizard in components.xml file</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Opening Refactoring wizard in .html file</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
</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">
+<chapter id="crud_database_application" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/crud_database_application.xml" xreflabel="crud_database_application">
<?dbhtml filename="crud_database_application.html"?>
<chapterinfo>
<keywordset>
@@ -3355,8 +3516,7 @@
</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">
+<chapter id="crud_application_walkthrough" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/crud_application_walkthrough.xml" xreflabel="crud_application_walkthrough">
<?dbhtml filename="crud_application_walkthrough.html"?>
<chapterinfo>
<keywordset>
@@ -3432,7 +3592,7 @@
<property moreinfo="none">employee</property>
</emphasis> database is displayed.</para>
<figure float="0">
- <title>Employees List</title>
+ <title>Employees List Page</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/crud_application_walkthrough/crud_application_walkthrough_5.png"></imagedata>
@@ -3445,7 +3605,7 @@
<para> Press <property moreinfo="none">Select</property> opposite one of employees.</para>
<figure float="0">
- <title>Employee details</title>
+ <title>Employee details Page</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/crud_application_walkthrough/crud_application_walkthrough_6.png"></imagedata>
@@ -3487,7 +3647,7 @@
</chapter>
-<chapter id="testNG" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/testng.xml" xreflabel="testNG">
+<chapter id="testNG" xml:base="file:///home/ochikvina/WORK/for_compare/jbosstools-3.1.0.CR1/seam/docs/reference/en/modules/testng.xml" xreflabel="testNG">
<?dbhtml filename="testNG.html"?>
<chapterinfo>
<keywordset>
@@ -3582,27 +3742,27 @@
</listitem>
</itemizedlist>
- <figure float="0">
+ <figure>
<title>Seam-test Project</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_5.png"></imagedata>
+ <imagedata fileref="images/testng/testng_5.png"/>
</imageobject>
</mediaobject>
</figure>
<itemizedlist>
<listitem>
- <para>Add Seam Action to your project via <emphasis><property moreinfo="none">File > New > Seam
+ <para>Add Seam Action to your project via <emphasis><property>File > New > Seam
Action</property>.</emphasis></para>
</listitem>
</itemizedlist>
- <figure float="0">
+ <figure>
<title>Seam Action Creation</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_6.png"></imagedata>
+ <imagedata fileref="images/testng/testng_6.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -3614,28 +3774,28 @@
</listitem>
</itemizedlist>
- <figure float="0">
+ <figure>
<title>New Seam Action Wizard</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_7.png"></imagedata>
+ <imagedata fileref="images/testng/testng_7.png"/>
</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
+ <para>When Action is created you will see <property>actionPage.xhtml</property> in
+ Package Explorer view. <property>ActionBean.java</property> will be
automatically opened in Java Editor.</para>
</listitem>
</itemizedlist>
- <figure float="0">
+ <figure>
<title>Created Action</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_8.png" scale="70"></imagedata>
+ <imagedata fileref="images/testng/testng_8.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
@@ -3643,28 +3803,28 @@
<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
+ <para>Select <property>ActionLocalTest.xml</property> in Seam-test project and run
+ the test with right click <emphasis><property>Run As > TestNG
Suite</property>.</emphasis></para>
</listitem>
</itemizedlist>
-
- <figure float="0">
+ <tip><para>OpenOn is available in testNG XML files opened in JBoss XML Editor</para></tip>
+ <figure>
<title>Running TestNG</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_9.png"></imagedata>
+ <imagedata fileref="images/testng/testng_9.png"/>
</imageobject>
</mediaobject>
</figure>
<para>The test process will start and its output will be written in Console View.</para>
- <figure float="0">
+ <figure>
<title>Test is Finished</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_10.png" scale="70"></imagedata>
+ <imagedata fileref="images/testng/testng_10.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
@@ -3673,20 +3833,20 @@
<itemizedlist>
<listitem>
<para>After running TestNG you will have the test results in <emphasis>
- <property moreinfo="none">test-output</property>
+ <property>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
+ Explorer view). Open <property>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">
+ <figure>
<title>Viewing the Test Results</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_11.png" scale="70"></imagedata>
+ <imagedata fileref="images/testng/testng_11.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
@@ -3694,24 +3854,24 @@
<para>You can see the test results in Web Browser.</para>
- <figure float="0">
+ <figure>
<title>Test Results in Browser</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_12.png" scale="70"></imagedata>
+ <imagedata fileref="images/testng/testng_12.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
<para>After clicking on <emphasis>
- <property moreinfo="none">ActionLocal Tests</property>
+ <property>ActionLocal Tests</property>
</emphasis> link you will see the Results for ActionLocal Tests.</para>
- <figure float="0">
+ <figure>
<title>Test Information</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_13.png" scale="70"></imagedata>
+ <imagedata fileref="images/testng/testng_13.png" scale="70"/>
</imageobject>
</mediaobject>
</figure>
@@ -3719,11 +3879,11 @@
<para>Select a result on the left-hand pane and its details will be displayed on the
right-hand one.</para>
- <figure float="0">
+ <figure>
<title>ActionLocal Test Details</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/testng/testng_14.png"></imagedata>
+ <imagedata fileref="images/testng/testng_14.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -3731,82 +3891,80 @@
<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>
-
+
</section>
</chapter>
-
-
-<chapter id="seam_faq" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/seam/docs/reference/en/modules/seam_faq.xml" xreflabel="seam_faq">
+<chapter id="seam_faq" xreflabel="seam_faq">
<?dbhtml filename="vwt_faq.html"?>
<title>FAQ</title>
-
+
<section id="seam_question_1">
<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>
+ <property>Properties > Seam Settings</property>.</emphasis> Check <emphasis>
+ <property>Seam support</property>
</emphasis> box to enable all available <link linkend="project_pref">Seam
Settings</link>.</para>
</section>
-
+
<section id="seam_question_2">
<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>
+ <property>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>
+ <property>New > Other > Java Project from Existing Buildfile</property>
</emphasis></para>
</listitem>
-
+
<listitem>
<para>Point to the <emphasis>
- <property moreinfo="none">build.xml</property>
+ <property>build.xml</property>
</emphasis> of any chosen project by pressing <emphasis>
- <property moreinfo="none">Browse</property>
+ <property>Browse</property>
</emphasis> button</para>
</listitem>
-
+
<listitem>
<para>Hit <emphasis>
- <property moreinfo="none">Finish</property>
+ <property>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>
+ <property>Properties > Seam Settings</property>.</emphasis></para>
</section>
-
+
<section id="seam_question_3">
<title>How to change the deploy folders for Seam source code from src/hot and src/main?</title>
-
+
<para>You should right-click the project, select <emphasis>
- <property moreinfo="none">Properties > Java Build Path</property>,</emphasis> then switch to the <emphasis>
- <property moreinfo="none">Source tab</property>,</emphasis> select the output folder for <emphasis>
- <property moreinfo="none">src/hot</property></emphasis> (<emphasis>
- <property moreinfo="none">src/main</property>)</emphasis> and click <emphasis>
- <property moreinfo="none">Edit</property></emphasis> to change their output location.</para>
-
+ <property>Properties > Java Build Path</property>,</emphasis> then switch to the <emphasis>
+ <property>Source tab</property>,</emphasis> select the output folder for <emphasis>
+ <property>src/hot</property></emphasis> (<emphasis>
+ <property>src/main</property>)</emphasis> and click <emphasis>
+ <property>Edit</property></emphasis> to change their output location.</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&f=201">JBoss
- Tools Forum</ulink><diffmk:wrapper diffmk:change="changed">. You can also influence on how you want to see JBoss Tools docs in
- future leaving your vote on the article </diffmk:wrapper><ulink url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture"><diffmk:wrapper diffmk:change="changed">Overview of the improvements required by JBossTools/JBDS Docs users</diffmk:wrapper></ulink>. </para>
-
- <para><diffmk:wrapper diffmk:change="changed">A set of movies on Seam tooling is available on </diffmk:wrapper><ulink url="http://docs.jboss.org/tools/movies"><diffmk:wrapper diffmk:change="changed">Seam movies page</diffmk:wrapper></ulink>.</para>
+ that <property>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&f=201">JBoss
+ Tools Forum</ulink>. You can also influence on how you want to see JBoss Tools docs in
+ future leaving your vote on the article <ulink
+ url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture"
+ >Overview of the improvements required by JBossTools/JBDS Docs users</ulink>. </para>
+
+ <para>A set of movies on Seam tooling is available on <ulink url="http://docs.jboss.org/tools/movies">Seam movies page</ulink>.</para>
</section>
</chapter>
-
- <!-- TODO: drools used in this section is not available for eclipse .3.3 &business_application; -->
-
-</book>
+</book>
\ No newline at end of file
15 years