JBoss Tools SVN: r3927 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-01 11:20:10 -0400 (Mon, 01 Oct 2007)
New Revision: 3927
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/ArrowRight.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java
Log:
Some code improvement
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2007-10-01 14:32:20 UTC (rev 3926)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2007-10-01 15:20:10 UTC (rev 3927)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.vpe;
+import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
@@ -23,26 +24,13 @@
//The shared instance.
private static VpePlugin plugin;
//Resource bundle.
-// private ResourceBundle resourceBundle;
/**
* The constructor.
*/
public VpePlugin() {
super();
-// final String VPE_PLUGIN_RESOURCE_BUNDLE_ID
-// = "org.jboss.tools.vpe.VpePluginResources";
plugin = this;
-// try {
-// resourceBundle
-// = ResourceBundle.getBundle(VPE_PLUGIN_RESOURCE_BUNDLE_ID);
-// } catch (MissingResourceException x) {
-// LogHelper.logError(VpePlugin.PLUGIN_ID,
-// "ResourceBundle " + VPE_PLUGIN_RESOURCE_BUNDLE_ID
-// + " is missing.",
-// x);
-// resourceBundle = null;
-// }
}
/**
@@ -63,6 +51,11 @@
* Returns the shared instance.
*/
public static VpePlugin getDefault() {
+ if (plugin == null) {
+ // plugin will be initialized in constructor
+ Platform.getBundle(PLUGIN_ID);
+ }
+
return plugin;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-10-01 14:32:20 UTC (rev 3926)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-10-01 15:20:10 UTC (rev 3927)
@@ -1925,25 +1925,37 @@
if (VpeDebug.printVisualInnerDragDropEvent) {
System.out.print("<<<<<< canInnerDrag"); //$NON-NLS-1$
}
+
if (innerDragInfo != null) {
innerDragInfo.Release();
innerDragInfo = null;
}
+
boolean canDrag = false;
VpeVisualInnerDragInfo dragInfo = selectionBuilder.getInnerDragInfo(event);
+
if (dragInfo != null) {
Node dragNode = dragInfo.getNode();
+
if (VpeDebug.printVisualInnerDragDropEvent) {
System.out.print(" dragNode: " + dragNode.getNodeName() + "(" + MozillaSupports.getAddress(dragNode) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
+
switch (dragNode.getNodeType()) {
case Node.ELEMENT_NODE:
canDrag = visualBuilder.canInnerDrag((Element)dragNode);
+ break;
case Node.TEXT_NODE:
canDrag = visualBuilder.isTextEditable(dragNode);
+ break;
+ default:
+ // Do nothing
+ break;
}
+
if (canDrag) {
VpeSourceInnerDragInfo sourceInnerDragInfo = visualBuilder.getSourceInnerDragInfo(dragInfo);
+
if (sourceInnerDragInfo.getNode() != null) {
innerDragInfo = dragInfo;
InnerDragBuffer.object = sourceInnerDragInfo.getNode();
@@ -1956,13 +1968,16 @@
canDrag = false;
}
}
+
if (!canDrag) {
dragInfo.Release();
}
}
+
if (VpeDebug.printVisualInnerDragDropEvent) {
System.out.println(" canDrag: " + canDrag); //$NON-NLS-1$
}
+
return canDrag;
}
@@ -2081,6 +2096,7 @@
// if(s.getT()) {
// return new MozillaDropInfo(false, null, 0);
// }
+
onHideTooltip();
if(dropWindow.active) {
@@ -2090,6 +2106,7 @@
return new MozillaDropInfo(false, null, 0);
}
}
+
if(mouseEvent.isAltKey()) {
Node visualNode = mouseEvent.getTargetNode();
Node sourceNode = domMapping.getNearSourceNode(visualNode);
@@ -2109,6 +2126,7 @@
return new MozillaDropInfo(false, null, 0);
}
}
+
boolean canDrop = false;
Node caretParent = null;
int caretOffset = 0;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2007-10-01 14:32:20 UTC (rev 3926)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2007-10-01 15:20:10 UTC (rev 3927)
@@ -780,7 +780,7 @@
}
private Node getNextFlatNode (Node node) {
for (Node next = FlatIterator.next(node); next != null; next = FlatIterator.next(next)) {
- if (getVisualNode(next) != null || next.getNodeType() == Node.TEXT_NODE);
+ if (getVisualNode(next) != null || next.getNodeType() == Node.TEXT_NODE)
return next;
}
return null;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/ArrowRight.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/ArrowRight.java 2007-10-01 14:32:20 UTC (rev 3926)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/ArrowRight.java 2007-10-01 15:20:10 UTC (rev 3927)
@@ -33,11 +33,8 @@
}
void paintControl(PaintEvent e) {
- GC gc = e.gc;
- int x = 1;
if (image != null) {
- gc.drawImage(image, x, 1);
- x = image.getBounds().width + 5;
+ e.gc.drawImage(image, image.getBounds().width + 5, 1);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java 2007-10-01 14:32:20 UTC (rev 3926)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java 2007-10-01 15:20:10 UTC (rev 3927)
@@ -338,13 +338,11 @@
}
public static boolean isWhitespace(char sourceString) {
- String visualString = visualText((new Character(sourceString)).toString());
return SPCHARS.indexOf(sourceString) != -1;
}
public static boolean isWhitespaceText(String sourceString) {
if (sourceString != null && sourceString.length() > 0) {
- char[] chars = sourceString.toCharArray();
for (int i = 0; i < sourceString.length(); i++) {
if (!TextUtil.isWhitespace(sourceString.charAt(i)))
return false;
17 years, 3 months
JBoss Tools SVN: r3926 - trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/internal/action.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-01 10:32:20 -0400 (Mon, 01 Oct 2007)
New Revision: 3926
Modified:
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/internal/action/CreateProjectAction.java
Log:
JBIDE-821
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/internal/action/CreateProjectAction.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/internal/action/CreateProjectAction.java 2007-10-01 14:31:12 UTC (rev 3925)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/internal/action/CreateProjectAction.java 2007-10-01 14:32:20 UTC (rev 3926)
@@ -20,6 +20,7 @@
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.jboss.tools.common.model.ui.*;
import org.jboss.tools.struts.ui.StrutsUIPlugin;
+import org.jboss.tools.struts.ui.wizard.project.NewProjectWizard;
import org.jboss.tools.struts.messages.StrutsUIMessages;
public class CreateProjectAction extends Action implements IWorkbenchWindowActionDelegate {
@@ -34,10 +35,13 @@
StrutsUIPlugin.PLUGIN_ID,
"org.jboss.tools.struts.ui.wizard.project.NewStrutsProjectWizard" //$NON-NLS-1$
);
+ ((NewProjectWizard)wizard).setHelpAvailable(false);
if (wizard != null) {
wizard.init(ModelUIPlugin.getDefault().getWorkbench(), null);
WizardDialog dialog = new WizardDialog(ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
- dialog.open();
+ dialog.create();
+ StrutsUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(dialog.getShell(), "org.eclipse.ui.ide.new_project_wizard_context");
+ dialog.open();
} else {
StrutsUIPlugin.getPluginLog().logInfo("Unable to create wizard 'org.jboss.tools.struts.ui.wizard.project.NewStrutsProjectWizard'."); //$NON-NLS-1$
}
17 years, 3 months
JBoss Tools SVN: r3925 - trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-01 10:31:12 -0400 (Mon, 01 Oct 2007)
New Revision: 3925
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/CreateProjectAction.java
Log:
JBIDE-821
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/CreateProjectAction.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/CreateProjectAction.java 2007-10-01 14:17:03 UTC (rev 3924)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/CreateProjectAction.java 2007-10-01 14:31:12 UTC (rev 3925)
@@ -24,6 +24,7 @@
import org.jboss.tools.jsf.messages.JSFUIMessages;
import org.jboss.tools.jsf.ui.JsfUiImages;
import org.jboss.tools.jsf.ui.JsfUiPlugin;
+import org.jboss.tools.jsf.ui.wizard.project.NewProjectWizard;
import org.jboss.tools.common.model.ui.*;
public class CreateProjectAction extends Action implements IWorkbenchWindowActionDelegate {
@@ -39,9 +40,12 @@
JSFModelPlugin.PLUGIN_ID,
"org.jboss.tools.jsf.ui.wizard.project.NewProjectWizard"
);
+ ((NewProjectWizard)wizard).setHelpAvailable(false);
if (wizard != null) {
wizard.init(ModelUIPlugin.getDefault().getWorkbench(), null);
WizardDialog dialog = new WizardDialog(ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ dialog.create();
+ JsfUiPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(dialog.getShell(), "org.eclipse.ui.ide.new_project_wizard_context");
dialog.open();
} else {
JsfUiPlugin.getPluginLog().logError("Unable to create wizard 'org.jboss.tools.jsf.ui.wizard.project.NewProjectWizard'");
17 years, 3 months
JBoss Tools SVN: r3924 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2007-10-01 10:17:03 -0400 (Mon, 01 Oct 2007)
New Revision: 3924
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-160
language correction
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-01 13:54:58 UTC (rev 3923)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-01 14:17:03 UTC (rev 3924)
@@ -28,6 +28,10 @@
</imageobject>
</mediaobject>
</figure>
+
+<para>Put "GuessNumber" as a project name, in "JSF Environment" drop down list choose JSF 1.2.</para>
+<para>Leave everything else as it is and click <emphasis><property>Finish</property></emphasis>.</para>
+<para>The project will appear in Project Explorer and Web Projects Views. As you can see Red Had Developer Studio has created for you the whole skeleton for the project with all needed libraries, faces-config.xml and web.xml files.</para>
</para></listitem>
<listitem><para>Put "GuessNumber" as a project name, in "JSF Environment" drop down list choose JSF 1.2.</para></listitem>
<listitem><para>Leave everything else as it is and click Finish</para></listitem>
@@ -46,7 +50,7 @@
<section id="CreatingJSPPages">
<?dbhtml filename="CreatingJSPPages.html"?>
<title>Creating JSP Pages</title>
-<para>Our application has two pages. The first page is inputnumber.jsp. It prompts you to enter a number. If the guess is incorrect, the same page will be redisplayed with a message indicating whether a smaller or a larger number should be tried. The second page is success.jsp. This page will be shown after you guess the number correctly. From this page you also have the option to play the game again.</para>
+<para>The application has two pages. The first page is inputnumber.jsp. It prompts you to enter a number. If the guess is incorrect, the same page will be redisplayed with a message indicating whether a smaller or a larger number should be tried. The second page is success.jsp. This page will be shown after you guess the number correctly. From this page you also have the option to play the game again.</para>
<para>On the first page inputnumber.jsp you will enter a number.</para>
<itemizedlist>
@@ -69,7 +73,7 @@
<listitem><para>In the same way create another jsf view. Type "pages/success" as the value for "From-view-id"</para></listitem>
<listitem><para>Select <emphasis>File > Save</emphasis></para></listitem>
</itemizedlist>
-<para>On the diagram you will see the two created views.</para>
+<para>On the diagram you will see two created views.</para>
<figure>
<title>New Views</title>
<mediaobject>
@@ -365,7 +369,7 @@
</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 we will create a <emphasis role="bold"><property><h:form></property></emphasis> component where will put all others components.</para>
+<para>At the beginning it's necessary to create a <emphasis role="bold"><property><h:form></property></emphasis> component where all others components are put.</para>
<itemizedlist>
<listitem><para>Place the mouse cursor inside <emphasis role="bold"><property><f:view></property></emphasis><emphasis role="bold"><property></f:view></property></emphasis></para></listitem>
<listitem><para>Go to JBoss Tools Palette and expand JSF HTML folder by selecting it</para></listitem>
@@ -389,9 +393,9 @@
</mediaobject>
</figure>
</para></listitem>
-<listitem><para>Type "inputNumbers" and click Finish</para></listitem>
+<listitem><para>Type "inputNumbers" and click <emphasis><property>Finish</property></emphasis></para></listitem>
</itemizedlist>
-<para>In source view you can see the declaration of form.</para>
+<para>In source view you can see the declaration of a form.</para>
<figure>
<title>Created form</title>
<mediaobject>
@@ -402,7 +406,7 @@
</figure>
<para>First let's declare the properties file in inputnumber.jsp page using the loadBundle JSF tag.</para>
<itemizedlist>
-<listitem><para>Put this declaration in the top of the page, right after the first two lines:</para></listitem>
+<listitem><para>Put 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"/>
]]></programlisting>
@@ -422,7 +426,7 @@
<listitem><para>Select <emphasis>value</emphasis> and click on this line below "value" header</para></listitem>
<listitem><para>Click <emphasis>...</emphasis> button next to the value field</para></listitem>
</itemizedlist>
-<para>RHDS will nicely propose us to choose within available values:</para>
+<para>RHDS will nicely propose you to choose within available values:</para>
<figure>
<title>Choose Value</title>
<mediaobject>
@@ -433,7 +437,7 @@
</figure>
<itemizedlist>
<listitem><para>Expand <emphasis>Resource Bundles > msg</emphasis></para></listitem>
-<listitem><para>Select "how_to_play" value and click Ok. Then click Finish
+<listitem><para>Select "how_to_play" value and click Ok. Then click <emphasis><property>Finish</property></emphasis>
<figure>
<title>Selecting Value</title>
<mediaobject>
@@ -454,6 +458,9 @@
</mediaobject>
</figure>
<itemizedlist>
+<listitem><para>Switch to Source mode and insert <emphasis role="bold"><property><br/></property></emphasis> tag after <emphasis role="bold"><property><h:outputText></property></emphasis> component to make a new line.</para></listitem>
+<listitem><para>Click <emphasis><property>Save</property></emphasis> button.</para></listitem>
+<listitem><para>On the Palette Click on <emphasis>inputText</emphasis>, drag the cursor over to the editor, and drop it inside the editor after the text.</para></listitem>
<listitem><para>Switch to Source mode and insert <emphasis role="bold"><property><br/></property></emphasis> tag after <emphasis role="bold"><property><h:outputText></property></emphasis> component to make a new line</para></listitem>
<listitem><para>Click Save button</para></listitem>
<listitem><para>On the Palette Click on <emphasis>inputText</emphasis>, drag the cursor over to the editor, and drop it inside the editor after the text</para></listitem>
@@ -477,7 +484,7 @@
</mediaobject>
</figure>
<itemizedlist>
-<listitem><para>Click Ok, then click Finish</para></listitem>
+<listitem><para>Click <emphasis><property>Ok</property></emphasis>, then click <emphasis><property>Finish</property></emphasis></para></listitem>
<listitem><para>Go to Source mode</para></listitem>
<listitem><para>Add the validation attribute to <emphasis role="bold"><property><f:validateLongRange></property></emphasis> for your input validation</para></listitem></itemizedlist>
<programlisting role="XML"><![CDATA[<h:inputText id="userNumber" value="#{NumberBean.userNumber}" required="true">
@@ -485,8 +492,9 @@
</h:inputText>
]]></programlisting>
<itemizedlist>
-<listitem><para>Click Save button</para></listitem>
+<listitem><para>Click <emphasis><property>Save</property></emphasis> button</para></listitem>
<listitem><para>Again select Visual mode</para></listitem>
+<listitem><para>On the Palette, click on <emphasis>commandButton</emphasis>, drag the cursor over to the editor, and drop it inside the editor after the inputText component.</para></listitem>
<listitem><para>On the Palette Click on <emphasis>commandButton</emphasis>, drag the cursor over to the editor, and drop it inside the editor after the inputText component</para></listitem>
<listitem><para>In the editing dialog select <emphasis>value</emphasis> and click on this line below "value" header</para></listitem>
<listitem><para>Click <emphasis>...</emphasis> button next to the value field</para></listitem>
@@ -522,7 +530,7 @@
<section id="EditingSuccessJsp">
<?dbhtml filename="EditingSuccessJsp.html"?>
<title>Editing success.jsp page</title>
-<para>In the same way like inputnumber.jsp edit success.jsp page. Its whole source should be the next:</para>
+<para>In the same way like inputnumber.jsp, edit success.jsp page. Its whole source should be the next:</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"/>
@@ -549,9 +557,9 @@
</mediaobject>
</figure>
<para>This page, success.jsp, is shown if you correctly guessed the number. The <emphasis role="bold"><property><h:outputFormat></property></emphasis> tag will get the value of success_text from the properties file. The {0} in success_text will be substituted for by the value of the value attribute within the <emphasis role="bold"><property><f:param></property></emphasis> tag during runtime.</para>
-<para>At the end, we have a button which allows us 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 we are shown the first page, the input text box is clear and a new random number is generated.</para>
+<para>At the end, you have a button which allows you to replay the game. The action value references a backing bean method. In this case, the method only terminates the current session so that when you are shown the first page, the input text box is clear and a new random number is generated.</para>
<itemizedlist>
-<listitem><para>Switch to Preview mode to see how this page will look in browser:</para></listitem>
+<listitem><para>Switch to Preview mode to see how this page will look in a browser:</para></listitem>
</itemizedlist>
<figure>
<title>success.jsp in Preview mode</title>
@@ -570,8 +578,8 @@
<itemizedlist>
<listitem><para>Right click <emphasis>WebContent > New > JSP File</emphasis></para></listitem>
<listitem><para>Type "index" for name field and choose JSPRedirect as a template</para></listitem>
-<listitem><para>Click Finish</para></listitem>
-<listitem><para>The source for this page should be like follows:</para></listitem>
+<listitem><para>Click <emphasis><property>Finish</property></emphasis></para></listitem>
+<listitem><para>The source for this page should be like the following:</para></listitem>
</itemizedlist>
<programlisting role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
@@ -581,13 +589,14 @@
</html>
]]></programlisting>
-<para>Note the <emphasis>.jsf</emphasis> extension of page. It means that we trigger the JSF controller servlet to handle the page according the servlet mapping in faces-config.xml 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 faces-config.xml file.</para>
</section>
<section id="RunningTheApplication33">
<?dbhtml filename="RunningTheApplication33.html"?>
<title>Running the Application</title>
<para>Everything is ready to run the application.</para>
<itemizedlist>
+<listitem><para>Start up JBoss server by clicking on the Start icon in JBoss Server view. (If JBoss is already running, stop it by clicking on the red icon and then start it again. After the messages in the Console tabbed view stops scrolling, JBoss is available.</para></listitem>
<listitem><para>Start up JBoss server by clicking on the Start icon in JBoss Server view. (If JBoss is already running, stop it by clicking on the red icon and then start it again. After the messages in the Console tabbed view stop scrolling, JBoss is available</para></listitem>
<listitem><para>Click on the Red Hat run icon in the toolbar</para></listitem>
<listitem><para>Play with the application by entering correct as well as incorrect values</para></listitem>
@@ -610,7 +619,7 @@
</figure>
<figure>
-<title>After you enter a guess, the application tells the user if a smaller or a larger number should be tried</title>
+<title>After you enter a guess, the application tells you whether a smaller or a larger number should be tried</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/default.png"/>
@@ -619,7 +628,7 @@
</figure>
<figure>
-<title>You guess correctly</title>
+<title>Your guess is correct</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/default.png"/>
17 years, 3 months
JBoss Tools SVN: r3923 - trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-01 09:54:58 -0400 (Mon, 01 Oct 2007)
New Revision: 3923
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Ajax4jsf3_1.xml
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/ajax4jsf.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-807
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Ajax4jsf3_1.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Ajax4jsf3_1.xml 2007-10-01 13:26:41 UTC (rev 3922)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Ajax4jsf3_1.xml 2007-10-01 13:54:58 UTC (rev 3923)
@@ -3155,6 +3155,9 @@
<proposal type="beanProperty"/>
<proposal type="bundleProperty"/>
<proposal type="jsfVariables"/>
+ <proposal type="beanMethodBySignature">
+ <param name="returnType" value="javax.faces.el.MethodBinding"/>
+ </proposal>
</attribute-type>
<attribute type="actionListener"/>
<attribute-type name="title" required="false">
@@ -3270,6 +3273,11 @@
<proposal type="beanProperty"/>
<proposal type="bundleProperty"/>
<proposal type="jsfVariables"/>
+ <proposal type="file">
+ <param name="extensions" value="%image%"/>
+ <param name="pathType" value="absolute"/>
+ <param name="pathAddition" value="#{facesContext.externalContext.requestContextPath}"/>
+ </proposal>
</attribute-type>
<attribute type="image"/>
<attribute-type name="style" required="false">
@@ -3318,6 +3326,7 @@
<proposal type="beanMethodBySignature">
<param name="returnType" value="javax.faces.el.MethodBinding"/>
</proposal>
+ <proposal type="viewActions"/>
</attribute-type>
<attribute type="action"/>
<attribute-type name="onkeyup" required="false">
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/ajax4jsf.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/ajax4jsf.xml 2007-10-01 13:26:41 UTC (rev 3922)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/ajax4jsf.xml 2007-10-01 13:54:58 UTC (rev 3923)
@@ -134,6 +134,9 @@
<proposal type="beanProperty"/>
<proposal type="bundleProperty"/>
<proposal type="jsfVariables"/>
+ <proposal type="beanMethodBySignature">
+ <param name="returnType" value="javax.faces.el.MethodBinding"/>
+ </proposal>
</attribute-type>
<attribute type="actionListener"/>
<attribute-type name="reRender" required="false">
@@ -250,6 +253,7 @@
<proposal type="beanMethodBySignature">
<param name="returnType" value="javax.faces.el.MethodBinding"/>
</proposal>
+ <proposal type="viewActions"/>
</attribute-type>
<attribute type="action"/>
<attribute-type name="focus" required="false">
@@ -334,6 +338,11 @@
<proposal type="beanProperty"/>
<proposal type="bundleProperty"/>
<proposal type="jsfVariables"/>
+ <proposal type="file">
+ <param name="extensions" value="%image%"/>
+ <param name="pathType" value="absolute"/>
+ <param name="pathAddition" value="#{facesContext.externalContext.requestContextPath}"/>
+ </proposal>
</attribute-type>
<attribute type="image"/>
<attribute-type name="onkeyup" required="false">
17 years, 3 months
JBoss Tools SVN: r3922 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-01 09:26:41 -0400 (Mon, 01 Oct 2007)
New Revision: 3922
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
Log:
fixed broken logic on property check.
JBIDE-981
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2007-10-01 12:56:45 UTC (rev 3921)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2007-10-01 13:26:41 UTC (rev 3922)
@@ -67,7 +67,7 @@
}
public static void ensureDefaultsSet(ILaunchConfigurationWorkingCopy wc, IServer server) throws CoreException {
- if( wc.getAttribute(DEFAULTS_SET, false ) ) {
+ if(!wc.getAttributes().containsKey(DEFAULTS_SET)) {
JBossServer jbs = findJBossServer(server.getId());
IJBossServerRuntime jbrt = findJBossServerRuntime(server);
String serverHome = getServerHome(jbs);
17 years, 3 months
JBoss Tools SVN: r3921 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-01 08:56:45 -0400 (Mon, 01 Oct 2007)
New Revision: 3921
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
Log:
JBIDE-861
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2007-10-01 12:46:03 UTC (rev 3920)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2007-10-01 12:56:45 UTC (rev 3921)
@@ -650,11 +650,11 @@
public void runDropCommand(final String flavor, final String data) {
XModelBuffer b = XModelTransferBuffer.getInstance().getBuffer();
- final XModelObject o = b.source();
+ final XModelObject o = b == null ? null : b.source();
Display.getDefault().asyncExec(new Runnable() {
public void run() {
if (parentEditor.getVisualEditor().getController() != null) {
- if(!XModelTransferBuffer.getInstance().isEnabled()) {
+ if(o != null && !XModelTransferBuffer.getInstance().isEnabled()) {
XModelTransferBuffer.getInstance().enable();
XModelTransferBuffer.getInstance().getBuffer().addSource(o);
}
17 years, 3 months
JBoss Tools SVN: r3920 - trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-01 08:46:03 -0400 (Mon, 01 Oct 2007)
New Revision: 3920
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JBossSeam.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-859
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JBossSeam.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JBossSeam.xml 2007-10-01 11:58:09 UTC (rev 3919)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/JBossSeam.xml 2007-10-01 12:46:03 UTC (rev 3920)
@@ -146,6 +146,7 @@
<proposal type="beanMethodBySignature">
<param name="returnType" value="javax.faces.el.MethodBinding"/>
</proposal>
+ <proposal type="viewActions"/>
</attribute-type>
<attribute type="action"/>
<attribute-type name="view" required="false">
@@ -153,6 +154,9 @@
<proposal type="beanProperty"/>
<proposal type="bundleProperty"/>
<proposal type="jsfVariables"/>
+ <proposal type="file">
+ <param name="extensions" value="%page%"/>
+ </proposal>
</attribute-type>
<attribute type="view"/>
<attribute-type name="fragment" required="false">
@@ -425,6 +429,7 @@
<proposal type="beanMethodBySignature">
<param name="returnType" value="javax.faces.el.MethodBinding"/>
</proposal>
+ <proposal type="viewActions"/>
</attribute-type>
<attribute type="action"/>
<attribute-type name="view" required="false">
@@ -432,6 +437,9 @@
<proposal type="beanProperty"/>
<proposal type="bundleProperty"/>
<proposal type="jsfVariables"/>
+ <proposal type="file">
+ <param name="extensions" value="%page%"/>
+ </proposal>
</attribute-type>
<attribute type="view"/>
<attribute-type name="fragment" required="false">
17 years, 3 months
JBoss Tools SVN: r3917 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-10-01 07:32:06 -0400 (Mon, 01 Oct 2007)
New Revision: 3917
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-160 minor changes
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-01 11:13:21 UTC (rev 3916)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-01 11:32:06 UTC (rev 3917)
@@ -18,7 +18,8 @@
<?dbhtml filename="SettingUpTheProject12.html"?>
<title>Setting up the project</title>
<para>We will create a JSF 1.2 project using an integrated RHDS's new project wizard and predefined templates.</para>
-<para>In Web Projects View (if it is not open select <emphasis>Window > Show View > Others > Red Hat Developer Studio > Web Projects View</emphasis>) click "Create New JSF Project" button.</para>
+<itemizedlist>
+<listitem><para>In Web Projects View (if it is not open select <emphasis>Window > Show View > Others > Red Hat Developer Studio > Web Projects View</emphasis>) click "Create New JSF Project" button.
<figure>
<title>Create New JSF Project</title>
<mediaobject>
@@ -27,9 +28,10 @@
</imageobject>
</mediaobject>
</figure>
-
-<para>Put "GuessNumber" as a project name, in "JSF Environment" drop down list choose JSF 1.2.</para>
-<para>Leave everything else as it is and click Finish.</para>
+</para></listitem>
+<listitem><para>Put "GuessNumber" as a project name, in "JSF Environment" drop down list choose JSF 1.2.</para></listitem>
+<listitem><para>Leave everything else as it is and click Finish</para></listitem>
+</itemizedlist>
<para>Our project will appear in Project Explorer and Web Projects Views. As you can see Red Had Developer Studio has created for us the whole skeleton for the project with all needed libraries, faces-config.xml and web.xml files.</para>
<figure>
<title>New JSF Project</title>
@@ -48,8 +50,8 @@
<para>On the first page inputnumber.jsp you will enter a number.</para>
<itemizedlist>
-<listitem><para>Open faces-config.xml file.</para></listitem>
-<listitem><para>Right click anywhere on the diagram mode.</para></listitem>
+<listitem><para>Open faces-config.xml file</para></listitem>
+<listitem><para>Right click anywhere on the diagram mode</para></listitem>
<listitem><para>From the context menu select <emphasis>New View</emphasis></para></listitem>
</itemizedlist>
<figure>
@@ -63,7 +65,7 @@
<itemizedlist>
<listitem><para>Type <emphasis>pages/inputname</emphasis> as the value for "From-view-id"</para></listitem>
-<listitem><para>Leave everything else as is and click <emphasis><property>Finish</property></emphasis>.</para></listitem>
+<listitem><para>Leave everything else as is and click Finish</para></listitem>
<listitem><para>In the same way create another jsf view. Type "pages/success" as the value for "From-view-id"</para></listitem>
<listitem><para>Select <emphasis>File > Save</emphasis></para></listitem>
</itemizedlist>
@@ -83,7 +85,7 @@
<title>Creating Transition between two views</title>
<para>We should now create connection between jsp pages.</para>
<itemizedlist>
-<listitem><para>In the diagram, select the connection 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.
+<listitem><para>In the diagram, select the connection 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>
@@ -93,7 +95,7 @@
</mediaobject>
</figure>
</para></listitem>
-<listitem><para>Click on the <emphasis>pages/inputname</emphasis> page icon and then click on the <emphasis>pages/greeting</emphasis> page icon.</para></listitem>
+<listitem><para>Click on the <emphasis>pages/inputname</emphasis> page icon and then click on the <emphasis>pages/greeting</emphasis> page icon</para></listitem>
</itemizedlist>
<para>A transition should appear between the two icons of views.</para>
<figure>
@@ -105,7 +107,7 @@
</mediaobject>
</figure>
<itemizedlist>
-<listitem><para>Select <emphasis>File/Save</emphasis> from the menu bar.</para></listitem>
+<listitem><para>Select <emphasis>File/Save</emphasis> from the menu bar</para></listitem>
</itemizedlist>
</section>
<section id="CreatingResourceFile">
@@ -165,7 +167,7 @@
<itemizedlist>
<listitem><para>Right click <emphasis>game</emphasis> folder</para></listitem>
<listitem><para>Select <emphasis>New > Class</emphasis></para></listitem>
-<listitem><para>Type <emphasis>NumberBean</emphasis></para> for bean name</listitem>
+<listitem><para>Type <emphasis>NumberBean</emphasis> for bean name</para></listitem>
</itemizedlist>
<para>A java bean is created.</para>
<itemizedlist>
@@ -312,7 +314,7 @@
<title>Editing faces-config.xml File</title>
<para>This file holds our two navigation rules and defines the backing bean used.</para>
<itemizedlist>
-<listitem><para>Open faces-config.xml file in source mode.</para></listitem>
+<listitem><para>Open faces-config.xml file in source mode</para></listitem>
<listitem><para>Add here one more navigation rule and a managed bean declarations that the content of the file looks like this:</para></listitem>
</itemizedlist>
<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
@@ -414,8 +416,8 @@
</mediaobject>
</figure>
<itemizedlist>
-<listitem><para>Switch to Visual tab, so we can work with the editor completely in its WYSIWYG mode.</para></listitem>
-<listitem><para>Click on <emphasis>outputText</emphasis>, drag the cursor over to the editor, and drop it inside the blue box in the editor.</para></listitem>
+<listitem><para>Switch to Visual tab, so we can work with the editor completely in its WYSIWYG mode</para></listitem>
+<listitem><para>Click on <emphasis>outputText</emphasis>, drag the cursor over to the editor, and drop it inside the blue box in the editor</para></listitem>
<listitem><para>Select <emphasis>value</emphasis> and click on this line below "value" header</para></listitem>
<listitem><para>Click <emphasis>...</emphasis> button next to the value field</para></listitem>
@@ -452,13 +454,13 @@
</mediaobject>
</figure>
<itemizedlist>
-<listitem><para>Switch to Source mode and insert <emphasis role="bold"><property><br/></property></emphasis> tag after <emphasis role="bold"><property><h:outputText></property></emphasis> component to make a new line.</para></listitem>
-<listitem><para>Click Save button.</para></listitem>
-<listitem><para>On the Palette Click on <emphasis>inputText</emphasis>, drag the cursor over to the editor, and drop it inside the editor after the text.</para></listitem>
+<listitem><para>Switch to Source mode and insert <emphasis role="bold"><property><br/></property></emphasis> tag after <emphasis role="bold"><property><h:outputText></property></emphasis> component to make a new line</para></listitem>
+<listitem><para>Click Save button</para></listitem>
+<listitem><para>On the Palette Click on <emphasis>inputText</emphasis>, drag the cursor over to the editor, and drop it inside the editor after the text</para></listitem>
<listitem><para>Select <emphasis>value</emphasis> and click on this line below "value" header</para></listitem>
<listitem><para>Click <emphasis>...</emphasis> button next to the value field</para></listitem>
<listitem><para>Expand <emphasis>Managed Beans > NumberBean</emphasis></para></listitem>
-<listitem><para>Select "userNumber" value and click Ok.</para></listitem>
+<listitem><para>Select "userNumber" value and click Ok</para></listitem>
<listitem><para>Switch <emphasis>Advanced</emphasis> tab</para></listitem>
<listitem><para>Select <emphasis>id</emphasis> and click on this line below "value" header</para></listitem>
<listitem><para>Type "userNumber" in text field</para></listitem>
@@ -467,7 +469,7 @@
<listitem><para>Expand <emphasis>Enumeration</emphasis> and select <emphasis>true</emphasis> as a value</para></listitem>
</itemizedlist>
<figure>
-<title>Add required attribute</title>
+<title>Add "required" attribute</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/newrad14.png"/>
@@ -485,7 +487,7 @@
<itemizedlist>
<listitem><para>Click Save button</para></listitem>
<listitem><para>Again select Visual mode</para></listitem>
-<listitem><para>On the Palette Click on <emphasis>commandButton</emphasis>, drag the cursor over to the editor, and drop it inside the editor after the inputText component.</para></listitem>
+<listitem><para>On the Palette Click on <emphasis>commandButton</emphasis>, drag the cursor over to the editor, and drop it inside the editor after the inputText component</para></listitem>
<listitem><para>In the editing dialog select <emphasis>value</emphasis> and click on this line below "value" header</para></listitem>
<listitem><para>Click <emphasis>...</emphasis> button next to the value field</para></listitem>
<listitem><para>Expand <emphasis>Resource Bundles > msg</emphasis> and select <emphasis>makeguess_button</emphasis> as a value</para></listitem>
@@ -586,7 +588,7 @@
<title>Running the Application</title>
<para>Everything is ready to run the application.</para>
<itemizedlist>
-<listitem><para>Start up JBoss server by clicking on the Start icon in JBoss Server view. (If JBoss is already running, stop it by clicking on the red icon and then start it again. After the messages in the Console tabbed view stop scrolling, JBoss is available.</para></listitem>
+<listitem><para>Start up JBoss server by clicking on the Start icon in JBoss Server view. (If JBoss is already running, stop it by clicking on the red icon and then start it again. After the messages in the Console tabbed view stop scrolling, JBoss is available</para></listitem>
<listitem><para>Click on the Red Hat run icon in the toolbar</para></listitem>
<listitem><para>Play with the application by entering correct as well as incorrect values</para></listitem>
</itemizedlist>
@@ -625,4 +627,4 @@
</mediaobject>
</figure>
</section>
-</chapter>
\ No newline at end of file
+</chapter>
17 years, 3 months
JBoss Tools SVN: r3916 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2007-10-01 07:13:21 -0400 (Mon, 01 Oct 2007)
New Revision: 3916
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/AddBusinessProcess.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-160
language correction
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/AddBusinessProcess.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/AddBusinessProcess.xml 2007-10-01 10:45:49 UTC (rev 3915)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/AddBusinessProcess.xml 2007-10-01 11:13:21 UTC (rev 3916)
@@ -18,7 +18,7 @@
process engine are two production-ready open source products supported by Red Hat. It is
very easy to incorporate rules and business processes into a Seam web application using the
Red Hat Developer Studio. In this section, we further re-factor the CRUD application we
- already have and add support for an "order management" process. The user scenario is to
+ already have and add support for an "order management" process.User scenario is to
simulate the following process and rules:</para>
<itemizedlist>
<listitem>The site administrator logs in and sees a list of outstanding orders</listitem>
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-10-01 10:45:49 UTC (rev 3915)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-10-01 11:13:21 UTC (rev 3916)
@@ -36,7 +36,7 @@
You only need to run "alternative" as a safe guard for the right JVM.</para>
</note>
- <para>Set this variable for the user account doing the installation and also for the user account that will run the server.</para>
+ <para>Set this variable for the your account doing the installation and also for the user account that will run the server.</para>
<itemizedlist>
<listitem><para>If you have more than one version of JVM installed in your machine, make sure you are using the JDK 1.5 installation as the default java and javac.
You can do this using the alternatives system. The alternatives system allows different versions of Java, from different sources to co-exist on your system.</para></listitem>
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-01 10:45:49 UTC (rev 3915)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/RADdevelopmentOfSimpleJSFapplication.xml 2007-10-01 11:13:21 UTC (rev 3916)
@@ -10,7 +10,7 @@
</keywordset>
</chapterinfo>
<title>RAD development of a simple JSF application</title>
- <para>In this chapter you will see how to create a simple JSF application being based on <property>"RAD"</property> philosophy. We will create the familiar Guess Number application. The scenario is as follows. A user is 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 the user that a smaller or a larger number should be entered and the game continues.</para>
+ <para>In this chapter you will see how to create a simple JSF application being based on <property>"RAD"</property> philosophy. We will create the familiar Guess Number application. The scenario is as follows. 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 the user 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 Red Hat 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 Red Hat Developer Studio using the bundled JBoss server.</para>
@@ -44,9 +44,9 @@
<section id="CreatingJSPPages">
<?dbhtml filename="CreatingJSPPages.html"?>
<title>Creating JSP Pages</title>
-<para>Our application has two pages. The first page is inputnumber.jsp. It prompts the user 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 the user guesses the number correctly. From this page you also have the option to play the game again.</para>
+<para>Our application has two pages. The first page is inputnumber.jsp. It prompts you to enter a number. If the guess is incorrect, the same page will be redisplayed with a message indicating whether a smaller or a larger number should be tried. The second page is success.jsp. This page will be shown after you guess the number correctly. From this page you also have the option to play the game again.</para>
-<para>On the first page inputnumber.jsp user will enter a number.</para>
+<para>On the first page inputnumber.jsp you will enter a number.</para>
<itemizedlist>
<listitem><para>Open faces-config.xml file.</para></listitem>
<listitem><para>Right click anywhere on the diagram mode.</para></listitem>
@@ -56,14 +56,14 @@
<title>Create New View</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad3.png"/>
+ <imagedata fileref="images/newrad3.png"/>
</imageobject>
</mediaobject>
</figure>
<itemizedlist>
<listitem><para>Type <emphasis>pages/inputname</emphasis> as the value for "From-view-id"</para></listitem>
-<listitem><para>Leave everything else as is and click Finish.</para></listitem>
+<listitem><para>Leave everything else as is and click <emphasis><property>Finish</property></emphasis>.</para></listitem>
<listitem><para>In the same way create another jsf view. Type "pages/success" as the value for "From-view-id"</para></listitem>
<listitem><para>Select <emphasis>File > Save</emphasis></para></listitem>
</itemizedlist>
@@ -72,7 +72,7 @@
<title>New Views</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad4.png"/>
+ <imagedata fileref="images/newrad4.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -88,7 +88,7 @@
<title>Create connection</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad5.png"/>
+ <imagedata fileref="images/newrad5.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -100,7 +100,7 @@
<title>Created connection</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad6.png"/>
+ <imagedata fileref="images/newrad6.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -111,7 +111,7 @@
<section id="CreatingResourceFile">
<?dbhtml filename="CreatingResourceFile.html"?>
<title>Creating Resource File</title>
-<para>Red Hat Developer Studio allows to quickly create a resource file. Using this feature you can collect text messages in one central place. A resource file is just a file with a <emphasis>.properties</emphasis> extension. The messages stored in resource file can be displayed to the user on a Web page during application execution. </para>
+<para>Red Hat Developer Studio allows to quickly create a resource file. Using this feature you can collect text messages in one central place. A resource file is just a file with a <emphasis>.properties</emphasis> extension. 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>JavaSource</emphasis> folder, where you keep your .java files. Every time you build the project, all <emphasis>.properties</emphasis> files will then be copied to the <emphasis>classes</emphasis> folder by default.</para>
<itemizedlist>
@@ -128,7 +128,7 @@
<title>messages.properties file</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad62.png"/>
+ <imagedata fileref="images/newrad62.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -152,7 +152,7 @@
<title>Properties are added</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad63.png"/>
+ <imagedata fileref="images/newrad63.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -169,7 +169,7 @@
</itemizedlist>
<para>A java bean is created.</para>
<itemizedlist>
-<listitem><para>Declare the variable of user entered number:</para></listitem>
+<listitem><para>Declare the variable of your entered number:</para></listitem>
</itemizedlist>
<programlisting role="JAVA"><![CDATA[Integer userNumber;
]]></programlisting>
@@ -182,7 +182,7 @@
<title>Generate Getters and Setters</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad64.png"/>
+ <imagedata fileref="images/newrad64.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -372,7 +372,7 @@
<title>Insert h:form</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad7.png"/>
+ <imagedata fileref="images/newrad7.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -382,7 +382,7 @@
<title>Define id of form</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad8.png"/>
+ <imagedata fileref="images/newrad8.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -394,7 +394,7 @@
<title>Created form</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad9.png"/>
+ <imagedata fileref="images/newrad9.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -409,7 +409,7 @@
<title>Code assist</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad10.png"/>
+ <imagedata fileref="images/newrad10.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -425,7 +425,7 @@
<title>Choose Value</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad11.png"/>
+ <imagedata fileref="images/newrad11.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -436,7 +436,7 @@
<title>Selecting Value</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad12.png"/>
+ <imagedata fileref="images/newrad12.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -447,7 +447,7 @@
<title>Created outputText component</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad13.png"/>
+ <imagedata fileref="images/newrad13.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -470,14 +470,14 @@
<title>Add required attribute</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad14.png"/>
+ <imagedata fileref="images/newrad14.png"/>
</imageobject>
</mediaobject>
</figure>
<itemizedlist>
<listitem><para>Click Ok, then click Finish</para></listitem>
<listitem><para>Go to Source mode</para></listitem>
-<listitem><para>Add the validation attribute to <emphasis role="bold"><property><f:validateLongRange></property></emphasis> for user input validation</para></listitem></itemizedlist>
+<listitem><para>Add the validation attribute to <emphasis role="bold"><property><f:validateLongRange></property></emphasis> for your input validation</para></listitem></itemizedlist>
<programlisting role="XML"><![CDATA[<h:inputText id="userNumber" value="#{NumberBean.userNumber}" required="true">
<f:validateLongRange minimum="0" maximum="100"/>
</h:inputText>
@@ -542,11 +542,11 @@
<title>Code Assist for <f:param></title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad15.png"/>
+ <imagedata fileref="images/newrad15.png"/>
</imageobject>
</mediaobject>
</figure>
-<para>This page, success.jsp, is shown if the user correctly guessed the number. The <emphasis role="bold"><property><h:outputFormat></property></emphasis> tag will get the value of success_text from the properties file. The {0} in success_text will be substituted for by the value of the value attribute within the <emphasis role="bold"><property><f:param></property></emphasis> tag during runtime.</para>
+<para>This page, success.jsp, is shown if you correctly guessed the number. The <emphasis role="bold"><property><h:outputFormat></property></emphasis> tag will get the value of success_text from the properties file. The {0} in success_text will be substituted for by the value of the value attribute within the <emphasis role="bold"><property><f:param></property></emphasis> tag during runtime.</para>
<para>At the end, we have a button which allows us 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 we 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 browser:</para></listitem>
@@ -555,7 +555,7 @@
<title>success.jsp in Preview mode</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/newrad16.png"/>
+ <imagedata fileref="images/newrad16.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -591,36 +591,36 @@
<listitem><para>Play with the application by entering correct as well as incorrect values</para></listitem>
</itemizedlist>
<figure>
-<title>A user is asked to enter a number between 0 and 100</title>
+<title>You are asked to enter a number between 0 and 100</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/default.png"/>
+ <imagedata fileref="images/default.png"/>
</imageobject>
</mediaobject>
</figure>
<figure>
-<title>User input is validated and an error message is displayed if invalid input was entered</title>
+<title>Your input is validated and an error message is displayed if invalid input was entered</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/default.png"/>
+ <imagedata fileref="images/default.png"/>
</imageobject>
</mediaobject>
</figure>
<figure>
-<title>After the user enters a guess, the application tells the user if a smaller or a larger number should be tried</title>
+<title>After you enter a guess, the application tells the user if a smaller or a larger number should be tried</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/default.png"/>
+ <imagedata fileref="images/default.png"/>
</imageobject>
</mediaobject>
</figure>
<figure>
-<title>A user guesses correctly</title>
+<title>You guess correctly</title>
<mediaobject>
<imageobject>
- <imagedata scale="80" fileref="images/default.png"/>
+ <imagedata fileref="images/default.png"/>
</imageobject>
</mediaobject>
</figure>
17 years, 3 months