JBoss Tools SVN: r28333 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-17 21:28:29 -0500 (Mon, 17 Jan 2011)
New Revision: 28333
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/project_examples.xml
Log:
General Updates
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/project_examples.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/project_examples.xml 2011-01-18 02:16:49 UTC (rev 28332)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/project_examples.xml 2011-01-18 02:28:29 UTC (rev 28333)
@@ -12,8 +12,7 @@
</chapterinfo>
<title>Project Examples</title>
- <para><emphasis><property>JBoss Developer Studio</property></emphasis> provides an option to download and import a ready-made
- project that you can explore and derive some useful technology implementation lessons from. </para>
+ <para><emphasis><property>JBoss Developer Studio</property></emphasis> provides an option to download and import a ready-made project that you can explore learn from. </para>
<para>
To adjust the settings of the Project Examples feature you need to navigate to <menuchoice><guimenuitem>Windows</guimenuitem><guimenuitem>Preferences</guimenuitem><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Project Examples</guimenuitem></menuchoice>. </para>
@@ -27,26 +26,19 @@
</mediaobject>
</figure>
- <para>The <property>Show experimental sites</property> checkbox serves to enable/disable representing the user sites in the <property>Project Example</property> dialog (<menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Project Examples</guimenuitem></menuchoice>). </para>
+ <para>The <property>Show experimental sites</property> checkbox serves to enable or disable user sites in the <property>Project Example</property> dialog (<menuchoice><guimenuitem>Help</guimenuitem><guimenuitem>Project Examples</guimenuitem></menuchoice>). </para>
<section id="UserSites">
<title>User Sites</title>
<para>
- As you can see from the <emphasis role="bold">Project Examples Preferences</emphasis> image you can add a custom project example that can be provided by anyone.
- This feature can, for example, facilitate project testing.
+ As you can see from the <emphasis role="bold">Project Examples Preferences</emphasis> image you can add a custom project example that can be provided by anyone. This feature can, for example, facilitate project testing.
</para>
<para>
- In oder to add a new project example you need to select the <property>User sites</property>
- option and press the <property>Add</property> button to the right.
+ In oder to add a new project example you need to select the <property>User sites</property> option and press the <guibutton>Add</guibutton> button to the right.
</para>
- <para>When the <property>Add</property> button is pressed the
- <property>Add Project Example Site</property> dialog is displayed. The dialog contains 2
- input fields: <property>Name</property> where you need to specify the name of the new entry and <property>URL</property>
- that has to point to the XML file that contains example project(s) properties.
- The structure of the XML file is discussed in more detail in a later chapter of this guide.
- Alternatively, if the XML is stored on your local machine, you can hit the <property>Browse</property> button to select the file in the file system.</para>
+ <para>When the <guibutton>Add</guibutton> button is pressed the <property>Add Project Example Site</property> dialog is displayed. The dialog contains two input fields: <property>Name</property>, where you need to specify the name of the new entry and <property>URL</property>,which has to point to the XML file that contains example project(s) properties. The structure of the XML file is discussed in more detail in a later chapter of this guide. Alternatively, if the XML is stored on your local machine, you can hit the <guibutton>Browse</guibutton> button to select the file in the file system.</para>
<para>Here is an example of the XML file that holds project example settings:</para>
<programlisting role="XML"><![CDATA[<projects>
@@ -67,12 +59,9 @@
</projects>
]]></programlisting>
- <para>Once you define the location of the xml file with projects settings you will see a new user site entry added.
- Please note now if you select the entry you can edit and remove it with the corresponding buttons to the right.
- You can not do such operations with the <property>Plugin provides sites</property>.</para>
+ <para>Once you define the location of the XML file with projects settings you will see a new user site entry added. Please note now if you select the entry you can edit and remove it with the corresponding buttons to the right. You can not perform such operations with the <property>Plugin provides sites</property>.</para>
- <para>When the user sites location is set up you can download and install the project(s).
- Please see the next chapter of the guide. </para>
+ <para>When the user sites location is set up you can download and install the project(s). Please see the next chapter of the guide for more details.</para>
</section>
@@ -80,12 +69,14 @@
<section id="DownloadingProjectExample">
<title>Downloading a Project Example</title>
- <para>To download a project example and start working with it you need to take a few steps:</para>
+ <para>To download a project example and start working with it you need to perform a few steps:</para>
<itemizedlist>
<listitem>
<para>Go to the menu bar and select <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice></para></listitem>
- <listitem><para>Select <menuchoice><guimenuitem>Jboss Tools</guimenuitem><guimenuitem>Project Examples</guimenuitem></menuchoice> (You can also call the <emphasis><property>Project Examples</property></emphasis> from menu bar: <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem> Project Examples...</guimenuitem></menuchoice> or directly from
+ <listitem>
+ <para>
+ Select <menuchoice><guimenuitem>Jboss Tools</guimenuitem><guimenuitem>Project Examples</guimenuitem></menuchoice> (You can also select <guimenuitem>Project Examples</guimenuitem> from menu bar: <menuchoice><guimenuitem>Help</guimenuitem><guimenuitem> Project Examples...</guimenuitem></menuchoice> or directly by selecting
<menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Example...</guimenuitem></menuchoice> menu )</para></listitem>
@@ -101,11 +92,11 @@
</figure>
<para>
- Alternatively, you should navigate to <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice>, scroll down to find the <property>JBoss Tools</property> option (or just type in the first letters of the word "JBoss" for quick search), expand the option and select <property>Project Examples</property>, click <property>Next</property>.
+ Alternatively, you should navigate to <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice>, scroll down to find the <guilabel>JBoss Tools</guilabel> option (or just type in the first letters of the word "JBoss" for quick search), expand the option and select <guilabel>Project Examples</guilabel>, and click the <guibutton>Next</guibutton> button.
</para>
<itemizedlist>
- <listitem><para>Now in the <property>New Project Example</property> dialog you can select a project you would like to explore and a site to download it from</para>
- <para>Project Examples Wizard provides a filter field to more easily locate the project examples you want, so you can type in the project you would like to explore in the field.</para></listitem>
+ <listitem><para>Now in the <guilabel>New Project Example</guilabel> dialog you can select a project you would like to explore and a site to download it from</para>
+ <para>The <guilabel>Project Examples Wizard</guilabel> provides a filter field to more easily locate the project examples you want, so you can type in the project you would like to explore in the field.</para></listitem>
</itemizedlist>
@@ -121,7 +112,7 @@
<para>Some project examples have dependencies which could not be automatically configured.
- In such cases you will receive the message prompted about detected requirements (see the figure below).</para>
+ In these cases you will receive a message prompt listing the detected requirements (see the figure below).</para>
<figure>
<title>Prompt about Project Example Requirements</title>
@@ -132,8 +123,7 @@
</mediaobject>
</figure>
- <para>You should click the <guibutton>Details</guibutton> button to see the list of requirements
- and make fixes.</para>
+ <para>You should click the <guibutton>Details</guibutton> button to see the list of requirements and make any necessary fixes.</para>
<figure>
<title>Requirements Details Dialog</title>
@@ -144,7 +134,7 @@
</mediaobject>
</figure>
- <para>If you have previously specified user sites (see the <link linkend="UserSites">User Sites</link> chapter) they also will be displayed in the list of project examples in the category that was defined in the xml file with user sites settings. </para>
+ <para>If you have previously specified user sites (see the <link linkend="UserSites">User Sites</link> chapter) they also will be displayed in the list of project examples in the category that was defined in the XML file with user sites settings. </para>
<figure>
<title>User Site</title>
<mediaobject>
@@ -161,23 +151,20 @@
<note>
<title>Note:</title>
<para>
- The <emphasis><property>Show the Quick Fix Dialog</property></emphasis> option is described in the <link linkend="QuickFixes">Quick Fixes</link> section.
+ The <guilabel>Show the Quick Fix Dialog</guilabel> option is described in the <link linkend="QuickFixes">Quick Fixes</link> section.
</para>
</note>
<itemizedlist>
- <listitem><para>Press the <guibutton>Finish</guibutton> button to start downloading the project from the repository
- </para></listitem>
-
+ <listitem>
+ <para>Press the <guibutton>Finish</guibutton> button to start downloading the project from the repository</para>
+ </listitem>
</itemizedlist>
- <para>When downloading is finished the project will be imported automatically and you will be able to see it in the Package Explorer.</para>
+ <para>When downloading is finished the project will be imported automatically and you will be able to see it in the the <guilabel>Package Explorer</guilabel> view.</para>
- <para>Now you can run the application on the server.
+ <para>Now you can run the application on the server.</para>
- </para>
-
-
<figure>
<title>Seam Demo Application run on the Server</title>
<mediaobject>
@@ -196,19 +183,17 @@
...
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>
]]></programlisting>
- <para>It is needed for correct work of <property>Code Assist</property> and <property>JSF EL Validation</property>.</para>
+ <para>It is needed for <property>Code Assist</property> and <property>JSF EL Validation</property> to function correctly.</para>
</section>
<section id="QuickFixes">
<title>Quick Fixes</title>
<para>
- Project Examples Wizard has an option for making quick fixes
- for the imported project to easily fix possible issues like missing servers, Seam runtimes etc.
+ The <guilabel>Project Examples Wizard</guilabel> has an option for making quick fixes for the imported project to easily fix possible issues like missing servers, Seam runtimes etc.
</para>
- <para>To enable quick fixing option you need to check the
- <emphasis><property>Show the Quick Fix dialog</property></emphasis> while choosing the <link linkend="DownloadingProjectExample">Project Example</link>.</para>
- <para>When the project you selected is downloaded it will be checked for missing dependences and if there are some you will see a dialog listing the problems.</para>
+ <para>To enable the quick fix option you need to check the <guilabel>Show the Quick Fix dialog</guilabel> while choosing the <link linkend="DownloadingProjectExample">Project Example</link>.</para>
+ <para>When the project you selected is downloaded it will be checked for missing dependences and if any are detected you will see a dialog listing the problems.</para>
<figure>
<title>Quick Fix Dialog box</title>
<mediaobject>
@@ -221,7 +206,7 @@
<itemizedlist>
<listitem><para>Select the problem from the list</para></listitem>
- <listitem><para>Click <guibutton>Quick Fix</guibutton> button</para></listitem>
+ <listitem><para>Click the <guibutton>Quick Fix</guibutton> button</para></listitem>
</itemizedlist>
<para>You will be offered a solution or a number of solutions to the problem.</para>
@@ -234,11 +219,11 @@
</imageobject>
</mediaobject>
</figure>
- <para>In this case (see the image above), when the <guibutton>Finish</guibutton> button is pressed, Seam Settings dialog box will be displayed where you need to provide a path to the Seam environment to fix the issue.</para>
+ <para>In this case (see the image above), when the <guibutton>Finish</guibutton> button is pressed, the Seam Settings dialog box will be displayed where you need to provide a path to the Seam environment in order to fix the issue.</para>
<para>When the problem is fixed you will be returned to the Quick Fix dialog box with the remaining problems to be fixed.</para>
- <para>There is a possibility to fix problems before downloading. When the project example is selected you will see warning message on the <property>New Project Example</property> dialog.</para>
+ <para>You can also fix problems before downloading. When the project example is selected you will see warning message on the <guilabel>New Project Example</guilabel> dialog.</para>
<figure>
<title>Requirements warning in the Project Example wizard</title>
@@ -251,8 +236,8 @@
<para>To fix the problem immediately you need to:</para>
<itemizedlist>
- <listitem><para>Click the <guibutton>Details...</guibutton> button in the <property>New Project Example</property> dialog</para></listitem>
- <listitem><para>Select the problem from the list in the <property>Requirement details</property> dialog box</para></listitem>
+ <listitem><para>Click the <guibutton>Details...</guibutton> button in the <guilabel>New Project Example</guilabel> dialog</para></listitem>
+ <listitem><para>Select the problem from the list in the <guilabel>Requirement details</guilabel> dialog box</para></listitem>
<listitem><para>Click the <guibutton>Fix</guibutton> button</para></listitem>
</itemizedlist>
15 years, 2 months
JBoss Tools SVN: r28332 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-17 21:16:49 -0500 (Mon, 17 Jan 2011)
New Revision: 28332
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/rad_jsf_application.xml
Log:
General Updates
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/rad_jsf_application.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/rad_jsf_application.xml 2011-01-18 01:42:53 UTC (rev 28331)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/rad_jsf_application.xml 2011-01-18 02:16:49 UTC (rev 28332)
@@ -17,14 +17,14 @@
who for some reason cannot use <property>Seam</property>.</para>
</note>
- <para>In this chapter you will see how to create a simple JSF application being based on
+ <para>In this chapter you will learn how to create a simple JSF application being based on the
<property>"RAD"</property> philosophy. We will create the familiar
- Guess Number application. The scenario is the following. You are asked to guess a number
+ Guess Number application. The game is played according to the following rules. You are asked to guess a number
between 0 and 100. If the guess is correct, a success page is displayed with a link to play
again. If the guess is incorrect, a message is printed notifying that a smaller or a larger
number should be entered and the game continues.</para>
<para>We'll show you how to create such an application from scratch, along the way
- demonstrating powerful features of JBoss Developer Studio such as project templating, Visual
+ demonstrating the powerful features included in JBoss Developer Studio such as project templating, Visual
Page Editor, code completion and others. You will design the JSF application and then run
the application from inside JBoss Developer Studio using the bundled JBoss server.</para>
@@ -35,7 +35,7 @@
project wizard and predefined templates. Follow the next steps:</para>
<itemizedlist>
<listitem>
- <para>In Web Projects (if it is not open select <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Others</guimenuitem><guimenuitem>JBoss Tools Web</guimenuitem><guimenuitem>Web Projects</guimenuitem></menuchoice>) click <guibutton>Create New JSF Project</guibutton> button. <figure>
+ <para>In the Web Projects view (if it is not open select <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Others</guimenuitem><guimenuitem>JBoss Tools Web</guimenuitem><guimenuitem>Web Projects</guimenuitem></menuchoice>) click <guibutton>Create New JSF Project</guibutton> button. <figure>
<title>Create New JSF Project</title>
<mediaobject>
<imageobject>
@@ -47,7 +47,7 @@
</listitem>
<listitem>
- <para>Put <property>GuessNumber</property> as a project name, in JSF Environment
+ <para>Enter <property>GuessNumber</property> as a project name, in JSF Environment
drop down list choose <property>JSF 1.2</property>
</para>
</listitem>
@@ -56,9 +56,9 @@
</para>
</listitem>
</itemizedlist>
- <para>Our project will appear in Project Explorer and Web Projects. As you can see
- JBoss Developer Studio has created for us the whole skeleton for the project with all
- needed libraries, <filename>faces-config.xml</filename> and <filename>web.xml</filename> files.</para>
+ <para>Our project will appear in the Project Explorer and Web Projects views. As you can see
+ JBoss Developer Studio has created the entire skeleton for the project with all
+ required libraries, <filename>faces-config.xml</filename> file and <filename>web.xml</filename> file.</para>
<figure>
<title>New JSF Project</title>
<mediaobject>
@@ -68,16 +68,16 @@
</mediaobject>
</figure>
- <para>As the project has been set up, new JSP pages should be created now.</para>
+ <para>As the project has been set up, new JSP pages should now be created.</para>
</section>
<section id="CreatingJSPPages">
<?dbhtml filename="CreatingJSPPages.html"?>
<title>Creating JSP Pages</title>
- <para>Here, we are going to add two pages to our application. The first page is
- inputnumber.jsp. It prompts you to enter a number. If the guess is incorrect, the same
+ <para>Here, we are going to add two pages to our application. The first page is called
+ <filename>inputnumber.jsp</filename>. It prompts you to enter a number. If the guess is incorrect, the same
page will be redisplayed with a message indicating whether a smaller or a larger number
- should be tried. The second page is success.jsp. This page will be shown after you guess
+ should be tried. The second page is called <filename>success.jsp</filename>. This page will be shown after you guess
the number correctly. From this page you also have the option to play the game again.</para>
<para>Now, we will guide you through the steps on how to do this.</para>
@@ -103,7 +103,7 @@
<para>Right click anywhere on the diagram mode</para>
</listitem>
<listitem>
- <para>From the context menu select <emphasis><property>New View</property></emphasis>
+ <para>From the context menu select <guimenuitem>New View</guimenuitem>
</para>
</listitem>
</itemizedlist>
@@ -118,10 +118,7 @@
<itemizedlist>
<listitem>
- <para>Type <emphasis>
- <property>pages/inputnumber</property>
- </emphasis> as the value for <emphasis>
- <property>From View ID</property>
+ <para>Type <emphasis><property>pages/inputnumber</property></emphasis> as the value for <emphasis> the <property>From View ID</property> field
</emphasis>
</para>
</listitem>
@@ -129,11 +126,7 @@
<para>Leave everything else as is and click the <guibutton>Finish</guibutton> button</para>
</listitem>
<listitem>
- <para>In the same way create another jsf view. Type <emphasis>
- <property>pages/success</property>
- </emphasis> as the value for <emphasis>
- <property>From View ID</property>
- </emphasis>
+ <para>In the same way create another JSF view. Type <emphasis><property>pages/success</property></emphasis> as the value for <emphasis><property>From View ID</property></emphasis>
</para>
</listitem>
<listitem>
@@ -155,14 +148,12 @@
<section id="CreatingTransition">
<?dbhtml filename="CreatingTransition.html"?>
<title>Creating Transition between two views</title>
- <para>Then, we should create connection between jsp pages.</para>
+ <para>Then, we should create connection between JSP pages.</para>
<itemizedlist>
<listitem>
- <para>In the diagram, select the <emphasis>
- <property>Create New Connection</property>
- </emphasis> icon third from the top along the upper left side of the diagram to
- get an arrow cursor with a two-pronged plug at the arrow's bottom <figure>
- <title>Create Connection</title>
+ <para>In the diagram, select the <guibutton>Create New Connection</guibutton> icon third from the top along the upper left side of the diagram to get an arrow cursor with a two-pronged plug at the arrow's bottom
+ <figure>
+ <title>Create Connection</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/rad_jsf_application/rad_jsf_application_5.png"/>
@@ -172,11 +163,7 @@
</para>
</listitem>
<listitem>
- <para>Click on the <emphasis>
- <property>pages/inputnumber</property>
- </emphasis> page icon and then click on the <emphasis>
- <property>pages/success</property>
- </emphasis> page icon</para>
+ <para>Click on the <emphasis><property>pages/inputnumber</property></emphasis> page icon and then click on the <emphasis><property>pages/success</property></emphasis> page icon</para>
</listitem>
</itemizedlist>
<para>A transition should appear between the two icons of views.</para>
@@ -202,35 +189,24 @@
collecting text messages in one central place. JBoss Developer Studio allows you to
create quickly a resource file. The messages stored in resource file can be displayed to
you on a Web page during application execution. </para>
- <para>With resource file first, you don't hard code anything into the JSP pages.
- And second, it makes it easier to translate your application to other languages. All you
- have to do is to translate all your messages to the other language and save them in a
- new properties file with a name that ends with the appropriate ISO-639 language code.</para>
- <para>It is a good idea to keep your resources inside the <emphasis>
- <property>JavaSource</property>
- </emphasis> folder, where you keep your .java files. Every time you build the project,
- all <emphasis>.properties</emphasis> files will then be copied to the
- <emphasis>classes</emphasis> folder by default.</para>
+ <para>
+ With resource file you don't hard code anything into the JSP pages. It also makes it easier to translate your application to other languages. All you have to do is to translate all your messages to the other language and save them in a new properties file with a name that ends with the appropriate ISO-639 language code.
+ </para>
+ <para>It is a good idea to keep your resources inside the <filename>JavaSource</filename> folder, where you keep your .java files. Every time you build the project, all <emphasis>.properties</emphasis> files will then be copied to the <filename>classes</filename> folder by default.</para>
<itemizedlist>
<listitem>
- <para>Right click <emphasis>
- <property>JavaSource</property>
- </emphasis> folder and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Folder</guimenuitem></menuchoice>
+ <para>Right click the <filename>JavaSource</filename> folder and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Folder</guimenuitem></menuchoice>
</para>
</listitem>
<listitem>
- <para>Type <emphasis>
- <property>game</property>
- </emphasis> for Folder name and click the <guibutton>Finish</guibutton> button
+ <para>Enter <filename>game</filename> as the Folder name and click the <guibutton>Finish</guibutton> button
</para>
</listitem>
</itemizedlist>
<para>Your resource file and java bean will be stored in this folder.</para>
<itemizedlist>
<listitem>
- <para>Right click on <emphasis>
- <property>game folder</property>
- </emphasis> and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Properties File</guimenuitem></menuchoice>
+ <para>Right click on the <filename>game</filename> folder and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Properties File</guimenuitem></menuchoice>
</para>
</listitem>
<listitem>
@@ -254,18 +230,14 @@
<para>Click the <guibutton>Add</guibutton> button for adding new attribute to your resource file</para>
</listitem>
<listitem>
- <para>Type <emphasis role="italic">
- <property>how_to_play</property>
- </emphasis> for "name" and <emphasis role="italic">
- <property>Please pick a number between 0 and 100.</property>
- </emphasis> for value</para>
+ <para>Enter <emphasis role="italic"><property>how_to_play</property></emphasis> for the "name" and <emphasis role="italic"><property>Please pick a number between 0 and 100.</property></emphasis> for the value</para>
</listitem>
<listitem>
<para>Click the <guibutton>Finish</guibutton> button
</para>
</listitem>
<listitem>
- <para>In such a way add the next properties:</para>
+ <para>Add the following properties using the same process:</para>
</listitem>
</itemizedlist>
<programlisting role="JAVA"><![CDATA[makeguess_button=Make Guess
@@ -276,7 +248,7 @@
]]></programlisting>
<itemizedlist>
<listitem>
- <para>Click <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>Save</guimenuitem></menuchoice> from the menu bar</para>
+ <para>Select <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>Save</guimenuitem></menuchoice> from the menu bar</para>
</listitem>
</itemizedlist>
<para>Your .properties file should now look like follows:</para>
@@ -289,10 +261,10 @@
</mediaobject>
</figure>
<para>
- The <guibutton>Up</guibutton> and <guibutton>Down</guibutton> buttons allow you to move you attribute on the list. For delete the attribute, choose it and press the <guibutton>Delete</guibutton> button.</para>
- <para>If you want to change a value or a name of your attribute, click on it and then click the <guibutton>Edit</guibutton> button.</para>
+ The <guibutton>Up</guibutton> and <guibutton>Down</guibutton> buttons allow you to move the attributes in the list. To delete the attribute, select it and press the <guibutton>Delete</guibutton> button.</para>
+ <para>If you want to change a value or a name of your attribute, select it and then click the <guibutton>Edit</guibutton> button.</para>
- <para>If the .properties file is rather big and there are a lot of entries in it, you can use filtering and regular expressions to find the necessary ones. The Filter and Regular Expressions Search is implemented by an expandable panel, closed by default: </para>
+ <para>If the .properties file is rather big and there are a lot of entries in it, you can use filtering and regular expressions narrow down the list. The Filter and Regular Expressions Search is implemented by an expandable panel, closed by default: </para>
<para>When "Expression" is not selected (as by default), filter is case insensitive. When "Expression" is selected, filter uses regular expressions which are case sensitive</para>
<figure>
<title>Filter and Regular Expressions Search Panel</title>
@@ -321,22 +293,17 @@
<section id="CreatingJavaBean">
<?dbhtml filename="CreatingJavaBean.html"?>
<title>Creating Java Bean</title>
- <para>In this section you'll see how to create a Java bean that will hold business
- logic of our application.</para>
+ <para>In this section you'll learn how to create a Java bean that will hold business logic of our application.</para>
<itemizedlist>
<listitem>
- <para>Right click <emphasis>
- <property>game folder</property>
- </emphasis>
+ <para>Right click the <filename>game</filename> folder
</para>
</listitem>
<listitem>
<para>Select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Class</guimenuitem></menuchoice></para>
</listitem>
<listitem>
- <para>Type <emphasis>
- <property>NumberBean</property>
- </emphasis> for bean name</para>
+ <para>Type <emphasis><property>NumberBean</property></emphasis> for bean name</para>
</listitem>
</itemizedlist>
<para>A java bean is created.</para>
@@ -350,18 +317,14 @@
<para>JBDS allows to quickly generate getters and setters for java bean.</para>
<itemizedlist>
<listitem>
- <para>Right click <emphasis>
- <property>NumberBean.java</property>
- </emphasis> in Package Explorer</para>
+ <para>Right click the <filename>NumberBean.java</filename> file </emphasis> in the Package Explorer view</para>
</listitem>
<listitem>
<para>Select <menuchoice><guimenuitem>Source</guimenuitem><guimenuitem>Generate Getters and Setters...</guimenuitem></menuchoice>
</para>
</listitem>
<listitem>
- <para>Check <emphasis>
- <property>userNumber</property>
- </emphasis> box and click the <guibutton>OK</guibutton> button
+ <para>Check <emphasis><property>userNumber</property></emphasis> box and click the <guibutton>OK</guibutton> button
<figure>
<title>Generate Getters and Setters</title>
<mediaobject>
@@ -432,7 +395,7 @@
import javax.faces.application.FacesMessage;
import java.util.ResourceBundle;
]]></programlisting>
- <para>The whole java bean should look as follows:</para>
+ <para>The whole java bean contain the following code:</para>
<programlisting role="JAVA"><![CDATA[package game;
import javax.faces.context.FacesContext;
@@ -508,15 +471,14 @@
<section id="EditingFacesConfig">
<?dbhtml filename="EditingFacesConfig.html"?>
<title>Editing faces-config.xml File</title>
- <para>In this section you know about <filename>faces-config.xml</filename> file.</para>
+ <para>In this section you will learn about the <filename>faces-config.xml</filename> file.</para>
<para>This file holds two navigation rules and defines the backing bean used.</para>
<itemizedlist>
<listitem>
- <para>Open <filename>faces-config.xml</filename> file in a source mode</para>
+ <para>Open the <filename>faces-config.xml</filename> file in a source mode</para>
</listitem>
<listitem>
- <para>Add here one more navigation rule and a managed bean declarations that the
- content of the file looks like this:</para>
+ <para>Here we will add one more navigation rule and a managed bean declaration, so that the content of the file looks like this:</para>
</listitem>
</itemizedlist>
<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
@@ -552,54 +514,36 @@
</faces-config>
]]></programlisting>
- <para>The first navigation rule states that from any page (<property>*</property> stands for
- any page) an outcome of playagain will take you to <emphasis>
- <property>/pages/inputnumber.jsp</property>
- </emphasis>. Outcome values are returned from backing bean methods in this example. The
- second navigation rule states that if you are at the page <emphasis>
- <property>/pages/inputnumber.jsp</property>
- </emphasis>, and the outcome is success, then navigate to the <emphasis>
- <property>/pages/success.jsp</property>
- </emphasis> page. </para>
+ <para>The first navigation rule states that from any page (<property>*</property> stands for any page) an outcome of playagain will take you to the <filename>/pages/inputnumber.jsp</filename> file. Outcome values are returned from backing bean methods in this example. The second navigation rule states that if you are at the page <filename>/pages/inputnumber.jsp</filename>, and the outcome is success, then navigate to the <filename>/pages/success.jsp</filename> page. </para>
</section>
<section id="EditingTheJSPViewFiles2">
<?dbhtml filename="EditingTheJSPViewFiles2.html"?>
<title>Editing the JSP View Files</title>
- <para>Now, we will continue editing the JSP files for our two "views" using
- Visual Page Editor.</para>
+ <para>Now, we will continue editing the JSP files for our two "views" using the Visual Page Editor.</para>
<section id="EditingInputjsp">
<?dbhtml filename="EditingInputjsp.html"?>
<title>Editing inputnumber.jsp page</title>
- <para>First, let's dwell on how to edit <filename>inputnumber.jsp</filename>.</para>
- <para>On this page we will have an output text component displaying a message, a text
- field for user's number entering and a button for input submission.</para>
+ <para>First, edit the <filename>inputnumber.jsp</filename> file.</para>
+ <para>On this page we will have an output text component displaying a message, a text field for user's number entering and a button for input submission.</para>
<itemizedlist>
<listitem>
- <para>Open <filename>inputnumber.jsp</filename> by double-clicking on the <filename>/pages/inputnumber. jsp</filename> icon</para>
+ <para>Open the <filename>inputnumber.jsp</filename> file by double-clicking on the <filename>/pages/inputnumber. jsp</filename> icon</para>
</listitem>
</itemizedlist>
- <para>The Visual Page Editor will open in a screen split between source code along the
- top and a WYSIWIG view along the bottom. You can see that some JSF code will be
- already generated as we choose a template when creating the page.</para>
- <para>At the beginning it's necessary to create a
- <code><h:form></code>
- component where all others components are put.</para>
+ <para>The Visual Page Editor will open in a screen split between source code along the top and a WYSIWIG view along the bottom. You can see that some JSF code will have already been generated since we chose a template when creating the page.</para>
+ <para>At the beginning it's necessary to create a <code><h:form></code> component that will hold the other components.</para>
<itemizedlist>
<listitem>
- <para>Place the mouse cursor inside
- <code><f:view>
- </f:view></code>
+ <para>Place the mouse cursor inside the <code><f:view></f:view></code> tag
</para>
</listitem>
<listitem>
- <para>Go to JBoss Tools Palette and expand JSF HTML folder by selecting
- it</para>
+ <para>Go to JBoss Tools Palette and expand JSF HTML folder by selecting it</para>
</listitem>
<listitem>
- <para>Click on
- <code><h:form></code>
- tag <figure>
- <title>Insert h:form</title>
+ <para>Click on the <code><h:form></code> tag
+ <figure>
+ <title>Insert h:form</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/rad_jsf_application/rad_jsf_application_10.png" />
@@ -609,11 +553,9 @@
</para>
</listitem>
<listitem>
- <para>In the dialog Insert Tag select <emphasis>
- <property>id</property>
- </emphasis> and click on this line below the value header. A blinking cursor
- will appear in a input text field inviting to enter a value of id <figure>
- <title>Define Id of Form</title>
+ <para>In the Insert Tag dialog select the <emphasis><property>id</property></emphasis> field and click on the second column. A blinking cursor will appear in a input text field inviting to enter a value of id
+ <figure>
+ <title>Define Id of Form</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/rad_jsf_application/rad_jsf_application_11.png" />
@@ -623,9 +565,7 @@
</para>
</listitem>
<listitem>
- <para>Type <emphasis>
- <property>inputNumbers</property>
- </emphasis> and click the <guibutton>Finish</guibutton> button
+ <para>Enter <emphasis><property>inputNumbers</property></emphasis> and click the <guibutton>Finish</guibutton> button
</para>
</listitem>
</itemizedlist>
@@ -638,12 +578,10 @@
</imageobject>
</mediaobject>
</figure>
- <para>First let's declare the properties file in the <filename>inputnumber.jsp</filename> page using the
- loadBundle JSF tag.</para>
+ <para>First let's declare the properties file in the <filename>inputnumber.jsp</filename> page using the loadBundle JSF tag.</para>
<itemizedlist>
<listitem>
- <para>Put this declaration on the top of a page, right after the first two
- lines:</para>
+ <para>Add this declaration on the top of a page, right after the first two lines:</para>
</listitem>
</itemizedlist>
<programlisting role="XML"><![CDATA[<f:loadBundle basename="game.messages" var="msg"/>
@@ -659,11 +597,10 @@
</figure>
<itemizedlist>
<listitem>
- <para>Switch to Visual tab, so it could be possible to work with the editor
- completely in its WYSIWYG mode</para>
+ <para>Switch to Visual tab, where it is possible to work with the editor through a WYSIWYG interface</para>
</listitem>
<listitem>
- <para>Click the <emphasis><property>outputText</property> item from the <guilabel>JSF HTML</guilabel> group in the <guilabel>JBoss Tools Palette</guilabel> view, </emphasis> drag the cursor over to the editor, and drop it inside the blue box in the editor</para>
+ <para>Click the <emphasis><property>outputText</property></emphasis> item from the <guilabel>JSF HTML</guilabel> group in the <guilabel>JBoss Tools Palette</guilabel> view, drag the cursor over to the editor, and drop it inside the blue box in the editor</para>
</listitem>
<listitem>
@@ -673,7 +610,7 @@
<para>Click the <guibutton>...</guibutton> button next to the value field</para>
</listitem>
</itemizedlist>
- <para>JBDS will nicely propose you to choose within available values:</para>
+ <para>JBDS will display a list of possible values:</para>
<figure>
<title>Choose Value</title>
<mediaobject>
@@ -688,9 +625,7 @@
</para>
</listitem>
<listitem>
- <para>Select <emphasis>
- <property>how_to_play</property>
- </emphasis> value and click the <guibutton>OK</guibutton>. Then click the <guibutton>Finish</guibutton> button.
+ <para>Select the <emphasis><property>how_to_play</property></emphasis> value and click the <guibutton>OK</guibutton> button. Then click the <guibutton>Finish</guibutton> button.
<figure>
<title>Selecting Value</title>
<mediaobject>
@@ -713,40 +648,25 @@
</figure>
<itemizedlist>
<listitem>
- <para>Switch to Source mode and insert
- <code><br/></code>
- tag after
- <code><h:outputText></code>
- component to make a new line.</para>
+ <para>Switch to Source mode and insert a <code><br/></code> tag after the <code><h:outputText></code> component to make a new line.</para>
</listitem>
<listitem>
<para>Click the <guibutton>Save</guibutton> button.</para>
</listitem>
<listitem>
- <para>On the Palette click on <emphasis>
- <property>inputText</property>, </emphasis> drag the cursor over to the
- editor, and drop it inside the editor after the text.</para>
+ <para>On the Palette click on <emphasis><property>inputText</property>, </emphasis> drag the cursor over to the editor, and drop it inside the editor after the text.</para>
</listitem>
<listitem>
- <para>Switch to a Source mode and insert
- <code><br/></code>
- tag after
- <code><h:outputText></code>
- component to make a new line</para>
+ <para>Switch to a Source mode and insert a <code><br/></code> tag after the <code><h:outputText></code> component to make a new line</para>
</listitem>
<listitem>
<para>Click the <guibutton>Save</guibutton> button</para>
</listitem>
<listitem>
- <para>On the Palette click on <emphasis>
- <property>inputText</property>, </emphasis> drag the cursor over to the
- editor, and drop it inside the editor after the text</para>
+ <para>On the Palette click on <emphasis><property>inputText</property>, </emphasis> drag the cursor over to the editor, and drop it inside the editor after the text</para>
</listitem>
<listitem>
- <para>Select <emphasis>
- <property>value</property>
- </emphasis> and click on this line below "value"
- header</para>
+ <para>Select the <emphasis><property>value</property></emphasis> row and click in the second column</para>
</listitem>
<listitem>
<para>Click the <guibutton>...</guibutton> button next to the value field</para>
@@ -756,42 +676,26 @@
</para>
</listitem>
<listitem>
- <para>Select <emphasis>
- <property>userNumber</property>
- </emphasis> value and click the <guibutton>OK</guibutton> button
+ <para>Select <emphasis><property>userNumber</property></emphasis> value and click the <guibutton>OK</guibutton> button
</para>
</listitem>
<listitem>
- <para>Switch <emphasis>
- <property>Advanced</property>
- </emphasis> tab</para>
+ <para>Select the <emphasis><property>Advanced</property></emphasis> tab</para>
</listitem>
<listitem>
- <para>Select <emphasis>
- <property>id</property>
- </emphasis> and click on this line below "value"
- header</para>
+ <para>Select the <emphasis><property>id</property></emphasis> row and click in the second column</para>
</listitem>
<listitem>
- <para>Type <emphasis>
- <property>userNumber</property>
- </emphasis> in text field</para>
+ <para>Type <emphasis><property>userNumber</property></emphasis> in the text field</para>
</listitem>
<listitem>
- <para>Select <emphasis>
- <property>required</property>
- </emphasis> and click on this line below "value"
- header</para>
+ <para>Select the <emphasis><property>required</property></emphasis> row and click in the second column</para>
</listitem>
<listitem>
<para>Click <guibutton>...</guibutton> button next to the value field</para>
</listitem>
<listitem>
- <para>Expand <emphasis>
- <property>Enumeration</property>
- </emphasis> and select <emphasis>
- <property>true</property>
- </emphasis> as a value</para>
+ <para>Expand <emphasis><property>Enumeration</property></emphasis> and select <emphasis><property>true</property></emphasis> as a value</para>
</listitem>
</itemizedlist>
<figure>
@@ -812,9 +716,7 @@
<para>Go to Source mode</para>
</listitem>
<listitem>
- <para>Add the validation attribute to
- <code><f:validateLongRange></code>
- for user input validation</para>
+ <para>Add the validation attribute to <code><f:validateLongRange></code> for user input validation</para>
</listitem>
</itemizedlist>
<programlisting role="XML"><![CDATA[<h:inputText id="userNumber" value="#{NumberBean.userNumber}" required="true">
@@ -826,57 +728,36 @@
<para>Click the <guibutton>Save</guibutton> button</para>
</listitem>
<listitem>
- <para>Again select <emphasis>
- <property>Visual</property>
- </emphasis> mode</para>
+ <para>Again select <emphasis><property>Visual</property></emphasis> mode</para>
</listitem>
<listitem>
- <para>On the Palette, click on <emphasis>
- <property>commandButton</property>, </emphasis> drag the cursor over to
- the editor, and drop it inside the editor after the inputText
- component.</para>
+ <para>On the Palette, click on <emphasis><property>commandButton</property>, </emphasis> drag the cursor over tothe editor, and drop it inside the editor after the <code>inputText</code> component.</para>
</listitem>
<listitem>
- <para>In the editing dialog select <emphasis>
- <property>value</property>
- </emphasis> and click on this line below "value"
- header</para>
+ <para>In the editing dialog select the <emphasis><property>value</property></emphasis> row and click on the second column</para>
</listitem>
<listitem>
- <para>Click <guibutton>...</guibutton> button next to the value field</para>
+ <para>Click the <guibutton>...</guibutton> button next to the value field</para>
</listitem>
<listitem>
- <para>Expand <menuchoice><guimenuitem>Resource Bundles</guimenuitem><guimenuitem>msg</guimenuitem></menuchoice> and select <emphasis>
- <property>makeguess_button</property>
- </emphasis> as a value</para>
+ <para>Expand <menuchoice><guimenuitem>Resource Bundles</guimenuitem><guimenuitem>msg</guimenuitem></menuchoice> and select <emphasis><property>makeguess_button</property></emphasis> as a value</para>
</listitem>
<listitem>
<para>Click the <guibutton>OK</guibutton> button
</para>
</listitem>
<listitem>
- <para>Select <emphasis>
- <property>action</property>
- </emphasis> and click on this line below "value"
- header</para>
+ <para>Select the <emphasis><property>action</property></emphasis> row and click in the second column</para>
</listitem>
<listitem>
- <para>Type <emphasis>
- <property>#{NumberBean.checkGuess}</property>
- </emphasis> in the text field</para>
+ <para>Type <emphasis><property>#{NumberBean.checkGuess}</property></emphasis> in the text field</para>
</listitem>
<listitem>
<para>Click the <guibutton>Finish</guibutton> button
</para>
</listitem>
<listitem>
- <para>In Source mode add
- <code><br/></code>
- tags between
- <code><outputText></code>
- , <code><inputText></code>
- and <code><commandButton></code>
- components to place them on different lines</para>
+ <para>In Source mode add <code><br/></code> tags between the <code><outputText></code>, <code><inputText></code> and <code><commandButton></code> components to place them on different lines</para>
</listitem>
</itemizedlist>
<para><filename>inputnumber.jsp</filename> page should look like this:</para>
@@ -912,8 +793,7 @@
<section id="EditingSuccessJsp">
<?dbhtml filename="EditingSuccessJsp.html"?>
<title>Editing success.jsp page</title>
- <para>In the same way like <filename>inputnumber.jsp</filename>, edit <filename>success.jsp</filename> page. Its whole source
- should be the next:</para>
+ <para>We now edit the <filename>success.jsp</filename> page in the same way as we just edited the <filename>inputnumber.jsp</filename> file. The code for the <filename>success.jsp</filename> page should look like the following:</para>
<programlisting role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:loadBundle basename="game.messages" var="msg"/>
@@ -947,16 +827,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>This page, <filename>success.jsp</filename>, is shown if you correctly guessed the number. The
- <code><h:outputFormat></code>
- tag will get the value of success_text from the properties file. The {0}
- in success_text will be substituted for by the value of the value attribute within
- the <code><f:param></code>
- tag during runtime.</para>
- <para>At the end, you have a button which allows you to replay the game. The action
- value references a backing bean method. In this case, the method only terminates the
- current session so that when you are shown the first page, the input text box is
- clear and a new random number is generated.</para>
+ <para>The <filename>success.jsp</filename> page is shown if you correctly guessed the number. The <code><h:outputFormat></code> tag will get the value of <code>success_text</code> from the properties file. The <code>{0}</code> in <code>success_text</code> will be substituted for by the value of the value attribute within the <code><f:param></code> tag during runtime.</para>
+ <para>In the final result you have a button which allows you to replay the game. The <code>action</code> value references a backing bean method. In this case, the method only terminates the current session so that when you are shown the first page, the input text box is clear and a new random number is generated.</para>
<itemizedlist>
<listitem>
<para>Switch to Preview mode to see how this page will look in a browser:</para>
@@ -975,16 +847,15 @@
<section id="CreatingIndexjsp">
<?dbhtml filename="CreatingIndexjsp.html"?>
<title>Creating index.jsp page</title>
- <para>Now you know how to create <filename>index.jsp</filename> page.</para>
- <para>The <filename>index.jsp</filename> page is the entry point of our application. It's just
- forwarding to <filename>inputnumber.jsp</filename> page.</para>
+ <para>Now we need to create the <filename>index.jsp</filename> page.</para>
+ <para>The <filename>index.jsp</filename> page is the entry point of our application. It's just forwarding to the <filename>inputnumber.jsp</filename> page.</para>
<itemizedlist>
<listitem>
- <para>Right click <menuchoice><guimenuitem>WebContent</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>JSP File</guimenuitem></menuchoice>
+ <para>Right click the <filename>WebContent</filename> folder and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>JSP File</guimenuitem></menuchoice>
</para>
</listitem>
<listitem>
- <para>Type <emphasis><property>index</property></emphasis> for name field and click the <guibutton>Next</guibutton> button.</para>
+ <para>Enter <filename>index</filename> for name field and click the <guibutton>Next</guibutton> button.</para>
</listitem>
<listitem>
<para>Untick the <guilabel>Use JSP Template</guilabel> check box and click the <guibutton>Finish</guibutton> button.</para>
@@ -1001,9 +872,7 @@
</html>
]]></programlisting>
- <para>Note the <emphasis>.jsf</emphasis> extension of a page. It means that we trigger the
- JSF controller servlet to handle the page according the servlet mapping in the
- <filename>faces-config.xml</filename> file.</para>
+ <para>Note the <emphasis>.jsf</emphasis> extension of a page. It means that we trigger the JSF controller servlet to handle the page according the servlet mapping in the <filename>faces-config.xml</filename> file.</para>
</section>
<section id="RunningTheApplication33">
<?dbhtml filename="RunningTheApplication33.html"?>
@@ -1011,14 +880,13 @@
<para>Finally, we have all the pieces needed to run the application.</para>
<itemizedlist>
<listitem>
- <para>Start up JBoss server by clicking on the the <guibutton>Start</guibutton> icon in the <property>Servers</property> view. (If JBoss is already running, stop it by clicking on the red icon and then start it again. After the messages in the Console tabbed view stop scrolling, JBoss is available)</para>
+ <para>Start up JBoss server by clicking on the the <guibutton>Start</guibutton> icon in the <property>Servers</property> view. (If the JBoss Server is already running, stop it by clicking on the red icon and then start it again. After the messages in the Console tabbed view stop scrolling, JBoss is available)</para>
</listitem>
<listitem>
- <para>Right-click on project <menuchoice><guimenuitem>Run AS</guimenuitem><guimenuitem>Run on Server</guimenuitem></menuchoice></para>
+ <para>Right-click on the project and select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run on Server</guimenuitem></menuchoice></para>
</listitem>
<listitem>
- <para>Play with the application by entering correct as well as incorrect
- values</para>
+ <para>Play with the application by entering correct as well as incorrect values</para>
</listitem>
</itemizedlist>
<figure>
15 years, 2 months
JBoss Tools SVN: r28331 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-17 20:42:53 -0500 (Mon, 17 Jan 2011)
New Revision: 28331
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml
Log:
General Updates
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml 2011-01-18 01:29:03 UTC (rev 28330)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml 2011-01-18 01:42:53 UTC (rev 28331)
@@ -12,12 +12,11 @@
<note>
<title>Note:</title>
- <para>We highly recommend developing in <property>Seam</property>. This chapter is for users
- who for some reason cannot use Seam.</para>
+ <para>We highly recommend developing in <property>Seam</property>. This chapter is for users who for some reason cannot use Seam.</para>
</note>
<para>In this chapter you'll find out how to create a simple <ulink
- url="http://java.sun.com/products/jsp/">JSP</ulink> application using the
+ url="http://java.sun.com/products/jsp/">JSP</ulink> application using
<property>JBoss Developer Studio</property>. The application will show a classic
"Hello World!" on the page.</para>
<para>We'll assume that you have already launched <property>JBoss Developer
@@ -28,7 +27,7 @@
<section id="SettingUpTheProject">
<?dbhtml filename="SettingUpTheProject.html"?>
<title>Setting Up the Project</title>
- <para>We are going to start with the creating a Dynamic Web Project with a minimal
+ <para>We are going to start by creating a Dynamic Web Project with a minimal
structure, i.e. with just required facets. Thus this section will perform you all
necessary steps on how to do this.</para>
<itemizedlist>
@@ -60,10 +59,7 @@
</mediaobject>
</figure>
- <para>The <emphasis>
- <property>jspHello</property>
- </emphasis> node should appear in the upper-left <property>Package Explorer</property>
- view.</para>
+ <para>The <emphasis><property>jspHello</property></emphasis> node should appear in the upper-left <property>Package Explorer</property> view.</para>
<figure>
<title>New Web Project</title>
<mediaobject>
@@ -82,13 +78,13 @@
<emphasis>"Hello World!"</emphasis> message.</para>
<itemizedlist>
<listitem>
- <para>Right click <menuchoice><guimenuitem>WebContent</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>JSP</guimenuitem></menuchoice>.</para>
+ <para>Right click the <filename>WebContent</filename> folder and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>JSP</guimenuitem></menuchoice>.</para>
</listitem>
<listitem>
- <para>Type "hello.jsp" for a file name and click the <guibutton>Next</guibutton> button.</para>
+ <para>Type <filename>hello.jsp</filename> for a file name and click the <guibutton>Next</guibutton> button.</para>
</listitem>
</itemizedlist>
- <para>In the next window you can choose a template for your jsp page and see its preview.</para>
+ <para>In the next window you can choose a template for your JSP page and see its preview.</para>
<itemizedlist>
<listitem>
<para>Select <emphasis>
@@ -104,13 +100,12 @@
</imageobject>
</mediaobject>
</figure>
- <para>Our <emphasis><property>hello.jsp</property></emphasis> page will now appear in
- <property>Project Explorer</property>.
+ <para>Our <filename>hello.jsp</filename> page will now appear in the <property>Project Explorer</property> view.
</para>
<section id="EditingJSPPage">
<?dbhtml filename="EditingJSPPage.html"?>
<title>Editing a JSP Page</title>
- <para>Let's now make a little change so that a jsp page displays
+ <para>Let's now make a little change so that a JSP page displays
<emphasis>"Hello World!"</emphasis> message.</para>
<itemizedlist>
<listitem>
@@ -140,9 +135,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>After changes made your <emphasis>
- <property>hello.jsp</property>
- </emphasis> page should look like this:</para>
+ <para>After changes made your <filename>hello.jsp</filename> page should look like this:</para>
<figure>
<title>Hello.jsp Page Source</title>
<mediaobject>
@@ -161,9 +154,7 @@
<section id="WebXML">
<?dbhtml filename="WebXML.html"?>
<title>web.xml file</title>
- <para>When you are creating web project the wizard creates the <emphasis>
- <property>web.xml</property>
- </emphasis> for you automatically. The <property>web.xml file editor</property>
+ <para>When you are creating web project the wizard creates the <filename>web.xml</filename> file for you automatically. The <property>web.xml file editor</property>
provided by <property>JBoss Developer Studio</property> is available in two modes:
<property>Tree</property> and <property>Source</property>.</para>
<figure>
@@ -175,14 +166,10 @@
</imageobject>
</mediaobject>
</figure>
- <para>Both modes are fully synchronized. Let's add mapping to our <emphasis>
- <property>hello.jsp</property>
- </emphasis> page in <emphasis>
- <property>web.xml</property>
- </emphasis> file.</para>
+ <para>Both modes are fully synchronized. Let's add a mapping to our <filename>hello.jsp</filename> page in the <filename>web.xml</filename> file.</para>
<itemizedlist>
<listitem>
- <para>Switch to <property>Source</property> tab.</para>
+ <para>Switch to the <property>Source</property> tab.</para>
</listitem>
<listitem>
<para>Add the next code into
@@ -200,8 +187,8 @@
<section id="DeployTheProject">
<?dbhtml filename="DeployTheProject.html"?>
<title>Deploying the project</title>
- <para>Writing ant scripts and managing the packaging can be quite a complicated and time consuming task for even the most trivial web applications. However, <property>JBoss Developer Studio</property> relieves you of this burden. All you need is to start <property>JBoss Server</property> and launch your application in your favorite browser.</para>
- <para>You can also create a war archive with JBDS's Archive Tools
+ <para>Writing ant scripts and managing the packaging process can be quite a complicated and time consuming task for even the most trivial web applications. However, <property>JBoss Developer Studio</property> relieves you of this burden. All you need is to start <property>JBoss Server</property> and launch your application in your favorite browser.</para>
+ <para>You can also create a WAR archive with JBDS's Archive Tools
and export it to any web server.</para>
<section id="WarConfig">
<?dbhtml filename="WarConfig.html"?>
@@ -216,7 +203,7 @@
<para>Select a project in Package Explorer you want to be archived</para>
</listitem>
</itemizedlist>
- <para>In <property>Project Archives</property> you will see the that the project is now listed:</para>
+ <para>In the <property>Project Archives</property> view you will see the that the project is now listed:</para>
<figure>
<title>Project Archives</title>
<mediaobject>
@@ -252,9 +239,7 @@
<title>Stub Archive Configuration</title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsp_application/jsp_application_10.png"
- />
+ <imagedata fileref="images/jsp_application/jsp_application_10.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -262,15 +247,13 @@
</listitem>
<listitem>
<para>Click the <guibutton>Finish</guibutton> button. The
- <emphasis>.war</emphasis> file will appear in <property>Package
+ <emphasis>.WAR</emphasis> file will appear in <property>Package
Explorer</property> and also in <property>Project Archives</property>
view as structure tree: <figure>
<title>Archive is Created</title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsp_application/jsp_application_11.png"
- />
+ <imagedata fileref="images/jsp_application/jsp_application_11.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -278,16 +261,14 @@
<title>Archive in Project Archives View</title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsp_application/jsp_application_12.png"
- />
+ <imagedata fileref="images/jsp_application/jsp_application_12.png"/>
</imageobject>
</mediaobject>
</figure>
</para>
</listitem>
</itemizedlist>
- <para>Via <property>Project Archives</property> view you could now rebuild the archive:</para>
+ <para>Using the <property>Project Archives</property> view you can rebuild the archive:</para>
<figure>
<title>Configure Archive</title>
<mediaobject>
@@ -302,8 +283,8 @@
<?dbhtml filename="AutoRedeploy.html"?>
<title>Auto redeploy</title>
<para>When you are creating a web application and register it on <property>JBoss
- Server</property> it is automatically deployed into
- <emphasis>/deploy</emphasis> directory of the server. JBDS comes with the
+ Server</property> it is automatically deployed into the
+ <filename>/deploy</filename> directory of the server. JBDS comes with the
feature of auto-redeploy. It means that you don't need to restart
<property>JBoss Server</property>. Any changes made in the application in
exploded format will trigger a redeployment on the server.</para>
@@ -328,25 +309,20 @@
<title>JSP Page Preview</title>
<para><property>JBDS</property> comes with JSP design-time preview features. When
designing JSP pages you can easily preview how they will look during runtime. You
- can even attach your stylesheet to the
- Preview.</para>
+ can even attach your stylesheet to the Preview.</para>
<itemizedlist>
<listitem>
- <para>Make a little change to <emphasis>
- <property>hello.jsp</property>
- </emphasis> page, e.g. put this code snippet:</para>
+ <para>Make a little change to <filename>hello.jsp</filename> page, e.g. put this code snippet:</para>
</listitem>
</itemizedlist>
<programlisting role="XML"><![CDATA[<%= new java.util.Date() %>
]]></programlisting>
<itemizedlist>
<listitem>
- <para>Click <emphasis>
- <property>Save</property>
- </emphasis> button.</para>
+ <para>Click the <guibutton>Save</guibutton> button.</para>
</listitem>
<listitem>
- <para>Switch to Preview page by clicking <property>Preview</property> tab at the
+ <para>Switch to Preview page by clicking the <property>Preview</property> tab at the
bottom of the page. You will see how the page will look at runtime.</para>
</listitem>
</itemizedlist>
@@ -380,15 +356,9 @@
<itemizedlist>
<listitem>
- <para>Click the Run icon or right click your project folder and select <emphasis>
- <property>Run As > Run on Server</property>. </emphasis> If you
- haven't made any changes in <emphasis>
- <property>web.xml</property>
- </emphasis> file or cleared it out you can launch the application by right
- clicking the <emphasis>
- <property>hello.jsp</property>
- </emphasis> page and selecting <emphasis>
- <property>Run on the Server</property> </emphasis>(
+ <para>Click the <guibutton>Run</guibutton> icon or right click your project folder and select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run on Server</guimenuitem></menuchoice>. If you
+ haven't made any changes in the <filename>web.xml</filename> file or cleared it out you can launch the application by right
+ clicking the the <filename>hello.jsp</filename> page and selecting <guimenuitem>Run on the Server</guimenuitem>(
<inlinemediaobject>
<imageobject>
<imagedata fileref="images/jsp_application/jsp_application_16.png"/>
@@ -407,8 +377,8 @@
</mediaobject>
</figure>
<para>Thus with the help of this chapter you've learnt how to organize a Dynamic
- Web Project with a minimal configuration, add any staff to it (in our case it's
- just one jsp page) and deploy and run it on the <property>JBoss Server</property>
+ Web Project with a minimal configuration, add new elements to it (in our case it's
+ just one JSP page) and deploy and run it on the <property>JBoss Server</property>
shipped with <property>JBDS</property>.
</para>
</section>
15 years, 2 months
JBoss Tools SVN: r28330 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-17 20:29:03 -0500 (Mon, 17 Jan 2011)
New Revision: 28330
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
Log:
General Updates
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2011-01-18 00:13:42 UTC (rev 28329)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2011-01-18 01:29:03 UTC (rev 28330)
@@ -378,7 +378,7 @@
<para>You may have to refresh the project to see the new files.</para>
</note>
- <para>The test case simulates a Seam component or method execution for the <property>MyAction.myAction()</property> logic.</para>
+ <para>The test case simulates a Seam method execution for the <property>MyAction.myAction()</property> logic.</para>
<para>To run the test case, right click on <filename>MyActionTest.xml</filename> and click <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>TestNG Suite</guimenuitem></menuchoice> or use the <guibutton>Run As...</guibutton> toolbar shortcut as shown below.</para>
<figure>
<title>TestNG Running</title>
@@ -398,7 +398,7 @@
</mediaobject>
</figure>
<para>Now, it’s safe to test the new Seam Action in a web browser. The fastest way to do that
- is to right click on <property>myAction.xhtml</property> and use <menuchoice><guimenuitem>Run As...</guimenuitem><guimenuitem>Run On Server</guimenuitem></menuchoice> which will show the appropriate url in the browser. Alternatively you can
+ is to right click on <filename>myAction.xhtml</filename> and use <menuchoice><guimenuitem>Run As...</guimenuitem><guimenuitem>Run On Server</guimenuitem></menuchoice> which will show the appropriate URL in the browser. Alternatively you can
manually enter <emphasis>
<property>http://localhost:8080/workshop/myAction.seam</property>
</emphasis> into a browser.</para>
@@ -415,10 +415,10 @@
<title>Modify Seam Action User Interface</title>
<para>Browse to <emphasis>
<property>http://localhost:8080/workshop/myAction.seam</property>
- </emphasis> and click on <property>myAction</property>. This executes the “myAction” method.
+ </emphasis> and click on the <guibutton>myAction</guibutton> button. This executes the “myAction” method.
This looks pretty good, but we could make this page look a little better.</para>
<para>Open <emphasis>
- <property>WebContent/myAction.xhtml</property>
+ <filename>WebContent/myAction.xhtml</filename>
</emphasis> in JBoss Developer Studio to use the nice facelets editor.</para>
<figure>
<title>Open Seam Action with Editor </title>
@@ -439,9 +439,7 @@
</mediaobject>
</figure>
<para>Change the <property>value</property> of the button to something different. If desired,
- you can change any other text on the page. Then, type <emphasis>
- <property>CTRL + S</property>
- </emphasis> to save the facelet.</para>
+ you can change any other text on the page. Then, type <keycombo><keycap>CTRL</keycap><keycap>S</keycap></keycombo> to save the facelet.</para>
<figure>
<title>Attributes Dialog</title>
<mediaobject>
@@ -453,8 +451,7 @@
<para>Refresh <emphasis>
<property>http://localhost:8080/workshop/myAction.seam</property>
</emphasis> and now you should see your changes.</para>
- <para>Notice that you did not have to publish the application. JBoss Developer Studio
- auto-published it for you.</para>
+ <para>Notice that you did not have to publish the application. JBoss Developer Studio auto-published it for you.</para>
<figure>
<title>Seam Action Is Modified</title>
<mediaobject>
@@ -467,15 +464,15 @@
</section>
<section id="declarative_security">
<title>Declarative Security</title>
- <para>In this section you will see how it’s easy to secure the facelets and facelet components
+ <para>In this section you will see how easy it is to secure the facelets and facelet components
in Seam. Let’s go ahead and secure the action button, then we will secure the entire
page.</para>
<section id="edit_login">
<title>Edit Login Authentication Logic</title>
- <para>There is a class called <property>Authenticator.java</property>. The login page will
+ <para>There is a class called <filename>Authenticator.java</filename>. The login page will
execute the <property>Authenticator.authenticate()</property> method by default, so we’ll
start by viewing the authentication logic.</para>
- <para>Open <property>Authenticator.java</property> in JBoss Developer Studio and you will see that it contains the
+ <para>Open <filename>Authenticator.java</filename> in JBoss Developer Studio and you will see that it contains the
<property>authenticate()</property> method with this code:</para>
<programlisting><![CDATA[public boolean authenticate()
{
@@ -493,7 +490,7 @@
</section>
<section id="secure_seam_page">
<title>Secure Seam Page Component</title>
- <para>Open <property>myAction.xhtml</property> and add a new secured command button:</para>
+ <para>Open <filename>myAction.xhtml</filename> and add a new secured command button:</para>
<programlisting><![CDATA[<h:commandButton id="myActionSecured"
value="Secured Action Button"
action="#{myAction.myAction}"
@@ -523,7 +520,7 @@
<para>The user is logged in as <property>"admin"</property>. Securing components is
easy but securing pages is pretty simple as well. </para>
<para>Open <emphasis>
- <property>WebContent/WEB-INF/pages.xml</property>
+ <filename>WebContent/WEB-INF/pages.xml</filename>
</emphasis>. Then add this markup directly underneath the <pages> element:</para>
<programlisting><![CDATA[<page view-id="/myAction.xhtml" login-required="true"/>]]></programlisting>
<para>Refresh <emphasis>
@@ -553,9 +550,8 @@
<title>Database Connectivity Setup</title>
<para>The workshop data can be browsed inside of JBoss Developer Studio.</para>
<para>To open the Data Source Explorer, click on <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Database Development</guimenuitem></menuchoice>.</para>
- <para>In the Data Source Explorer, expand a <property>Databases</property> node and select a
- <property>Default</property> database. Right click on it, select <property
- >Connect</property> from the context menu.</para>
+ <para>In the Data Source Explorer, expand the <property>Databases</property> node and select the
+ <property>Default</property> database. Right click on it, select <guimenuitem>Connect</guimenuitem> from the context menu.</para>
<figure>
<title>Data Source Explorer</title>
<mediaobject>
@@ -601,14 +597,13 @@
<section id="db_programming">
<title>Database Programming</title>
<para>Now, it’s time to reverse engineer the workshop database into a fully functioning Seam
- CRUD(Create Read Update Delete) application.</para>
+ CRUD (Create Read Update Delete) application.</para>
<section id="reverse_engineer_crud">
<title>Reverse Engineer CRUD from a Running Database</title>
- <para>In <property>JBoss Developer Studio</property>, switch to <property>Seam
- perspective</property>, and then right-click the project and select <emphasis><property
- >New > Seam Generate Entities</property>.</emphasis></para>
- <para>"workshop" project in the <property>Seam Generate Entities wizard</property>
- will be selected automatically. There is no need to change something more, click the <guibutton>Next</guibutton> button to proceed further.</para>
+ <para>In <property>JBoss Developer Studio</property>, switch to the <property>Seam
+ perspective</property>, and then right-click the project and select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Seam Generate Entities</guimenuitem></menuchoice>.</para>
+ <para>The "workshop" project in the <property>Seam Generate Entities wizard</property>
+ will be selected automatically. There is no need to change something more, click the <guibutton>Next</guibutton> button to proceed to the next step.</para>
<figure>
<title>Generate Seam Entities</title>
<mediaobject>
@@ -637,7 +632,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>There are also <emphasis>
+ <para>There is also the <emphasis>
<property>org.domain.workshop.entity</property>
</emphasis> package that contains the JPA classes. These are the entity beans that are
mapped to database tables. Note that you can use Seam refactoring tools with Seam components.
@@ -655,13 +650,13 @@
<note>
<title>Tip</title>
<para>
- If you see the error <emphasis>java.lang.ClassNotFoundException: org.jboss.seam.servlet.SeamListener</emphasis> in the console output from the Application Server, you may need to copy the <filename>jboss-seam.jar</filename> file from the <filename>lib</filename> subdirectoy in the Seam library (which can be downloaded from <ulink url="http://seamframework.org/Seam2/Seam2DistributionDownloads">here</ulink>) into the <filename>/server/default/deploy/workshop.war/WEB-INF/lib/</filename> subdirectory in your Application Server (where "default" refers to the server profile that you are using).
+ If you see the error <code>java.lang.ClassNotFoundException: org.jboss.seam.servlet.SeamListener</code> in the console output from the Application Server, you may need to copy the <filename>jboss-seam.jar</filename> file from the <filename>lib</filename> subdirectoy in the Seam library (which can be downloaded from <ulink url="http://seamframework.org/Seam2/Seam2DistributionDownloads">here</ulink>) into the <filename>/server/default/deploy/workshop.war/WEB-INF/lib/</filename> subdirectory in your Application Server (where "default" refers to the server profile that you are using).
</para>
</note>
<note>
<title>Tip</title>
<para>
- If you see the error <emphasis>Could not instantiate Seam component: org.jboss.seam.security.ruleBasedPermissionResolver</emphasis>, copy the <filename>mvel2.jar</filename> file from the Seam library to the same destination directory mentioned in the tip above.
+ If you see the error <code>Could not instantiate Seam component: org.jboss.seam.security.ruleBasedPermissionResolver</code>, copy the <filename>mvel2.jar</filename> file from the Seam library to the same destination directory mentioned in the tip above.
</para>
</note>
@@ -673,15 +668,14 @@
</imageobject>
</mediaobject>
</figure>
- <para>Congratulations! You now have a fully functioning CRUD application that is already AJAX
- enabled.</para>
+ <para>Congratulations! You now have a fully functioning CRUD application that is AJAX enabled.</para>
</section>
<section id="use_hibernate_tools">
<title>Use Hibernate Tools to Query Data via JPA</title>
<para>Now, it's time to write some JPA queries using the Hibernate perspective in
<property>JBoss Developer Studio</property>.</para>
<para>In the upper right corner of the workbench there is a small icon (see the figure below),
- click on it and choose <property>Hibernate</property>.</para>
+ click on it and select <guimenuitem>Hibernate</guimenuitem>.</para>
<figure>
<title>Hibernate Perspective</title>
<mediaobject>
@@ -701,8 +695,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>Right click on the <property>Session Factory</property> and select <property>HQL
- Editor</property>. This will open a JPA query scratch pad window.</para>
+ <para>Right click on the <property>Session Factory</property> and select <guimenuitem>HQL
+ Editor</guimenuitem>. This will open a JPA query scratch pad window.</para>
<para>Write your query and click on the "Hibernate Dynamic SQL Preview" tab. You
should see the SQL that will be executed if this JPA query is run.</para>
<figure>
@@ -714,7 +708,7 @@
</mediaobject>
</figure>
<para>Run the query by clicking on the green run icon.</para>
- <para>The results are listed in the "Hibernate Query Result" tab. There is a
+ <para>The results are listed in the "Hibernate Query Result" view. There is a
"Properties" tab in the workbench that can be used to see a specific JPA result.
These results represent the JPA objects because our query did not specify column
names.</para>
@@ -766,7 +760,7 @@
<para>Now, it’s time to view the data model for the workshop database.</para>
<para>In the Hibernate Configurations view, select "workshop" project and expand the
<property>Configuration</property> node. Select the <property>Customers</property> entity,
- right click on it, choose <property>Mapping Diagram</property>.</para>
+ right click on it, choose <guimenuitem>Mapping Diagram</guimenuitem>.</para>
<figure>
<title>Mapping Diagram Opening</title>
<mediaobject>
@@ -794,9 +788,7 @@
<property>inputNumberSlider</property> to the Order Details edit screen.</para>
<section id="add_richfaces">
<title>Add a Richfaces component to the CRUD Application</title>
- <para>Switch to Seam perspective, open <emphasis>
- <property>WebContent/OrderdetailsEdit.xhtml</property>
- </emphasis> in JBoss Developer Studio.</para>
+ <para>Switch to Seam perspective, and open <filename>WebContent/OrderdetailsEdit.xhtml</filename> in JBoss Developer Studio.</para>
<para>Change the form field values using the visual editor. Seam has generated the form field
names that match the database column names. This is not ideal for business users.</para>
<figure>
15 years, 2 months
JBoss Tools SVN: r28329 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-17 19:13:42 -0500 (Mon, 17 Jan 2011)
New Revision: 28329
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
Log:
General Updates
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2011-01-17 23:57:59 UTC (rev 28328)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2011-01-18 00:13:42 UTC (rev 28329)
@@ -199,7 +199,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>Now, the <property>Test Connection</property> should succeed. After testing the
+ <para>Now, the <guibutton>Test Connection</guibutton> should succeed. After testing the
connection, click the <guibutton>OK</guibutton> button.</para>
<figure>
<title>Connection Testing</title>
@@ -209,8 +209,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>You can leave the <property>Code Generation</property> section as is. It refers to Java
- packages in which the generated code will be placed.</para>
+ <para>You can leave the <property>Code Generation</property> section as is. It refers to Java packages in which the generated code will be placed.</para>
<figure>
<title>Code Generation Setting</title>
@@ -227,8 +226,7 @@
it should be "MyProject-test".</para>
</note>
- <para>Click on <guibutton>Finish</guibutton> button. Now, there should be a new Seam project
- called “workshop” listed in Package Explorer view.</para>
+ <para>Click on <guibutton>Finish</guibutton> button. Now, there should be a new Seam project called “workshop” listed in the Package Explorer view.</para>
<figure>
<title>"worskhop" Project in the Package Explorer</title>
<mediaobject>
@@ -240,15 +238,14 @@
</section>
<section id="start_JBossAS">
<title>Start JBoss Application Server</title>
- <para>The complete information on how to manage JBoss AS from JBoss Developer Studio you can
- read in a <link linkend="manage">corresponding chapter</link>.</para>
+ <para>The complete information on how to manage JBoss AS from JBoss Developer Studio can be found in the <link linkend="manage">corresponding chapter</link>.</para>
<para>Now you just need to start the server by clicking on the Start the server icon (
<inlinemediaobject>
<imageobject>
<imagedata fileref="images/first_seam/first_seam15.png"/>
</imageobject>
</inlinemediaobject> ) in the <property>Servers</property> view.</para>
- <para>Then run the project by selecting the project and use <menuchoice><guimenuitem>Run As...</guimenuitem><guimenuitem>Run on Server</guimenuitem></menuchoice>.</para>
+ <para>Then run the project by selecting the project then selecting <menuchoice><guimenuitem>Run As...</guimenuitem><guimenuitem>Run on Server</guimenuitem></menuchoice>.</para>
<figure>
<title>"worskhop" Run As</title>
@@ -276,7 +273,7 @@
<title>Note:</title>
<para>If the project does not show up, then you can use a normal browser and use <emphasis>
<property>http://localhost:8080/workshop/home.seam</property>
- </emphasis> as the url.</para>
+ </emphasis> as the URL.</para>
</note>
<para>Your project looks like this:</para>
<figure>
@@ -292,20 +289,15 @@
<title>Workshop Project Code Overview</title>
<para>Now let's examine the project and its structure. Go back to the Package Explorer view in
JBoss Developer Studio.</para>
- <para>It seems like it's not much for project but this shell application contains a login
+ <para>It seems like it's not much for a project but this shell application contains a login
screen with default login logic, a menu template that can be further modified, and other
layout templates.</para>
- <para>It's important to note that the business logic will reside in the <emphasis>
- <property>src/hot</property>
- </emphasis> folder, by default. And, the package naming conventions that were used in
- <property>New Seam project wizard</property> could have been changed to something
+ <para>It's important to note that the business logic will reside in the <filename>src/hot</filename> folder, by default. And, the package naming conventions that were used in <property>New Seam project wizard</property> could have been changed to something
different from <emphasis>
<property>org.domain.workshop.session</property>. </emphasis> Also, notice that there is a
default <filename>Authenticator.java</filename> file. This is where custom security logic
- can be added. Seam has a nice declarative security model that we will explore in a bit more
- detail later on. The <emphasis>
- <property>src/main</property>
- </emphasis> folder is a model directory. It stores the project's JPA entity
+ can be added. Seam has a nice declarative security model that we will explore in more
+ detail later on. The <filename>src/main</filename> folder is a model directory. It stores the project's JPA entity
beans.</para>
<figure>
<title>Project Structure</title>
@@ -316,9 +308,8 @@
</mediaobject>
</figure>
<para>The view tier of the application is also important. Seam uses facelets and there is a
- built-in facelets GUI editor that has some nice WYSIWYG and component drag/drop
- functionality. Try this out by opening <property>home.xhtml</property> from <property
- >WebContent</property> folder.</para>
+ built-in facelets GUI editor that includes nice WYSIWYG and component drag/drop
+ functionality. Try this out by opening <filename>home.xhtml</filename> from <filename>WebContent</filename> folder.</para>
<figure>
<title>Facelets GUI Editor</title>
<mediaobject>
@@ -327,26 +318,22 @@
</imageobject>
</mediaobject>
</figure>
- <para>Notice that the templates reside in the <emphasis>
- <property>WebContent/layout</property>
- </emphasis> folder. There is a stylesheet in the <emphasis>
- <property>WebContent/stylesheet</property>
- </emphasis> folder. There is also a login and default error page. The Facelet editor will be
+ <para>Notice that the templates reside in the <filename>WebContent/layout</filename> folder. There is a stylesheet in the <filename>WebContent/stylesheet</filename> folder. There is also a login and default error page. The Facelet editor will be
explored in more detail later in the lab.</para>
- <para>The project already has a datasource that was created per the Seam project wizard
- database settings. And, obviously all of the Seam specific configuration files and JAR
- dependencies are included and placed in the proper locations. On last noteworthy line item
- is related to the build script. There isn’t a build script because the Eclipse WTP(Web Tools
+ <para>The project already has a datasource that was created via the Seam project wizard
+ database settings. All of the Seam specific configuration files and JAR
+ dependencies are included and located in their proper locations. On last noteworthy line item
+ is related to the build script. There isn’t a build script because the Eclipse WTP (Web Tools
Project) plugin is used to publish web application changes. As you can see, JBoss Developer
Studio is removing a great deal of complexity from the enterprise Java project
- setup/deployment process. The end result is a developer that is writing code, not spending
- days/weeks trying to figure out how to get a decent development environment and project
+ setup and deployment process. The end result is the developer is writing code, not spending
+ time trying to figure out how to get a decent development environment and project
build process.</para>
</section>
</section>
<section id="seam_action_dev">
<title>Seam Action Development</title>
- <para>Now, it’s time to write some code. The good news is that JBoss Developer Studio can also
+ <para>Now it’s time to write some code. The good news is that JBoss Developer Studio can also
help out in this respect. In this section, we will create a new Seam Action POJO and facelet
with some custom business logic and some GUI changes.</para>
<section id="create_seam_action">
@@ -363,7 +350,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>Now, open the <property>MyAction.java</property> file and replace the
+ <para>Now, open the <filename>MyAction.java</filename> file and replace the
"myAction" method with this logic:</para>
<programlisting><![CDATA[public void myAction() {
Calendar cal = Calendar.getInstance();
@@ -371,7 +358,7 @@
statusMessages.add("MyAction Executed on:" + cal.getTime());
}]]></programlisting>
<para>You also need to import the <property>java.util.Calendar</property> class by clicking
- <emphasis><property>CTRL + Shift + O</property>.</emphasis></para>
+ <keycombo><keycap>CTRL</keycap><keycap>Shift</keycap><keycap>O</keycap></keycombo>.</para>
</section>
<section id="test_seam_action">
<title>Test Seam Action</title>
@@ -391,10 +378,8 @@
<para>You may have to refresh the project to see the new files.</para>
</note>
- <para>The test case simulates a Seam component/method execution for the <property
- >MyAction.myAction()</property> logic.</para>
- <para>To run the test case, right click on <property>MyActionTest.xml</property> and click <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>TestNG Suite</guimenuitem></menuchoice> or use the <guibutton>Run As...</guibutton> toolbar shortcut as shown
- below.</para>
+ <para>The test case simulates a Seam component or method execution for the <property>MyAction.myAction()</property> logic.</para>
+ <para>To run the test case, right click on <filename>MyActionTest.xml</filename> and click <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>TestNG Suite</guimenuitem></menuchoice> or use the <guibutton>Run As...</guibutton> toolbar shortcut as shown below.</para>
<figure>
<title>TestNG Running</title>
<mediaobject>
15 years, 2 months
JBoss Tools SVN: r28328 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-17 18:57:59 -0500 (Mon, 17 Jan 2011)
New Revision: 28328
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml
Log:
General Updates
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2011-01-17 23:53:20 UTC (rev 28327)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2011-01-17 23:57:59 UTC (rev 28328)
@@ -9,19 +9,18 @@
</keywordset>
</chapterinfo>
<title>Write Your First Project with JBoss Developer Studio</title>
- <para>This chapter is a set of hands-on labs. You get step-by-step information about how the JBoss
+ <para>This chapter is a set of hands-on labs. You get step-by-step information about how JBoss
Developer Studio can be used during the development process.</para>
<section id="create_seam_application">
<title>Create a Seam Application</title>
- <para>In this section you get to know how to create a Seam project in JBDS, how to start the
- server and what a structure your project has after creating.</para>
+ <para>In this section you will learn how to create a Seam project in JBDS, how to start the
+ server and what structure your project has after it is created.</para>
<section id="start_dev_db">
<title>Start Development Database</title>
- <para>Before opening the JBoss Developer studio you need to download and start <ulink
+ <para>Before opening the JBoss Developer studio you need to download and start the <ulink
url="http://docs.jboss.org/tools/resources/GSG_database.zip">Workshop Database</ulink>
.</para>
- <para>To start the database just run <property>./runDBServer.sh</property> or <property
- >runDBServer.bat</property> from the database directory.</para>
+ <para>To start the database just run <filename>./runDBServer.sh</filename> or <filename>runDBServer.bat</filename> from the database directory.</para>
<para>The end result should be a console window that looks like:</para>
<figure>
<title>Starting DataBase</title>
@@ -33,15 +32,15 @@
</figure>
<note>
<title>Tip</title>
- <para>You may need to set the runDBServer.sh executable flag with the following command:</para>
+ <para>You may need to set the <filename>runDBServer.sh</filename> executable flag with the following command:</para>
<screen>chmod +x runDBServer.sh</screen>
</note>
</section>
<section id="create_deploy_seam">
<title>Create and deploy Seam Web Project</title>
- <para>Minimize the terminal window and run the <property>JBoss Developer Studio</property>
+ <para>Minimize the terminal window and run <property>JBoss Developer Studio</property>
from Applications Menu or from the desktop icon.</para>
- <para>First of all you get the Workspace Launcher. Change the default workspace location if
+ <para>First you will see the Workspace Launcher. Change the default workspace location if
it's needed. Click the <guibutton>OK</guibutton> button. </para>
<figure>
<title>Workspace Launcher Dialog</title>
@@ -52,14 +51,14 @@
</mediaobject>
</figure>
<para>After startup, you see the welcome page. You could read how to work with welcome pages
- in <link linkend="Welcome">previous</link> chapter. Now select <property>Create
- New...</property> icon and then press on <property>Create Seam Project</property>
+ in <link linkend="Welcome">previous</link> chapter. Now select <guibutton>Create
+ New...</guibutton> icon and then press on <guibutton>Create Seam Project</guibutton>
link.</para>
<para>The <property>New Seam Project wizard</property> is started. You need to enter a name
- (e.g., "workshop") and a location directory for your new project. The wizard has
+ (e.g., "workshop") and a location for your new project. The wizard has
an option for selecting the actual Server (and not just WTP runtime) that will be used for
- the project. This allows the wizard to correctly identify where the needed datasource and
- driver libraries need to go.</para>
+ the project. This allows the wizard to correctly identify where the desitination folder for the required datasource and
+ driver libraries.</para>
<figure>
<title>New Seam Project Wizard</title>
<mediaobject>
@@ -69,9 +68,7 @@
</mediaobject>
</figure>
<para>All settings are already specified here, you can just modify the Configuration. Click on
- the <emphasis>
- <property>Modify...</property>
- </emphasis> button to configure your custom facets pattern:</para>
+ the <guibutton>Modify...</guibutton> button to configure your custom facet options:</para>
<figure id="ProjectFacetsSpecifyingScreen">
<title>Project Facets Specifying</title>
<mediaobject>
@@ -81,7 +78,7 @@
</mediaobject>
</figure>
<para>On the whole the dialog allows to select the "features" you want to use in your project.
- Doing this <property>JBoss Developer Studio</property> setups the appropriate tooling for
+ <property>JBoss Developer Studio</property> will then setup the appropriate tooling for
your project. Since JBoss Seam integrates all popular Java EE frameworks, you can select any
combination of technologies from the list. Here, for the default configuration, Dynamic Web
Module, Java, JavaServer Faces (JSF), and Seam Facet are already selected for a typical
@@ -97,7 +94,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>Click the <guibutton>OK</guibutton> and then the <guibutton>Next</guibutton> button to proceed further.</para>
+ <para>Click the <guibutton>OK</guibutton> and then the <guibutton>Next</guibutton> button to proceed to the next step.</para>
<para>A dynamic web application contains both web pages and <property>Java</property> code.
The next wizard will ask you where you want to store Java files.</para>
<figure>
@@ -153,11 +150,11 @@
</imageobject>
</mediaobject>
</figure>
- <para>Next <property>Database</property> section is a little tricky. The <property>Connection
+ <para>The <property>Database</property> section is a little tricky. The <property>Connection
Profile</property> needs to be edited so that the new project works properly with the
external HSQLDB server. By default the project wizard tries to use the JBoss embedded
HSQLDB, but the tutorial uses an external database to replicate a more real world
- development scenario. Click on <property>Edit</property> to modify the Connection
+ development scenario. Click on the <guibutton>Edit</guibutton> button to modify the Connection
Profile.</para>
<figure>
<title>DataBase Setting</title>
@@ -179,8 +176,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>Try click on <property>Test Connection</property> button. It probably won’t work. This
- happens if the hsql jdbc driver is not exactly the same. This can be worked around by
+ <para>Click the <guibutton>Test Connection</guibutton> button. At this point it probably won’t work. This
+ happens if the HSQL JDBC driver is not exactly the same. This can be solved by
modifying the HSQLDB database driver settings. To modify the settings, click the <guibutton>Edit Driver Definition Driver</guibutton> button.
</para>
<figure>
@@ -192,7 +189,7 @@
</mediaobject>
</figure>
<para>The proper Driver JAR File should be listed under <property>Jar List</property>. Select
- the hsqldb.jar file found in the <filename>jbdevstudio/jboss-eap/jboss-as/common/lib/</filename> directory and
+ the <filename>hsqldb.jar</filename> file found in the <filename>jbdevstudio/jboss-eap/jboss-as/common/lib/</filename> directory and
click the <guibutton>OK</guibutton> button.</para>
<figure>
<title>Driver Details</title>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml 2011-01-17 23:53:20 UTC (rev 28327)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/manage.xml 2011-01-17 23:57:59 UTC (rev 28328)
@@ -16,11 +16,10 @@
<para>In this chapter we'll focus more on how to operate the <property>JBoss
AS</property> from <property>JBoss Developer Studio</property>.</para>
<para>
- <property>JBoss Developer Studio 4.0.0.GA</property> is shipped with <property>JBoss EAP 5.1</property>. When you followed the default installation of <property>JBoss
- Developer Studio</property>, you should already have a JBoss EAP 5.1 Server installed and defined. To run JBoss AS you need you will need to have JDK 6 installed.</para>
+ <property>JBoss Developer Studio 4.0.0.GA</property> ships with <property>JBoss EAP 5.1</property>. When you followed the default installation of <property>JBoss Developer Studio</property>, you should already have a JBoss EAP 5.1 Server installed and defined. To run JBoss AS you need you will need to have JDK 6 installed.</para>
<note>
<title>Note:</title>
- <para>You can leave <property>JDK 1.5</property> configuration for <property>JBDS</property> and set <property>JDK 6</property> as <property>JRE</property> only for <property>JBoss EAP Server</property>. For this you need to select <menuchoice><guimenuitem>Windows</guimenuitem><guimenuitem>Preferences</guimenuitem></menuchoice>, and then click <menuchoice><guimenuitem>Server</guimenuitem><guimenuitem>Runtime Environments</guimenuitem></menuchoice>. On the opened preference page you should select <property>JBoss EAP Runtime</property> and click <property>Edit</property>. In <property>Edit Server Runtime Environment</property> dialog you can configure <property>Jave Runtime Environment</property> by clicking <property>JRE</property> button. </para>
+ <para>You can leave <property>JDK 1.5</property> configuration for <property>JBDS</property> and set <property>JDK 6</property> as <property>JRE</property> only for <property>JBoss EAP Server</property>. For this you need to select <menuchoice><guimenuitem>Windows</guimenuitem><guimenuitem>Preferences</guimenuitem></menuchoice>, and then click <menuchoice><guimenuitem>Server</guimenuitem><guimenuitem>Runtime Environments</guimenuitem></menuchoice>. On the opened preference page you should select <property>JBoss EAP Runtime</property> and clicking the <guibutton>Edit</guibutton> button. In <property>Edit Server Runtime Environment</property> dialog you can configure <property>Jave Runtime Environment</property> by clicking the <guibutton>JRE</guibutton> button. </para>
</note>
<section id="JBossbundled">
@@ -50,9 +49,7 @@
<itemizedlist>
<listitem>
- <para>To launch the server click the green-with-white-arrow icon on the
- <property>Servers</property> or right click server name in
- this view and click the <guibutton>Start</guibutton> button. If this view is not open, select <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Server</guimenuitem><guimenuitem>Servers</guimenuitem></menuchoice>
+ <para>To launch the server click the green-with-white-arrow icon in the <property>Servers</property> view or right click server name in this view and click the <guibutton>Start</guibutton> button. If this view is not open, select <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Server</guimenuitem><guimenuitem>Servers</guimenuitem></menuchoice>
</para>
</listitem>
</itemizedlist>
@@ -76,9 +73,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>When the server is started you should see <emphasis>
- <property>Started</property>
- </emphasis> in the square brackets right next its name in <property>Servers</property>.</para>
+ <para>When the server is started you should see <emphasis><property>Started</property></emphasis> in the square brackets right next its name in the <property>Servers</property> view.</para>
<figure>
<title>Server is Started</title>
@@ -103,11 +98,7 @@
<section id="StoppingJBoss">
<?dbhtml filename="StoppingJBoss.html"?>
<title>Stopping JBoss Server</title>
- <para>To stop the server, click the <emphasis>
- <property>Stop</property>
- </emphasis> icon in <property>Servers</property> or right click the server
- name and press <emphasis>
- <property>Stop</property>. </emphasis>
+ <para>To stop the server, click the the <guibutton>Stop</guibutton> button icon in <property>Servers</property> or right click the server name and press <guimenuitem>Stop</guimenuitem>.
</para>
<figure>
@@ -139,7 +130,7 @@
</figure>
<para>Here you can specify some common settings: host name, server name, runtime as well
- as settings related to the publishing, timeouts and server ports.</para>
+ as settings related to publishing, timeouts and server ports.</para>
</section>
</section>
@@ -169,7 +160,7 @@
<title>Note:</title>
<para>The installation of JBoss server into a directory that has a name containing
spaces provokes problems in some situations with Sun-based VMs. Try to avoid
- using installation folders that have spaces in their names.</para>
+ using installation folders that contain spaces in their names.</para>
</note>
<para>There is no requirement for root access to run JBoss Server on UNIX/Linux systems
@@ -178,11 +169,11 @@
<itemizedlist>
<listitem>
<para>After you have the binary archive you want to install, use the JDK jar
- tool (or any other ZIP extraction tool) to extract the jboss-4.2.3.GA.zip
- archive contents into a location of your choice. The jboss-4.2.3.GA.tgz
+ tool (or any other ZIP extraction tool) to extract the <filename>jboss-4.2.3.GA.zip</filename>
+ archive contents into a location of your choice. The <filename>jboss-4.2.3.GA.tgz</filename>
archive is a gzipped tar file that requires a gnutar compatible tar which
can handle the long pathnames in the archive. The extraction process will
- create a jboss-4.2.3.GA directory. </para>
+ create a <filename>jboss-4.2.3.GA</filename> directory. </para>
</listitem>
</itemizedlist>
</section>
@@ -190,11 +181,10 @@
<section id="AddingJBossServer">
<?dbhtml filename="AddingJBossServer.html"?>
<title>Adding and Configuring JBoss Server</title>
- <para>Now we should add just installed server into server manager in <property>JBoss
- Developer Studio</property>.</para>
+ <para>Now we should add the just installed server into server manager in <property>JBoss Developer Studio</property>.</para>
<itemizedlist>
<listitem>
- <para>Select <property>Servers</property> by selecting <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Server</guimenuitem><guimenuitem>Servers</guimenuitem></menuchoice>.
+ <para>Select the <property>Servers</property> view by selecting <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Server</guimenuitem><guimenuitem>Servers</guimenuitem></menuchoice>.
</para>
</listitem>
<listitem>
@@ -218,28 +208,19 @@
<note>
<title>Note:</title>
- <para>Now in the <property>New Server wizard</property> there is a separation
- between the .org servers (the <emphasis>
- <property>JBoss Community</property>
- </emphasis> category) and product server that comes bundled with JBoss EAP (the
- <emphasis>
- <property>JBoss Enterprise Middleware</property>
- </emphasis> category).</para>
+ <para>Now in the <property>New Server wizard</property> there is a separation between the .org servers (the <emphasis><property>JBoss Community</property></emphasis> category) and product server that comes bundled with JBoss EAP (the <emphasis><property>JBoss Enterprise Middleware</property></emphasis> category).</para>
</note>
<itemizedlist>
<listitem>
- <para>To create a new runtime, which Jboss AS 4.2 matches to, click <emphasis>
- <property>Next</property>
- </emphasis>
+ <para>To create a new runtime, which Jboss AS 4.2 matches to, click the <guibutton>Next</guibutton> button
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
- <para>In the next step make <property>JBoss Developer Studio</property> to know
- where you have installed the Server and define JRE.</para>
+ <para>In the next step you need to specify the location of the Server and define JRE to be used.</para>
</listitem>
</itemizedlist>
<figure>
15 years, 2 months
JBoss Tools SVN: r28327 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-01-17 18:53:20 -0500 (Mon, 17 Jan 2011)
New Revision: 28327
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3473Test.java
Log:
https://issues.jboss.org/browse/JBIDE-7745 Seam/JSF UI test fails on b2
added clean up for deferred events into JBIDE3473Test
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3473Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3473Test.java 2011-01-17 23:48:45 UTC (rev 28326)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3473Test.java 2011-01-17 23:53:20 UTC (rev 28327)
@@ -4,6 +4,7 @@
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
@@ -11,6 +12,7 @@
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.test.util.WorkbenchUtils;
import org.jboss.tools.vpe.base.test.TestUtil;
import org.jboss.tools.vpe.base.test.VpeTest;
import org.jboss.tools.vpe.editor.VpeController;
@@ -75,7 +77,9 @@
assertNotNull("boundsBeforeInsert should be not null.", boundsBeforeInsert); //$NON-NLS-1$
styledText.insert(INSERTING_TEXT); //$NON-NLS-1$
- TestUtil.delay(450);
+ // wait while all deferred events are processed
+ while(Display.getCurrent().readAndDispatch());
+ // wait while all jobs including started through deferred events are ended
TestUtil.waitForJobs();
Rectangle boundsAfterInsert = getBoundsOfElementById(vpeController.getXulRunnerEditor().getDOMDocument(), TABLE_ID);
15 years, 2 months
JBoss Tools SVN: r28326 - branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-01-17 18:48:45 -0500 (Mon, 17 Jan 2011)
New Revision: 28326
Modified:
branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
Log:
JBIDE-8096 - trunk
Modified: branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-17 23:41:47 UTC (rev 28325)
+++ branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-17 23:48:45 UTC (rev 28326)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import java.io.File;
import java.text.MessageFormat;
+import java.util.Arrays;
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
@@ -28,22 +30,25 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Listener;
@@ -60,6 +65,7 @@
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ObjectNotNullToBoolean;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ValidWritableFilePathValidator;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
/**
@@ -113,24 +119,6 @@
}
}
- private class UniqueKeyIdConstraint implements IInputValidator {
-
- @Override
- public String isValid(String keyId) {
- if (keyId == null) {
- return null;
- }
-
- for (DeltaCloudKey key : model.getKeys()) {
- if (keyId.equals(key.getId())) {
- // TODO: internationalize string
- return "Key id is already used, please choose another id.";
- }
- }
- return null;
- }
- }
-
public ManageKeysPage(DeltaCloud cloud) {
super(WizardMessages.getString(NAME));
this.model = new ManageKeysPageModel(cloud);
@@ -172,25 +160,7 @@
Button deleteButton = createDeleteButton(container, dbc);
GridDataFactory.fillDefaults().applyTo(deleteButton);
- Group localStorageGroup = new Group(container, SWT.BORDER);
- localStorageGroup.setText("Local Keystore");
- GridDataFactory.fillDefaults().span(4, 1).applyTo(localStorageGroup);
- GridLayoutFactory.fillDefaults()
- .numColumns(2).extendedMargins(10, 10, 10, 14).applyTo(localStorageGroup);
-
- Text keyStoreText = new Text(localStorageGroup, SWT.BORDER);
- bindKeyStoreText(keyStoreText, dbc);
- GridDataFactory.fillDefaults()
- .grab(true, false).align(SWT.FILL, SWT.CENTER).applyTo(keyStoreText);
- addKeyStoreLocationDecoration(keyStoreText, dbc);
-
- Button keyStoreBrowseButton = new Button(localStorageGroup, SWT.None);
- keyStoreBrowseButton.addSelectionListener(onKeyStoreLocationBrowse());
- keyStoreBrowseButton.setText("Choose...");
- GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER);
-
setControl(container);
-
refreshKeys();
}
@@ -330,26 +300,114 @@
private SelectionListener onNewPressed() {
return new SelectionAdapter() {
-
- @Override
public void widgetSelected(SelectionEvent event) {
- Display display = Display.getDefault();
- Shell shell = new Shell(display);
- // String directoryText = directory.getText();
- InputDialog d = new InputDialog(shell, WizardMessages.getString(CREATE_KEY_TITLE),
- WizardMessages.getString(CREATE_KEY_MSG), "", new UniqueKeyIdConstraint());
- d.setBlockOnOpen(true);
- d.create();
- if (d.open() == InputDialog.OK) {
- String keyId = d.getValue();
+ java.util.List<DeltaCloudKey> keys = model.getKeys();
+ String[] keys2 = new String[keys.size()];
+ for( int i = 0; i < keys2.length; i++ ) {
+ keys2[i] = keys.get(i).getId();
+ }
+ AddKeyDialog dialog = new AddKeyDialog(getShell(), keys2);
+ if(dialog.open() == Dialog.OK) {
+ String keyId = dialog.getKeyId();
DeltaCloudKey key = createKey(keyId);
- storeKeyLocally(key);
+ if( dialog.shouldPersist() ) {
+ storeKeyLocally(key, dialog.getFolder());
+ }
}
}
-
};
}
+ private class AddKeyDialog extends TitleAreaDialog {
+ private String[] existingKeys;
+ private Text pemText, nameText;
+ private Button persist;
+ private String pem, name;
+ private boolean persistBool;
+ public AddKeyDialog(Shell parentShell, String[] existingKeys) {
+ super(parentShell);
+ this.existingKeys = existingKeys;
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ // create the top level composite for the dialog area
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+ composite.setFont(parent.getFont());
+ composite.setLayout(new FormLayout());
+ Label titleBarSeparator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ titleBarSeparator.setLayoutData(UIUtils.createFormData(0,0,null,0,0,0,100,0));
+
+ setTitle(WizardMessages.getString(CREATE_KEY_TITLE));
+ Label nameLabel = new Label(composite, SWT.NONE);
+ nameLabel.setText("Key ID: ");
+ nameLabel.setLayoutData(UIUtils.createFormData(0,7,null,0,0,5,null,0));
+ nameText = new Text(composite, SWT.BORDER);
+ nameText.setLayoutData(UIUtils.createFormData(0,5,null,0,nameLabel, 5, 100, -5));
+
+ persist = new Button(composite, SWT.CHECK);
+ persist.setText("Save key in folder: ");
+ persist.setLayoutData(UIUtils.createFormData(nameText, 8, null, 0, 0,5,null,0));
+
+ Button browse = new Button(composite, SWT.DEFAULT);
+ browse.setText("Browse...");
+ browse.setLayoutData(UIUtils.createFormData(nameText, 5, null, 0, null, 0, 100, -5));
+ browse.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
+ dialog.setFilterPath(model.getKeyStorePath());
+ dialog.setText("Choose a directory to store new keys");
+ String keyStorePath = dialog.open();
+ pemText.setText(keyStorePath);
+ }
+ });
+
+
+ pemText = new Text(composite, SWT.BORDER);
+ pemText.setLayoutData(UIUtils.createFormData(nameText,5,null,0,persist, 5, browse, -5));
+ init();
+ ModifyListener listener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ verify();
+ }
+ };
+ nameText.addModifyListener(listener);
+ pemText.addModifyListener(listener);
+ persist.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ verify();
+ }
+ });
+ return composite;
+ }
+ private void init() {
+ persist.setSelection(true);
+ pemText.setText(model.getInitialKeyStorePath());
+ verify();
+ }
+ private void verify() {
+ persistBool = persist.getSelection();
+ pem = pemText.getText();
+ name = nameText.getText();
+ if( !(new File(pem).exists())) {
+ setErrorMessage("Key folder does not exist.");
+ } else if( Arrays.asList(existingKeys).contains(name)){
+ setErrorMessage("Key id is already used, please choose another id.");
+ } else {
+ setErrorMessage(null);
+ }
+ }
+ public String getKeyId() {
+ return name;
+ }
+ public String getFolder() {
+ return pem;
+ }
+ public boolean shouldPersist() {
+ return persistBool;
+ }
+ }
+
private DeltaCloudKey createKey(final String keyId) {
final DeltaCloudKey[] keyHolder = new DeltaCloudKey[1];
try {
@@ -372,15 +430,10 @@
return keyHolder[0];
}
- private void storeKeyLocally(DeltaCloudKey key) {
+ private void storeKeyLocally(DeltaCloudKey key, String pemFolder) {
try {
if (key != null) {
- boolean store = MessageDialog.openConfirm(getShell(),
- "Confirm to store the new key",
- "Do you want to store the key locally and add it to the private keys?");
- if (store) {
- model.storeKeyLocally(key);
- }
+ model.storeKeyLocally(key, pemFolder);
}
} catch (Exception e) {
ErrorUtils.handleError("Error", MessageFormat.format(
Modified: branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-01-17 23:41:47 UTC (rev 28325)
+++ branches/jbosstools-3.2.0.CR1/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-01-17 23:48:45 UTC (rev 28326)
@@ -39,10 +39,10 @@
public ManageKeysPageModel(DeltaCloud cloud) {
this.cloud = cloud;
- this.keyStorePath = initKeyStorePath();
+ this.keyStorePath = getInitialKeyStorePath();
}
- private String initKeyStorePath() {
+ public String getInitialKeyStorePath() {
try {
return SshPrivateKeysPreferences.getSshKeyDirectory();
} catch (FileNotFoundException e) {
@@ -85,7 +85,11 @@
}
public void storeKeyLocally(DeltaCloudKey key) throws DeltaCloudException, FileNotFoundException {
- File pemFile = PemFileManager.create(key, getKeyStorePath());
+ storeKeyLocally(key, getKeyStorePath());
+ }
+
+ public void storeKeyLocally(DeltaCloudKey key, String pemFolder) throws DeltaCloudException, FileNotFoundException {
+ File pemFile = PemFileManager.create(key, pemFolder);
SshPrivateKeysPreferences.add(pemFile.getAbsolutePath());
}
15 years, 2 months
JBoss Tools SVN: r28325 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-01-17 18:41:47 -0500 (Mon, 17 Jan 2011)
New Revision: 28325
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
Log:
JBIDE-8096 bad UI for manage keys wizard (TRUNK commit)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-17 23:22:42 UTC (rev 28324)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-01-17 23:41:47 UTC (rev 28325)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import java.io.File;
import java.text.MessageFormat;
+import java.util.Arrays;
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
@@ -28,22 +30,25 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Listener;
@@ -60,6 +65,7 @@
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ObjectNotNullToBoolean;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.ValidWritableFilePathValidator;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
/**
@@ -113,24 +119,6 @@
}
}
- private class UniqueKeyIdConstraint implements IInputValidator {
-
- @Override
- public String isValid(String keyId) {
- if (keyId == null) {
- return null;
- }
-
- for (DeltaCloudKey key : model.getKeys()) {
- if (keyId.equals(key.getId())) {
- // TODO: internationalize string
- return "Key id is already used, please choose another id.";
- }
- }
- return null;
- }
- }
-
public ManageKeysPage(DeltaCloud cloud) {
super(WizardMessages.getString(NAME));
this.model = new ManageKeysPageModel(cloud);
@@ -172,25 +160,7 @@
Button deleteButton = createDeleteButton(container, dbc);
GridDataFactory.fillDefaults().applyTo(deleteButton);
- Group localStorageGroup = new Group(container, SWT.BORDER);
- localStorageGroup.setText("Local Keystore");
- GridDataFactory.fillDefaults().span(4, 1).applyTo(localStorageGroup);
- GridLayoutFactory.fillDefaults()
- .numColumns(2).extendedMargins(10, 10, 10, 14).applyTo(localStorageGroup);
-
- Text keyStoreText = new Text(localStorageGroup, SWT.BORDER);
- bindKeyStoreText(keyStoreText, dbc);
- GridDataFactory.fillDefaults()
- .grab(true, false).align(SWT.FILL, SWT.CENTER).applyTo(keyStoreText);
- addKeyStoreLocationDecoration(keyStoreText, dbc);
-
- Button keyStoreBrowseButton = new Button(localStorageGroup, SWT.None);
- keyStoreBrowseButton.addSelectionListener(onKeyStoreLocationBrowse());
- keyStoreBrowseButton.setText("Choose...");
- GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER);
-
setControl(container);
-
refreshKeys();
}
@@ -330,26 +300,114 @@
private SelectionListener onNewPressed() {
return new SelectionAdapter() {
-
- @Override
public void widgetSelected(SelectionEvent event) {
- Display display = Display.getDefault();
- Shell shell = new Shell(display);
- // String directoryText = directory.getText();
- InputDialog d = new InputDialog(shell, WizardMessages.getString(CREATE_KEY_TITLE),
- WizardMessages.getString(CREATE_KEY_MSG), "", new UniqueKeyIdConstraint());
- d.setBlockOnOpen(true);
- d.create();
- if (d.open() == InputDialog.OK) {
- String keyId = d.getValue();
+ java.util.List<DeltaCloudKey> keys = model.getKeys();
+ String[] keys2 = new String[keys.size()];
+ for( int i = 0; i < keys2.length; i++ ) {
+ keys2[i] = keys.get(i).getId();
+ }
+ AddKeyDialog dialog = new AddKeyDialog(getShell(), keys2);
+ if(dialog.open() == Dialog.OK) {
+ String keyId = dialog.getKeyId();
DeltaCloudKey key = createKey(keyId);
- storeKeyLocally(key);
+ if( dialog.shouldPersist() ) {
+ storeKeyLocally(key, dialog.getFolder());
+ }
}
}
-
};
}
+ private class AddKeyDialog extends TitleAreaDialog {
+ private String[] existingKeys;
+ private Text pemText, nameText;
+ private Button persist;
+ private String pem, name;
+ private boolean persistBool;
+ public AddKeyDialog(Shell parentShell, String[] existingKeys) {
+ super(parentShell);
+ this.existingKeys = existingKeys;
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ // create the top level composite for the dialog area
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+ composite.setFont(parent.getFont());
+ composite.setLayout(new FormLayout());
+ Label titleBarSeparator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ titleBarSeparator.setLayoutData(UIUtils.createFormData(0,0,null,0,0,0,100,0));
+
+ setTitle(WizardMessages.getString(CREATE_KEY_TITLE));
+ Label nameLabel = new Label(composite, SWT.NONE);
+ nameLabel.setText("Key ID: ");
+ nameLabel.setLayoutData(UIUtils.createFormData(0,7,null,0,0,5,null,0));
+ nameText = new Text(composite, SWT.BORDER);
+ nameText.setLayoutData(UIUtils.createFormData(0,5,null,0,nameLabel, 5, 100, -5));
+
+ persist = new Button(composite, SWT.CHECK);
+ persist.setText("Save key in folder: ");
+ persist.setLayoutData(UIUtils.createFormData(nameText, 8, null, 0, 0,5,null,0));
+
+ Button browse = new Button(composite, SWT.DEFAULT);
+ browse.setText("Browse...");
+ browse.setLayoutData(UIUtils.createFormData(nameText, 5, null, 0, null, 0, 100, -5));
+ browse.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.NONE);
+ dialog.setFilterPath(model.getKeyStorePath());
+ dialog.setText("Choose a directory to store new keys");
+ String keyStorePath = dialog.open();
+ pemText.setText(keyStorePath);
+ }
+ });
+
+
+ pemText = new Text(composite, SWT.BORDER);
+ pemText.setLayoutData(UIUtils.createFormData(nameText,5,null,0,persist, 5, browse, -5));
+ init();
+ ModifyListener listener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ verify();
+ }
+ };
+ nameText.addModifyListener(listener);
+ pemText.addModifyListener(listener);
+ persist.addSelectionListener(new SelectionAdapter(){
+ public void widgetSelected(SelectionEvent e) {
+ verify();
+ }
+ });
+ return composite;
+ }
+ private void init() {
+ persist.setSelection(true);
+ pemText.setText(model.getInitialKeyStorePath());
+ verify();
+ }
+ private void verify() {
+ persistBool = persist.getSelection();
+ pem = pemText.getText();
+ name = nameText.getText();
+ if( !(new File(pem).exists())) {
+ setErrorMessage("Key folder does not exist.");
+ } else if( Arrays.asList(existingKeys).contains(name)){
+ setErrorMessage("Key id is already used, please choose another id.");
+ } else {
+ setErrorMessage(null);
+ }
+ }
+ public String getKeyId() {
+ return name;
+ }
+ public String getFolder() {
+ return pem;
+ }
+ public boolean shouldPersist() {
+ return persistBool;
+ }
+ }
+
private DeltaCloudKey createKey(final String keyId) {
final DeltaCloudKey[] keyHolder = new DeltaCloudKey[1];
try {
@@ -372,15 +430,10 @@
return keyHolder[0];
}
- private void storeKeyLocally(DeltaCloudKey key) {
+ private void storeKeyLocally(DeltaCloudKey key, String pemFolder) {
try {
if (key != null) {
- boolean store = MessageDialog.openConfirm(getShell(),
- "Confirm to store the new key",
- "Do you want to store the key locally and add it to the private keys?");
- if (store) {
- model.storeKeyLocally(key);
- }
+ model.storeKeyLocally(key, pemFolder);
}
} catch (Exception e) {
ErrorUtils.handleError("Error", MessageFormat.format(
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-01-17 23:22:42 UTC (rev 28324)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-01-17 23:41:47 UTC (rev 28325)
@@ -39,10 +39,10 @@
public ManageKeysPageModel(DeltaCloud cloud) {
this.cloud = cloud;
- this.keyStorePath = initKeyStorePath();
+ this.keyStorePath = getInitialKeyStorePath();
}
- private String initKeyStorePath() {
+ public String getInitialKeyStorePath() {
try {
return SshPrivateKeysPreferences.getSshKeyDirectory();
} catch (FileNotFoundException e) {
@@ -85,7 +85,11 @@
}
public void storeKeyLocally(DeltaCloudKey key) throws DeltaCloudException, FileNotFoundException {
- File pemFile = PemFileManager.create(key, getKeyStorePath());
+ storeKeyLocally(key, getKeyStorePath());
+ }
+
+ public void storeKeyLocally(DeltaCloudKey key, String pemFolder) throws DeltaCloudException, FileNotFoundException {
+ File pemFile = PemFileManager.create(key, pemFolder);
SshPrivateKeysPreferences.add(pemFile.getAbsolutePath());
}
15 years, 2 months
JBoss Tools SVN: r28324 - trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-01-17 18:22:42 -0500 (Mon, 17 Jan 2011)
New Revision: 28324
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
Log:
JBIDE-8125 [JBossTools Runtimes] no runtimes except for server runtime are added
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2011-01-17 22:18:35 UTC (rev 28323)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2011-01-17 23:22:42 UTC (rev 28324)
@@ -235,9 +235,10 @@
protected void okPressed() {
getShell().setCursor(Display.getCurrent().getSystemCursor(SWT.CURSOR_WAIT));
Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getRuntimeDetectors();
+ List<ServerDefinition> definitions = getServerDefinitions(true);
for( IRuntimeDetector detector:detectors) {
if (detector.isEnabled()) {
- detector.initializeRuntimes(getServerDefinitions(true));
+ detector.initializeRuntimes(definitions);
}
}
getShell().setCursor(null);
15 years, 2 months