JBoss Tools SVN: r20680 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-03-05 03:00:46 -0500 (Fri, 05 Mar 2010)
New Revision: 20680
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5996 -- disabling menu items when there is no visual editor.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java 2010-03-05 07:58:30 UTC (rev 20679)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java 2010-03-05 08:00:46 UTC (rev 20680)
@@ -111,8 +111,6 @@
paletteManuManager.fill(menu, index);
index++;
}
- } else {
-// menu.setVisible(false);
}
}
14 years, 3 months
JBoss Tools SVN: r20679 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-03-05 02:58:30 -0500 (Fri, 05 Mar 2010)
New Revision: 20679
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/SetupTemplateContributionItem.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5996 -- disabling menu items when there is no visual editor.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java 2010-03-05 02:53:07 UTC (rev 20678)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/InsertContributionItem.java 2010-03-05 07:58:30 UTC (rev 20679)
@@ -26,6 +26,7 @@
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.jst.web.tld.URIConstants;
+import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.VpeEditorPart;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.menu.action.ComplexAction;
@@ -42,19 +43,22 @@
*/
public class InsertContributionItem extends ContributionItem {
- private final Node node;
- private final StructuredTextEditor sourceEditor;
- private final VpePageContext pageContext;
private final static String NAME_PROPERTY = "name"; //$NON-NLS-1$
private final static String HIDDEN_PROPERTY = "hidden"; //$NON-NLS-1$
private final static String ELEMENT_TYPE_PROPERTY
- = "element type"; //$NON-NLS-1$
+ = "element type"; //$NON-NLS-1$
private final static String END_TEXT_PROPERTY = "end text"; //$NON-NLS-1$
private final static String TAG_ELEMENT_TYPE = "macro"; //$NON-NLS-1$
private final static String TAGLIB_ELEMENT_TYPE = "sub-group"; //$NON-NLS-1$
private final static String LEFT_ANGLE_BRACKET = "<"; //$NON-NLS-1$
private final static String RIGHT_ANGLE_BRACKET = ">"; //$NON-NLS-1$
-
+
+ private final Node node;
+ private final StructuredTextEditor sourceEditor;
+ private final VpePageContext pageContext;
+ private final JSPMultiPageEditor editor;
+ private final VpeController vpeController;
+
/**
* Creates an {@code InsertContributionItem}
* to make insert actions on the currently selected node.
@@ -70,32 +74,45 @@
public InsertContributionItem(final Node node) {
this.node = node;
- final JSPMultiPageEditor editor = (JSPMultiPageEditor)
+ editor = (JSPMultiPageEditor)
PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().getActiveEditor();
this.sourceEditor = editor.getSourceEditor();
- this.pageContext = ((VpeEditorPart) editor.getVisualEditor())
- .getController().getPageContext();
+ /*
+ * Fixes https://jira.jboss.org/jira/browse/JBIDE-5996
+ * When VisualEditor is not initialized it is impossible
+ * to fill this menu item.
+ */
+ this.vpeController = ((VpeEditorPart) editor.getVisualEditor()).getController();
+ if (null != vpeController) {
+ this.pageContext = vpeController.getPageContext();
+ } else {
+ this.pageContext = null;
+ }
}
@Override
public void fill(Menu menu, int index) {
- /*
- * Setting each InsertType to correct position in the menu
- */
- for (final InsertType insertItem : InsertType.values()) {
+ if (null != vpeController) {
/*
- * Use MenuManager to create submenu.
+ * Setting each InsertType to correct position in the menu
*/
- final MenuManager paletteManuManager = new MenuManager(
- insertItem.getMessage());
- final XModelObject model = ModelUtilities.getPreferenceModel()
+ for (final InsertType insertItem : InsertType.values()) {
+ /*
+ * Use MenuManager to create submenu.
+ */
+ final MenuManager paletteManuManager = new MenuManager(
+ insertItem.getMessage());
+ final XModelObject model = ModelUtilities.getPreferenceModel()
.getByPath("%Palette%"); //$NON-NLS-1$
- paletteManuManager.addMenuListener(new InsertMenuListener(
- model, insertItem));
- paletteManuManager.setRemoveAllWhenShown(true);
- paletteManuManager.fill(menu, index);
- index++;
+ paletteManuManager.addMenuListener(new InsertMenuListener(
+ model, insertItem));
+ paletteManuManager.setRemoveAllWhenShown(true);
+ paletteManuManager.fill(menu, index);
+ index++;
+ }
+ } else {
+// menu.setVisible(false);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/SetupTemplateContributionItem.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/SetupTemplateContributionItem.java 2010-03-05 02:53:07 UTC (rev 20678)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/SetupTemplateContributionItem.java 2010-03-05 07:58:30 UTC (rev 20679)
@@ -20,6 +20,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.VpeEditorPart;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
@@ -35,52 +36,61 @@
public class SetupTemplateContributionItem extends ActionContributionItem {
private VpePageContext pageContext;
-
private StructuredTextEditor sourceEditor;
+ private final JSPMultiPageEditor editor;
+ private final VpeController vpeController;
/**
- *
+ * Constructor
*/
public SetupTemplateContributionItem() {
super(new SetupTemplateAction());
- final JSPMultiPageEditor editor = (JSPMultiPageEditor) PlatformUI
+ editor = (JSPMultiPageEditor) PlatformUI
.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.getActiveEditor();
this.sourceEditor = editor.getSourceEditor();
- this.pageContext = ((VpeEditorPart) editor.getVisualEditor())
- .getController().getPageContext();
+ /*
+ * Fixes https://jira.jboss.org/jira/browse/JBIDE-5996
+ * When VisualEditor is not initialized it is impossible
+ * to fill this menu item.
+ */
+ this.vpeController = ((VpeEditorPart) editor.getVisualEditor()).getController();
+ if (null != vpeController) {
+ this.pageContext = vpeController.getPageContext();
+ } else {
+ this.pageContext = null;
+ }
getAction().setPageContext(pageContext);
}
@Override
public void fill(Menu menu, int index) {
-
- IStructuredSelection selection = (IStructuredSelection) sourceEditor
+ if (null != vpeController) {
+ IStructuredSelection selection = (IStructuredSelection) sourceEditor
.getSelectionProvider().getSelection();
-
- if (selection != null && selection.size() == 1
- && selection.getFirstElement() instanceof Element) {
- Element element = (Element) selection.getFirstElement();
- VpeElementMapping elementMapping = (VpeElementMapping) pageContext
- .getDomMapping().getNodeMapping(element);
- if (elementMapping != null
- && elementMapping.getTemplate() != null
- && elementMapping.getTemplate().getType()
- == VpeHtmlTemplate.TYPE_ANY) {
-
- getAction().setText(NLS.bind(
- VpeUIMessages.SETUP_TEMPLATE_FOR_MENU,
- element.getNodeName()));
- getAction().setActionNode(element);
- getAction().setData(elementMapping.getTemplate().getAnyData());
- /*
- * https://jira.jboss.org/jira/browse/JBIDE-4541
- * Index should be used as is.
- */
- super.fill(menu, index);
+ if (selection != null && selection.size() == 1
+ && selection.getFirstElement() instanceof Element) {
+ Element element = (Element) selection.getFirstElement();
+ VpeElementMapping elementMapping = (VpeElementMapping) pageContext
+ .getDomMapping().getNodeMapping(element);
+ if (elementMapping != null
+ && elementMapping.getTemplate() != null
+ && elementMapping.getTemplate().getType()
+ == VpeHtmlTemplate.TYPE_ANY) {
+
+ getAction().setText(NLS.bind(
+ VpeUIMessages.SETUP_TEMPLATE_FOR_MENU,
+ element.getNodeName()));
+ getAction().setActionNode(element);
+ getAction().setData(elementMapping.getTemplate().getAnyData());
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-4541
+ * Index should be used as is.
+ */
+ super.fill(menu, index);
+ }
}
}
-
}
@Override
14 years, 3 months
JBoss Tools SVN: r20677 - in trunk/jsf/docs/jsf_tools_tutorial: en-US and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-03-04 21:05:14 -0500 (Thu, 04 Mar 2010)
New Revision: 20677
Added:
trunk/jsf/docs/jsf_tools_tutorial/en-US/
trunk/jsf/docs/jsf_tools_tutorial/en-US/Author_Group.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/Book_Info.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/JSF_Tools_Tutorial.ent
trunk/jsf/docs/jsf_tools_tutorial/en-US/JSF_Tools_Tutorial.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/Preface.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/Revision_History.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/adding_managed_bean.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/adding_navigation.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/favicon.ico
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jbosstools_logo.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_1.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_10.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_2.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_3.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_4.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_5.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_6.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_7.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_8.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_9.png
trunk/jsf/docs/jsf_tools_tutorial/en-US/introduction.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/jsf_application.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/jsp_view_files.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/master.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/master_output.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/relevant_resources.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/running_application.xml
trunk/jsf/docs/jsf_tools_tutorial/en-US/start_page.xml
trunk/jsf/docs/jsf_tools_tutorial/publican.cfg
Removed:
trunk/jsf/docs/jsf_tools_tutorial/en/
Modified:
trunk/jsf/docs/jsf_tools_tutorial/pom.xml
Log:
modified book to build with publican and maven
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/Author_Group.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/Author_Group.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/Author_Group.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<authorgroup><author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author></authorgroup>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/Book_Info.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/Book_Info.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/Book_Info.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<bookinfo><title>JSF Tools Tutorial</title><subtitle>Provides information relating to the JSF Tools module.</subtitle><productname>JBoss Developer Studio</productname><productnumber>3.0</productnumber><edition>1.0</edition><pubsnumber>0</pubsnumber><abstract><para>The JSF Tools Tutorial explains how to use the JSF Tools module to create a simple JSF application.</para></abstract><corpauthor><inlinemediaobject><imageobject><imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"></imagedata></imageobject></inlinemediaobject></corpauthor><xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include><xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></bookinfo>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/JSF_Tools_Tutorial.ent
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/JSF_Tools_Tutorial.ent (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/JSF_Tools_Tutorial.ent 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,4 @@
+<!ENTITY PRODUCT "JBoss">
+<!ENTITY BOOKID "JSF_Tools_Tutorial">
+<!ENTITY YEAR "2010">
+<!ENTITY HOLDER "Red Hat">
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/JSF_Tools_Tutorial.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/JSF_Tools_Tutorial.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/JSF_Tools_Tutorial.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<book>
+<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="jsf_application.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="adding_navigation.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="adding_managed_bean.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="jsp_view_files.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="start_page.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="running_application.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="relevant_resources.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+</book>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/Preface.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/Preface.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/Preface.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<preface><title>Preface</title><xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include><xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></xi:fallback></xi:include></preface>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/Revision_History.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/Revision_History.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/Revision_History.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<appendix><title>Revision History</title><simpara><revhistory><revision><revnumber>0</revnumber><date>Fri Nov 20 2009</date><author><firstname>Isaac</firstname><surname>Rooskov</surname><email>irooskov(a)redhat.com</email></author><revdescription><simplelist><member>Initial creation of book by publican</member></simplelist></revdescription></revision></revhistory></simpara></appendix>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/adding_managed_bean.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/adding_managed_bean.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/adding_managed_bean.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="adding_managed_bean" xreflabel="adding_managed_bean">
+ <?dbhtml filename="adding_managed_bean.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Adding a Managed Bean to the Application</title>
+ <para>To store data in the application, we will use a managed bean.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property>Tree</property>
+ </emphasis> tab at the bottom of the editing window</para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property>Managed Beans</property>
+ </emphasis> node and then click the <emphasis>
+ <property>Add...</property>
+ </emphasis> button displayed along the right side of the editor window</para>
+ </listitem>
+ <listitem>
+ <para>Type in <emphasis>
+ <property>jsfHello.PersonBean</property>
+ </emphasis> for Class and <emphasis>
+ <property>personBean</property>
+ </emphasis> for Name. Leave Scope as is and Generate Source Code as is
+ (checked)</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>personBean will now be selected and three sections of information: <emphasis>
+ <property>Managed Bean</property>
+ </emphasis>, <emphasis>
+ <property>Properties</property>
+ </emphasis>, and <emphasis>
+ <property>Advanced</property>
+ </emphasis>, will be displayed about it. Under the Properties section, click the <emphasis>
+ <property>Add...</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Type in <emphasis>
+ <property>name</property>
+ </emphasis> for Property-Name. Leave everything else as is. (When Property-
+ Class is not filled in, String is the assumed type)</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property>personBean</property>
+ </emphasis> node in the tree</para>
+ </listitem>
+ </itemizedlist>
+ <para>You should see this now:</para>
+ <figure>
+ <title>Tree View in Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ <para>You have now registered the <emphasis>
+ <property>managed bean</property>
+ </emphasis> and created a <emphasis>
+ <property>stub-coded class</property>
+ </emphasis> file for it.</para>
+
+ </chapter>
\ No newline at end of file
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/adding_navigation.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/adding_navigation.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/adding_navigation.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="adding_navigation" xreflabel="adding_navigation">
+ <?dbhtml filename="adding_navigation.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Adding Navigation to the Application</title>
+
+ <para>In our simple application, the flow is defined as a single navigation rule connecting
+ two views (presentation files). At this point, we will create the placeholders for the
+ two JSP presentation files and then the navigation rule to connect them as views. Later,
+ we will complete the coding for the JSP presentation files. We can do all of this in the
+ Diagram mode of the configuration file editor.</para>
+ <section id="AddingTwoViewsJSPPages">
+ <?dbhtml filename="AddingTwoViewsJSPPages.html"?>
+ <title>Adding Two Views (JSP Pages)</title>
+ <itemizedlist>
+ <listitem>
+ <para>Right-click anywhere on the diagram and select <emphasis>
+ <property>New View...</property>
+ </emphasis> from the pop-up menu</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog box, type <emphasis>
+ <property>pages/inputname</property>
+ </emphasis> as the value for From-view-id</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Finish</property>
+ </emphasis></para>
+ <para>If you look in the Package Explorer view you should see a <emphasis>
+ <property>pages</property>
+ </emphasis> folder under WebContent. Opening it will reveal the JSP file you
+ just created</para>
+ </listitem>
+ <listitem>
+ <para>Back on the diagram, right-click anywhere and select <emphasis>
+ <property>New View...</property>
+ </emphasis> from the pop-up menu</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog box, type <emphasis>
+ <property>pages/greeting</property>
+ </emphasis> as the value for From-view-id</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section id="CreatingTheTransitionNavigationRule">
+ <?dbhtml filename="CreatingTheTransitionNavigationRule.html"?>
+ <title>Creating the Transition (Navigation Rule)</title>
+ <itemizedlist>
+ <listitem>
+ <para>In the diagram, select the connection icon third from the top along
+ the upper left side of the diagram (<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_3.png"/>
+ </imageobject>
+ </inlinemediaobject>) to get an arrow cursor with a two-pronged plug at the arrow's bottom.</para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property>pages/inputname</property>
+ </emphasis> page icon and then click on the <emphasis>
+ <property>pages/greeting</property>
+ </emphasis> page icon</para>
+ </listitem>
+
+ </itemizedlist>
+ <para>A transition should appear between the two icons.</para>
+ <figure>
+ <title>Transition Between Two Icons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+</chapter>
\ No newline at end of file
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/favicon.ico
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/favicon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jbosstools_logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jbosstools_logo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_10.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_6.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_7.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_8.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_9.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_tutorial/en-US/images/jsf_application/jsf_application_9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/introduction.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/introduction.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/introduction.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="introduction" xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Introduction</title>
+ <para>The following chapters describe how to deal with classic/old style of JSF development. We
+ recommend users to use JBoss
+ Seam to simplify development, but until then you can read about classical JSF
+ usage here.</para>
+
+ <para>Thus, in this document we are going to show you how to create a simple <property>JSF application
+ </property>using <property>JBoss Tools</property> plugins for Eclipse. The completed
+ application will ask a user to enter a name and click a button. The resulting new page
+ will display the familiar message, "Hello <name>!" This
+ tutorial will show you how to create and run such an application from the beginning along the
+ way demonstrating some of the powerful features of <property>JBoss Tools</property>.</para>
+ <section><title>Key Features of JSF Tools</title>
+ <para>Here, we provide you with a key functionality which is integrated in JSF tooling.</para>
+
+ <table>
+ <title>Key Functionality for JSF Tools</title>
+ <tgroup cols="2">
+
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>JSF and Facelets support</entry>
+ <entry>Step-by-step wizards for creating new JSF and Facelets projects with a number of predefined templates, importing existing ones and adding JSF capabilities to non-jsf web projects.</entry>
+
+ </row>
+
+ <row>
+ <entry>Flexible and customizable project template management</entry>
+ <entry>Jump-start development with out-of-the-box templates or easily
+ customized templates for re-use.</entry>
+
+ </row>
+
+ <row>
+ <entry>Support for JSF Configuration File</entry>
+ <entry>Working on file using three modes: diagram, tree and source.
+ Synchronization between the modes and full control over the code. Easy
+ moving around the diagram using the Diagram Navigator.</entry>
+
+ </row>
+
+ <row>
+ <entry>Support for Managed Beans</entry>
+ <entry>Adding new managed beans, generating code for attributes, properties
+ and getter/setter methods.</entry>
+
+ </row>
+
+ <row>
+ <entry>Support for Custom Converters and Validators</entry>
+ <entry>Fast creating of custom converters and validators with tree view of
+ faces-config.xml file.</entry>
+
+ </row>
+
+ <row>
+ <entry>Verification and Validation</entry>
+ <entry>All occuring errors will be immediately reported by verification
+ feature, no matter in what view you are working. Constant validation and
+ errors checking allows to catch many of the errors during development
+ process that significantly reduces development time.</entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at <ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
+ </section>
+
+</chapter>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/jsf_application.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/jsf_application.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/jsf_application.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="jsf_application" xreflabel="jsf_application">
+ <?dbhtml filename="jsf_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating a Simple JSF Application</title>
+
+ <para>Firstly, we assume that you have already launched Eclipse with <property>JBoss Tools</property>
+ plug-ins installed and also that the <property>Web Development perspective</property> is the current
+ one. (If not, make it active by selecting <emphasis>
+ <property>Window > Open Perspective > Web Development</property>
+ </emphasis> from the menu bar or by selecting <emphasis>
+ <property>Window > Open Perspective > Other...</property>
+ </emphasis> from the menu bar and then selecting <emphasis>
+ <property>Web Development</property>
+ </emphasis> from the Select Perspective dialog box.)</para>
+
+ <section id="setting_up_the_project">
+ <?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para>Now we are going to create a new project for the application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>For that go to the menu bar and select <emphasis>
+ <property>File > New > Project...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property>JBoss Tools Web > JSF > JSF Project</property>
+ </emphasis> in the New Project dialog box</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Next</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Enter "jsfHello" as the project name.</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is, and click <emphasis>
+ <property>Finish</property>
+ </emphasis></para>
+ </listitem>
+
+ </itemizedlist>
+ </section>
+
+ <section id="TheJSFApplicationConfigurationFile">
+ <?dbhtml filename="TheJSFApplicationConfigurationFile.html"?>
+ <title>JSF Configuration File</title>
+ <para>A jsfHello node should appear in the upper-left Package Explorer view.</para>
+ <figure>
+ <title>Package Explorer View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property>jsfHello</property>
+ </emphasis> to reveal the child nodes</para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property>WebContent</property>
+ </emphasis> under jsfHello</para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property>WEB-INF</property>
+ </emphasis> under WebContent</para>
+ </listitem>
+
+ <listitem>
+ <para>Then double-click on the <property>faces-config.xml</property> node to display
+ the JSF application configuration file editor</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Configuration File Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+</chapter>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/jsp_view_files.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/jsp_view_files.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/jsp_view_files.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="jsp_view_files" xreflabel="jsp_view_files">
+ <?dbhtml filename="jsp_view_files.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Editing the JSP View Files</title>
+
+ <para>Now we will finish editing the JSP files for our two "views" using
+ JSP Visual Page.</para>
+ <section id="Inputname.jsp">
+ <title>inputname.jsp</title>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property>Diagram</property>
+ </emphasis> tab for the configuration file editor</para>
+ </listitem>
+ <listitem>
+ <para>Open the editor for this first JSP file by double-clicking on the <emphasis>
+ <property>/pages/inputname. jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The Visual Page Editor will open in a screen split between source code along the
+ top and a WYSIWIG view along the bottom:</para>
+ <figure>
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Some JSF code is already in the file, because we have chosen a template to create
+ a page.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select the <emphasis>
+ <property>Visual</property>
+ </emphasis> tab, so we can work with the editor completely in its WYSIWYG
+ mode</para>
+ </listitem>
+ <listitem>
+ <para>To the right of the editor, in the JBoss Tools Palette, expand the <emphasis>
+ <property>JSF HTML</property>
+ </emphasis> palette folder by selecting it</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>JBoss Tools Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click on <emphasis>
+ <property>form</property>
+ </emphasis> within this folder, drag the cursor over to the editor, and drop
+ it inside the red box in the editor</para>
+ </listitem>
+ <listitem>
+ <para>Another red box will appear inside the first red box</para>
+ </listitem>
+ <listitem>
+ <para>Right-click on the innermost box and select <emphasis role="bold">
+ <property><h:form></property>
+ </emphasis> Attributes from the menu</para>
+ </listitem>
+ <listitem>
+ <para>In the value field next to id, type <emphasis>
+ <property>greeting</property>
+ </emphasis> and click on the <emphasis>
+ <property>Close</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Type "Please enter name:" inside the boxes</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property>inputText</property>
+ </emphasis> within the JSF HTML palette folder and drag it into the
+ innermost box in the editor after "Please enter
+ name:"</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in the <emphasis>
+ <property>value</property>
+ </emphasis> field next to the value attribute and click on the <property>...
+ </property>button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property>Managed Beans > personBean > name</property>
+ </emphasis> node and click on the <emphasis>
+ <property>Ok</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Back in the attributes dialog, select the <emphasis>
+ <property>Advanced</property>
+ </emphasis> tab, type in <emphasis>
+ <property>name</property>
+ </emphasis> as the value for the <emphasis role="italic">
+ <property>"id"</property>
+ </emphasis> attribute, and then click on the <emphasis>
+ <property>Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property>commandButton</property>
+ </emphasis> within the JSF HTML palette folder and drag it into the
+ innermost box in the editor after the input box</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in the value field next to the <emphasis
+ role="italic">
+ <property>"action"</property>
+ </emphasis> attribute and click on the <property>...
+ </property>button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property>View Actions > greeting</property>
+ </emphasis> node and click on the <emphasis>
+ <property>OK</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Back in the attributes dialog box, type in "Say Hello"
+ as the value for the value attribute ("Say Hello") and
+ then click on the <emphasis>
+ <property>Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should be something like this now:</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" %>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+<h:form id="greeting">
+Please enter name:
+<h:inputText id="name" value="#{personBean.name}"/>
+<h:commandButton value=" Say Hello " action="greeting"/>
+</h:form>
+</f:view>
+</body>
+</html>
+]]></programlisting>
+ <para>The editor should look like this:</para>
+ <figure>
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Save the file by selecting <emphasis>
+ <property>File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="Greeting.jsp">
+ <title>greeting.jsp</title>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property>faces-config.xml</property>
+ </emphasis> tab to bring the diagram back</para>
+ </listitem>
+ <listitem>
+ <para>Open the editor for the second file by double-clicking on the <emphasis>
+ <property>/pages/greeting.jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property>Visual</property>
+ </emphasis> tab, so we can work with the editor completely in its WYSIWYG
+ mode</para>
+ </listitem>
+ <listitem>
+ <para>Type "Hello "(note space after Hello) into the
+ box</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property>outputText</property>
+ </emphasis> within the JSF HTML palette folder and drag it into the
+ innermost box in the editor after "Hello"</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in <emphasis>
+ <property>value</property>
+ </emphasis> field next to the value attribute and click on the
+ <property>...</property> (Browse) button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property>Managed Beans > personBean > name</property>
+ </emphasis> node, click on the <emphasis>
+ <property>Ok</property>
+ </emphasis> button, and then click on the <emphasis>
+ <property>Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Right after the output field, type an <emphasis>
+ <property>exclamation point</property>
+ </emphasis> (<emphasis>
+ <property>!</property>
+ </emphasis>)</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should be something like this now:</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" %>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+Hello <h:outputText value="#{personBean.name}"/>!
+</f:view>
+</body>
+</html>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Save the file</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </chapter>
\ No newline at end of file
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/master.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/master.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/master.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY introduction SYSTEM "introduction.xml">
+<!ENTITY jsf_application SYSTEM "jsf_application.xml">
+<!ENTITY adding_navigation SYSTEM "adding_navigation.xml">
+<!ENTITY adding_managed_bean SYSTEM "adding_managed_bean.xml">
+<!ENTITY jsp_view_files SYSTEM "jsp_view_files.xml">
+<!ENTITY start_page SYSTEM "start_page.xml">
+<!ENTITY running_application SYSTEM "running_application.xml">
+<!ENTITY relevant_resources SYSTEM "relevant_resources.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+]>
+
+<book>
+
+ <bookinfo>
+ <title>JSF Tools Tutorial</title>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata format="PNG" fileref="images/jbosstools_logo.png" />
+ </imageobject>
+ <imageobject role="html">
+ <imagedata/>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+
+ <releaseinfo>
+ Version: 3.1.0.GA
+ </releaseinfo>
+
+
+<abstract>
+ <title/>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf_tools_tutorial/p...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc/>
+
+
+ &introduction;
+ &jsf_application;
+ &adding_navigation;
+ &adding_managed_bean;
+ &jsp_view_files;
+ &start_page;
+ &running_application;
+ &relevant_resources;
+</book>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/master_output.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/master_output.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/master_output.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,872 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY jsf_application SYSTEM "modules/jsf_application.xml">
+<!ENTITY adding_navigation SYSTEM "modules/adding_navigation.xml">
+<!ENTITY adding_managed_bean SYSTEM "modules/adding_managed_bean.xml">
+<!ENTITY jsp_view_files SYSTEM "modules/jsp_view_files.xml">
+<!ENTITY start_page SYSTEM "modules/start_page.xml">
+<!ENTITY running_application SYSTEM "modules/running_application.xml">
+<!ENTITY relevant_resources SYSTEM "modules/relevant_resources.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JSF Tools Tutorial</title>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 3.1.0.GA
+ </diffmk:wrapper></releaseinfo>
+
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf_tools_tutorial/p...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+
+<chapter id="introduction" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_tutorial/en/modules/introduction.xml" xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Introduction</title>
+ <para>The following chapters describe how to deal with classic/old style of JSF development. We
+ recommend users to use <ulink url="../../seam/html_single/index.html">JBoss
+ Seam</ulink> to simplify development, but until then you can read about classical JSF
+ usage here.</para>
+
+ <para>Thus, in this document we are going to show you how to create a simple <property moreinfo="none">JSF application
+ </property>using <property moreinfo="none">JBoss Tools</property> plugins for Eclipse. The completed
+ application will ask a user to enter a name and click a button. The resulting new page
+ will display the familiar message, "Hello <name>!" This
+ tutorial will show you how to create and run such an application from the beginning along the
+ way demonstrating some of the powerful features of <property moreinfo="none">JBoss Tools</property>.</para>
+ <section><title>Key Features of JSF Tools</title>
+ <para>Here, we provide you with a key functionality which is integrated in JSF tooling.</para>
+
+ <table>
+ <title>Key Functionality for JSF Tools</title>
+ <tgroup cols="2">
+
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>JSF and Facelets support</entry>
+ <entry>Step-by-step wizards for creating new JSF and Facelets projects with a number of predefined templates, importing existing ones and adding JSF capabilities to non-jsf web projects.</entry>
+
+ </row>
+
+ <row>
+ <entry>Flexible and customizable project template management</entry>
+ <entry>Jump-start development with out-of-the-box templates or easily
+ customized templates for re-use.</entry>
+
+ </row>
+
+ <row>
+ <entry>Support for JSF Configuration File</entry>
+ <entry>Working on file using three modes: diagram, tree and source.
+ Synchronization between the modes and full control over the code. Easy
+ moving around the diagram using the Diagram Navigator.</entry>
+
+ </row>
+
+ <row>
+ <entry>Support for Managed Beans</entry>
+ <entry>Adding new managed beans, generating code for attributes, properties
+ and getter/setter methods.</entry>
+
+ </row>
+
+ <row>
+ <entry>Support for Custom Converters and Validators</entry>
+ <entry>Fast creating of custom converters and validators with tree view of
+ faces-config.xml file.</entry>
+
+ </row>
+
+ <row>
+ <entry>Verification and Validation</entry>
+ <entry>All occuring errors will be immediately reported by verification
+ feature, no matter in what view you are working. Constant validation and
+ errors checking allows to catch many of the errors during development
+ process that significantly reduces development time.</entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at <ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
+ </section>
+
+</chapter>
+
+
+<chapter id="jsf_application" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_tutorial/en/modules/jsf_application.xml" xreflabel="jsf_application">
+ <?dbhtml filename="jsf_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating a Simple JSF Application</title>
+
+ <para>Firstly, we assume that you have already launched Eclipse with <property moreinfo="none">JBoss Tools</property>
+ plug-ins installed and also that the <property moreinfo="none">Web Development perspective</property> is the current
+ one. (If not, make it active by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Web Development</property>
+ </emphasis> from the menu bar or by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Other...</property>
+ </emphasis> from the menu bar and then selecting <emphasis>
+ <property moreinfo="none">Web Development</property>
+ </emphasis> from the Select Perspective dialog box.)</para>
+
+ <section id="setting_up_the_project">
+ <?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para>Now we are going to create a new project for the application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>For that go to the menu bar and select <emphasis>
+ <property moreinfo="none">File > New > Project...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss Tools Web > JSF > JSF Project</property>
+ </emphasis> in the New Project dialog box</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Enter "jsfHello" as the project name.</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is, and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+
+ </itemizedlist>
+ </section>
+
+ <section id="TheJSFApplicationConfigurationFile">
+ <?dbhtml filename="TheJSFApplicationConfigurationFile.html"?>
+ <title>JSF Configuration File</title>
+ <para>A jsfHello node should appear in the upper-left Package Explorer view.</para>
+ <figure float="0">
+ <title>Package Explorer View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property moreinfo="none">jsfHello</property>
+ </emphasis> to reveal the child nodes</para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property moreinfo="none">WebContent</property>
+ </emphasis> under jsfHello</para>
+ </listitem>
+ <listitem>
+ <para>Click the plus sign next to <emphasis>
+ <property moreinfo="none">WEB-INF</property>
+ </emphasis> under WebContent</para>
+ </listitem>
+
+ <listitem>
+ <para>Then double-click on the <property moreinfo="none">faces-config.xml</property> node to display
+ the JSF application configuration file editor</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Configuration File Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+</chapter>
+
+
+<chapter id="adding_navigation" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_tutorial/en/modules/adding_navigation.xml" xreflabel="adding_navigation">
+ <?dbhtml filename="adding_navigation.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Adding Navigation to the Application</title>
+
+ <para>In our simple application, the flow is defined as a single navigation rule connecting
+ two views (presentation files). At this point, we will create the placeholders for the
+ two JSP presentation files and then the navigation rule to connect them as views. Later,
+ we will complete the coding for the JSP presentation files. We can do all of this in the
+ Diagram mode of the configuration file editor.</para>
+ <section id="AddingTwoViewsJSPPages">
+ <?dbhtml filename="AddingTwoViewsJSPPages.html"?>
+ <title>Adding Two Views (JSP Pages)</title>
+ <itemizedlist>
+ <listitem>
+ <para>Right-click anywhere on the diagram and select <emphasis>
+ <property moreinfo="none">New View...</property>
+ </emphasis> from the pop-up menu</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog box, type <emphasis>
+ <property moreinfo="none">pages/inputname</property>
+ </emphasis> as the value for From-view-id</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ <para>If you look in the Package Explorer view you should see a <emphasis>
+ <property moreinfo="none">pages</property>
+ </emphasis> folder under WebContent. Opening it will reveal the JSP file you
+ just created</para>
+ </listitem>
+ <listitem>
+ <para>Back on the diagram, right-click anywhere and select <emphasis>
+ <property moreinfo="none">New View...</property>
+ </emphasis> from the pop-up menu</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog box, type <emphasis>
+ <property moreinfo="none">pages/greeting</property>
+ </emphasis> as the value for From-view-id</para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section id="CreatingTheTransitionNavigationRule">
+ <?dbhtml filename="CreatingTheTransitionNavigationRule.html"?>
+ <title>Creating the Transition (Navigation Rule)</title>
+ <itemizedlist>
+ <listitem>
+ <para>In the diagram, select the connection icon third from the top along
+ the upper left side of the diagram (<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_3.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>) to get an arrow cursor with a two-pronged plug at the arrow's bottom.</para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">pages/inputname</property>
+ </emphasis> page icon and then click on the <emphasis>
+ <property moreinfo="none">pages/greeting</property>
+ </emphasis> page icon</para>
+ </listitem>
+
+ </itemizedlist>
+ <para>A transition should appear between the two icons.</para>
+ <figure float="0">
+ <title>Transition Between Two Icons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+</chapter>
+
+<chapter id="adding_managed_bean" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_tutorial/en/modules/adding_managed_bean.xml" xreflabel="adding_managed_bean">
+ <?dbhtml filename="adding_managed_bean.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Adding a Managed Bean to the Application</title>
+ <para>To store data in the application, we will use a managed bean.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Tree</property>
+ </emphasis> tab at the bottom of the editing window</para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property moreinfo="none">Managed Beans</property>
+ </emphasis> node and then click the <emphasis>
+ <property moreinfo="none">Add...</property>
+ </emphasis> button displayed along the right side of the editor window</para>
+ </listitem>
+ <listitem>
+ <para>Type in <emphasis>
+ <property moreinfo="none">jsfHello.PersonBean</property>
+ </emphasis> for Class and <emphasis>
+ <property moreinfo="none">personBean</property>
+ </emphasis> for Name. Leave Scope as is and Generate Source Code as is
+ (checked)</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>personBean will now be selected and three sections of information: <emphasis>
+ <property moreinfo="none">Managed Bean</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">Properties</property>
+ </emphasis>, and <emphasis>
+ <property moreinfo="none">Advanced</property>
+ </emphasis>, will be displayed about it. Under the Properties section, click the <emphasis>
+ <property moreinfo="none">Add...</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Type in <emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> for Property-Name. Leave everything else as is. (When Property-
+ Class is not filled in, String is the assumed type)</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property moreinfo="none">personBean</property>
+ </emphasis> node in the tree</para>
+ </listitem>
+ </itemizedlist>
+ <para>You should see this now:</para>
+ <figure float="0">
+ <title>Tree View in Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ <para>You have now registered the <emphasis>
+ <property moreinfo="none">managed bean</property>
+ </emphasis> and created a <emphasis>
+ <property moreinfo="none">stub-coded class</property>
+ </emphasis> file for it.</para>
+
+ </chapter>
+
+<chapter id="jsp_view_files" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_tutorial/en/modules/jsp_view_files.xml" xreflabel="jsp_view_files">
+ <?dbhtml filename="jsp_view_files.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Editing the JSP View Files</title>
+
+ <para>Now we will finish editing the JSP files for our two "views" using
+ JSP Visual Page.</para>
+ <section id="Inputname.jsp">
+ <title>inputname.jsp</title>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Diagram</property>
+ </emphasis> tab for the configuration file editor</para>
+ </listitem>
+ <listitem>
+ <para>Open the editor for this first JSP file by double-clicking on the <emphasis>
+ <property moreinfo="none">/pages/inputname. jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The Visual Page Editor will open in a screen split between source code along the
+ top and a WYSIWIG view along the bottom:</para>
+ <figure float="0">
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Some JSF code is already in the file, because we have chosen a template to create
+ a page.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select the <emphasis>
+ <property moreinfo="none">Visual</property>
+ </emphasis> tab, so we can work with the editor completely in its WYSIWYG
+ mode</para>
+ </listitem>
+ <listitem>
+ <para>To the right of the editor, in the JBoss Tools Palette, expand the <emphasis>
+ <property moreinfo="none">JSF HTML</property>
+ </emphasis> palette folder by selecting it</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>JBoss Tools Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click on <emphasis>
+ <property moreinfo="none">form</property>
+ </emphasis> within this folder, drag the cursor over to the editor, and drop
+ it inside the red box in the editor</para>
+ </listitem>
+ <listitem>
+ <para>Another red box will appear inside the first red box</para>
+ </listitem>
+ <listitem>
+ <para>Right-click on the innermost box and select <emphasis role="bold">
+ <property moreinfo="none"><h:form></property>
+ </emphasis> Attributes from the menu</para>
+ </listitem>
+ <listitem>
+ <para>In the value field next to id, type <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> and click on the <emphasis>
+ <property moreinfo="none">Close</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Type "Please enter name:" inside the boxes</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">inputText</property>
+ </emphasis> within the JSF HTML palette folder and drag it into the
+ innermost box in the editor after "Please enter
+ name:"</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in the <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> field next to the value attribute and click on the <property moreinfo="none">...
+ </property>button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property moreinfo="none">Managed Beans > personBean > name</property>
+ </emphasis> node and click on the <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Back in the attributes dialog, select the <emphasis>
+ <property moreinfo="none">Advanced</property>
+ </emphasis> tab, type in <emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> as the value for the <emphasis role="italic">
+ <property moreinfo="none">"id"</property>
+ </emphasis> attribute, and then click on the <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">commandButton</property>
+ </emphasis> within the JSF HTML palette folder and drag it into the
+ innermost box in the editor after the input box</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in the value field next to the <emphasis role="italic">
+ <property moreinfo="none">"action"</property>
+ </emphasis> attribute and click on the <property moreinfo="none">...
+ </property>button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property moreinfo="none">View Actions > greeting</property>
+ </emphasis> node and click on the <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Back in the attributes dialog box, type in "Say Hello"
+ as the value for the value attribute ("Say Hello") and
+ then click on the <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should be something like this now:</para>
+ <programlisting format="linespecific" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+<h:form id="greeting">
+Please enter name:
+<h:inputText id="name" value="#{personBean.name}"/>
+<h:commandButton value=" Say Hello " action="greeting"/>
+</h:form>
+</f:view>
+</body>
+</html>
+]]></programlisting>
+ <para>The editor should look like this:</para>
+ <figure float="0">
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Save the file by selecting <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="Greeting.jsp">
+ <title>greeting.jsp</title>
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">faces-config.xml</property>
+ </emphasis> tab to bring the diagram back</para>
+ </listitem>
+ <listitem>
+ <para>Open the editor for the second file by double-clicking on the <emphasis>
+ <property moreinfo="none">/pages/greeting.jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ <listitem>
+ <para>Select the <emphasis>
+ <property moreinfo="none">Visual</property>
+ </emphasis> tab, so we can work with the editor completely in its WYSIWYG
+ mode</para>
+ </listitem>
+ <listitem>
+ <para>Type "Hello "(note space after Hello) into the
+ box</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">outputText</property>
+ </emphasis> within the JSF HTML palette folder and drag it into the
+ innermost box in the editor after "Hello"</para>
+ </listitem>
+ <listitem>
+ <para>In the attributes dialog, click in <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> field next to the value attribute and click on the
+ <property moreinfo="none">...</property> (Browse) button</para>
+ </listitem>
+ <listitem>
+ <para>Then, select the <emphasis>
+ <property moreinfo="none">Managed Beans > personBean > name</property>
+ </emphasis> node, click on the <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> button, and then click on the <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Right after the output field, type an <emphasis>
+ <property moreinfo="none">exclamation point</property>
+ </emphasis> (<emphasis>
+ <property moreinfo="none">!</property>
+ </emphasis>)</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should be something like this now:</para>
+ <programlisting format="linespecific" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+Hello <h:outputText value="#{personBean.name}"/>!
+</f:view>
+</body>
+</html>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Save the file</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </chapter>
+
+<chapter id="start_page" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_tutorial/en/modules/start_page.xml" xreflabel="start_page">
+ <?dbhtml filename="start_page.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating the Start Page</title>
+ <para>You also need to create a start page as an entry point into the application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Package Explorer view to the left, right-click <emphasis>
+ <property moreinfo="none">jsfHello > WebContent</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">New > JSP File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For Name type in <emphasis>
+ <property moreinfo="none">index</property>
+ </emphasis>, for Template select <emphasis>
+ <property moreinfo="none">JSPRedirect</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>A JSP editor will open up on the newly created file.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Source part of the split screen, type <emphasis>
+ <property moreinfo="none">/pages/inputname.jsf</property>
+ </emphasis> in between the quotes for the page attribute</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should look like this now:</para>
+ <programlisting format="linespecific" role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+<body>
+<jsp:forward page="/pages/inputname.jsf" />
+</body>
+</html>
+]]></programlisting>
+
+ <para>Note the <emphasis>
+ <property moreinfo="none">.jsf</property>
+ </emphasis> extension for the file name. This is a mapping defined in the web.xml file
+ for the project for invoking <property moreinfo="none">JavaServer Faces</property> when you run the
+ application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select<emphasis>
+ <property moreinfo="none"> File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </chapter>
+
+<chapter id="running_application" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_tutorial/en/modules/running_application.xml" xreflabel="running_application">
+ <?dbhtml filename="running_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Running the Application</title>
+ <para>Everything is now ready for running our application by using the JBoss engine. For
+ controlling JBoss server there is JBoss Server view:</para>
+ <figure float="0">
+ <title>JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Start up JBoss by clicking on the icon in JBoss Server view. (If JBoss is
+ already running, stop it by clicking on the red icon and then start it again.
+ Remember, the JSF run-time requires restarting the servlet engine when any
+ changes have been made.) After the messages in the Console tabbed view stop
+ scrolling, JBoss is available</para>
+ </listitem>
+
+ <listitem>
+ <para>Click the Run icon(<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_10.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>) or right click your project folder and select <emphasis>
+ <property moreinfo="none">Run As > Run on Server</property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>This is the equivalent of launching the browser and typing <emphasis>
+ <property moreinfo="none">http://localhost:8080/jsfHello</property>
+ </emphasis> into your browser. Our <property moreinfo="none">JSF application</property> should now
+ appear.</para>
+ </chapter>
+
+<chapter id="relevant_resources" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_tutorial/en/modules/relevant_resources.xml" xreflabel="relevant_resources">
+ <?dbhtml filename="relevant_resources.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Other Relevant Resources on the topic</title>
+ <para>JSF on Sun: <ulink url="http://java.sun.com/javaee/javaserverfaces/">JavaServer Faces
+ Technology</ulink></para>
+ <para>Core JSF: <ulink url="http://www.horstmann.com/corejsf/">Core JavaServer Faces</ulink></para>
+ <para>API: <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1/docs/api/index.html">JSF
+ API</ulink></para>
+ <para>JSF Tags: <ulink url="http://www.horstmann.com/corejsf/jsf-tags.html">JSF Core
+ Tags</ulink></para>
+ <para>HTML Tags Reference: <ulink url="http://www.exadel.com/tutorial/jsf/jsftags-guide.html">JSF HTML Tags Reference</ulink></para>
+ <para>JSF Central: <ulink url="http://www.jsfcentral.com/">JSF Central - Your JavaServer Faces
+ Community</ulink></para>
+ <para>FAQ: <ulink url="http://wiki.java.net/bin/view/Projects/JavaServerFacesSpecFaq">JSF
+ FAQ</ulink></para>
+ <para>Download: <ulink url="http://java.sun.com/javaee/javaserverfaces/download.html">JavaServer
+ Faces Technology - Download</ulink></para>
+
+ <para>In summary, with this tutorial you should now know how to organize JSF sample application
+ using the wizards provided by <property moreinfo="none">JBoss Tools</property>, configure its stuff and
+ finally run it on the <property moreinfo="none">JBoss Server</property>.</para>
+
+ <para>Find out more features on JSF tooling in our <ulink url="../../jsf_tools_ref_guide/html_single/index.html">JSF Tools
+ Reference Guide</ulink>.
+ If you have questions and suggestions, please refer to
+ <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
+ Tools Forum</ulink>.</para>
+</chapter>
+
+</book>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/relevant_resources.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/relevant_resources.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/relevant_resources.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="relevant_resources" xreflabel="relevant_resources">
+ <?dbhtml filename="relevant_resources.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Other Relevant Resources on the topic</title>
+ <para>JSF on Sun: <ulink url="http://java.sun.com/javaee/javaserverfaces/">JavaServer Faces
+ Technology</ulink></para>
+ <para>Core JSF: <ulink url="http://www.horstmann.com/corejsf/">Core JavaServer Faces</ulink></para>
+ <para>API: <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1/docs/api/index.html">JSF
+ API</ulink></para>
+ <para>JSF Tags: <ulink url="http://www.horstmann.com/corejsf/jsf-tags.html">JSF Core
+ Tags</ulink></para>
+ <para>HTML Tags Reference: <ulink url="http://www.exadel.com/tutorial/jsf/jsftags-guide.html"
+ >JSF HTML Tags Reference</ulink></para>
+ <para>JSF Central: <ulink url="http://www.jsfcentral.com/">JSF Central - Your JavaServer Faces
+ Community</ulink></para>
+ <para>FAQ: <ulink url="http://wiki.java.net/bin/view/Projects/JavaServerFacesSpecFaq">JSF
+ FAQ</ulink></para>
+ <para>Download: <ulink url="http://java.sun.com/javaee/javaserverfaces/download.html">JavaServer
+ Faces Technology - Download</ulink></para>
+
+ <para>In summary, with this tutorial you should now know how to organize JSF sample application
+ using the wizards provided by <property>JBoss Tools</property>, configure its stuff and
+ finally run it on the <property>JBoss Server</property>.</para>
+
+ <para>Find out more features on JSF tooling in our JSF Tools
+ Reference Guide. If you have questions and suggestions, please refer to <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
+ Tools Forum</ulink>.</para>
+</chapter>
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/running_application.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/running_application.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/running_application.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="running_application" xreflabel="running_application">
+ <?dbhtml filename="running_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Running the Application</title>
+ <para>Everything is now ready for running our application by using the JBoss engine. For
+ controlling JBoss server there is JBoss Server view:</para>
+ <figure>
+ <title>JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Start up JBoss by clicking on the icon in JBoss Server view. (If JBoss is
+ already running, stop it by clicking on the red icon and then start it again.
+ Remember, the JSF run-time requires restarting the servlet engine when any
+ changes have been made.) After the messages in the Console tabbed view stop
+ scrolling, JBoss is available</para>
+ </listitem>
+
+ <listitem>
+ <para>Click the Run icon(<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_application/jsf_application_10.png"/>
+ </imageobject>
+ </inlinemediaobject>) or right click your project folder and select <emphasis>
+ <property>Run As > Run on Server</property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>This is the equivalent of launching the browser and typing <emphasis>
+ <property>http://localhost:8080/jsfHello</property>
+ </emphasis> into your browser. Our <property>JSF application</property> should now
+ appear.</para>
+ </chapter>
\ No newline at end of file
Added: trunk/jsf/docs/jsf_tools_tutorial/en-US/start_page.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en-US/start_page.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/en-US/start_page.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="start_page" xreflabel="start_page">
+ <?dbhtml filename="start_page.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF application</keyword>
+ <keyword>Java</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating the Start Page</title>
+ <para>You also need to create a start page as an entry point into the application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Package Explorer view to the left, right-click <emphasis>
+ <property>jsfHello > WebContent</property>
+ </emphasis> and select <emphasis>
+ <property>New > JSP File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For Name type in <emphasis>
+ <property>index</property>
+ </emphasis>, for Template select <emphasis>
+ <property>JSPRedirect</property>
+ </emphasis> and click <emphasis>
+ <property>Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>A JSP editor will open up on the newly created file.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Source part of the split screen, type <emphasis>
+ <property>/pages/inputname.jsf</property>
+ </emphasis> in between the quotes for the page attribute</para>
+ </listitem>
+ </itemizedlist>
+ <para>The source coding should look like this now:</para>
+ <programlisting role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+<body>
+<jsp:forward page="/pages/inputname.jsf" />
+</body>
+</html>
+]]></programlisting>
+
+ <para>Note the <emphasis>
+ <property>.jsf</property>
+ </emphasis> extension for the file name. This is a mapping defined in the web.xml file
+ for the project for invoking <property>JavaServer Faces</property> when you run the
+ application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select<emphasis>
+ <property> File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </chapter>
\ No newline at end of file
Modified: trunk/jsf/docs/jsf_tools_tutorial/pom.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/pom.xml 2010-03-05 01:40:06 UTC (rev 20676)
+++ trunk/jsf/docs/jsf_tools_tutorial/pom.xml 2010-03-05 02:05:14 UTC (rev 20677)
@@ -86,9 +86,9 @@
<configuration>
<sourceDocumentName>${master}</sourceDocumentName>
- <sourceDirectory>${pom.basedir}/en</sourceDirectory>
+ <sourceDirectory>${pom.basedir}/en-US</sourceDirectory>
<imageResource>
- <directory>${pom.basedir}/en</directory>
+ <directory>${pom.basedir}/en-US</directory>
<includes>
<include>images/**/*</include>
</includes>
Added: trunk/jsf/docs/jsf_tools_tutorial/publican.cfg
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/publican.cfg (rev 0)
+++ trunk/jsf/docs/jsf_tools_tutorial/publican.cfg 2010-03-05 02:05:14 UTC (rev 20677)
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Fri Nov 20 13:19:45 2009
+
+xml_lang: en-US
+type: Book
+brand: JBoss
+
14 years, 3 months
JBoss Tools SVN: r20676 - in trunk/jsf/docs/jsf_tools_ref_guide: en-US and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-03-04 20:40:06 -0500 (Thu, 04 Mar 2010)
New Revision: 20676
Added:
trunk/jsf/docs/jsf_tools_ref_guide/en-US/
trunk/jsf/docs/jsf_tools_ref_guide/en-US/Author_Group.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/Book_Info.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/JSF_Tools_Reference_Guide.ent
trunk/jsf/docs/jsf_tools_ref_guide/en-US/JSF_Tools_Reference_Guide.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/Preface.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/Revision_History.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/creation_and_registration.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/favicon.ico
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jbosstools_logo.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_10.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_11.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_12.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_14.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_15.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_16.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_17.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_18.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_19.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_2.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20_1.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20_2.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_21.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_22.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_23.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24a.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24b.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24c.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24d.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26a.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26b.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26c.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26d.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_27.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_28.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_29.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_3.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_30.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_31.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_32.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_33.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_34.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_35.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_36.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_37.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_38.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_39.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_4.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_40.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_42.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_43.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_44.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_45.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_46.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_47.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_48.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_49.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_5.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_50.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_51.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_52.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_53.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_54.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_55.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_56.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_57.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_58.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_59.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_6.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_7.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_8.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_9.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_1.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_2.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_3.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_4.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_5.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_6.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_7.png
trunk/jsf/docs/jsf_tools_ref_guide/en-US/introduction.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_config_file.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_project_verification.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_support.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/managed_beans.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/master.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/master_output.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/projects.xml
trunk/jsf/docs/jsf_tools_ref_guide/en-US/webxml_editor.xml
trunk/jsf/docs/jsf_tools_ref_guide/publican.cfg
Removed:
trunk/jsf/docs/jsf_tools_ref_guide/en/
Modified:
trunk/jsf/docs/jsf_tools_ref_guide/pom.xml
Log:
updated to build with publican and maven
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/Author_Group.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/Author_Group.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/Author_Group.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<authorgroup><author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author></authorgroup>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/Book_Info.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/Book_Info.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/Book_Info.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<bookinfo><title>JSF Tools Reference Guide</title><subtitle>Provides information relating to the JSF Tools module.</subtitle><productname>JBoss Developer Studio</productname><productnumber>3.0</productnumber><edition>1.0</edition><pubsnumber>0</pubsnumber><abstract><para>The JSF Tools Reference Guide explains how to use the JSF Tools module to develop JSF applications.</para></abstract><corpauthor><inlinemediaobject><imageobject><imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"></imagedata></imageobject></inlinemediaobject></corpauthor><xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include><xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></bookinfo>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/JSF_Tools_Reference_Guide.ent
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/JSF_Tools_Reference_Guide.ent (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/JSF_Tools_Reference_Guide.ent 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,4 @@
+<!ENTITY PRODUCT "JBoss">
+<!ENTITY BOOKID "JSF_Tools_Reference_Guide">
+<!ENTITY YEAR "2010">
+<!ENTITY HOLDER "Red Hat">
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/JSF_Tools_Reference_Guide.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/JSF_Tools_Reference_Guide.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/JSF_Tools_Reference_Guide.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<book>
+<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="jsf_support.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="projects.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="webxml_editor.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="jsf_config_file.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="managed_beans.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="creation_and_registration.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="jsf_project_verification.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+</book>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/Preface.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/Preface.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/Preface.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<preface><title>Preface</title><xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include><xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></xi:fallback></xi:include></preface>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/Revision_History.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/Revision_History.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/Revision_History.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<appendix><title>Revision History</title><simpara><revhistory><revision><revnumber>0</revnumber><date>Fri Nov 20 2009</date><author><firstname>Isaac</firstname><surname>Rooskov</surname><email>irooskov(a)redhat.com</email></author><revdescription><simplelist><member>Initial creation of book by publican</member></simplelist></revdescription></revision></revhistory></simpara></appendix>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/creation_and_registration.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/creation_and_registration.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/creation_and_registration.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,364 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="creation_and_registration">
+ <?dbhtml filename="creation_and_registration.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Creation and Registration</title>
+
+ <section id="CreateAndRegisterACustomConverter94230">
+
+ <title>Create and Register a Custom Converter</title>
+
+ <para>It's also possible to create a
+ custom Converter in order to specify your own converting rules. Let's look at how you can do this.</para>
+
+ <para>To create and register a custom converter it's necessary to
+ go through the following steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open <emphasis>
+ <property>faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property>Tree</property>
+ </emphasis> tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Converters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_44.png" scale="80"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Converters</property>
+ </emphasis> and click on<emphasis>
+ <property> Add</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the form type the name of your converter in the <emphasis>
+ <property>Converter-id</property>
+ </emphasis> field and name of the class for
+ converters. After clicking <emphasis>
+ <property>Finish</property>
+ </emphasis> button your custom converter is
+ registered under the entered name.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Add Converter Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_45.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Now you can create <emphasis role="italic">
+ <property>"converter"</property>
+ </emphasis> class. In the Converter section you
+ should see your <emphasis>
+ <property>Converter-id</property>
+ </emphasis> and
+ <emphasis><property>Converter-class</property>.</emphasis>
+ Click on <emphasis>
+ <property>Converter-class</property>
+ </emphasis> to generate the source code.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Generation of Source Code for Converter Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_46.png" scale="80"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>A usual wizard for creating a Java class will appear.
+ All needed fields here will be adjusted
+ automatically. Just leave everything without changes
+ and click <emphasis>
+ <property>Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_47.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open a converter class click again on <emphasis>
+ <property>Converter-class</property>
+ </emphasis> link in the Converter section.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Converter Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_48.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now you
+ are able to add a business logic of converter in the
+ Java editor.</para>
+ </section>
+
+ <section id="CreateAndRegisterACustomValidator5632">
+
+ <title>Create and Register a Custom Validator</title>
+
+ <para>It's also quite easy to develop your
+ own custom Validators. You should perform the actions similar to the
+ previous one. Go through the following steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open<emphasis>
+ <property> faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property>Tree </property>
+ </emphasis>tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Validator in Faces Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_49.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Validators</property>
+ </emphasis> and click on <emphasis>
+ <property>Add </property>
+ </emphasis>button.</para>
+ </listitem>
+ <listitem>
+ <para>Type the name of your validator in the <emphasis>
+ <property>Validator-id</property>
+ </emphasis> field and name of the class for
+ validators. After clicking <emphasis>
+ <property>Finish</property>
+ </emphasis> button your custom validator is
+ registered under the entered name.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Adding Validator</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_50.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now you can create the "validator" class. </para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Validator section you can see your <emphasis>
+ <property>Validator-id</property>
+ </emphasis> and <emphasis>
+ <property>Validator-class</property></emphasis>. To generate the source code click on <emphasis>
+ <property>Validator-class</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Creating Validator Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_51.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Java class will be created automatically. Leave
+ everything without changes and click <emphasis>
+ <property>Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_52.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open validator class click again on <emphasis>
+ <property>Validator-Class</property>
+ </emphasis> link in the Validator section. Now you
+ are able to write a business logic of validator in
+ the Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Converter Class Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_53.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="referenced_beans">
+ <title>Create and Register Referenced Beans</title>
+
+ <para>Creation of Referenced Beans is similar to creation of Custom
+ Validator as well. To perform this, let's walk through the necessary steps.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open<emphasis>
+ <property> faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property>Tree </property>
+ </emphasis>tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Referenced Beans in Faces Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_54.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Referenced Beans</property>
+ </emphasis> and click on <emphasis>
+ <property>Add</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>Type in the name of your Referenced Bean and type in
+ or select <emphasis>
+ <property>Referenced-Bean-Class</property>
+ </emphasis> by using <emphasis>
+ <property>Browse</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Add Referenced Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_55.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the Referenced Bean section you should see your <emphasis>
+ <property>Referenced-Bean-Name</property>
+ </emphasis> and
+ <emphasis><property>Referenced-Bean-Class</property>.</emphasis>
+ Click on the link to open the Java creation
+ wizard.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Create Referenced Bean Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_56.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Java class will be created automatically. Leave
+ everything without changes and click <emphasis>
+ <property>Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_57.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open Referenced Bean class click again on <emphasis>
+ <property>Referenced-Bean-Class</property>
+ </emphasis> in the Referenced Bean section. Now you
+ are able to write business logic of Referenced Bean
+ in the Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Referenced Bean Class Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_58.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
\ No newline at end of file
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/favicon.ico
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/favicon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jbosstools_logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jbosstools_logo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_10.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_11.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_11.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_12.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_12.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_14.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_14.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_15.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_15.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_16.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_16.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_17.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_17.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_18.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_18.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_19.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_19.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_20_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_21.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_21.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_22.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_22.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_23.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_23.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24a.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24b.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24b.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24c.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24c.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24d.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_24d.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26a.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26b.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26b.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26c.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26c.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26d.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_26d.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_27.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_27.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_28.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_28.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_29.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_29.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_30.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_30.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_31.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_31.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_32.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_32.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_33.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_33.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_34.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_34.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_35.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_35.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_36.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_36.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_37.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_37.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_38.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_38.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_39.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_39.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_40.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_40.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_42.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_42.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_43.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_43.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_44.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_44.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_45.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_45.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_46.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_46.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_47.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_47.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_48.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_48.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_49.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_49.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_50.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_50.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_51.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_51.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_52.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_52.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_53.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_53.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_54.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_54.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_55.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_55.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_56.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_56.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_57.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_57.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_58.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_58.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_59.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_59.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_6.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_7.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_8.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_9.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/jsf_support/jsf_support_9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_6.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_7.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/jsf_tools_ref_guide/en-US/images/verif_valid/verif_valid_7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/introduction.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/introduction.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/introduction.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="introduction">
+ <?dbhtml filename="introduction.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>JSF Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <para>JSF Tools are especially designed for supporting JSF and JSF-related technologies. JSF
+ Tools provide extensible and exemplary tools for building JSF-based applications as well as
+ adding JSF capabilities to existing web projects, importing JSF projects and choosing any
+ JSF implementation while developing JSF application.</para>
+
+ <para>In this guide we provide you with the information on JSF tooling which allows you to
+ develop JSF applications much faster and with far fewer errors so sparing your time.</para>
+
+ <section id="jsf_key_features">
+ <title>Key Features of JSF Tools</title>
+
+ <para>Here, we provide you with a key functionality which is integrated in JSF tooling.</para>
+
+ <table>
+ <title>Key Functionality for JSF Tools</title>
+ <tgroup cols="3">
+
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <colspec colnum="3" colwidth="2*"/>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>JSF and Facelets support</entry>
+ <entry>Step-by-step wizards for creating new JSF and Facelets projects with a number of predefined templates, importing existing ones and adding JSF capabilities to non-jsf web projects.</entry>
+ <entry><link linkend="jsf_support">jsf support</link></entry>
+ </row>
+
+ <row>
+ <entry>Flexible and customizable project template management</entry>
+ <entry>Jump-start development with out-of-the-box templates or easily
+ customized templates for re-use.</entry>
+ <entry>
+ <link linkend="projects">projects</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for JSF Configuration File</entry>
+ <entry>Working on file using three modes: diagram, tree and source.
+ Synchronization between the modes and full control over the code. Easy
+ moving around the diagram using the Diagram Navigator.</entry>
+ <entry>
+ <link linkend="jsf_config_file"
+ >graphical editor for jsf</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for Managed Beans</entry>
+ <entry>Adding new managed beans, generating code for attributes, properties
+ and getter/setter methods.</entry>
+ <entry>
+ <link linkend="managed_beans">managed beans</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for Custom Converters and Validators</entry>
+ <entry>Fast creating of custom converters and validators with tree view of
+ faces-config.xml file.</entry>
+ <entry>
+ <link linkend="creation_and_registration">converters and validators</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Verification and Validation</entry>
+ <entry>All occuring errors will be immediately reported by verification
+ feature, no matter in what view you are working. Constant validation and
+ errors checking allows to catch many of the errors during development
+ process that significantly reduces development time.</entry>
+ <entry>
+ <link linkend="jsf_project_verification">verification and
+ validation</link>
+ </entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at<ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
+ </section>
+</chapter>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_config_file.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_config_file.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_config_file.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,436 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="jsf_config_file" role="updated">
+ <?dbhtml filename="jsf_config_file.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JSF Configuration File Editor</title>
+
+ <para>First, we should mention that JSF configuration file (<emphasis>
+ <property>faces-config.xml</property>
+ </emphasis>) is intended for registering JSF application resources such as Converters,
+ Validators, Managed Beans and page-to-page navigation rules.</para>
+ <para>Now, let's look at how you can easily configure this file by means of a special
+ graphical editor for JSF configuration file. The editor has three main views:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Diagram</para>
+ </listitem>
+ <listitem>
+ <para>Tree</para>
+ </listitem>
+ <listitem>
+ <para>Source</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>They can be selected via the tabs at the bottom of the editor.</para>
+
+ <section id="Diagram9553">
+
+ <title>Diagram view</title>
+
+ <para>Here, we will show you how to work with JSF configuration file through the Diagram
+ view of the editor.</para>
+ <para>As you can see on the figure below, the Diagram view displays the navigation rules in
+ the faces-config.xml:</para>
+ <figure>
+ <title>Diagram View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_21.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If your diagram is large, make use of the Outline view. Within it you can switch to a <emphasis>
+ <property>Diagram Navigator</property>
+ </emphasis> mode by selecting the middle icon at the top of the view window. It allows
+ you to easily move around the diagram. Just move the blue area in any direction, and the
+ diagram on the left will also move:</para>
+ <figure>
+ <title>Outline View for Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_32.png" scale="50"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To create a new page here, you should click the page icon (View Template) on the
+ toolbar from the left and then click anywhere on the diagram. A New Page Wizard will
+ appear.</para>
+
+ <para>To create a transition for connecting pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select the transition icon from the toolbar (New Connection).</para>
+ </listitem>
+ <listitem>
+ <para>Click the source page.</para>
+ </listitem>
+ <listitem>
+ <para>Click the target page.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>A transition will appear between the two pages:</para>
+ <figure>
+ <title>Transition between JSP Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_22.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It is also possible to create a new page with context menu by right-clicking anywhere
+ on the diagram and selecting <emphasis>
+ <property>New View</property>. </emphasis></para>
+ <figure>
+ <title>Creating a New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_23.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To edit an existing transition, first select the transition line. Then, place the
+ mouse cursor over the last black dot (on the target page). The mouse cursor will change
+ to a big +. At this point, drag the line to a new target page:</para>
+ <figure>
+ <title>Editing Transition between Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="TreeView11123" role="updated">
+
+ <title>Tree View</title>
+
+ <para>You can find it more convenient to edit your JSF Configuration file in the Tree view of
+ the <property>VPE</property>.</para>
+
+ <para>The view displays all JSF application artifacts referenced in the configuration file
+ in a tree format. By selecting any node on the left, you can see and edit its properties
+ which will appear in the right-hand area. Let's look at the structure of this
+ tree more closely.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property>Application</property>
+ </emphasis> node you can adjust JSF application specific settings such as
+ internationalization, possibility to set extensions, add property and variable
+ resolvers, etc.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>JSF Application Specific Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property>Components</property>
+ </emphasis> node is for registering custom JSF components. Right-click and
+ choose <emphasis>
+ <property>New > Component</property>
+ </emphasis> or just press the <emphasis>
+ <property>Add</property>
+ </emphasis> button in the right-hand area to add a new component to the JSF
+ Configuration file.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Registering a New JSF Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the <property>Add Component wizard</property> you should set a component
+ type and point to a component class by using the <emphasis>
+ <property>Browse</property>
+ </emphasis> button or create a new class for this component by using the <emphasis>
+ <property>Component-Class</property>
+ </emphasis> link.</para>
+
+ <figure>
+ <title>Adding a New JSF Component to the JSF Configuration File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24c.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Use the <emphasis>
+ <property>Render Kit</property>
+ </emphasis> node to create and register a set of related renderers for custom
+ JSF components.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Adding a New JSF Component to the JSF Configuration File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24d.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property>Converters</property>
+ </emphasis> node you can create a converter class for your JSF application
+ either with id or for a proper class. How to do that see the <link
+ linkend="CreateAndRegisterACustomConverter94230">Create and Register a
+ Custom Converter</link> section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Creating a New Custom Converter</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_59.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property>Managed Bean</property>
+ </emphasis> node is meant for creating and registering Bean classes in your JSF
+ application. Read more on the topic in the <link linkend="managed_beans">Managed
+ Beans</link> chapter.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Managed Beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Use the <emphasis>
+ <property>Navigation Rules</property>
+ </emphasis> node to configure a navigation between the pages in your
+ application: create a new navigation rule and adjust necessary properties for it
+ in the right-hand area.</para>
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <title>Tip:</title>
+ <para>The same you can do in the <link linkend="Diagram9553">Diagram view</link> of the
+ JSF Configuration file editor.</para>
+ </tip>
+
+ <figure>
+ <title>Configuring Navigation Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property>Referenced Beans</property>
+ </emphasis> node you can add a new Referenced Bean and configure various
+ properties for it. To learn more on this refer to the <link
+ linkend="referenced_beans">Create and Register Referenced Beans</link>
+ section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Referenced Beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property>Validators</property>
+ </emphasis> node is needed to create validator classes for organizing the
+ validation of your application data. You can read more on the topic in the <link
+ linkend="CreateAndRegisterACustomValidator5632">Create and Register a Custom
+ Validator</link> section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Validators</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26c.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property>Extensions</property>
+ </emphasis> node is for setting extensions for your <emphasis>
+ <property>faces-config.xml</property>.</emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Adding Extensions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26d.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the <property>Tree view</property> you can also edit the properties of the selected
+ element with the help of the <property>Properties view</property> as shown below:</para>
+
+ <figure>
+ <title>Properties View </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_33.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="SourceView4643">
+
+ <title>Source View</title>
+
+ <para>Here, we'll discuss how you can configure your faces-config.xml with the help
+ of Source View.</para>
+ <para>The Source view for the editor displays a text content of the JSF configuration file.
+ It is always synchronized with other two views, so any changes made in one of the views
+ will immediately appear in the other:</para>
+ <figure>
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_27.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You can also work in the Source view with the help of the <emphasis>
+ <property>Outline view</property>.</emphasis> The Outline view shows a tree
+ structure of the JSF configuration file. Simply select any element in the Outline view,
+ and it will jump to the same place in the Source editor, so you can navigate through the
+ source code with Outline view.</para>
+ <figure>
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_31.png" scale="50"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="jsf_editor_features">
+ <title>Editor Features</title>
+ <para>Here we'll discuss a very important features that JSF configuration file
+ editor provides for work with JSF resources.</para>
+
+ <section id="jsf_openOn">
+ <title>Open On</title>
+ <para>The JSF configuration file editor comes with a very useful OpenOn navigating
+ feature. More fully you can read about it in our Visual Web Tools
+ Guide.</para>
+ </section>
+
+ <section id="ContentAssist976">
+
+ <title>Code Assist</title>
+ <para>Code Assist provides pop-up tip to help you complete your code statements. It
+ allows you to write your code faster and with more accuracy.</para>
+ <para>Code assist is always available in the Source mode:</para>
+ <figure>
+ <title>Code Assist in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_28.png" scale="65"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="ErrorReporting3324">
+
+ <title>Error Reporting</title>
+ <para>When you are developing your project, error checking is constantly provided. This
+ greatly reduces your development time as it allows you to catch many of the errors
+ during development.</para>
+ <para>Errors will be reported by <link linkend="jsf_project_verification">
+ verification</link> facility:</para>
+ <figure>
+ <title>Error Reporting in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_29.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Other errors are also reported.</para>
+ <figure>
+ <title>Other Errors Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_30.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+</chapter>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_project_verification.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_project_verification.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_project_verification.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="jsf_project_verification">
+ <?dbhtml filename="struts_project_verification.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JSF Project Verification</title>
+
+ <para>In this chapter we'll discuss a possible verification that you can take advantage
+ of.</para>
+ <!-- JBoss Developer Studio checks for many different rules for a JSF project -->
+ <para>Many different rules are checked for a JSF project that can be configured by selecting <emphasis>
+ <property>Window > Preferences</property>
+ </emphasis> from the menu bar, selecting <emphasis>
+ <property>JBoss Tools > Web > Verification</property>
+ </emphasis> from the Preferences dialog box and then expanding the JSF Rules node.</para>
+ <figure>
+ <title>JSF Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Suppose you are working in the Source viewer for a JSF configuration file as shown below:</para>
+ <figure>
+ <title>Faces-config.xml File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>While typing a class name, you might make a minor typo (like <emphasis role="italic">
+ <property>"jsfHello.PersonBean9"</property>
+ </emphasis> instead of <emphasis role="italic">
+ <property>"jsfHello.PersonBean"</property>
+ </emphasis>). After saving the file, verification checks to make sure everything is correct
+ and finds the error below:</para>
+ <figure>
+ <title>Error in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_3.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Notice that the Package Explorer View shows a marked folder and a marked file where the
+ error is.</para>
+ <para>You can place the cursor over the line with an error message and get a detailed error
+ message:</para>
+ <figure>
+ <title>Error Message</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Verification also checks navigation rules:</para>
+ <figure>
+ <title>Checking Navigation Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If you provide a page name that does not exist, verification will let you know about that:</para>
+ <figure>
+ <title>Page Name Verification</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_6.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can always call up verification explicitly by right-clicking any element in the tree
+ and selecting Verify from the context menu. This works from both the Tree and Diagram
+ viewers for the JSF configuration file editor. You can also invoke verification from the Web
+ Projects view. Below we are checking all of the elements in the configuration file.</para>
+ <figure>
+ <title>Verify Command</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In summary, this document highlights all the JSF-specific features of <property>JBoss Tools</property>
+ meant for enhancing the development of rich Web applications based on JSF technology. The
+ reference introduces you to wizards for creating and importing JSF projects, JSF
+ Configuration File editor features, functionality for enabling JSF capabilities and etc.</para>
+
+ <para>If you have questions or good suggestions, please refer to <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
+ Tools Forum</ulink>.</para>
+</chapter>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_support.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_support.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/jsf_support.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="jsf_support">
+ <?dbhtml filename="jsf_support.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JavaServer Faces Support</title>
+
+ <para>We don't lock you into any one <property>JavaServer
+ Faces</property> implementation. You can always select the one which is
+ necessary for you while <link linkend="new_jsf_project">creating a new JSF
+ project</link>, <link linkend="add_jsf_capability">adding JSF capability</link> to
+ any existing Eclipse project or <link linkend="ImportingExsJSFProjWithAnyStr74447"
+ >importing existing JSF projects</link> as well.</para>
+ <para>At this point the special wizard will prompt you to specify a proper JSF environment.
+ It may be JSF 1.1.02 RI or JSF 1.2 which integrates a number of new features and
+ changes. The wizard also lets you select JSF implementation with a component
+ orientation such as JSF 1.2 with Facelets or MyFaces 1.1.4.</para>
+
+ <figure>
+ <title>Choosing JSF Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After specifying a proper JSF environment all the required libraries for the selected
+ version will be added to your project.</para>
+
+ <section id="FaceletsSupport865">
+
+ <title>Facelets Support</title>
+ <para>In this section we will focus more on all concepts that are integrated for
+ working with Facelets.</para>
+
+ <para>The Facelets extends JavaServer Faces by providing a lightweight framework
+ that radically simplifies the design of presentation pages for JSF. Facelets can be used in a variety of ways that we
+ will consider further in this section.</para>
+
+ <section>
+ <title>Facelets templates</title>
+ <para>If you want to build an application using Facelets, just create a
+ project with Facelets based on version 1.2 of the JSF Reference
+ Implementation, i. e. select the <emphasis>
+ <property>JSF 1.2 with Facelets</property>
+ </emphasis> in the JSF Environment section of the New JSF Project
+ wizard.</para>
+
+ <figure>
+ <title>Choosing Facelets Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_2.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once you've selected the environment, it's possible
+ to specify the one of three available templates:</para>
+ <figure>
+ <title>Choosing Facelets Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_3.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The following table lists possible templates with Facelets for any JSF
+ project and gives a proper description for each one.</para>
+ <table>
+ <title>Facelets Templates</title>
+ <tgroup cols="2">
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="3*"/>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Template</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property>FaceletsBlankWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>Some servers already provide
+ jsf libs and you take risk
+ of getting conflicting
+ libraries while deploying
+ your project. To avoid such
+ conflicts, use a template
+ without libs if you have a
+ server with its own jsf
+ libraries</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property>FaceletsKickStartWithRILibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>A sample application with
+ Facelets that is ready to
+ run</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property>FaceletsKickStartWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>A sample application without
+ libraries</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Facelets components</title>
+
+ <para>The JBoss Tools
+ Palette comes with the Facelets components ready to
+ use. A useful tip appears when you hover the mouse cursor over the
+ tag, the tip includes a detailed description of the tag component,
+ the syntax and available attributes.</para>
+
+ <!-- JBoss Developer Studio does not provide templates for MyFaces right out of the box, but you can easily do it
+ yourself with the "Save As Template" feature (available on the File submenu). Just create a small project
+ with MyFaces and Facelets and then save it as a template for future use.
+
+ How can I add Facelets support to an existing project?</para>
+ <para>A: Right-click on the folder of existing project and select <emphasis>JBoss Tools > Add Custom Capabilities.. > Facelets</emphasis>. </para>
+ -->
+ <figure>
+ <title>Facelets Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_4.png"
+ scale="65"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Code assist for Facelets</title>
+
+ <para>One more feature which comes with Facelets support is code assist
+ (Ctrl + Space). It is available for <property>Facelets
+ tags</property> while editing <emphasis>
+ <property>.xhtml</property>
+ </emphasis> files.</para>
+
+ <figure>
+ <title>XHTML File Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_5.png"
+ scale="60"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>What's more, code assist is also available for <emphasis
+ role="italic">
+ <property>"jsfc"</property>
+ </emphasis> attribute in any HTML tag.</para>
+
+ <figure>
+ <title>Code Assist for JSFC Attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_6.png"
+ scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After selecting <emphasis role="italic">
+ <property>"jsfc"</property>
+ </emphasis> you get the code assist for JSF components available on
+ a page.</para>
+
+ <figure>
+ <title>Code Assist for JSF Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_7.png"
+ scale="80"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When a component is chosen you will see all available attributes for
+ it.</para>
+
+ <figure>
+ <title>Available Attributes for the Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_8.png"
+ scale="80"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Open On feature</title>
+ <para>Finally, Eclipse's <emphasis>
+ <property>OpenOn</property>
+ </emphasis> feature for editing Facelets files is supported. Using this feature,
+ you can easily navigate between the <property>Facelets
+ templates</property> and other parts of your projects. Just by
+ holding down the Control key while hovering the mouse cursor over a
+ reference to a template, the reference becomes a hyperlink to open
+ that template.</para>
+
+
+ <figure>
+ <title>Template Hyperlink</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_9.png"
+ scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!-- <para>Additionally, when hovering the mouse cursor over <emphasis role="italic"><property>"Facelets tag"</property></emphasis> attributes, JBoss Developer Studio provides a pop-up help tip:</para>
+ <figure>
+<title>Pop-up Help Tip for Facelets Tag Attributes</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/defaultImage.png"/>
+ </imageobject>
+</mediaobject>
+ </figure>
+
+ -->
+ <!-- <para>See <link linkend="faq_facelets">FAQ</link> concerning Facelets
+ support.</para>
+ -->
+ </section>
+
+ <!--section>
+ <title>Relevant Resources Links</title>
+ <para>Necessary information and support for Facelets find out <ulink
+ url="https://facelets.dev.java.net/"
+ >here</ulink>.</para>
+ </section-->
+ </section>
+
+
+
+
+
+
+
+
+
+
+ <!--section>
+ <title>Relevant Resources Links</title>
+ <para>If you don't familiar with <ulink
+ url="http://java.sun.com/javaee/javaserverfaces/">JSF
+ technology</ulink>, we suggest that you walk through the
+ information on the topic.</para>
+ </section-->
+</chapter>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/managed_beans.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/managed_beans.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/managed_beans.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="managed_beans">
+ <?dbhtml filename="managed_beans.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Managed Beans</title>
+
+ <para>There is lots of power to work with <property>managed beans</property>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add and generate code for new managed beans</para>
+ <itemizedlist>
+ <listitem>
+ <para>Generate code for attributes and getter/setter methods</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Add existing managed beans to JSF configuration file</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Thus, in this section we will guides you through all this possibilities.</para>
+
+ <section id="CodeGenerationForManagedBeans421">
+
+ <title>Code Generation for Managed Beans</title>
+
+ <para>To start, create a new managed bean in JSF configuration file editor, in the Tree
+ view.</para>
+ <figure>
+ <title>Creation of New Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_34.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>When you define a new managed bean, make sure that <emphasis>
+ <property>Generate Source Code</property>
+ </emphasis> is checked as shown in the figure below.</para>
+ </note>
+ <figure>
+ <title>New Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_35.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After the <emphasis role="italic">
+ <property>"Java"</property>
+ </emphasis> class has been generated you can open it for additional editing. There are
+ two ways to open the <emphasis role="italic">
+ <property>"Java"</property>
+ </emphasis> class:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>click on <emphasis>
+ <property>Managed-Bean-Class</property>
+ </emphasis> link in the editor</para>
+ </listitem>
+ </itemizedlist>
+ <para>or</para>
+ <itemizedlist>
+ <listitem>
+ <para>right click the <emphasis>
+ <property>managed bean</property>
+ </emphasis> and select <emphasis>
+ <property>Open Source</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Opening of Created Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_36.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The generated Java source should look as follows:</para>
+
+ <figure>
+ <title>Java Source Code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_37.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also generate source code for properties, also includes <emphasis
+ role="italic">
+ <property>"getter"</property>
+ </emphasis> and <emphasis role="italic">
+ <property>"setter"</property>
+ </emphasis> methods. Right click on the bean and select <emphasis>
+ <property>New > Property</property>
+ </emphasis>. You will see <property>Add Property</property> dialog.</para>
+ <figure>
+ <title>Generation of Source Code for Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_38.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the form is open make sure that all the check boxes are selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add Java property</para>
+ </listitem>
+ <listitem>
+ <para>Generate Getter</para>
+ </listitem>
+ <listitem>
+ <para>Generate Setter</para>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <figure>
+ <title>"Add Property" Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_39.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once the generation is complete, you can open the file and see the added property with
+ <emphasis role="italic">
+ <property>"get"</property>
+ </emphasis> and <emphasis role="italic">
+ <property>"set"</property>
+ </emphasis> methods:</para>
+ <figure>
+ <title>Generated Java Source Code for Property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_40.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus, we've discussed everything which comes to creating a new Managed Bean.
+ The next section will show you how to add an existing Bean into a JSF configuration
+ file.</para>
+ </section>
+ <section id="AddExistingJavaBeansToAJSFConfigurationFile74332">
+
+ <title>Add Existing Java Beans to a JSF Configuration File</title>
+ <para>If you already have a Java bean you can easily add it to a <property>JSF configuration
+ file</property>.</para>
+ <para>You should start the same way you create a new managed bean. Use the <emphasis>
+ <property>Browse...</property>
+ </emphasis> button to add your existing Java class.</para>
+ <figure>
+ <title>New Managed Bean Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_42.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once the class is set, its <emphasis>
+ <property>Name</property>
+ </emphasis> will be set as well. But you can easily substitute it for the other one.
+ Notice that <emphasis>
+ <property>Generate Source Code</property>
+ </emphasis> option is not available as the <emphasis role="italic">
+ <property>"Java"</property>
+ </emphasis> class already exists. </para>
+ <para>After adding your class <emphasis>
+ <property>Next</property>
+ </emphasis> button will be activated. Pressing it you'll get <emphasis>
+ <property>Managed Properties</property>
+ </emphasis> dialog where all corresponding properties are displayed. Check the necessary
+ ones to add them into your <property>JSF Configuration File</property>.</para>
+
+ <figure>
+ <title>Selection of Bean's Properties.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_43.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you don't want to add any, just click <emphasis>
+ <property>Finish</property>. </emphasis></para>
+ <para>Above-listed steps have demonstrated how you can specify an existing Bean in the JSF
+ configuration file, i.e. <emphasis>
+ <property>faces-config.xml</property>. </emphasis> In the next chapter
+ you'll know how to organize and register another kind of artifacts.</para>
+ </section>
+</chapter>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/master.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/master.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/master.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[
+<!ENTITY introduction SYSTEM "introduction.xml">
+<!ENTITY jsf_support SYSTEM "jsf_support.xml">
+<!ENTITY projects SYSTEM "projects.xml">
+<!ENTITY webxml_editor SYSTEM "webxml_editor.xml">
+<!ENTITY jsf_config_file SYSTEM "jsf_config_file.xml">
+<!ENTITY managed_beans SYSTEM "managed_beans.xml">
+<!ENTITY creation_and_registration SYSTEM "creation_and_registration.xml">
+<!ENTITY jsf_project_verification SYSTEM "jsf_project_verification.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
+
+
+]>
+<book>
+ <bookinfo>
+ <title>JSF Tools Reference Guide</title>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata format="PNG" fileref="images/jbosstools_logo.png" />
+ </imageobject>
+ <imageobject role="html">
+ <imagedata/>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 3.1.0.GA
+ </releaseinfo>
+
+<abstract>
+ <title/>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf_tools_ref_guide/...">PDF version</ulink>
+ </para>
+</abstract>
+
+ </bookinfo>
+
+ <toc/>
+
+ &introduction;
+ &jsf_support;
+ &projects;
+ &webxml_editor;
+ &jsf_config_file;
+ &managed_beans;
+ &creation_and_registration;
+ &jsf_project_verification;
+</book>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/master_output.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/master_output.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/master_output.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,1987 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[
+<!ENTITY introduction SYSTEM "introduction.xml">
+<!ENTITY jsf_support SYSTEM "jsf_support.xml">
+<!ENTITY projects SYSTEM "projects.xml">
+<!ENTITY webxml_editor SYSTEM "webxml_editor.xml">
+<!ENTITY jsf_config_file SYSTEM "jsf_config_file.xml">
+<!ENTITY managed_beans SYSTEM "managed_beans.xml">
+<!ENTITY creation_and_registration SYSTEM "creation_and_registration.xml">
+<!ENTITY jsf_project_verification SYSTEM "jsf_project_verification.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
+
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>JSF Tools Reference Guide</title>
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 3.1.0.GA
+ </diffmk:wrapper></releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf_tools_ref_guide/...">PDF version</ulink>
+ </para>
+</abstract>
+
+ </bookinfo>
+
+ <toc></toc>
+
+
+<chapter id="introduction" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml">
+ <?dbhtml filename="introduction.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>JSF Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <para>JSF Tools are especially designed for supporting JSF and JSF-related technologies. JSF
+ Tools provide extensible and exemplary tools for building JSF-based applications as well as
+ adding JSF capabilities to existing web projects, importing JSF projects and choosing any
+ JSF implementation while developing JSF application.</para>
+
+ <para>In this guide we provide you with the information on JSF tooling which allows you to
+ develop JSF applications much faster and with far fewer errors so sparing your time.</para>
+
+ <section id="jsf_key_features">
+ <title>Key Features of JSF Tools</title>
+
+ <para>Here, we provide you with a key functionality which is integrated in JSF tooling.</para>
+
+ <table>
+ <title>Key Functionality for JSF Tools</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+ <colspec colnum="3" colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>JSF and Facelets support</entry>
+ <entry>Step-by-step wizards for creating new JSF and Facelets projects with a number of predefined templates, importing existing ones and adding JSF capabilities to non-jsf web projects.</entry>
+ <entry><link linkend="jsf_support">jsf support</link></entry>
+ </row>
+
+ <row>
+ <entry>Flexible and customizable project template management</entry>
+ <entry>Jump-start development with out-of-the-box templates or easily
+ customized templates for re-use.</entry>
+ <entry>
+ <link linkend="projects">projects</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for JSF Configuration File</entry>
+ <entry>Working on file using three modes: diagram, tree and source.
+ Synchronization between the modes and full control over the code. Easy
+ moving around the diagram using the Diagram Navigator.</entry>
+ <entry>
+ <link linkend="jsf_config_file">graphical editor for jsf</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for Managed Beans</entry>
+ <entry>Adding new managed beans, generating code for attributes, properties
+ and getter/setter methods.</entry>
+ <entry>
+ <link linkend="managed_beans">managed beans</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Support for Custom Converters and Validators</entry>
+ <entry>Fast creating of custom converters and validators with tree view of
+ faces-config.xml file.</entry>
+ <entry>
+ <link linkend="creation_and_registration">converters and validators</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Verification and Validation</entry>
+ <entry>All occuring errors will be immediately reported by verification
+ feature, no matter in what view you are working. Constant validation and
+ errors checking allows to catch many of the errors during development
+ process that significantly reduces development time.</entry>
+ <entry>
+ <link linkend="jsf_project_verification">verification and
+ validation</link>
+ </entry>
+
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at<ulink url="http://docs.jboss.org/tools/">http://docs.jboss.org/tools</ulink> in the corresponding release directory.</para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">http://download.jboss.org/jbosstools/nightly-docs</ulink>.</para>
+ </section>
+</chapter>
+
+
+<chapter id="jsf_support" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_support.xml">
+ <?dbhtml filename="jsf_support.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JavaServer Faces Support</title>
+
+ <para>We don't lock you into any one <property moreinfo="none">JavaServer
+ Faces</property> implementation. You can always select the one which is
+ necessary for you while <link linkend="new_jsf_project">creating a new JSF
+ project</link>, <link linkend="add_jsf_capability">adding JSF capability</link> to
+ any existing Eclipse project or <link linkend="ImportingExsJSFProjWithAnyStr74447">importing existing JSF projects</link> as well.</para>
+ <para>At this point the special wizard will prompt you to specify a proper JSF environment.
+ It may be JSF 1.1.02 RI or JSF 1.2 which integrates a number of new features and
+ changes. The wizard also lets you select JSF implementation with a component
+ orientation such as JSF 1.2 with Facelets or MyFaces 1.1.4.</para>
+
+ <figure float="0">
+ <title>Choosing JSF Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After specifying a proper JSF environment all the required libraries for the selected
+ version will be added to your project.</para>
+
+ <section id="FaceletsSupport865">
+
+ <title>Facelets Support</title>
+ <para>In this section we will focus more on all concepts that are integrated for
+ working with Facelets.</para>
+
+ <para>The Facelets extends JavaServer Faces by providing a lightweight framework
+ that radically simplifies the design of presentation pages for JSF. Facelets can be used in a variety of ways that we
+ will consider further in this section.</para>
+
+ <section>
+ <title>Facelets templates</title>
+ <para>If you want to build an application using Facelets, just create a
+ project with Facelets based on version 1.2 of the JSF Reference
+ Implementation, i. e. select the <emphasis>
+ <property moreinfo="none">JSF 1.2 with Facelets</property>
+ </emphasis> in the JSF Environment section of the New JSF Project
+ wizard.</para>
+
+ <figure float="0">
+ <title>Choosing Facelets Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once you've selected the environment, it's possible
+ to specify the one of three available templates:</para>
+ <figure float="0">
+ <title>Choosing Facelets Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The following table lists possible templates with Facelets for any JSF
+ project and gives a proper description for each one.</para>
+ <table>
+ <title>Facelets Templates</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Template</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property moreinfo="none">FaceletsBlankWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>Some servers already provide
+ jsf libs and you take risk
+ of getting conflicting
+ libraries while deploying
+ your project. To avoid such
+ conflicts, use a template
+ without libs if you have a
+ server with its own jsf
+ libraries</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property moreinfo="none">FaceletsKickStartWithRILibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>A sample application with
+ Facelets that is ready to
+ run</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property moreinfo="none">FaceletsKickStartWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>A sample application without
+ libraries</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Facelets components</title>
+
+ <para>The <ulink url="../../jsf/html_single/index.html#palette">JBoss Tools
+ Palette</ulink> comes with the Facelets components ready to
+ use. A useful tip appears when you hover the mouse cursor over the
+ tag, the tip includes a detailed description of the tag component,
+ the syntax and available attributes.</para>
+
+ <!-- JBoss Developer Studio does not provide templates for MyFaces right out of the box, but you can easily do it
+ yourself with the "Save As Template" feature (available on the File submenu). Just create a small project
+ with MyFaces and Facelets and then save it as a template for future use.
+
+ How can I add Facelets support to an existing project?</para>
+ <para>A: Right-click on the folder of existing project and select <emphasis>JBoss Tools > Add Custom Capabilities.. > Facelets</emphasis>. </para>
+ -->
+ <figure float="0">
+ <title>Facelets Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_4.png" scale="65"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Code assist for Facelets</title>
+
+ <para>One more feature which comes with Facelets support is code assist
+ (Ctrl + Space). It is available for <property moreinfo="none">Facelets
+ tags</property> while editing <emphasis>
+ <property moreinfo="none">.xhtml</property>
+ </emphasis> files.</para>
+
+ <figure float="0">
+ <title>XHTML File Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_5.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>What's more, code assist is also available for <emphasis role="italic">
+ <property moreinfo="none">"jsfc"</property>
+ </emphasis> attribute in any HTML tag.</para>
+
+ <figure float="0">
+ <title>Code Assist for JSFC Attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_6.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After selecting <emphasis role="italic">
+ <property moreinfo="none">"jsfc"</property>
+ </emphasis> you get the code assist for JSF components available on
+ a page.</para>
+
+ <figure float="0">
+ <title>Code Assist for JSF Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_7.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When a component is chosen you will see all available attributes for
+ it.</para>
+
+ <figure float="0">
+ <title>Available Attributes for the Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_8.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section>
+ <title>Open On feature</title>
+ <para>Finally, Eclipse's <emphasis>
+ <property moreinfo="none">OpenOn</property>
+ </emphasis> feature for editing Facelets files is supported. Using this feature,
+ you can easily navigate between the <property moreinfo="none">Facelets
+ templates</property> and other parts of your projects. Just by
+ holding down the Control key while hovering the mouse cursor over a
+ reference to a template, the reference becomes a hyperlink to open
+ that template.</para>
+
+
+ <figure float="0">
+ <title>Template Hyperlink</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_9.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!-- <para>Additionally, when hovering the mouse cursor over <emphasis role="italic"><property>"Facelets tag"</property></emphasis> attributes, JBoss Developer Studio provides a pop-up help tip:</para>
+ <figure>
+<title>Pop-up Help Tip for Facelets Tag Attributes</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/defaultImage.png"/>
+ </imageobject>
+</mediaobject>
+ </figure>
+
+ -->
+ <!-- <para>See <link linkend="faq_facelets">FAQ</link> concerning Facelets
+ support.</para>
+ -->
+ </section>
+
+ <!--section>
+ <title>Relevant Resources Links</title>
+ <para>Necessary information and support for Facelets find out <ulink
+ url="https://facelets.dev.java.net/"
+ >here</ulink>.</para>
+ </section-->
+ </section>
+
+
+
+
+
+
+
+
+
+
+ <!--section>
+ <title>Relevant Resources Links</title>
+ <para>If you don't familiar with <ulink
+ url="http://java.sun.com/javaee/javaserverfaces/">JSF
+ technology</ulink>, we suggest that you walk through the
+ information on the topic.</para>
+ </section-->
+</chapter>
+
+
+<chapter id="projects" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml">
+ <?dbhtml filename="projects.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Projects</title>
+ <para>To take an advantage of JSF firstly you should perform one of the next steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create new JSF projects</para>
+ </listitem>
+ <listitem>
+ <para>Import (open) existing JSF projects</para>
+ </listitem>
+ <listitem>
+ <para>Add JSF capability to any existing Eclipse project</para>
+ </listitem>
+ <listitem>
+ <para>Import and add JSF capability to any existing project created outside
+ Eclipse.</para>
+ </listitem>
+ </itemizedlist>
+ <para>In this section we're going to stop on each of them in detail.</para>
+
+ <section id="new_jsf_project">
+
+ <title>Creating a New JSF Project</title>
+
+ <para>If you want your project to already contain all JSF libraries, tag libraries
+ and JSF configuration file, just organize a new brand JSF project. It is
+ possible to do this easily with the help of the special wizard. To get it, select<emphasis>
+ <property moreinfo="none"> File > New > Project > JBoos Tools
+ Web > JSF > JSF Project</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Next</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Choosing a JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next form you'll be prompted to enter <property moreinfo="none">Project
+ Name</property> and select a location for the project or just leave
+ a default path.</para>
+ <para>Here, JSF Version also allows you to select which JSF implementation to
+ use.</para>
+ <figure float="0">
+ <title>Creating a New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>There is a number of predefined project templates that are flexible and easily
+ customizable. Thus you can pick a different template on which the projects
+ Importing Existing should be based on. Almost all templates come in two
+ variations: with jsf libraries and without ones.</para>
+ <figure float="0">
+ <title>Choosing JSF Templates</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_12.png "></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The table below provides description for each possible JSF template.</para>
+ <table>
+ <title>JSF Project Templates</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Template</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property moreinfo="none">JSFBlankWithLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>This template will create a standard Web
+ project structure with all JSF capabilities</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property moreinfo="none">JSFKickStartWithLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>This template will create a standard Web
+ project structure but will also include a sample
+ application that is ready to run</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property moreinfo="none">JSFKickStartWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>Some servers already provide jsf libs and
+ you take risk of getting conflicting libraries
+ while deploying your project. To avoid such
+ conflicts, use a template without libs if you have
+ a server with its own jsf libraries</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <!-- <para>You can of course create your own custom templates. More information
+ on templates creation could be found in <link
+ linkend="CreatingCustomJSPTemplates">Chapter 5</link>.</para>
+ -->
+
+ <para>On the next screen select what <emphasis>
+ <property moreinfo="none">Servlet version</property>
+ </emphasis> to use and whether to register this application with JBoss AS
+ (or other server) for running and testing your application.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Context Path</property>
+ </emphasis> is the name under which the application will be deployed.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Runtime</property>
+ </emphasis> value tells Eclipse where to find Web libraries in order to
+ build (compile) the project. It is not possible to finish project creation
+ without selecting Runtime. If you don't have any values, select <emphasis>
+ <property moreinfo="none">New...</property>
+ </emphasis> to add new Runtime.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Target Server</property>
+ </emphasis> allows you specifying whether to deploy the application. The
+ Target Server corresponds to the Runtime value selected above. If you
+ don't want to deploy the application, uncheck this value.</para>
+ <figure float="0">
+ <title>Registering the Project on Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When you are all done, you should have the project that has been appeared in
+ the Package Explorer view:</para>
+ <figure float="0">
+ <title>A New Project in the Package Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>At this point you can open <emphasis>
+ <property moreinfo="none">faces-config.xml</property>
+ </emphasis> and start working on your application. There are a lot of
+ features to develop JSF applications. We will describe the features
+ further.</para>
+ </section>
+
+ <section id="ImportingExsJSFProjWithAnyStr74447">
+
+ <title>Importing Existing JSF Projects with Any Structure</title>
+
+ <para>For detailed information on migration of JSF projects into a workspace see
+ <ulink url="../../Exadel-migration/html_single/index.html#jsf_struts">Migration
+ Guide</ulink>.</para>
+
+ </section>
+ <section id="add_jsf_capability">
+
+ <title>Adding JSF Capability to Any Existing Eclipse Project</title>
+
+ <para>It's also possible to add <property moreinfo="none">JSF capability</property> (JSF
+ libraries, tag libraries) to any existing Eclipse project in your workspace.
+ After that you'll be able to make use of such editors as JSF
+ configuration editor, JBoss Tools JSP editor and any others.</para>
+ <para>Right click the project and select <emphasis>
+ <property moreinfo="none">JBoss Tools > Add JSF Capabilities</property>. </emphasis>
+ This will start the process of adding all necessary libraries, files to make
+ this a Web JSF project.</para>
+ <figure float="0">
+ <title>Adding JSF Capabilities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The wizard will first ask you to show the <emphasis>
+ <property moreinfo="none">web.xml</property>
+ </emphasis> file location and the project name.</para>
+ <figure float="0">
+ <title>Project Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On the last form you can set the different folders for your project as well as
+ register this application with a servlet container.</para>
+
+ <para>Make sure to select <emphasis>
+ <property moreinfo="none">Add Libraries</property>
+ </emphasis> to add all required JSF related libraries to this
+ project.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Context Path</property>
+ </emphasis> is the name under which the application will be deployed.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Runtime</property>
+ </emphasis> value tells Eclipse where to find Web libraries in order to
+ build (compile) the project. It is not possible to finish project import
+ without selecting Runtime. If you don't have any values, select <emphasis>
+ <property moreinfo="none">New...</property>
+ </emphasis> to add new Runtime.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Target Server</property>
+ </emphasis> allows you to specify whether to deploy the application. The
+ Target Server corresponds to the Runtime value selected above. If you
+ don't want to deploy the application, uncheck this value.</para>
+ <figure float="0">
+ <title>Project Folders</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once your project is imported you can see that JSF related libraries have been
+ added to your project: <emphasis>
+ <property moreinfo="none">jsf-api.jar</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">jsf-impl.jar</property>
+ </emphasis>.</para>
+ <note>
+ <title>Note:</title>
+ <para>Some application servers provide their own jsf implementation
+ libraries. Thus, to avoid conflicts you should not add jsf libraries
+ while adding jsf capabilities.</para>
+ </note>
+ <para>You are now ready to work with JSF by creating a new JSF configuration
+ file:</para>
+
+
+ <figure float="0">
+ <title>Creating a New JSF Configuration File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once the file has been created, it should be opened in a special <link linkend="jsf_config_file">Faces Config Editor</link>.</para>
+ </section>
+ <section id="AddingYourOwnProjectTemplates853">
+
+ <title>Adding Your Own Project Templates</title>
+ <para>Template is a set of files that is served as a basis to facilitate the
+ creation of a new project. Project templates provide content and structure
+ for a project.</para>
+ <para>There is a powerful templating capability for creating new and importing
+ existing Struts and JSF projects. This templating facility has a variety of
+ aspects to consider. But, let's start with the most straightforward
+ case and consider the process of creating a template from your existing JSF
+ project.</para>
+
+ <para>Let's say you have a project that you want to use as the basis for a
+ new <property moreinfo="none">template</property>. Follow these steps to make a template out
+ of it:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Web Projects view, right-click the project and select <emphasis>
+ <property moreinfo="none">JBoss Tools JSF > Save As
+ Template</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Saving Your Project as Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the first dialog box, you can choose a name for the
+ template (defaults to the project name) and confirm what
+ run-time implementation of the project technology will be
+ used</para>
+ </listitem>
+
+ </itemizedlist>
+ <figure float="0">
+ <title>Define Template Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_20_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> and you will be sent to a dialog box with your
+ project structure displayed with check boxes. Here you can
+ check only those parts and files in your project directory
+ that should be part of the template</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Define Template Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_20_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>At this point, unless you want to designate some extra files
+ as having Velocity template coding inside them, you should
+ click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <para>That's it. Now, you can use this template with any new or imported
+ project that uses the same run-time implementation as the project you turned
+ into a template.</para>
+ <para>At this point, you have a fully configured project and now you can bring some
+ new logic to it starting from JSF configuration file.</para>
+ </section>
+ <section>
+ <title>Relevant Resources Links</title>
+
+ <para>You can find more in-depth explanation on how to work with special wizards, editors and views that can
+ be used in various scenarios while developing JSF applications in our <ulink url="../../jsf/html_single/index.html">Visual Web Tools guide</ulink>.</para>
+ </section>
+</chapter>
+
+
+<chapter id="webxml_editor" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_ref_guide/en/modules/webxml_editor.xml" xreflabel="webxml_editor">
+ <?dbhtml filename="webxml_editor.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Web.xml Editor</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none">web.xml</property></emphasis> file inside the <emphasis>
+ <property moreinfo="none">WEB-INF</property></emphasis> folder is a deployment descriptor file for a Web Application. It
+ describes the servlets and other components and deployment properties that make up your application.</para>
+
+ <para><property moreinfo="none">JBoss Tools</property> add the <emphasis>
+ <property moreinfo="none">web.xml</property></emphasis> file to created JSF project automatically and provides a special editor for its editing.
+ See the Visual Web Tools guide that gives a descriptive information on the <ulink url="../../jsf/html_single/index.html#GraphicalWebApplicationFileEditor">web.xml editor</ulink>.</para>
+</chapter>
+
+<chapter id="jsf_config_file" role="updated" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_config_file.xml">
+ <?dbhtml filename="jsf_config_file.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JSF Configuration File Editor</title>
+
+ <para>First, we should mention that JSF configuration file (<emphasis>
+ <property moreinfo="none">faces-config.xml</property>
+ </emphasis>) is intended for registering JSF application resources such as Converters,
+ Validators, Managed Beans and page-to-page navigation rules.</para>
+ <para>Now, let's look at how you can easily configure this file by means of a special
+ graphical editor for JSF configuration file. The editor has three main views:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Diagram</para>
+ </listitem>
+ <listitem>
+ <para>Tree</para>
+ </listitem>
+ <listitem>
+ <para>Source</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>They can be selected via the tabs at the bottom of the editor.</para>
+
+ <section id="Diagram9553">
+
+ <title>Diagram view</title>
+
+ <para>Here, we will show you how to work with JSF configuration file through the Diagram
+ view of the editor.</para>
+ <para>As you can see on the figure below, the Diagram view displays the navigation rules in
+ the faces-config.xml:</para>
+ <figure float="0">
+ <title>Diagram View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If your diagram is large, make use of the Outline view. Within it you can switch to a <emphasis>
+ <property moreinfo="none">Diagram Navigator</property>
+ </emphasis> mode by selecting the middle icon at the top of the view window. It allows
+ you to easily move around the diagram. Just move the blue area in any direction, and the
+ diagram on the left will also move:</para>
+ <figure float="0">
+ <title>Outline View for Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_32.png" scale="50"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To create a new page here, you should click the page icon (View Template) on the
+ toolbar from the left and then click anywhere on the diagram. A New Page Wizard will
+ appear.</para>
+
+ <para>To create a transition for connecting pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select the transition icon from the toolbar (New Connection).</para>
+ </listitem>
+ <listitem>
+ <para>Click the source page.</para>
+ </listitem>
+ <listitem>
+ <para>Click the target page.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>A transition will appear between the two pages:</para>
+ <figure float="0">
+ <title>Transition between JSP Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It is also possible to create a new page with context menu by right-clicking anywhere
+ on the diagram and selecting <emphasis>
+ <property moreinfo="none">New View</property>. </emphasis></para>
+ <figure float="0">
+ <title>Creating a New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To edit an existing transition, first select the transition line. Then, place the
+ mouse cursor over the last black dot (on the target page). The mouse cursor will change
+ to a big +. At this point, drag the line to a new target page:</para>
+ <figure float="0">
+ <title>Editing Transition between Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="TreeView11123" role="updated">
+
+ <title>Tree View</title>
+
+ <para>You can find it more convenient to edit your JSF Configuration file in the Tree view of
+ the <property moreinfo="none">VPE</property>.</para>
+
+ <para>The view displays all JSF application artifacts referenced in the configuration file
+ in a tree format. By selecting any node on the left, you can see and edit its properties
+ which will appear in the right-hand area. Let's look at the structure of this
+ tree more closely.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property moreinfo="none">Application</property>
+ </emphasis> node you can adjust JSF application specific settings such as
+ internationalization, possibility to set extensions, add property and variable
+ resolvers, etc.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JSF Application Specific Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property moreinfo="none">Components</property>
+ </emphasis> node is for registering custom JSF components. Right-click and
+ choose <emphasis>
+ <property moreinfo="none">New > Component</property>
+ </emphasis> or just press the <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button in the right-hand area to add a new component to the JSF
+ Configuration file.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Registering a New JSF Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the <property moreinfo="none">Add Component wizard</property> you should set a component
+ type and point to a component class by using the <emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button or create a new class for this component by using the <emphasis>
+ <property moreinfo="none">Component-Class</property>
+ </emphasis> link.</para>
+
+ <figure float="0">
+ <title>Adding a New JSF Component to the JSF Configuration File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Use the <emphasis>
+ <property moreinfo="none">Render Kit</property>
+ </emphasis> node to create and register a set of related renderers for custom
+ JSF components.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Adding a New JSF Component to the JSF Configuration File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24d.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property moreinfo="none">Converters</property>
+ </emphasis> node you can create a converter class for your JSF application
+ either with id or for a proper class. How to do that see the <link linkend="CreateAndRegisterACustomConverter94230">Create and Register a
+ Custom Converter</link> section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Creating a New Custom Converter</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_59.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property moreinfo="none">Managed Bean</property>
+ </emphasis> node is meant for creating and registering Bean classes in your JSF
+ application. Read more on the topic in the <link linkend="managed_beans">Managed
+ Beans</link> chapter.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Managed Beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Use the <emphasis>
+ <property moreinfo="none">Navigation Rules</property>
+ </emphasis> node to configure a navigation between the pages in your
+ application: create a new navigation rule and adjust necessary properties for it
+ in the right-hand area.</para>
+ </listitem>
+ </itemizedlist>
+ <tip>
+ <title>Tip:</title>
+ <para>The same you can do in the <link linkend="Diagram9553">Diagram view</link> of the
+ JSF Configuration file editor.</para>
+ </tip>
+
+ <figure float="0">
+ <title>Configuring Navigation Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Under the <emphasis>
+ <property moreinfo="none">Referenced Beans</property>
+ </emphasis> node you can add a new Referenced Bean and configure various
+ properties for it. To learn more on this refer to the <link linkend="referenced_beans">Create and Register Referenced Beans</link>
+ section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Referenced Beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property moreinfo="none">Validators</property>
+ </emphasis> node is needed to create validator classes for organizing the
+ validation of your application data. You can read more on the topic in the <link linkend="CreateAndRegisterACustomValidator5632">Create and Register a Custom
+ Validator</link> section.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Validators</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>The <emphasis>
+ <property moreinfo="none">Extensions</property>
+ </emphasis> node is for setting extensions for your <emphasis>
+ <property moreinfo="none">faces-config.xml</property>.</emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Adding Extensions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26d.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the <property moreinfo="none">Tree view</property> you can also edit the properties of the selected
+ element with the help of the <property moreinfo="none">Properties view</property> as shown below:</para>
+
+ <figure float="0">
+ <title>Properties View </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_33.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="SourceView4643">
+
+ <title>Source View</title>
+
+ <para>Here, we'll discuss how you can configure your faces-config.xml with the help
+ of Source View.</para>
+ <para>The Source view for the editor displays a text content of the JSF configuration file.
+ It is always synchronized with other two views, so any changes made in one of the views
+ will immediately appear in the other:</para>
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_27.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You can also work in the Source view with the help of the <emphasis>
+ <property moreinfo="none">Outline view</property>.</emphasis> The Outline view shows a tree
+ structure of the JSF configuration file. Simply select any element in the Outline view,
+ and it will jump to the same place in the Source editor, so you can navigate through the
+ source code with Outline view.</para>
+ <figure float="0">
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_31.png" scale="50"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="jsf_editor_features">
+ <title>Editor Features</title>
+ <para>Here we'll discuss a very important features that JSF configuration file
+ editor provides for work with JSF resources.</para>
+
+ <section id="jsf_openOn">
+ <title>Open On</title>
+ <para>The JSF configuration file editor comes with a very useful OpenOn navigating
+ feature. More fully you can read about it in our <ulink url="../../jsf/html_single/index.html#OpenOnSelection4Hyperlinknavigation">Visual Web Tools
+ Guide</ulink>.</para>
+ </section>
+
+ <section id="ContentAssist976">
+
+ <title>Code Assist</title>
+ <para>Code Assist provides pop-up tip to help you complete your code statements. It
+ allows you to write your code faster and with more accuracy.</para>
+ <para>Code assist is always available in the Source mode:</para>
+ <figure float="0">
+ <title>Code Assist in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_28.png" scale="65"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="ErrorReporting3324">
+
+ <title>Error Reporting</title>
+ <para>When you are developing your project, error checking is constantly provided. This
+ greatly reduces your development time as it allows you to catch many of the errors
+ during development.</para>
+ <para>Errors will be reported by <link linkend="jsf_project_verification">
+ verification</link> facility:</para>
+ <figure float="0">
+ <title>Error Reporting in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_29.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Other errors are also reported.</para>
+ <figure float="0">
+ <title>Other Errors Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_30.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+</chapter>
+
+
+<chapter id="managed_beans" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_ref_guide/en/modules/managed_beans.xml">
+ <?dbhtml filename="managed_beans.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Managed Beans</title>
+
+ <para>There is lots of power to work with <property moreinfo="none">managed beans</property>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add and generate code for new managed beans</para>
+ <itemizedlist>
+ <listitem>
+ <para>Generate code for attributes and getter/setter methods</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Add existing managed beans to JSF configuration file</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Thus, in this section we will guides you through all this possibilities.</para>
+
+ <section id="CodeGenerationForManagedBeans421">
+
+ <title>Code Generation for Managed Beans</title>
+
+ <para>To start, create a new managed bean in JSF configuration file editor, in the Tree
+ view.</para>
+ <figure float="0">
+ <title>Creation of New Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_34.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>When you define a new managed bean, make sure that <emphasis>
+ <property moreinfo="none">Generate Source Code</property>
+ </emphasis> is checked as shown in the figure below.</para>
+ </note>
+ <figure float="0">
+ <title>New Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_35.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After the <emphasis role="italic">
+ <property moreinfo="none">"Java"</property>
+ </emphasis> class has been generated you can open it for additional editing. There are
+ two ways to open the <emphasis role="italic">
+ <property moreinfo="none">"Java"</property>
+ </emphasis> class:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>click on <emphasis>
+ <property moreinfo="none">Managed-Bean-Class</property>
+ </emphasis> link in the editor</para>
+ </listitem>
+ </itemizedlist>
+ <para>or</para>
+ <itemizedlist>
+ <listitem>
+ <para>right click the <emphasis>
+ <property moreinfo="none">managed bean</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">Open Source</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Opening of Created Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_36.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The generated Java source should look as follows:</para>
+
+ <figure float="0">
+ <title>Java Source Code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_37.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also generate source code for properties, also includes <emphasis role="italic">
+ <property moreinfo="none">"getter"</property>
+ </emphasis> and <emphasis role="italic">
+ <property moreinfo="none">"setter"</property>
+ </emphasis> methods. Right click on the bean and select <emphasis>
+ <property moreinfo="none">New > Property</property>
+ </emphasis>. You will see <property moreinfo="none">Add Property</property> dialog.</para>
+ <figure float="0">
+ <title>Generation of Source Code for Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_38.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the form is open make sure that all the check boxes are selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add Java property</para>
+ </listitem>
+ <listitem>
+ <para>Generate Getter</para>
+ </listitem>
+ <listitem>
+ <para>Generate Setter</para>
+ </listitem>
+ </itemizedlist>
+ <para></para>
+ <figure float="0">
+ <title>"Add Property" Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_39.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once the generation is complete, you can open the file and see the added property with
+ <emphasis role="italic">
+ <property moreinfo="none">"get"</property>
+ </emphasis> and <emphasis role="italic">
+ <property moreinfo="none">"set"</property>
+ </emphasis> methods:</para>
+ <figure float="0">
+ <title>Generated Java Source Code for Property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_40.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus, we've discussed everything which comes to creating a new Managed Bean.
+ The next section will show you how to add an existing Bean into a JSF configuration
+ file.</para>
+ </section>
+ <section id="AddExistingJavaBeansToAJSFConfigurationFile74332">
+
+ <title>Add Existing Java Beans to a JSF Configuration File</title>
+ <para>If you already have a Java bean you can easily add it to a <property moreinfo="none">JSF configuration
+ file</property>.</para>
+ <para>You should start the same way you create a new managed bean. Use the <emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis> button to add your existing Java class.</para>
+ <figure float="0">
+ <title>New Managed Bean Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_42.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once the class is set, its <emphasis>
+ <property moreinfo="none">Name</property>
+ </emphasis> will be set as well. But you can easily substitute it for the other one.
+ Notice that <emphasis>
+ <property moreinfo="none">Generate Source Code</property>
+ </emphasis> option is not available as the <emphasis role="italic">
+ <property moreinfo="none">"Java"</property>
+ </emphasis> class already exists. </para>
+ <para>After adding your class <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button will be activated. Pressing it you'll get <emphasis>
+ <property moreinfo="none">Managed Properties</property>
+ </emphasis> dialog where all corresponding properties are displayed. Check the necessary
+ ones to add them into your <property moreinfo="none">JSF Configuration File</property>.</para>
+
+ <figure float="0">
+ <title>Selection of Bean's Properties.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_43.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you don't want to add any, just click <emphasis>
+ <property moreinfo="none">Finish</property>. </emphasis></para>
+ <para>Above-listed steps have demonstrated how you can specify an existing Bean in the JSF
+ configuration file, i.e. <emphasis>
+ <property moreinfo="none">faces-config.xml</property>. </emphasis> In the next chapter
+ you'll know how to organize and register another kind of artifacts.</para>
+ </section>
+</chapter>
+
+
+<chapter id="creation_and_registration" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_ref_guide/en/modules/creation_and_registration.xml">
+ <?dbhtml filename="creation_and_registration.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Creation and Registration</title>
+
+ <section id="CreateAndRegisterACustomConverter94230">
+
+ <title>Create and Register a Custom Converter</title>
+
+ <para>It's also possible to create a
+ custom Converter in order to specify your own converting rules. Let's look at how you can do this.</para>
+
+ <para>To create and register a custom converter it's necessary to
+ go through the following steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open <emphasis>
+ <property moreinfo="none">faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">Tree</property>
+ </emphasis> tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Converters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_44.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Converters</property>
+ </emphasis> and click on<emphasis>
+ <property moreinfo="none"> Add</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the form type the name of your converter in the <emphasis>
+ <property moreinfo="none">Converter-id</property>
+ </emphasis> field and name of the class for
+ converters. After clicking <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button your custom converter is
+ registered under the entered name.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Add Converter Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_45.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Now you can create <emphasis role="italic">
+ <property moreinfo="none">"converter"</property>
+ </emphasis> class. In the Converter section you
+ should see your <emphasis>
+ <property moreinfo="none">Converter-id</property>
+ </emphasis> and
+ <emphasis><property moreinfo="none">Converter-class</property>.</emphasis>
+ Click on <emphasis>
+ <property moreinfo="none">Converter-class</property>
+ </emphasis> to generate the source code.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Generation of Source Code for Converter Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_46.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>A usual wizard for creating a Java class will appear.
+ All needed fields here will be adjusted
+ automatically. Just leave everything without changes
+ and click <emphasis>
+ <property moreinfo="none">Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_47.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open a converter class click again on <emphasis>
+ <property moreinfo="none">Converter-class</property>
+ </emphasis> link in the Converter section.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Converter Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_48.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now you
+ are able to add a business logic of converter in the
+ Java editor.</para>
+ </section>
+
+ <section id="CreateAndRegisterACustomValidator5632">
+
+ <title>Create and Register a Custom Validator</title>
+
+ <para>It's also quite easy to develop your
+ own custom Validators. You should perform the actions similar to the
+ previous one. Go through the following steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open<emphasis>
+ <property moreinfo="none"> faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">Tree </property>
+ </emphasis>tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Validator in Faces Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_49.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Validators</property>
+ </emphasis> and click on <emphasis>
+ <property moreinfo="none">Add </property>
+ </emphasis>button.</para>
+ </listitem>
+ <listitem>
+ <para>Type the name of your validator in the <emphasis>
+ <property moreinfo="none">Validator-id</property>
+ </emphasis> field and name of the class for
+ validators. After clicking <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button your custom validator is
+ registered under the entered name.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Adding Validator</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_50.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now you can create the "validator" class. </para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Validator section you can see your <emphasis>
+ <property moreinfo="none">Validator-id</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Validator-class</property></emphasis>. To generate the source code click on <emphasis>
+ <property moreinfo="none">Validator-class</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Creating Validator Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_51.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Java class will be created automatically. Leave
+ everything without changes and click <emphasis>
+ <property moreinfo="none">Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_52.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open validator class click again on <emphasis>
+ <property moreinfo="none">Validator-Class</property>
+ </emphasis> link in the Validator section. Now you
+ are able to write a business logic of validator in
+ the Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Converter Class Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_53.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="referenced_beans">
+ <title>Create and Register Referenced Beans</title>
+
+ <para>Creation of Referenced Beans is similar to creation of Custom
+ Validator as well. To perform this, let's walk through the necessary steps.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open<emphasis>
+ <property moreinfo="none"> faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">Tree </property>
+ </emphasis>tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Referenced Beans in Faces Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_54.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Referenced Beans</property>
+ </emphasis> and click on <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>Type in the name of your Referenced Bean and type in
+ or select <emphasis>
+ <property moreinfo="none">Referenced-Bean-Class</property>
+ </emphasis> by using <emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Add Referenced Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_55.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the Referenced Bean section you should see your <emphasis>
+ <property moreinfo="none">Referenced-Bean-Name</property>
+ </emphasis> and
+ <emphasis><property moreinfo="none">Referenced-Bean-Class</property>.</emphasis>
+ Click on the link to open the Java creation
+ wizard.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create Referenced Bean Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_56.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Java class will be created automatically. Leave
+ everything without changes and click <emphasis>
+ <property moreinfo="none">Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_57.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open Referenced Bean class click again on <emphasis>
+ <property moreinfo="none">Referenced-Bean-Class</property>
+ </emphasis> in the Referenced Bean section. Now you
+ are able to write business logic of Referenced Bean
+ in the Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Referenced Bean Class Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_58.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+<chapter id="jsf_project_verification" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_project_verification.xml">
+ <?dbhtml filename="struts_project_verification.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>JSF Project Verification</title>
+
+ <para>In this chapter we'll discuss a possible verification that you can take advantage
+ of.</para>
+ <!-- JBoss Developer Studio checks for many different rules for a JSF project -->
+ <para>Many different rules are checked for a JSF project that can be configured by selecting <emphasis>
+ <property moreinfo="none">Window > Preferences</property>
+ </emphasis> from the menu bar, selecting <emphasis>
+ <property moreinfo="none">JBoss Tools > Web > Verification</property>
+ </emphasis> from the Preferences dialog box and then expanding the JSF Rules node.</para>
+ <figure float="0">
+ <title>JSF Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Suppose you are working in the Source viewer for a JSF configuration file as shown below:</para>
+ <figure float="0">
+ <title>Faces-config.xml File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>While typing a class name, you might make a minor typo (like <emphasis role="italic">
+ <property moreinfo="none">"jsfHello.PersonBean9"</property>
+ </emphasis> instead of <emphasis role="italic">
+ <property moreinfo="none">"jsfHello.PersonBean"</property>
+ </emphasis>). After saving the file, verification checks to make sure everything is correct
+ and finds the error below:</para>
+ <figure float="0">
+ <title>Error in Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_3.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Notice that the Package Explorer View shows a marked folder and a marked file where the
+ error is.</para>
+ <para>You can place the cursor over the line with an error message and get a detailed error
+ message:</para>
+ <figure float="0">
+ <title>Error Message</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Verification also checks navigation rules:</para>
+ <figure float="0">
+ <title>Checking Navigation Rules</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If you provide a page name that does not exist, verification will let you know about that:</para>
+ <figure float="0">
+ <title>Page Name Verification</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_6.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can always call up verification explicitly by right-clicking any element in the tree
+ and selecting Verify from the context menu. This works from both the Tree and Diagram
+ viewers for the JSF configuration file editor. You can also invoke verification from the Web
+ Projects view. Below we are checking all of the elements in the configuration file.</para>
+ <figure float="0">
+ <title>Verify Command</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/verif_valid/verif_valid_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In summary, this document highlights all the JSF-specific features of <property moreinfo="none">JBoss Tools</property>
+ meant for enhancing the development of rich Web applications based on JSF technology. The
+ reference introduces you to wizards for creating and importing JSF projects, JSF
+ Configuration File editor features, functionality for enabling JSF capabilities and etc.</para>
+
+ <para>If you have questions or good suggestions, please refer to
+ <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
+ Tools Forum</ulink>.</para>
+</chapter>
+
+</book>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/projects.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/projects.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/projects.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,403 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="projects">
+ <?dbhtml filename="projects.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Projects</title>
+ <para>To take an advantage of JSF firstly you should perform one of the next steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create new JSF projects</para>
+ </listitem>
+ <listitem>
+ <para>Import (open) existing JSF projects</para>
+ </listitem>
+ <listitem>
+ <para>Add JSF capability to any existing Eclipse project</para>
+ </listitem>
+ <listitem>
+ <para>Import and add JSF capability to any existing project created outside
+ Eclipse.</para>
+ </listitem>
+ </itemizedlist>
+ <para>In this section we're going to stop on each of them in detail.</para>
+
+ <section id="new_jsf_project">
+
+ <title>Creating a New JSF Project</title>
+
+ <para>If you want your project to already contain all JSF libraries, tag libraries
+ and JSF configuration file, just organize a new brand JSF project. It is
+ possible to do this easily with the help of the special wizard. To get it, select<emphasis>
+ <property> File > New > Project > JBoos Tools
+ Web > JSF > JSF Project</property>
+ </emphasis> and click <emphasis>
+ <property>Next</property>.</emphasis></para>
+
+ <figure>
+ <title>Choosing a JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next form you'll be prompted to enter <property>Project
+ Name</property> and select a location for the project or just leave
+ a default path.</para>
+ <para>Here, JSF Version also allows you to select which JSF implementation to
+ use.</para>
+ <figure>
+ <title>Creating a New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_11.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>There is a number of predefined project templates that are flexible and easily
+ customizable. Thus you can pick a different template on which the projects
+ Importing Existing should be based on. Almost all templates come in two
+ variations: with jsf libraries and without ones.</para>
+ <figure>
+ <title>Choosing JSF Templates</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The table below provides description for each possible JSF template.</para>
+ <table>
+ <title>JSF Project Templates</title>
+ <tgroup cols="2">
+ <colspec colnum="1" align="left" colwidth="1*"/>
+ <colspec colnum="2" colwidth="3*"/>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Template</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property>JSFBlankWithLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>This template will create a standard Web
+ project structure with all JSF capabilities</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property>JSFKickStartWithLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>This template will create a standard Web
+ project structure but will also include a sample
+ application that is ready to run</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <emphasis>
+ <property>JSFKickStartWithoutLibs</property>
+ </emphasis>
+ </para>
+ </entry>
+
+ <entry>
+ <para>Some servers already provide jsf libs and
+ you take risk of getting conflicting libraries
+ while deploying your project. To avoid such
+ conflicts, use a template without libs if you have
+ a server with its own jsf libraries</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <!-- <para>You can of course create your own custom templates. More information
+ on templates creation could be found in <link
+ linkend="CreatingCustomJSPTemplates">Chapter 5</link>.</para>
+ -->
+
+ <para>On the next screen select what <emphasis>
+ <property>Servlet version</property>
+ </emphasis> to use and whether to register this application with JBoss AS
+ (or other server) for running and testing your application.</para>
+
+ <para>The <emphasis>
+ <property>Context Path</property>
+ </emphasis> is the name under which the application will be deployed.</para>
+
+ <para>The <emphasis>
+ <property>Runtime</property>
+ </emphasis> value tells Eclipse where to find Web libraries in order to
+ build (compile) the project. It is not possible to finish project creation
+ without selecting Runtime. If you don't have any values, select <emphasis>
+ <property>New...</property>
+ </emphasis> to add new Runtime.</para>
+
+ <para>The <emphasis>
+ <property>Target Server</property>
+ </emphasis> allows you specifying whether to deploy the application. The
+ Target Server corresponds to the Runtime value selected above. If you
+ don't want to deploy the application, uncheck this value.</para>
+ <figure>
+ <title>Registering the Project on Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When you are all done, you should have the project that has been appeared in
+ the Package Explorer view:</para>
+ <figure>
+ <title>A New Project in the Package Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_15.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>At this point you can open <emphasis>
+ <property>faces-config.xml</property>
+ </emphasis> and start working on your application. There are a lot of
+ features to develop JSF applications. We will describe the features
+ further.</para>
+ </section>
+
+ <section id="ImportingExsJSFProjWithAnyStr74447">
+
+ <title>Importing Existing JSF Projects with Any Structure</title>
+
+ <para>For detailed information on migration of JSF projects into a workspace see the Migration
+ Guide.</para>
+
+ </section>
+ <section id="add_jsf_capability">
+
+ <title>Adding JSF Capability to Any Existing Eclipse Project</title>
+
+ <para>It's also possible to add <property>JSF capability</property> (JSF
+ libraries, tag libraries) to any existing Eclipse project in your workspace.
+ After that you'll be able to make use of such editors as JSF
+ configuration editor, JBoss Tools JSP editor and any others.</para>
+ <para>Right click the project and select <emphasis>
+ <property>JBoss Tools > Add JSF Capabilities</property>. </emphasis>
+ This will start the process of adding all necessary libraries, files to make
+ this a Web JSF project.</para>
+ <figure>
+ <title>Adding JSF Capabilities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_16.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The wizard will first ask you to show the <emphasis>
+ <property>web.xml</property>
+ </emphasis> file location and the project name.</para>
+ <figure>
+ <title>Project Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On the last form you can set the different folders for your project as well as
+ register this application with a servlet container.</para>
+
+ <para>Make sure to select <emphasis>
+ <property>Add Libraries</property>
+ </emphasis> to add all required JSF related libraries to this
+ project.</para>
+
+ <para>The <emphasis>
+ <property>Context Path</property>
+ </emphasis> is the name under which the application will be deployed.</para>
+
+ <para>The <emphasis>
+ <property>Runtime</property>
+ </emphasis> value tells Eclipse where to find Web libraries in order to
+ build (compile) the project. It is not possible to finish project import
+ without selecting Runtime. If you don't have any values, select <emphasis>
+ <property>New...</property>
+ </emphasis> to add new Runtime.</para>
+
+ <para>The <emphasis>
+ <property>Target Server</property>
+ </emphasis> allows you to specify whether to deploy the application. The
+ Target Server corresponds to the Runtime value selected above. If you
+ don't want to deploy the application, uncheck this value.</para>
+ <figure>
+ <title>Project Folders</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_18.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once your project is imported you can see that JSF related libraries have been
+ added to your project: <emphasis>
+ <property>jsf-api.jar</property>
+ </emphasis> and <emphasis>
+ <property>jsf-impl.jar</property>
+ </emphasis>.</para>
+ <note>
+ <title>Note:</title>
+ <para>Some application servers provide their own jsf implementation
+ libraries. Thus, to avoid conflicts you should not add jsf libraries
+ while adding jsf capabilities.</para>
+ </note>
+ <para>You are now ready to work with JSF by creating a new JSF configuration
+ file:</para>
+
+
+ <figure>
+ <title>Creating a New JSF Configuration File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_19.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Once the file has been created, it should be opened in a special <link
+ linkend="jsf_config_file">Faces Config Editor</link>.</para>
+ </section>
+ <section id="AddingYourOwnProjectTemplates853">
+
+ <title>Adding Your Own Project Templates</title>
+ <para>Template is a set of files that is served as a basis to facilitate the
+ creation of a new project. Project templates provide content and structure
+ for a project.</para>
+ <para>There is a powerful templating capability for creating new and importing
+ existing Struts and JSF projects. This templating facility has a variety of
+ aspects to consider. But, let's start with the most straightforward
+ case and consider the process of creating a template from your existing JSF
+ project.</para>
+
+ <para>Let's say you have a project that you want to use as the basis for a
+ new <property>template</property>. Follow these steps to make a template out
+ of it:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Web Projects view, right-click the project and select <emphasis>
+ <property>JBoss Tools JSF > Save As
+ Template</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Saving Your Project as Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_20.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the first dialog box, you can choose a name for the
+ template (defaults to the project name) and confirm what
+ run-time implementation of the project technology will be
+ used</para>
+ </listitem>
+
+ </itemizedlist>
+ <figure>
+ <title>Define Template Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_20_1.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Next</property>
+ </emphasis> and you will be sent to a dialog box with your
+ project structure displayed with check boxes. Here you can
+ check only those parts and files in your project directory
+ that should be part of the template</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Define Template Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_20_2.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>At this point, unless you want to designate some extra files
+ as having Velocity template coding inside them, you should
+ click <emphasis>
+ <property>Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <para>That's it. Now, you can use this template with any new or imported
+ project that uses the same run-time implementation as the project you turned
+ into a template.</para>
+ <para>At this point, you have a fully configured project and now you can bring some
+ new logic to it starting from JSF configuration file.</para>
+ </section>
+ <section>
+ <title>Relevant Resources Links</title>
+
+ <para>You can find more in-depth explanation on how to work with special wizards, editors and views that can
+ be used in various scenarios while developing JSF applications in our Visual Web Tools Guide.</para>
+ </section>
+</chapter>
Added: trunk/jsf/docs/jsf_tools_ref_guide/en-US/webxml_editor.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en-US/webxml_editor.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/webxml_editor.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="webxml_editor" xreflabel="webxml_editor">
+ <?dbhtml filename="webxml_editor.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JSF Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Web.xml Editor</title>
+
+ <para>The <emphasis>
+ <property>web.xml</property></emphasis> file inside the <emphasis>
+ <property>WEB-INF</property></emphasis> folder is a deployment descriptor file for a Web Application. It
+ describes the servlets and other components and deployment properties that make up your application.</para>
+
+ <para><property>JBoss Tools</property> add the <emphasis>
+ <property>web.xml</property></emphasis> file to created JSF project automatically and provides a special editor for its editing.
+ See the Visual Web Tools guide that gives a descriptive information on the <filename>web.xml editor</filename>.</para>
+</chapter>
\ No newline at end of file
Modified: trunk/jsf/docs/jsf_tools_ref_guide/pom.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/pom.xml 2010-03-05 00:58:52 UTC (rev 20675)
+++ trunk/jsf/docs/jsf_tools_ref_guide/pom.xml 2010-03-05 01:40:06 UTC (rev 20676)
@@ -86,9 +86,9 @@
<configuration>
<sourceDocumentName>${master}</sourceDocumentName>
- <sourceDirectory>${pom.basedir}/en</sourceDirectory>
+ <sourceDirectory>${pom.basedir}/en-US</sourceDirectory>
<imageResource>
- <directory>${pom.basedir}/en</directory>
+ <directory>${pom.basedir}/en-US</directory>
<includes>
<include>images/**/*</include>
</includes>
Added: trunk/jsf/docs/jsf_tools_ref_guide/publican.cfg
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/publican.cfg (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/publican.cfg 2010-03-05 01:40:06 UTC (rev 20676)
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Fri Nov 20 13:19:45 2009
+
+xml_lang: en-US
+type: Book
+brand: JBoss
+
14 years, 3 months
JBoss Tools SVN: r20675 - in trunk/jmx/docs/reference: en-US and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-03-04 19:58:52 -0500 (Thu, 04 Mar 2010)
New Revision: 20675
Added:
trunk/jmx/docs/reference/en-US/
trunk/jmx/docs/reference/en-US/Author_Group.xml
trunk/jmx/docs/reference/en-US/Book_Info.xml
trunk/jmx/docs/reference/en-US/JMX_Tools_Reference_Guide.ent
trunk/jmx/docs/reference/en-US/JMX_Tools_Reference_Guide.xml
trunk/jmx/docs/reference/en-US/Preface.xml
trunk/jmx/docs/reference/en-US/Revision_History.xml
trunk/jmx/docs/reference/en-US/connection.xml
trunk/jmx/docs/reference/en-US/extensions.xml
trunk/jmx/docs/reference/en-US/how_to.xml
trunk/jmx/docs/reference/en-US/images/
trunk/jmx/docs/reference/en-US/images/collaps_all.png
trunk/jmx/docs/reference/en-US/images/eclipse-jmx_0.2.png
trunk/jmx/docs/reference/en-US/images/favicon.ico
trunk/jmx/docs/reference/en-US/images/jbosstools_logo.png
trunk/jmx/docs/reference/en-US/images/link-with-editor_0.2.0.png
trunk/jmx/docs/reference/en-US/images/mbean-editor-horizontal-layout_0.2.0.png
trunk/jmx/docs/reference/en-US/images/mbean-editor-layout-buttons_0.2.0.png
trunk/jmx/docs/reference/en-US/images/mbean-editor_0.2.0.png
trunk/jmx/docs/reference/en-US/images/mbean-explorer-features.png
trunk/jmx/docs/reference/en-US/images/mbean-explorer-query.png
trunk/jmx/docs/reference/en-US/images/new_connection_icon.png
trunk/jmx/docs/reference/en-US/images/notifications.png
trunk/jmx/docs/reference/en-US/introduction.xml
trunk/jmx/docs/reference/en-US/master.xml
trunk/jmx/docs/reference/en-US/master_output.xml
trunk/jmx/docs/reference/en-US/mbean_editor.xml
trunk/jmx/docs/reference/en-US/mbean_explorer.xml
trunk/jmx/docs/reference/en-US/references.xml
trunk/jmx/docs/reference/en-US/summary.xml
trunk/jmx/docs/reference/en-US/tasks.xml
trunk/jmx/docs/reference/publican.cfg
Removed:
trunk/jmx/docs/reference/en/
Modified:
trunk/jmx/docs/reference/pom.xml
Log:
modified book to be built with publican and maven
Added: trunk/jmx/docs/reference/en-US/Author_Group.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/Author_Group.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/Author_Group.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<authorgroup><author><firstname>JBoss Tools Team</firstname></author></authorgroup>
Added: trunk/jmx/docs/reference/en-US/Book_Info.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/Book_Info.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/Book_Info.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<bookinfo><title>JMX Tools Reference Guide</title><subtitle>Provides information relating to the JMX Tools module.</subtitle><productname>JBoss Developer Studio</productname><productnumber>3.0</productnumber><edition>1.0</edition><pubsnumber>0</pubsnumber><abstract><para>The JMX Tools Reference Guide explains how to use the JMX Tools module to setup multiple JMX connections and explore the JMX tree and execute operations.</para></abstract><corpauthor><inlinemediaobject><imageobject><imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"></imagedata></imageobject></inlinemediaobject></corpauthor><xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include><xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></bookinfo>
Added: trunk/jmx/docs/reference/en-US/JMX_Tools_Reference_Guide.ent
===================================================================
--- trunk/jmx/docs/reference/en-US/JMX_Tools_Reference_Guide.ent (rev 0)
+++ trunk/jmx/docs/reference/en-US/JMX_Tools_Reference_Guide.ent 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,4 @@
+<!ENTITY PRODUCT "JBoss">
+<!ENTITY BOOKID "JMX_Tools_Reference_Guide">
+<!ENTITY YEAR "2010">
+<!ENTITY HOLDER "Red Hat">
Added: trunk/jmx/docs/reference/en-US/JMX_Tools_Reference_Guide.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/JMX_Tools_Reference_Guide.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/JMX_Tools_Reference_Guide.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<book>
+<xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="tasks.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="references.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="summary.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<!--
+<xi:include href="connection.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="how_to.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="extensions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="mbean_explorer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<xi:include href="mbean_editor.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+-->
+<xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+</book>
Added: trunk/jmx/docs/reference/en-US/Preface.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/Preface.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/Preface.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<preface><title>Preface</title><xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include><xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></xi:fallback></xi:include></preface>
Added: trunk/jmx/docs/reference/en-US/Revision_History.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/Revision_History.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/Revision_History.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<appendix><title>Revision History</title><simpara><revhistory><revision><revnumber>0</revnumber><date>Fri Nov 20 2009</date><author><firstname>Isaac</firstname><surname>Rooskov</surname><email>irooskov(a)redhat.com</email></author><revdescription><simplelist><member>Initial creation of book by publican</member></simplelist></revdescription></revision></revhistory></simpara></appendix>
Added: trunk/jmx/docs/reference/en-US/connection.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/connection.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/connection.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="connection" xreflabel="connection">
+ <?dbhtml filename="connection.html"?>
+
+ <title>Connections</title>
+
+ <para>The <property>MBean Explorer</property> supports several different types of connections.
+ The tooling itself comes only with a default connection type, however other
+ adopters can provide additional connection types that may require additional
+ or non-spec behavior. Connections can be in either the connected state or
+ the disconnected state. Some connection types (such as the default connection type)
+ allow you to control the current state. Other connection types may not. </para>
+
+ <para>Similarly, some connection types may be able to be created, and others may not.
+ The default connection type, for example, can be created and deleted by you
+ at will. The AS Tools connection type, which represents a JBoss server, does not
+ allow you this level of control. A JBoss JMX connection is created when a JBoss server is created
+ in the server's view, and deleted when said server is deleted. The JMX connection for
+ this server is in the connected state only when the server is started. </para>
+
+
+ <section><title>The Default Connection</title>
+
+ <para> There are two ways to connect to an application with remote management enabled:</para>
+
+ <para> The first step is the same for both - to connect to a MBean Server, click on the
+ <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu bar.</para>
+
+ <para>Then to follow the simple one you just need to specify host, port (and optionally user
+ name and password) and click <emphasis>
+ <property>OK</property>.</emphasis></para>
+
+ <para>The default JMX URL is <emphasis>
+ <property>service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi</property>.</emphasis></para>
+
+ <para>In case you need to connect to an application which has not used the "standard" JMX URL
+ (e.g. Eclipse Equinox), you need chose more advance way, where it's necessary to specify
+ explicitly a JMX URL in the Advanced tab of the JMX Connection window.</para>
+
+ <note>
+ <title>Note</title>
+ <para>Only JMX URL based on RMI are supported.</para>
+ </note>
+ </section>
+</chapter>
Added: trunk/jmx/docs/reference/en-US/extensions.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/extensions.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/extensions.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="extensions" xreflabel="extensions">
+ <?dbhtml filename="extensions"?>
+ <title>Extension API</title>
+ <para>This chapter will outline how to contribute your own Server type with some default
+ behavior.</para>
+
+ <section>
+ <title>Why??</title>
+
+ <para>You might be asking yourself why you'd need to extend this framework if JMX is
+ a standard. Perhaps you want a connection to be automatically created after some specific
+ action, or perhaps you want your connection wizard to do more than simply set a host and
+ port. JBoss, for example, requires setting some credentials on the client machine, but
+ using JBoss classes to do it. This requires that the connection have access to JBoss
+ jars.</para>
+ </section>
+
+ <section>
+ <title>Core Extensions</title>
+
+ <para>To create your own JMX Connection type, you must use the
+ org.jboss.tools.jmx.core.MBeanServerConnectionProvider extension point. This point takes
+ one child, a connectionProvider with a class that implements
+ org.jboss.tools.jmx.core.IConnectionProvider.</para>
+
+ <para>An IConnectionProvider is responsible for creation and deletion of IConnectionWrapper
+ objects. It must also keep a list of listeners that it is expected to inform when a
+ connection is added or removed from its list. </para>
+
+ <para>Each IConnectionWrapper is expected to handle running arbitrary JMX runnables or getting
+ a "Root" object representing all JMX nodes. There are some utility methods the
+ IConnectionWrapper can make use of.</para>
+ </section>
+
+
+ <section>
+ <title>UI Extensions</title>
+ <para>There are two extension points currently approved for use in the UI</para>
+ <itemizedlist>
+ <listitem>
+ <para>org.jboss.tools.jmx.ui.providerUI - provide an icon, id, displayable name, and
+ wizardPage class for creation of new connections</para>
+ </listitem>
+ <listitem>
+ <para>org.jboss.tools.jmx.ui.attribute.controls - allows you to map class types to some
+ Control to present them in the MBean Editor</para>
+ <para>We hope, this guide helped you to get started with the JBoss JMX Tools. Besides, for additional information you are welcome on <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+</chapter>
Added: trunk/jmx/docs/reference/en-US/how_to.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/how_to.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/how_to.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="how_to" xreflabel="how_to">
+ <?dbhtml filename="how_to.html"?>
+ <title>How to ...</title>
+ <para>This chapter will give you answers on most popular questions asked by <property>JMX
+ plugin</property> users.</para>
+
+ <section>
+ <title>How to Manage Tomcat</title>
+
+ <para>It's possible to manage Tomcat using <property>JMX Tools</property>.</para>
+
+ <para>Currently, JMX Tooling is able to connect to Tomcat without authentication or with
+ password-based authentication.</para>
+ <para>Using SSL for authentication is not supported: you need to make sure that the System
+ property <emphasis>
+ <property>com.sun.management.jmxremote.ssl</property>
+ </emphasis> is set to false. </para>
+ <para>More information to manage Tomcat can be found in Tomcat management
+ documentation.</para>
+ <para>Instructions to manage remotely Tomcat are available in Tomcat's monitoring
+ documentation.</para>
+
+ </section>
+
+ <section>
+ <title>How to manage Eclipse Equinox</title>
+
+ <para>You can manage Equinox through the Equinox monitoring framework.</para>
+ <para>Once you have installed the Equinox monitoring framework and restarted Eclipse:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Go to <emphasis>
+ <property>Window > Open Perspective > Other</property>
+ </emphasis> and select the <property>JMX perspective</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Select <emphasis>
+ <property>JMX Server > Open Connection</property>
+ </emphasis> and click on <emphasis>
+ <property>OK</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>Switch to the <property>MBean Explorer</property> by going to <emphasis>
+ <property>Window > Show View > Other</property>
+ </emphasis> and selecting the MBean Explorer</para>
+ </listitem>
+
+ <listitem>
+ <para>Click on the <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu
+ bar </para>
+ </listitem>
+
+ <listitem>
+ <para>Select the <emphasis>
+ <property>Advanced tab</property></emphasis> and set the JMX URL to <emphasis>
+ <property>service:jmx:rmi:///jndi/rmi://:8118/jmxserver</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>You now have access to the MBeans exposed by Equinox.</para>
+ </section>
+
+
+ <section>
+ <title>Managing JBoss Instances</title>
+
+ <para>Managing JBoss instances is not supported with the <property>JMX Tools</property>
+ alone. You must also download and install the <property>AS Tools</property> portion of
+ the <property>JBoss Tools</property> distribution. Even after installing the proper
+ tooling, you cannot create a JBoss JMX connection yourself or through the Connection
+ Wizard. The first step is to create a JBoss Server. The full instructions for this can
+ be found in the AS Tools section, however, the short summary is: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the <property>JBoss Servers View</property> or the <property>Servers
+ View</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Right-click in the view and select <emphasis>
+ <property>New > Server</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>In the <emphasis>
+ <property>JBoss Community</property>
+ </emphasis> section, select a server version</para>
+ </listitem>
+
+ <listitem>
+ <para>If a runtime has not yet been created, you'll be prompted for the
+ server's home directory, JDK, and configuration</para>
+ </listitem>
+
+ <listitem>
+ <para>Finish the wizard and note that you have a new entry in both the
+ <property>JBoss Server View</property> and the <property>MBean
+ Explorer</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Start the server by right-clicking it and selecting <emphasis>
+ <property>Start</property></emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Note that once the server is started, the JMX connection can be
+ expanded</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Now you can explore MBeans exposed by a JBoss instance.</para>
+ </section>
+
+</chapter>
Added: trunk/jmx/docs/reference/en-US/images/collaps_all.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/collaps_all.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/eclipse-jmx_0.2.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/eclipse-jmx_0.2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/favicon.ico
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/favicon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/jbosstools_logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/jbosstools_logo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/link-with-editor_0.2.0.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/link-with-editor_0.2.0.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/mbean-editor-horizontal-layout_0.2.0.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/mbean-editor-horizontal-layout_0.2.0.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/mbean-editor-layout-buttons_0.2.0.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/mbean-editor-layout-buttons_0.2.0.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/mbean-editor_0.2.0.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/mbean-editor_0.2.0.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/mbean-explorer-features.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/mbean-explorer-features.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/mbean-explorer-query.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/mbean-explorer-query.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/new_connection_icon.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/new_connection_icon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/images/notifications.png
===================================================================
(Binary files differ)
Property changes on: trunk/jmx/docs/reference/en-US/images/notifications.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jmx/docs/reference/en-US/introduction.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/introduction.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/introduction.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="intruduction" xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+
+ <title>Introduction</title>
+ <para><property>JBoss Tools</property>' JMX project is a fork of <ulink
+ url="http://code.google.com/p/eclipse-jmx/">eclipse-jmx</ulink>, a project by Jeff Mesnil.
+ It was forked with permission. </para>
+ <section>
+ <title>What is JMX Tools?</title>
+ <para><property>JMX Tools</property> allows to setup multiple JMX connections and provides view
+ for exploring the JMX tree and execute operations directly from Eclipse.</para>
+
+ <para>This chapter covers the basics of working with <property>JMX plugin</property>, which is
+ used to manage Java applications through JMX and its RMI Connector.</para>
+
+ <figure>
+ <title>JMX Tools</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/eclipse-jmx_0.2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section><title>Key Features of JMX Tools</title>
+ <para>For a start, we propose you to look through the table of main features of JMX Tools:</para>
+ <table>
+
+ <title>Key Functionality for JMX Tools</title>
+ <tgroup cols="3">
+
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <colspec colnum="3" align="left" colwidth="2*"/>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry><para>MBean Explorer</para></entry>
+ <entry><para>MBean Explorer is a useful view with a text filter that displays domains, mbeans, attributes, and operations inside a connection.</para></entry>
+ <entry>
+ <link linkend="mbean_explorer">MBean Explorer</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry><para>MBean Editor</para></entry>
+ <entry><para>MBean Editor is a multi-page editor to manage MBeans.</para></entry>
+ <entry>
+ <link linkend="mbean_editor">MBean Editor</link>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Requirements and Installation</title>
+ <section>
+ <title> Requirements</title>
+ <para>Requirements to use <property>JMX Tools</property> are the following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><property>JMX Tools</property> is developed on Eclipse 3.4.x milestones</para>
+ </listitem>
+ <listitem>
+ <para><property>JMX Tools</property> requires that Eclipse is run on a JDK 1.5.0 or above
+ (due to dependencies on JMX packages which were introduced in Java 1.5.0)</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Installation</title>
+ <para>Here, we are going to explain how to install the <property>JMX plugin</property> into
+ Eclipse.</para>
+
+ <para><property>JMX Tools</property> is one module of the <property>JBoss Tools</property>
+ project. <property>JMX Tools</property> has no dependency on any other part of <property>JBoss
+ Tools</property>, and can be downloaded standalone. Even though the <property>JMX
+ Tools</property> have no dependencies, other plugins, such as <property>AS Tools</property>,
+ do depend on the JMX Tooling and even extend it. </para>
+
+ <para>You can find the <property>JBoss Tools</property> plugins over at the <ulink
+ url="http://labs.jboss.com/tools/download.html">download pages</ulink>. The only
+ package you'll need to get is the JMX Tooling, however the <property>AS
+ Tools</property> would give you a more full experience when using JMX with JBoss Servers.
+ You can find further download and installation instructions on the JBoss Wiki in the <ulink
+ url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink>
+ section.</para>
+ </section>
+ </section>
+</chapter>
Added: trunk/jmx/docs/reference/en-US/master.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/master.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/master.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY introduction SYSTEM "introduction.xml">
+<!ENTITY mbean_explorer SYSTEM "mbean_explorer.xml">
+<!ENTITY mbean_editor SYSTEM "mbean_editor.xml">
+<!ENTITY connection SYSTEM "connection.xml">
+<!ENTITY how_to SYSTEM "how_to.xml">
+<!ENTITY extensions SYSTEM "extensions.xml">
+<!ENTITY tasks SYSTEM "tasks.xml">
+<!ENTITY references SYSTEM "references.xml">
+<!ENTITY summary SYSTEM "summary.xml">
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+
+]>
+
+<book>
+
+ <bookinfo>
+ <title>JMX Tools Reference Guide</title>
+
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata format="PNG" fileref="images/jbosstools_logo.png" />
+ </imageobject>
+ <imageobject role="html">
+ <imagedata/>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 1.1.0.GA
+ </releaseinfo>
+<abstract>
+ <title/>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jmx_ref_guide/pdf/JM...">PDF version</ulink>
+ </para>
+</abstract>
+ </bookinfo>
+
+ <toc/>
+ &introduction;
+ &tasks;
+ &references;
+ &summary;
+ <!--&connection;
+ &how_to;
+ &extensions;
+ &mbean_explorer;
+ &mbean_editor;-->
+
+</book>
Added: trunk/jmx/docs/reference/en-US/master_output.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/master_output.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/master_output.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,634 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY mbean_explorer SYSTEM "modules/mbean_explorer.xml">
+<!ENTITY mbean_editor SYSTEM "modules/mbean_editor.xml">
+<!ENTITY connection SYSTEM "modules/connection.xml">
+<!ENTITY how_to SYSTEM "modules/how_to.xml">
+<!ENTITY extensions SYSTEM "modules/extensions.xml">
+<!ENTITY tasks SYSTEM "modules/tasks.xml">
+<!ENTITY references SYSTEM "modules/references.xml">
+<!ENTITY summary SYSTEM "modules/summary.xml">
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JMX Tools Reference Guide</title>
+
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 1.1.0.GA
+ </diffmk:wrapper></releaseinfo>
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jmx_ref_guide/pdf/JM...">PDF version</ulink>
+ </para>
+</abstract>
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="intruduction" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jmx/docs/reference/en/modules/introduction.xml" xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+
+ <title>Introduction</title>
+ <para><property moreinfo="none">JBoss Tools</property>' JMX project is a fork of <ulink url="http://code.google.com/p/eclipse-jmx/">eclipse-jmx</ulink>, a project by Jeff Mesnil.
+ It was forked with permission. </para>
+ <section>
+ <title>What is JMX Tools?</title>
+ <para><property moreinfo="none">JMX Tools</property> allows to setup multiple JMX connections and provides view
+ for exploring the JMX tree and execute operations directly from Eclipse.</para>
+
+ <para>This chapter covers the basics of working with <property moreinfo="none">JMX plugin</property>, which is
+ used to manage Java applications through JMX and its RMI Connector.</para>
+
+ <figure float="0">
+ <title>JMX Tools</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/eclipse-jmx_0.2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section><title>Key Features of JMX Tools</title>
+ <para>For a start, we propose you to look through the table of main features of JMX Tools:</para>
+ <table>
+
+ <title>Key Functionality for JMX Tools</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+ <colspec align="left" colnum="3" colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry><para>MBean Explorer</para></entry>
+ <entry><para>MBean Explorer is a useful view with a text filter that displays domains, mbeans, attributes, and operations inside a connection.</para></entry>
+ <entry>
+ <link linkend="mbean_explorer">MBean Explorer</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry><para>MBean Editor</para></entry>
+ <entry><para>MBean Editor is a multi-page editor to manage MBeans.</para></entry>
+ <entry>
+ <link linkend="mbean_editor">MBean Editor</link>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Requirements and Installation</title>
+ <section>
+ <title> Requirements</title>
+ <para>Requirements to use <property moreinfo="none">JMX Tools</property> are the following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><property moreinfo="none">JMX Tools</property> is developed on Eclipse 3.4.x milestones</para>
+ </listitem>
+ <listitem>
+ <para><property moreinfo="none">JMX Tools</property> requires that Eclipse is run on a JDK 1.5.0 or above
+ (due to dependencies on JMX packages which were introduced in Java 1.5.0)</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Installation</title>
+ <para>Here, we are going to explain how to install the <property moreinfo="none">JMX plugin</property> into
+ Eclipse.</para>
+
+ <para><property moreinfo="none">JMX Tools</property> is one module of the <property moreinfo="none">JBoss Tools</property>
+ project. <property moreinfo="none">JMX Tools</property> has no dependency on any other part of <property moreinfo="none">JBoss
+ Tools</property>, and can be downloaded standalone. Even though the <property moreinfo="none">JMX
+ Tools</property> have no dependencies, other plugins, such as <property moreinfo="none">AS Tools</property>,
+ do depend on the JMX Tooling and even extend it. </para>
+
+ <para>You can find the <property moreinfo="none">JBoss Tools</property> plugins over at the <ulink url="http://labs.jboss.com/tools/download.html">download pages</ulink>. The only
+ package you'll need to get is the JMX Tooling, however the <property moreinfo="none">AS
+ Tools</property> would give you a more full experience when using JMX with JBoss Servers.
+ You can find further download and installation instructions on the JBoss Wiki in the <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink>
+ section.</para>
+ </section>
+ </section>
+</chapter>
+
+
+<chapter id="tasks" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jmx/docs/reference/en/modules/tasks.xml" xreflabel="tasks">
+ <?dbhtml filename="tasks.html"?>
+ <title>JMX Tools Tasks</title>
+ <para>This chapter will give you answers on most popular questions asked by <property moreinfo="none">JMX
+ plugin</property> users.</para>
+ <section>
+ <title>Quick Start</title>
+
+ <para>To start using the <property moreinfo="none">JMX Tools</property>, it's necessary to open
+ <property moreinfo="none">MBean Explorer</property>. Go to <emphasis><property moreinfo="none">Window > Show View > Other</property></emphasis> and then select
+ <property moreinfo="none">MBean Explorer</property> and click <emphasis><property moreinfo="none">OK</property>.</emphasis></para>
+
+ <para>The <property moreinfo="none">MBean Explorer</property> lists all of the domains, mbeans, attributes, and operations inside a
+ connection. When you double-click on a MBean in the <emphasis><property moreinfo="none">MBean Explorer</property>,</emphasis> it opens a multi-page
+ editor to manage the MBean. The <property moreinfo="none">MBean Editor</property> is composed of these pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis><property moreinfo="none">Attributes page</property>,</emphasis> to get/set the attributes of the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property moreinfo="none">Operations page</property>,</emphasis> to invoke operations on the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property moreinfo="none">Notifications page</property>,</emphasis> to receive notifications from the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property moreinfo="none">Info page</property>,</emphasis> which displays general information about the MBean </para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section>
+ <title>Tomcat Managing</title>
+
+ <para>It's possible to manage Tomcat using <property moreinfo="none">JMX Tools</property>.</para>
+
+ <para>Currently, JMX Tooling is able to connect to Tomcat without authentication or with
+ password-based authentication.</para>
+ <para>Using SSL for authentication is not supported: you need to make sure that the System
+ property <emphasis>
+ <property moreinfo="none">com.sun.management.jmxremote.ssl</property>
+ </emphasis> is set to false. </para>
+ <para>More information to manage Tomcat can be found in Tomcat management
+ documentation.</para>
+ <para>Instructions to manage remotely Tomcat are available in Tomcat's monitoring
+ documentation.</para>
+
+ </section>
+
+ <section>
+ <title>Eclipse Equinox Managing</title>
+
+ <para>You can manage Equinox through the Equinox monitoring framework.</para>
+ <para>Once you have installed the Equinox monitoring framework and restarted Eclipse:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Go to <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Other</property>
+ </emphasis> and select the <property moreinfo="none">JMX perspective</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">JMX Server > Open Connection</property>
+ </emphasis> and click on <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>Switch to the <property moreinfo="none">MBean Explorer</property> by going to <emphasis>
+ <property moreinfo="none">Window > Show View > Other</property>
+ </emphasis> and selecting the MBean Explorer</para>
+ </listitem>
+
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property moreinfo="none">MBean Explorer</property> menu
+ bar </para>
+ </listitem>
+
+ <listitem>
+ <para>Select the <emphasis>
+ <property moreinfo="none">Advanced tab</property></emphasis> and set the JMX URL to <emphasis>
+ <property moreinfo="none">service:jmx:rmi:///jndi/rmi://:8118/jmxserver</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>You now have access to the MBeans exposed by Equinox.</para>
+ </section>
+
+
+ <section>
+ <title>Managing JBoss Instances</title>
+
+ <para>Managing JBoss instances is not supported with the <property moreinfo="none">JMX Tools</property>
+ alone. You must also download and install the <property moreinfo="none">AS Tools</property> portion of
+ the <property moreinfo="none">JBoss Tools</property> distribution. Even after installing the proper
+ tooling, you cannot create a JBoss JMX connection yourself or through the Connection
+ Wizard. The first step is to create a JBoss Server. The full instructions for this can
+ be found in the AS Tools section, however, the short summary is: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the <property moreinfo="none">JBoss Servers View</property> or the <property moreinfo="none">Servers
+ View</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Right-click in the view and select <emphasis>
+ <property moreinfo="none">New > Server</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>In the <emphasis>
+ <property moreinfo="none">JBoss Community</property>
+ </emphasis> section, select a server version</para>
+ </listitem>
+
+ <listitem>
+ <para>If a runtime has not yet been created, you'll be prompted for the
+ server's home directory, JDK, and configuration</para>
+ </listitem>
+
+ <listitem>
+ <para>Finish the wizard and note that you have a new entry in both the
+ <property moreinfo="none">JBoss Server View</property> and the <property moreinfo="none">MBean
+ Explorer</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Start the server by right-clicking it and selecting <emphasis>
+ <property moreinfo="none">Start</property></emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Note that once the server is started, the JMX connection can be
+ expanded</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Now you can explore MBeans exposed by a JBoss instance.</para>
+ </section>
+ <section id="extensions" xreflabel="extensions">
+ <title>Extension Task</title>
+ <para>This section will outline how to contribute your own Server type with some default
+ behavior.</para>
+
+ <section>
+ <title>Why we should do that?</title>
+
+ <para>You might be asking yourself why you'd need to extend this framework if JMX is
+ a standard. Perhaps you want a connection to be automatically created after some specific
+ action, or perhaps you want your connection wizard to do more than simply set a host and
+ port. JBoss, for example, requires setting some credentials on the client machine, but
+ using JBoss classes to do it. This requires that the connection have access to JBoss
+ jars.</para>
+ </section>
+
+ <section>
+ <title>Core Extensions</title>
+
+ <para>To create your own JMX Connection type, you must use the
+ org.jboss.tools.jmx.core.MBeanServerConnectionProvider extension point. This point takes
+ one child, a connectionProvider with a class that implements
+ org.jboss.tools.jmx.core.IConnectionProvider.</para>
+
+ <para>An IConnectionProvider is responsible for creation and deletion of IConnectionWrapper
+ objects. It must also keep a list of listeners that it is expected to inform when a
+ connection is added or removed from its list. </para>
+
+ <para>Each IConnectionWrapper is expected to handle running arbitrary JMX runnables or getting
+ a "Root" object representing all JMX nodes. There are some utility methods the
+ IConnectionWrapper can make use of.</para>
+ </section>
+
+ <section>
+ <title>UI Extensions</title>
+ <para>There are two extension points currently approved for use in the UI</para>
+ <itemizedlist>
+ <listitem>
+ <para>org.jboss.tools.jmx.ui.providerUI - provide an icon, id, displayable name, and
+ wizardPage class for creation of new connections</para>
+ </listitem>
+ <listitem>
+ <para>org.jboss.tools.jmx.ui.attribute.controls - allows you to map class types to some
+ Control to present them in the MBean Editor</para>
+ <para>We hope, this guide helped you to get started with the JBoss JMX Tools.
+ Besides, for additional information you are welcome on
+ <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ </section>
+ <section id="connection" xreflabel="connection">
+
+ <title>Connections Creation Task</title>
+
+ <para>The <property moreinfo="none">MBean Explorer</property> supports several different types of connections.
+ The tooling itself comes only with a default connection type, however other
+ adopters can provide additional connection types that may require additional
+ or non-spec behavior. Connections can be in either the connected state or
+ the disconnected state. Some connection types (such as the default connection type)
+ allow you to control the current state. Other connection types may not. </para>
+
+ <para>Similarly, some connection types may be able to be created, and others may not.
+ The default connection type, for example, can be created and deleted by you
+ at will. The AS Tools connection type, which represents a JBoss server, does not
+ allow you this level of control. A JBoss JMX connection is created when a JBoss server is created
+ in the server's view, and deleted when said server is deleted. The JMX connection for
+ this server is in the connected state only when the server is started. </para>
+
+
+ <section><title>The Default Connection</title>
+
+ <para> There are two ways to connect to an application with remote management enabled:</para>
+
+ <para> The first step is the same for both - to connect to a MBean Server, click on the
+ <emphasis>
+ <property moreinfo="none">New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property moreinfo="none">MBean Explorer</property> menu bar.</para>
+
+ <para>Then to follow the simple one you just need to specify host, port (and optionally user
+ name and password) and click <emphasis>
+ <property moreinfo="none">OK</property>.</emphasis></para>
+
+ <para>The default JMX URL is <emphasis>
+ <property moreinfo="none">service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi</property>.</emphasis></para>
+
+ <para>In case you need to connect to an application which has not used the "standard" JMX URL
+ (e.g. Eclipse Equinox), you need chose more advance way, where it's necessary to specify
+ explicitly a JMX URL in the Advanced tab of the JMX Connection window.</para>
+
+ <note>
+ <title>Note</title>
+ <para>Only JMX URL based on RMI are supported.</para>
+ </note>
+ </section>
+ </section>
+</chapter>
+
+
+
+<chapter id="references" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jmx/docs/reference/en/modules/references.xml" xreflabel="references">
+ <?dbhtml filename="references.html"?>
+ <title>References</title>
+
+ <section id="mbean_explorer" xreflabel="mbean_explorer">
+ <?dbhtml filename="mbean_explorer.html"?>
+
+ <title>MBean Explorer</title>
+ <para>The <property moreinfo="none">MBean Explorer</property> displays the MBean features (both attributes and operations) in its
+ hierarchy. Double-clicking on a feature will open a <property moreinfo="none">MBean Editor</property>, display the page
+ corresponding to the feature type and select the feature.</para>
+
+ <figure float="0">
+ <title>MBean Explorer Features</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-explorer-features.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Since it's possible to have many MBean Editors opened at the same time, the <property moreinfo="none">MBean Explorer</property>
+ has the Link With Editor button
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/link-with-editor_0.2.0.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+
+ to synchronize selections between the active <property moreinfo="none">MBean Editor</property> and
+ the <property moreinfo="none">MBean Explorer</property> (and vice versa).</para>
+
+ <para>The <property moreinfo="none">MBean Explorer</property> has also a filter text that can be used to filter among all the MBeans
+ the few ones, which interest you.</para>
+
+ <para>For example, if you are only interested by MBeans related to memory, typing memo will show
+ any node (domain, mbean, attribute, or operation) that matches that text, as well as
+ that node's parents and children. So if an MBean matches, all attributes and operations from
+ that bean will show. If, however, an attribute or operation name (a leaf node) matches,
+ only that node and its parents in the tree will show.</para>
+
+ <figure float="0">
+ <title>Query Filter</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-explorer-query.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The <emphasis>
+ <property moreinfo="none">Collapse All</property></emphasis> button
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/collaps_all.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+
+ on the <property moreinfo="none">MBean Explorer</property> toolbar is used to collapse all the MBeans and
+ display only the domains. It is also possible to double click on a node to expand/collapse it. </para>
+
+ </section>
+ <section id="mbean_editor" xreflabel="mbean_editor">
+ <?dbhtml filename="mbean_editor.html"?>
+
+ <title>MBean Editor</title>
+
+ <figure float="0">
+ <title>MBean Editor Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor_0.2.0.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property moreinfo="none">MBean Editor</property> is composed of several pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>the <emphasis>
+ <property moreinfo="none">Attributes</property></emphasis> page</para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property moreinfo="none">Operations</property></emphasis> page</para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property moreinfo="none">Notifications</property></emphasis> page </para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property moreinfo="none">Info</property></emphasis> page </para>
+ </listitem>
+ </itemizedlist>
+
+ <para> The <emphasis>
+ <property moreinfo="none">Attributes</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Operations</property>
+ </emphasis> pages display a list for either the MBean attributes or operations as well as
+ details for the selection.</para>
+
+ <para> It is possible to toggle the layout between the list and the details either vertically
+ (by default) or horizontally with the help of the special icons
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor-layout-buttons_0.2.0.png"></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the right top corner of the editor.</para>
+
+ <figure float="0">
+ <title>MBean Editor Horizontal Layout</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor-horizontal-layout_0.2.0.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure diffmk:change="added" float="0" id="figu-Beginners_Guide-Visual_Web_Tools-Visual_Page_Editor">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Visual Page Editor</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/mbean-editor-horizontal-layout_0.2.0.png" format="PNG" width="444"></imagedata>
+ </imageobject>
+ <textobject diffmk:change="added">
+ <phrase diffmk:change="added"><diffmk:wrapper diffmk:change="added">
+ The Visual Page Editor, showing both the source and a visual preview simultaneously.
+ </diffmk:wrapper></phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <section>
+ <title>Notifications Page</title>
+ <para>One more page in the <property moreinfo="none">MBean Editor</property> is the <emphasis>
+ <property moreinfo="none">Notifications</property></emphasis> page, which gives the possibility to
+ subscribe (resp. unsubscribe) to a MBean to receive its notifications by checking (resp.
+ unchecking) the <emphasis>
+ <property moreinfo="none">Subscribe</property></emphasis> button in the right top corner. </para>
+ <para>The list of notifications is refreshed every time a new notification is
+ received:</para>
+
+ <figure float="0">
+ <title>MBean Editor Notifications Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/notifications.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note</title>
+ <para>It is only possible to subscribe to MBean, which emits notifications (they must be
+ NotificationBroadcaster).</para>
+ </note>
+
+ </section>
+
+ </section>
+
+ </chapter>
+
+
+<chapter xml:base="file:///home/vchukhutsina/repos/ochik_jboss/jmx/docs/reference/en/modules/summary.xml">
+ <?dbhtml filename="summary.html"?>
+ <title>Summary</title>
+ <para>In conclusion, with this document you could easily start with JXM Tools.
+ The chapters above walked you through the steps on how to do Tomcat,Eclipse Equinox or JBoss Instances managing and how to create new JMX connections.
+ The document also includes the reference of JMX Tools features.
+
+ If you have questions or suggestions concerned both the documentation and tools behavior,
+ you are welcome to JBoss Tools Users forum.
+ Please, use Jira to report bugs and requests on documentation.</para>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at
+ <ulink url="http://docs.jboss.org/tools">http://docs.jboss.org/tools</ulink> in the corresponding release directory.
+ </para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs">http://download.jboss.org/jbosstools/nightly-docs</ulink>. </para>
+ <para>You can find a set of benefits and other extra information on:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/community/wiki/JBossMX">JBoss Wiki</ulink>
+ </para>
+ </listitem>
+ <listitem><para>For more information about JMX technology please visit
+ <ulink url="http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/">
+ JMX Technology Home Page</ulink></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+</chapter>
+ <!--&connection;
+ &how_to;
+ &extensions;
+ &mbean_explorer;
+ &mbean_editor;-->
+
+</book>
Added: trunk/jmx/docs/reference/en-US/mbean_editor.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/mbean_editor.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/mbean_editor.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="mbean_editor" xreflabel="mbean_editor">
+ <?dbhtml filename="mbean_editor.html"?>
+
+ <title>MBean Editor</title>
+
+ <figure>
+ <title>MBean Editor Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor_0.2.0.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property>MBean Editor</property> is composed of several pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>the <emphasis>
+ <property>Attributes</property></emphasis> page</para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property>Operations</property></emphasis> page</para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property>Notifications</property></emphasis> page </para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property>Info</property></emphasis> page </para>
+ </listitem>
+ </itemizedlist>
+
+ <para> The <emphasis>
+ <property>Attributes</property>
+ </emphasis> and <emphasis>
+ <property>Operations</property>
+ </emphasis> pages display a list for either the MBean attributes or operations as well as
+ details for the selection.</para>
+
+ <para> It is possible to toggle the layout between the list and the details either vertically
+ (by default) or horizontally with the help of the special icons
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor-layout-buttons_0.2.0.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the right top corner of the editor.</para>
+
+ <figure>
+ <title>MBean Editor Horizontal Layout</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor-horizontal-layout_0.2.0.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section>
+ <title>Notifications Page</title>
+ <para>One more page in the <property>MBean Editor</property> is the <emphasis>
+ <property>Notifications</property></emphasis> page, which gives the possibility to
+ subscribe (resp. unsubscribe) to a MBean to receive its notifications by checking (resp.
+ unchecking) the <emphasis>
+ <property>Subscribe</property></emphasis> button in the right top corner. </para>
+ <para>The list of notifications is refreshed every time a new notification is
+ received:</para>
+
+ <figure>
+ <title>MBean Editor Notifications Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/notifications.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note</title>
+ <para>It is only possible to subscribe to MBean, which emits notifications (they must be
+ NotificationBroadcaster).</para>
+ </note>
+
+ </section>
+
+</chapter>
Added: trunk/jmx/docs/reference/en-US/mbean_explorer.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/mbean_explorer.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/mbean_explorer.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="mbean_explorer" xreflabel="mbean_explorer">
+ <?dbhtml filename="mbean_explorer.html"?>
+
+ <title>MBean Explorer</title>
+ <para>The <property>MBean Explorer</property> displays the MBean features (both attributes and operations) in its
+ hierarchy. Double-clicking on a feature will open a <property>MBean Editor</property>, display the page
+ corresponding to the feature type and select the feature.</para>
+
+ <figure>
+ <title>MBean Explorer Features</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-explorer-features.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Since it's possible to have many MBean Editors opened at the same time, the <property>MBean Explorer</property>
+ has the Link With Editor button
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/link-with-editor_0.2.0.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ to synchronize selections between the active <property>MBean Editor</property> and
+ the <property>MBean Explorer</property> (and vice versa).</para>
+
+ <para>The <property>MBean Explorer</property> has also a filter text that can be used to filter among all the MBeans
+ the few ones, which interest you.</para>
+
+ <para>For example, if you are only interested by MBeans related to memory, typing memo will show
+ any node (domain, mbean, attribute, or operation) that matches that text, as well as
+ that node's parents and children. So if an MBean matches, all attributes and operations from
+ that bean will show. If, however, an attribute or operation name (a leaf node) matches,
+ only that node and its parents in the tree will show.</para>
+
+ <figure>
+ <title>Query Filter</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-explorer-query.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The <emphasis>
+ <property>Collapse All</property></emphasis> button
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/collaps_all.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ on the <property>MBean Explorer</property> toolbar is used to collapse all the MBeans and
+ display only the domains. It is also possible to double click on a node to expand/collapse it. </para>
+
+</chapter>
Added: trunk/jmx/docs/reference/en-US/references.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/references.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/references.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="references" xreflabel="references">
+ <?dbhtml filename="references.html"?>
+ <title>References</title>
+
+ <section id="mbean_explorer" xreflabel="mbean_explorer">
+ <?dbhtml filename="mbean_explorer.html"?>
+
+ <title>MBean Explorer</title>
+ <para>The <property>MBean Explorer</property> displays the MBean features (both attributes and operations) in its
+ hierarchy. Double-clicking on a feature will open a <property>MBean Editor</property>, display the page
+ corresponding to the feature type and select the feature.</para>
+
+ <figure>
+ <title>MBean Explorer Features</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-explorer-features.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Since it's possible to have many MBean Editors opened at the same time, the <property>MBean Explorer</property>
+ has the Link With Editor button
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/link-with-editor_0.2.0.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ to synchronize selections between the active <property>MBean Editor</property> and
+ the <property>MBean Explorer</property> (and vice versa).</para>
+
+ <para>The <property>MBean Explorer</property> has also a filter text that can be used to filter among all the MBeans
+ the few ones, which interest you.</para>
+
+ <para>For example, if you are only interested by MBeans related to memory, typing memo will show
+ any node (domain, mbean, attribute, or operation) that matches that text, as well as
+ that node's parents and children. So if an MBean matches, all attributes and operations from
+ that bean will show. If, however, an attribute or operation name (a leaf node) matches,
+ only that node and its parents in the tree will show.</para>
+
+ <figure>
+ <title>Query Filter</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-explorer-query.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The <emphasis>
+ <property>Collapse All</property></emphasis> button
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/collaps_all.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ on the <property>MBean Explorer</property> toolbar is used to collapse all the MBeans and
+ display only the domains. It is also possible to double click on a node to expand/collapse it. </para>
+
+ </section>
+ <section id="mbean_editor" xreflabel="mbean_editor">
+ <?dbhtml filename="mbean_editor.html"?>
+
+ <title>MBean Editor</title>
+
+ <figure>
+ <title>MBean Editor Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor_0.2.0.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property>MBean Editor</property> is composed of several pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>the <emphasis>
+ <property>Attributes</property></emphasis> page</para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property>Operations</property></emphasis> page</para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property>Notifications</property></emphasis> page </para>
+ </listitem>
+ <listitem>
+ <para>the <emphasis>
+ <property>Info</property></emphasis> page </para>
+ </listitem>
+ </itemizedlist>
+
+ <para> The <emphasis>
+ <property>Attributes</property>
+ </emphasis> and <emphasis>
+ <property>Operations</property>
+ </emphasis> pages display a list for either the MBean attributes or operations as well as
+ details for the selection.</para>
+
+ <para> It is possible to toggle the layout between the list and the details either vertically
+ (by default) or horizontally with the help of the special icons
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor-layout-buttons_0.2.0.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the right top corner of the editor.</para>
+
+ <figure>
+ <title>MBean Editor Horizontal Layout</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor-horizontal-layout_0.2.0.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure id="figu-Beginners_Guide-Visual_Web_Tools-Visual_Page_Editor">
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mbean-editor-horizontal-layout_0.2.0.png" format="PNG" width="444" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The Visual Page Editor, showing both the source and a visual preview simultaneously.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <section>
+ <title>Notifications Page</title>
+ <para>One more page in the <property>MBean Editor</property> is the <emphasis>
+ <property>Notifications</property></emphasis> page, which gives the possibility to
+ subscribe (resp. unsubscribe) to a MBean to receive its notifications by checking (resp.
+ unchecking) the <emphasis>
+ <property>Subscribe</property></emphasis> button in the right top corner. </para>
+ <para>The list of notifications is refreshed every time a new notification is
+ received:</para>
+
+ <figure>
+ <title>MBean Editor Notifications Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/notifications.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note</title>
+ <para>It is only possible to subscribe to MBean, which emits notifications (they must be
+ NotificationBroadcaster).</para>
+ </note>
+
+ </section>
+
+ </section>
+
+ </chapter>
Added: trunk/jmx/docs/reference/en-US/summary.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/summary.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/summary.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter>
+ <?dbhtml filename="summary.html"?>
+ <title>Summary</title>
+ <para>In conclusion, with this document you could easily start with JXM Tools.
+ The chapters above walked you through the steps on how to do Tomcat,Eclipse Equinox or JBoss Instances managing and how to create new JMX connections.
+ The document also includes the reference of JMX Tools features.
+
+ If you have questions or suggestions concerned both the documentation and tools behavior,
+ you are welcome to JBoss Tools Users forum.
+ Please, use Jira to report bugs and requests on documentation.</para>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools release documentation you can find at
+ <ulink url="http://docs.jboss.org/tools">http://docs.jboss.org/tools</ulink> in the corresponding release directory.
+ </para>
+ <para>The latest documentation builds are available at <ulink url="http://download.jboss.org/jbosstools/nightly-docs">http://download.jboss.org/jbosstools/nightly-docs</ulink>. </para>
+ <para>You can find a set of benefits and other extra information on:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/community/wiki/JBossMX">JBoss Wiki</ulink>
+ </para>
+ </listitem>
+ <listitem><para>For more information about JMX technology please visit
+ <ulink url="http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/">
+ JMX Technology Home Page</ulink></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+</chapter>
\ No newline at end of file
Added: trunk/jmx/docs/reference/en-US/tasks.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/tasks.xml (rev 0)
+++ trunk/jmx/docs/reference/en-US/tasks.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,259 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="tasks" xreflabel="tasks">
+ <?dbhtml filename="tasks.html"?>
+ <title>JMX Tools Tasks</title>
+ <para>This chapter will give you answers on most popular questions asked by <property>JMX
+ plugin</property> users.</para>
+ <section>
+ <title>Quick Start</title>
+
+ <para>To start using the <property>JMX Tools</property>, it's necessary to open
+ <property>MBean Explorer</property>. Go to <emphasis><property>Window > Show View > Other</property></emphasis> and then select
+ <property>MBean Explorer</property> and click <emphasis><property>OK</property>.</emphasis></para>
+
+ <para>The <property>MBean Explorer</property> lists all of the domains, mbeans, attributes, and operations inside a
+ connection. When you double-click on a MBean in the <emphasis><property>MBean Explorer</property>,</emphasis> it opens a multi-page
+ editor to manage the MBean. The <property>MBean Editor</property> is composed of these pages:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis><property>Attributes page</property>,</emphasis> to get/set the attributes of the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property>Operations page</property>,</emphasis> to invoke operations on the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property>Notifications page</property>,</emphasis> to receive notifications from the MBean</para>
+ </listitem>
+ <listitem>
+ <para><emphasis><property>Info page</property>,</emphasis> which displays general information about the MBean </para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section>
+ <title>Tomcat Managing</title>
+
+ <para>It's possible to manage Tomcat using <property>JMX Tools</property>.</para>
+
+ <para>Currently, JMX Tooling is able to connect to Tomcat without authentication or with
+ password-based authentication.</para>
+ <para>Using SSL for authentication is not supported: you need to make sure that the System
+ property <emphasis>
+ <property>com.sun.management.jmxremote.ssl</property>
+ </emphasis> is set to false. </para>
+ <para>More information to manage Tomcat can be found in Tomcat management
+ documentation.</para>
+ <para>Instructions to manage remotely Tomcat are available in Tomcat's monitoring
+ documentation.</para>
+
+ </section>
+
+ <section>
+ <title>Eclipse Equinox Managing</title>
+
+ <para>You can manage Equinox through the Equinox monitoring framework.</para>
+ <para>Once you have installed the Equinox monitoring framework and restarted Eclipse:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Go to <emphasis>
+ <property>Window > Open Perspective > Other</property>
+ </emphasis> and select the <property>JMX perspective</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Select <emphasis>
+ <property>JMX Server > Open Connection</property>
+ </emphasis> and click on <emphasis>
+ <property>OK</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>Switch to the <property>MBean Explorer</property> by going to <emphasis>
+ <property>Window > Show View > Other</property>
+ </emphasis> and selecting the MBean Explorer</para>
+ </listitem>
+
+ <listitem>
+ <para>Click on the <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu
+ bar </para>
+ </listitem>
+
+ <listitem>
+ <para>Select the <emphasis>
+ <property>Advanced tab</property></emphasis> and set the JMX URL to <emphasis>
+ <property>service:jmx:rmi:///jndi/rmi://:8118/jmxserver</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>You now have access to the MBeans exposed by Equinox.</para>
+ </section>
+
+
+ <section>
+ <title>Managing JBoss Instances</title>
+
+ <para>Managing JBoss instances is not supported with the <property>JMX Tools</property>
+ alone. You must also download and install the <property>AS Tools</property> portion of
+ the <property>JBoss Tools</property> distribution. Even after installing the proper
+ tooling, you cannot create a JBoss JMX connection yourself or through the Connection
+ Wizard. The first step is to create a JBoss Server. The full instructions for this can
+ be found in the AS Tools section, however, the short summary is: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the <property>JBoss Servers View</property> or the <property>Servers
+ View</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Right-click in the view and select <emphasis>
+ <property>New > Server</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>In the <emphasis>
+ <property>JBoss Community</property>
+ </emphasis> section, select a server version</para>
+ </listitem>
+
+ <listitem>
+ <para>If a runtime has not yet been created, you'll be prompted for the
+ server's home directory, JDK, and configuration</para>
+ </listitem>
+
+ <listitem>
+ <para>Finish the wizard and note that you have a new entry in both the
+ <property>JBoss Server View</property> and the <property>MBean
+ Explorer</property></para>
+ </listitem>
+
+ <listitem>
+ <para>Start the server by right-clicking it and selecting <emphasis>
+ <property>Start</property></emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Note that once the server is started, the JMX connection can be
+ expanded</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Now you can explore MBeans exposed by a JBoss instance.</para>
+ </section>
+ <section id="extensions" xreflabel="extensions">
+ <title>Extension Task</title>
+ <para>This section will outline how to contribute your own Server type with some default
+ behavior.</para>
+
+ <section>
+ <title>Why we should do that?</title>
+
+ <para>You might be asking yourself why you'd need to extend this framework if JMX is
+ a standard. Perhaps you want a connection to be automatically created after some specific
+ action, or perhaps you want your connection wizard to do more than simply set a host and
+ port. JBoss, for example, requires setting some credentials on the client machine, but
+ using JBoss classes to do it. This requires that the connection have access to JBoss
+ jars.</para>
+ </section>
+
+ <section>
+ <title>Core Extensions</title>
+
+ <para>To create your own JMX Connection type, you must use the
+ org.jboss.tools.jmx.core.MBeanServerConnectionProvider extension point. This point takes
+ one child, a connectionProvider with a class that implements
+ org.jboss.tools.jmx.core.IConnectionProvider.</para>
+
+ <para>An IConnectionProvider is responsible for creation and deletion of IConnectionWrapper
+ objects. It must also keep a list of listeners that it is expected to inform when a
+ connection is added or removed from its list. </para>
+
+ <para>Each IConnectionWrapper is expected to handle running arbitrary JMX runnables or getting
+ a "Root" object representing all JMX nodes. There are some utility methods the
+ IConnectionWrapper can make use of.</para>
+ </section>
+
+ <section>
+ <title>UI Extensions</title>
+ <para>There are two extension points currently approved for use in the UI</para>
+ <itemizedlist>
+ <listitem>
+ <para>org.jboss.tools.jmx.ui.providerUI - provide an icon, id, displayable name, and
+ wizardPage class for creation of new connections</para>
+ </listitem>
+ <listitem>
+ <para>org.jboss.tools.jmx.ui.attribute.controls - allows you to map class types to some
+ Control to present them in the MBean Editor</para>
+ <para>We hope, this guide helped you to get started with the JBoss JMX Tools. Besides, for additional information you are welcome on <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ </section>
+ <section id="connection" xreflabel="connection">
+
+ <title>Connections Creation Task</title>
+
+ <para>The <property>MBean Explorer</property> supports several different types of connections.
+ The tooling itself comes only with a default connection type, however other
+ adopters can provide additional connection types that may require additional
+ or non-spec behavior. Connections can be in either the connected state or
+ the disconnected state. Some connection types (such as the default connection type)
+ allow you to control the current state. Other connection types may not. </para>
+
+ <para>Similarly, some connection types may be able to be created, and others may not.
+ The default connection type, for example, can be created and deleted by you
+ at will. The AS Tools connection type, which represents a JBoss server, does not
+ allow you this level of control. A JBoss JMX connection is created when a JBoss server is created
+ in the server's view, and deleted when said server is deleted. The JMX connection for
+ this server is in the connected state only when the server is started. </para>
+
+
+ <section><title>The Default Connection</title>
+
+ <para> There are two ways to connect to an application with remote management enabled:</para>
+
+ <para> The first step is the same for both - to connect to a MBean Server, click on the
+ <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu bar.</para>
+
+ <para>Then to follow the simple one you just need to specify host, port (and optionally user
+ name and password) and click <emphasis>
+ <property>OK</property>.</emphasis></para>
+
+ <para>The default JMX URL is <emphasis>
+ <property>service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi</property>.</emphasis></para>
+
+ <para>In case you need to connect to an application which has not used the "standard" JMX URL
+ (e.g. Eclipse Equinox), you need chose more advance way, where it's necessary to specify
+ explicitly a JMX URL in the Advanced tab of the JMX Connection window.</para>
+
+ <note>
+ <title>Note</title>
+ <para>Only JMX URL based on RMI are supported.</para>
+ </note>
+ </section>
+ </section>
+</chapter>
+
Modified: trunk/jmx/docs/reference/pom.xml
===================================================================
--- trunk/jmx/docs/reference/pom.xml 2010-03-04 17:02:28 UTC (rev 20674)
+++ trunk/jmx/docs/reference/pom.xml 2010-03-05 00:58:52 UTC (rev 20675)
@@ -97,9 +97,9 @@
<configuration>
<sourceDocumentName>${master}</sourceDocumentName>
- <sourceDirectory>${pom.basedir}/en</sourceDirectory>
+ <sourceDirectory>${pom.basedir}/en-US</sourceDirectory>
<imageResource>
- <directory>${pom.basedir}/en</directory>
+ <directory>${pom.basedir}/en-US</directory>
<includes>
<include>images/**/*</include>
</includes>
Added: trunk/jmx/docs/reference/publican.cfg
===================================================================
--- trunk/jmx/docs/reference/publican.cfg (rev 0)
+++ trunk/jmx/docs/reference/publican.cfg 2010-03-05 00:58:52 UTC (rev 20675)
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Fri Nov 20 13:19:45 2009
+
+xml_lang: en-US
+type: Book
+brand: JBoss
+
14 years, 3 months
JBoss Tools SVN: r20674 - in trunk/jbpm/plugins: org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-03-04 12:02:28 -0500 (Thu, 04 Mar 2010)
New Revision: 20674
Added:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java
Log:
JBIDE-5951: jBPM3 runtime from JBDS 2.1.1 workspace is missing when opened in 3.0.0 CR2
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -30,7 +30,7 @@
}
public PreferencesManager getPreferencesManager() {
- return PreferencesManager.INSTANCE;
+ return PreferencesManager.getInstance();
}
public void start(BundleContext context) throws Exception {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -36,7 +36,7 @@
clearMarkers((IFile)resource);
ValidationResult validationResult = super.validate(resource, kind, state, monitor);
if (!(resource instanceof IFile) || resource == null) return validationResult;
- PreferencesManager manager = PreferencesManager.INSTANCE;
+ PreferencesManager manager = PreferencesManager.getInstance();
if (manager == null) return validationResult;
String jbpmName = Activator.getDefault().getPluginPreferences().getString(Constants.JBPM_NAME);
if (jbpmName == null) return validationResult;
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -30,7 +30,7 @@
}
public PreferencesManager getPreferencesManager() {
- return PreferencesManager.INSTANCE;
+ return PreferencesManager.getInstance();
}
public void start(BundleContext context) throws Exception {
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -185,7 +185,7 @@
}
private boolean isNameAlreadyUsed() {
- return PreferencesManager.INSTANCE.getJbpmInstallation(nameText.getText()) != null;
+ return PreferencesManager.getInstance().getJbpmInstallation(nameText.getText()) != null;
}
private boolean isLocationExisting() {
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -178,7 +178,7 @@
}
private void initializeInput(TableViewer viewer) {
- viewer.setInput(PreferencesManager.INSTANCE);
+ viewer.setInput(PreferencesManager.getInstance());
checkItemToCheck(viewer);
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -43,9 +43,16 @@
private Map<String, JbpmInstallation> jbpmInstallations = null;
private File installationsFile = null;
- public static final PreferencesManager INSTANCE = new PreferencesManager();
+ private static PreferencesManager INSTANCE;
- private PreferencesManager() {
+ public static PreferencesManager getInstance() {
+ if (INSTANCE == null) {
+ INSTANCE = new PreferencesManager();
+ }
+ return INSTANCE;
+ }
+
+ protected PreferencesManager() {
initializeInstallations();
}
@@ -63,7 +70,7 @@
return jbpmInstallations;
}
- private Preferences getPreferences() {
+ protected Preferences getPreferences() {
return Activator.getDefault().getPluginPreferences();
}
@@ -86,10 +93,10 @@
}
}
- private void loadInstallations() {
+ protected void loadInstallations(File installationsFile) {
Reader reader = null;
try {
- reader = new FileReader(getInstallationFile());
+ reader = new FileReader(installationsFile);
XMLMemento memento = XMLMemento.createReadRoot(reader);
IMemento[] children = memento.getChildren("installation");
for (int i = 0; i < children.length; i++) {
@@ -114,6 +121,10 @@
}
}
+ protected void loadInstallations() {
+ loadInstallations(getInstallationFile());
+ }
+
public void saveInstallations() {
XMLMemento memento = XMLMemento.createWriteRoot("installations");
Iterator<String> iterator = getJbpmInstallations().keySet().iterator();
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-03-04 17:02:28 UTC (rev 20674)
@@ -355,8 +355,9 @@
class="org.jbpm.gd.jpdl.util.JbpmClasspathContainerInitializer"
id="JBPM"/>
</extension>
-
- <extension
+
+
+ <extension
point="org.eclipse.ui.preferencePages">
<page class="org.jboss.tools.jbpm.preferences.DefaultPage"
id="org.jbpm.gd.jpdl.prefs.jbpm3"
@@ -367,9 +368,6 @@
id="org.jbpm.gd.jpdl.prefs.assignmentTypes"
name="Assignment Types"
category="org.jbpm.gd.jpdl.prefs.jbpm3">
- <enablement>
- <systemProperty name="MyTestProperty" value="puppy"/>
- </enablement>
</page>
<page
class="org.jbpm.gd.jpdl.prefs.ServerDeploymentPage"
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -25,6 +25,7 @@
import java.util.ResourceBundle;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
import org.osgi.framework.BundleContext;
public class Plugin extends AbstractUIPlugin implements Constants {
@@ -45,6 +46,7 @@
public void start(BundleContext context) throws Exception {
super.start(context);
+ Jbpm3PreferencesManager.INSTANCE.getPreferredJbpmName();
}
public void stop(BundleContext context) throws Exception {
Added: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java (rev 0)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.gd.jpdl.prefs;
+
+import java.io.File;
+
+import org.jboss.tools.jbpm.Constants;
+import org.jboss.tools.jbpm.preferences.PreferencesManager;
+import org.jbpm.gd.jpdl.Plugin;
+
+public class Jbpm3PreferencesManager extends PreferencesManager {
+
+ public static final Jbpm3PreferencesManager INSTANCE = new Jbpm3PreferencesManager();
+
+ protected Jbpm3PreferencesManager() {
+ super();
+ initialize();
+ }
+
+ void initialize() {
+ initializeInstallations();
+ initializePreferredJbpmName();
+ }
+
+ private void initializeInstallations() {
+ File installationsFile =
+ Plugin.getDefault().getStateLocation().append("jbpm-installations.xml").toFile();
+ if (installationsFile.exists()) {
+ loadInstallations(installationsFile);
+ saveInstallations();
+ loadInstallations();
+ }
+ installationsFile.delete();
+ }
+
+ private void initializePreferredJbpmName() {
+ String preferredJbpmName = Plugin.getDefault().getPluginPreferences().getString(Constants.JBPM_NAME);
+ if (preferredJbpmName != null) {
+ setPreferredJbpmName(preferredJbpmName);
+ }
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -28,15 +28,15 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
public class JbpmClasspathContainerInitializer extends
ClasspathContainerInitializer {
private JbpmInstallation getJbpmInstallation(IPath containerPath) {
String jbpmInstallationName = containerPath.lastSegment();
- return PreferencesManager.INSTANCE.getJbpmInstallation(jbpmInstallationName);
+ return Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(jbpmInstallationName);
}
public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -48,9 +48,9 @@
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
import org.jbpm.gd.jpdl.Plugin;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
public class NewProcessDefinitionWizard extends Wizard implements INewWizard {
@@ -141,7 +141,7 @@
IProject project = page.getProcessFolder().getProject();
String jbpmName = project.getPersistentProperty(new QualifiedName("", "jbpmName"));
if (jbpmName == null) return "";
- JbpmInstallation jbpmInstallation = PreferencesManager.INSTANCE.getJbpmInstallation(jbpmName);
+ JbpmInstallation jbpmInstallation = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(jbpmName);
if (jbpmInstallation == null) return "";
String location = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(jbpmInstallation.location);
if (location == null) return "";
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -35,7 +35,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
public class NewProcessProjectDetailsWizardPage extends WizardPage {
@@ -91,7 +91,7 @@
}
private void fillComboWithPreferenceRuntimes() {
- Map<String, JbpmInstallation> installations = PreferencesManager.INSTANCE.getJbpmInstallationMap();
+ Map<String, JbpmInstallation> installations = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallationMap();
Iterator<String> iterator = installations.keySet().iterator();
int counter = 0;
while (iterator.hasNext()) {
@@ -100,7 +100,7 @@
if ("jBPM3".equals(installation.version)) {
counter++;
combo.add(next);
- if (PreferencesManager.INSTANCE.getPreferredJbpmName().equals(next)) {
+ if (Jbpm3PreferencesManager.INSTANCE.getPreferredJbpmName().equals(next)) {
combo.select(counter - 1);
}
}
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java 2010-03-04 16:31:46 UTC (rev 20673)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java 2010-03-04 17:02:28 UTC (rev 20674)
@@ -84,8 +84,8 @@
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
import org.eclipse.ui.part.ISetSelectionTarget;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
import org.jbpm.gd.jpdl.util.JbpmClasspathContainer;
public class NewProcessProjectWizard extends Wizard implements INewWizard {
@@ -115,7 +115,7 @@
}
private boolean isJbpm3RuntimeAvailable() {
- Map<String, JbpmInstallation> installations = PreferencesManager.INSTANCE.getJbpmInstallationMap();
+ Map<String, JbpmInstallation> installations = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallationMap();
Iterator<String> iterator = installations.keySet().iterator();
while (iterator.hasNext()) {
JbpmInstallation installation = installations.get(iterator.next());
@@ -191,7 +191,7 @@
}
private JbpmInstallation getJbpmInstallation() {
- return PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
+ return Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
}
private void createJbpmLibraryContainer(IJavaProject javaProject) throws JavaModelException {
@@ -258,7 +258,7 @@
}
private void createSimpleProcessDefinition(IJavaProject javaProject) throws CoreException, JavaModelException, IOException {
- JbpmInstallation jbpmInstallation = PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
+ JbpmInstallation jbpmInstallation = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
if (jbpmInstallation == null) return;
// IFolder processesFolder = javaProject.getProject().getFolder("processes");
// if (!processesFolder.exists()) {
@@ -305,7 +305,7 @@
}
private void copyJbpmResources(IJavaProject javaProject) throws CoreException {
- JbpmInstallation jbpmInstallation = PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
+ JbpmInstallation jbpmInstallation = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
if (jbpmInstallation == null) return;
String location = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(jbpmInstallation.location);
IFolder folder = javaProject.getProject().getFolder("src/main/config");
@@ -440,7 +440,7 @@
String name = configureRuntimePage.nameText.getText();
String location = configureRuntimePage.locationText.getText();
String version = "jBPM3";
- PreferencesManager.INSTANCE.initializeDefaultJbpmInstallation(name, location, version);
+ Jbpm3PreferencesManager.INSTANCE.initializeDefaultJbpmInstallation(name, location, version);
}
getContainer().updateButtons();
createJavaProject();
14 years, 3 months
JBoss Tools SVN: r20673 - in branches/jbosstools-3.1.x/jbpm/plugins: org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2010-03-04 11:31:46 -0500 (Thu, 04 Mar 2010)
New Revision: 20673
Added:
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java
Modified:
branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java
branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java
Log:
JBIDE-5951: jBPM3 runtime from JBDS 2.1.1 workspace is missing when opened in 3.0.0 CR2
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -30,7 +30,7 @@
}
public PreferencesManager getPreferencesManager() {
- return PreferencesManager.INSTANCE;
+ return PreferencesManager.getInstance();
}
public void start(BundleContext context) throws Exception {
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -36,7 +36,7 @@
clearMarkers((IFile)resource);
ValidationResult validationResult = super.validate(resource, kind, state, monitor);
if (!(resource instanceof IFile) || resource == null) return validationResult;
- PreferencesManager manager = PreferencesManager.INSTANCE;
+ PreferencesManager manager = PreferencesManager.getInstance();
if (manager == null) return validationResult;
String jbpmName = Activator.getDefault().getPluginPreferences().getString(Constants.JBPM_NAME);
if (jbpmName == null) return validationResult;
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -30,7 +30,7 @@
}
public PreferencesManager getPreferencesManager() {
- return PreferencesManager.INSTANCE;
+ return PreferencesManager.getInstance();
}
public void start(BundleContext context) throws Exception {
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -185,7 +185,7 @@
}
private boolean isNameAlreadyUsed() {
- return PreferencesManager.INSTANCE.getJbpmInstallation(nameText.getText()) != null;
+ return PreferencesManager.getInstance().getJbpmInstallation(nameText.getText()) != null;
}
private boolean isLocationExisting() {
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -178,7 +178,7 @@
}
private void initializeInput(TableViewer viewer) {
- viewer.setInput(PreferencesManager.INSTANCE);
+ viewer.setInput(PreferencesManager.getInstance());
checkItemToCheck(viewer);
}
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -43,9 +43,16 @@
private Map<String, JbpmInstallation> jbpmInstallations = null;
private File installationsFile = null;
- public static final PreferencesManager INSTANCE = new PreferencesManager();
+ private static PreferencesManager INSTANCE;
- private PreferencesManager() {
+ public static PreferencesManager getInstance() {
+ if (INSTANCE == null) {
+ INSTANCE = new PreferencesManager();
+ }
+ return INSTANCE;
+ }
+
+ protected PreferencesManager() {
initializeInstallations();
}
@@ -63,7 +70,7 @@
return jbpmInstallations;
}
- private Preferences getPreferences() {
+ protected Preferences getPreferences() {
return Activator.getDefault().getPluginPreferences();
}
@@ -86,10 +93,10 @@
}
}
- private void loadInstallations() {
+ protected void loadInstallations(File installationsFile) {
Reader reader = null;
try {
- reader = new FileReader(getInstallationFile());
+ reader = new FileReader(installationsFile);
XMLMemento memento = XMLMemento.createReadRoot(reader);
IMemento[] children = memento.getChildren("installation");
for (int i = 0; i < children.length; i++) {
@@ -114,6 +121,10 @@
}
}
+ protected void loadInstallations() {
+ loadInstallations(getInstallationFile());
+ }
+
public void saveInstallations() {
XMLMemento memento = XMLMemento.createWriteRoot("installations");
Iterator<String> iterator = getJbpmInstallations().keySet().iterator();
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-03-04 16:31:46 UTC (rev 20673)
@@ -355,8 +355,9 @@
class="org.jbpm.gd.jpdl.util.JbpmClasspathContainerInitializer"
id="JBPM"/>
</extension>
-
- <extension
+
+
+ <extension
point="org.eclipse.ui.preferencePages">
<page class="org.jboss.tools.jbpm.preferences.DefaultPage"
id="org.jbpm.gd.jpdl.prefs.jbpm3"
@@ -367,9 +368,6 @@
id="org.jbpm.gd.jpdl.prefs.assignmentTypes"
name="Assignment Types"
category="org.jbpm.gd.jpdl.prefs.jbpm3">
- <enablement>
- <systemProperty name="MyTestProperty" value="puppy"/>
- </enablement>
</page>
<page
class="org.jbpm.gd.jpdl.prefs.ServerDeploymentPage"
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -25,6 +25,7 @@
import java.util.ResourceBundle;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
import org.osgi.framework.BundleContext;
public class Plugin extends AbstractUIPlugin implements Constants {
@@ -45,6 +46,7 @@
public void start(BundleContext context) throws Exception {
super.start(context);
+ Jbpm3PreferencesManager.INSTANCE.getPreferredJbpmName();
}
public void stop(BundleContext context) throws Exception {
Added: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java (rev 0)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.gd.jpdl.prefs;
+
+import java.io.File;
+
+import org.jboss.tools.jbpm.Constants;
+import org.jboss.tools.jbpm.preferences.PreferencesManager;
+import org.jbpm.gd.jpdl.Plugin;
+
+public class Jbpm3PreferencesManager extends PreferencesManager {
+
+ public static final Jbpm3PreferencesManager INSTANCE = new Jbpm3PreferencesManager();
+
+ protected Jbpm3PreferencesManager() {
+ super();
+ initialize();
+ }
+
+ void initialize() {
+ initializeInstallations();
+ initializePreferredJbpmName();
+ }
+
+ private void initializeInstallations() {
+ File installationsFile =
+ Plugin.getDefault().getStateLocation().append("jbpm-installations.xml").toFile();
+ if (installationsFile.exists()) {
+ loadInstallations(installationsFile);
+ saveInstallations();
+ loadInstallations();
+ }
+ installationsFile.delete();
+ }
+
+ private void initializePreferredJbpmName() {
+ String preferredJbpmName = Plugin.getDefault().getPluginPreferences().getString(Constants.JBPM_NAME);
+ if (preferredJbpmName != null) {
+ setPreferredJbpmName(preferredJbpmName);
+ }
+ }
+
+}
Property changes on: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -28,15 +28,15 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
public class JbpmClasspathContainerInitializer extends
ClasspathContainerInitializer {
private JbpmInstallation getJbpmInstallation(IPath containerPath) {
String jbpmInstallationName = containerPath.lastSegment();
- return PreferencesManager.INSTANCE.getJbpmInstallation(jbpmInstallationName);
+ return Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(jbpmInstallationName);
}
public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessDefinitionWizard.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -48,9 +48,9 @@
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
import org.jbpm.gd.jpdl.Plugin;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
public class NewProcessDefinitionWizard extends Wizard implements INewWizard {
@@ -141,7 +141,7 @@
IProject project = page.getProcessFolder().getProject();
String jbpmName = project.getPersistentProperty(new QualifiedName("", "jbpmName"));
if (jbpmName == null) return "";
- JbpmInstallation jbpmInstallation = PreferencesManager.INSTANCE.getJbpmInstallation(jbpmName);
+ JbpmInstallation jbpmInstallation = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(jbpmName);
if (jbpmInstallation == null) return "";
String location = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(jbpmInstallation.location);
if (location == null) return "";
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectDetailsWizardPage.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -35,7 +35,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
public class NewProcessProjectDetailsWizardPage extends WizardPage {
@@ -91,7 +91,7 @@
}
private void fillComboWithPreferenceRuntimes() {
- Map<String, JbpmInstallation> installations = PreferencesManager.INSTANCE.getJbpmInstallationMap();
+ Map<String, JbpmInstallation> installations = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallationMap();
Iterator<String> iterator = installations.keySet().iterator();
int counter = 0;
while (iterator.hasNext()) {
@@ -100,7 +100,7 @@
if ("jBPM3".equals(installation.version)) {
counter++;
combo.add(next);
- if (PreferencesManager.INSTANCE.getPreferredJbpmName().equals(next)) {
+ if (Jbpm3PreferencesManager.INSTANCE.getPreferredJbpmName().equals(next)) {
combo.select(counter - 1);
}
}
Modified: branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java
===================================================================
--- branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java 2010-03-04 16:22:15 UTC (rev 20672)
+++ branches/jbosstools-3.1.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/wizard/NewProcessProjectWizard.java 2010-03-04 16:31:46 UTC (rev 20673)
@@ -84,8 +84,8 @@
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
import org.eclipse.ui.part.ISetSelectionTarget;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
import org.jbpm.gd.jpdl.util.JbpmClasspathContainer;
public class NewProcessProjectWizard extends Wizard implements INewWizard {
@@ -115,7 +115,7 @@
}
private boolean isJbpm3RuntimeAvailable() {
- Map<String, JbpmInstallation> installations = PreferencesManager.INSTANCE.getJbpmInstallationMap();
+ Map<String, JbpmInstallation> installations = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallationMap();
Iterator<String> iterator = installations.keySet().iterator();
while (iterator.hasNext()) {
JbpmInstallation installation = installations.get(iterator.next());
@@ -191,7 +191,7 @@
}
private JbpmInstallation getJbpmInstallation() {
- return PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
+ return Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
}
private void createJbpmLibraryContainer(IJavaProject javaProject) throws JavaModelException {
@@ -258,7 +258,7 @@
}
private void createSimpleProcessDefinition(IJavaProject javaProject) throws CoreException, JavaModelException, IOException {
- JbpmInstallation jbpmInstallation = PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
+ JbpmInstallation jbpmInstallation = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
if (jbpmInstallation == null) return;
// IFolder processesFolder = javaProject.getProject().getFolder("processes");
// if (!processesFolder.exists()) {
@@ -305,7 +305,7 @@
}
private void copyJbpmResources(IJavaProject javaProject) throws CoreException {
- JbpmInstallation jbpmInstallation = PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
+ JbpmInstallation jbpmInstallation = Jbpm3PreferencesManager.INSTANCE.getJbpmInstallation(getCoreJbpmName());
if (jbpmInstallation == null) return;
String location = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(jbpmInstallation.location);
IFolder folder = javaProject.getProject().getFolder("src/main/config");
@@ -440,7 +440,7 @@
String name = configureRuntimePage.nameText.getText();
String location = configureRuntimePage.locationText.getText();
String version = "jBPM3";
- PreferencesManager.INSTANCE.initializeDefaultJbpmInstallation(name, location, version);
+ Jbpm3PreferencesManager.INSTANCE.initializeDefaultJbpmInstallation(name, location, version);
}
getContainer().updateButtons();
createJavaProject();
14 years, 3 months
JBoss Tools SVN: r20672 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-03-04 11:22:15 -0500 (Thu, 04 Mar 2010)
New Revision: 20672
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySheetConfiguration.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5744 reverted because of a side effect
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySheetConfiguration.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySheetConfiguration.java 2010-03-04 15:18:43 UTC (rev 20671)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySheetConfiguration.java 2010-03-04 16:22:15 UTC (rev 20672)
@@ -10,34 +10,11 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.outline;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.progress.UIJob;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.IPropertySourceProvider;
-import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.CMDocumentManagerListener;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
+import org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConfiguration;
/**
* @author Kabanovich
@@ -45,24 +22,14 @@
* creation of property source provider.
*/
-/**
- * A part of https://jira.jboss.org/jira/browse/JBIDE-5744 fix
- * implementation was a little bit changed (workaround of // https://bugs.eclipse.org/bugs/show_bug.cgi?id=218979)
- */
-@SuppressWarnings("restriction")
-public class JSPPropertySheetConfiguration extends PropertySheetConfiguration {
+public class JSPPropertySheetConfiguration extends XMLPropertySheetConfiguration {
private AttributeSorter sorter = new AttributeSorter();
- private CMDocumentManagerListenerImpl fCMDocumentManagerListener = new CMDocumentManagerListenerImpl();
- private PropertiesRefreshJob fPropertiesRefreshJob = null;
private IPropertySheetPage fPropertySheetPage = null;
private JSPPropertySourceProvider0 fPropertySourceProvider = null;
- private INodeAdapter fRefreshAdapter = new XMLPropertySheetRefreshAdapter();
- private CMDocumentManager[] fSelectedCMDocumentManagers = new CMDocumentManager[0];
- private INodeNotifier[] fSelectedNotifiers = new INodeNotifier[0];
-
public IPropertySourceProvider getPropertySourceProvider(IPropertySheetPage page) {
if (fPropertySourceProvider == null) {
+ super.getPropertySourceProvider(page);
fPropertySheetPage = page;
fPropertySourceProvider = new JSPPropertySourceProvider0();
fPropertySourceProvider.setSorter(sorter);
@@ -86,19 +53,7 @@
if (object instanceof INodeNotifier) {
fSource = (INodeNotifier) object;
- fPropertySource = new JSPPropertySourceAdapter((INodeNotifier) object){
- @Override
- public void setPropertyValue(Object nameObject, Object value) {
- for (int i = 0; i < fSelectedNotifiers.length; i++) {
- fSelectedNotifiers[i].removeAdapter(fRefreshAdapter);
- }
- super.setPropertyValue(nameObject, value);
- for (int i = 0; i < fSelectedNotifiers.length; i++) {
- fSelectedNotifiers[i].addAdapter(fRefreshAdapter);
- }
- }
-
- };
+ fPropertySource = new JSPPropertySourceAdapter((INodeNotifier) object);
}
else {
fSource = null;
@@ -110,174 +65,11 @@
this.sorter = sorter;
}
}
-
- private class CMDocumentManagerListenerImpl implements CMDocumentManagerListener {
- public void cacheCleared(CMDocumentCache cache) {
- // nothing to do
- }
- public void cacheUpdated(CMDocumentCache cache, final String uri, int oldStatus, int newStatus, CMDocument cmDocument) {
- if ((newStatus == CMDocumentCache.STATUS_LOADED) || (newStatus == CMDocumentCache.STATUS_ERROR)) {
- refreshPages();
- }
- }
-
- public void propertyChanged(CMDocumentManager cmDocumentManager, String propertyName) {
- if (cmDocumentManager.getPropertyEnabled(CMDocumentManager.PROPERTY_AUTO_LOAD)) {
- refreshPages();
- }
- }
-
- private void refreshPages() {
- getPropertiesRefreshJob().addPropertySheetPage(fPropertySheetPage);
- getPropertiesRefreshJob().schedule(PropertiesRefreshJob.UPDATE_DELAY);
- }
- }
-
- private class PropertiesRefreshJob extends UIJob {
- public static final int UPDATE_DELAY = 200;
-
- Set propertySheetPages = null;
-
- public PropertiesRefreshJob() {
- super(XMLUIMessages.JFaceNodeAdapter_1);
- setSystem(true);
- setPriority(Job.SHORT);
- propertySheetPages = new HashSet(1);
- }
-
- void addPropertySheetPage(IPropertySheetPage page) {
- if (page != null && propertySheetPages != null) {
- propertySheetPages.add(page);
- schedule(UPDATE_DELAY);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#canceling()
- */
- protected void canceling() {
- propertySheetPages.clear();
- super.canceling();
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- Object[] pages = propertySheetPages.toArray();
- propertySheetPages.clear();
-
- for (int i = 0; i < pages.length; i++) {
- PropertySheetPage page = (PropertySheetPage) pages[i];
- if ((page != null) && (page.getControl() != null) && !page.getControl().isDisposed()) {
- page.refresh();
- }
- }
-
- return Status.OK_STATUS;
- }
- }
-
- private class XMLPropertySheetRefreshAdapter implements INodeAdapter {
- public boolean isAdapterForType(Object type) {
- return false;
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (fPropertySheetPage != null) {
- getPropertiesRefreshJob().addPropertySheetPage(fPropertySheetPage);
- }
- }
- }
-
- public ISelection getInputSelection(IWorkbenchPart selectingPart, ISelection selection) {
- if (fSelectedNotifiers != null) {
- for (int i = 0; i < fSelectedNotifiers.length; i++) {
- fSelectedNotifiers[i].removeAdapter(fRefreshAdapter);
- }
- fSelectedNotifiers = null;
- }
- for (int i = 0; i < fSelectedCMDocumentManagers.length; i++) {
- fSelectedCMDocumentManagers[i].removeListener(fCMDocumentManagerListener);
- }
-
- ISelection preferredSelection = selection;
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSel = (IStructuredSelection) selection;
-
- /*
- * On Attr nodes, select the owner Element. On Text nodes, select
- * the parent Element.
- */
- Object[] selectedObjects = new Object[structuredSel.size()];
- System.arraycopy(structuredSel.toArray(), 0, selectedObjects, 0, selectedObjects.length);
- for (int i = 0; i < selectedObjects.length; i++) {
- Object inode = selectedObjects[i];
- if (inode instanceof Node) {
- Node node = (Node) inode;
- // replace Attribute Node with its owner
- Node parentNode = node.getParentNode();
- if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
- Element ownerElement = ((Attr) node).getOwnerElement();
- selectedObjects[i] = ownerElement;
- }
- // replace Text Node with its parent
- else if (((node.getNodeType() == Node.TEXT_NODE) || (node.getNodeType() == Node.CDATA_SECTION_NODE)) && (parentNode != null)) {
- selectedObjects[i] = parentNode;
- }
- }
- }
-
- if (selectedObjects.length > 0) {
- Set managers = new HashSet(1);
- Set selectedNotifiers = new HashSet(1);
-
- for (int i = 0; i < selectedObjects.length; i++) {
- if (selectedObjects[i] instanceof Node) {
- ModelQuery query = ModelQueryUtil.getModelQuery(((Node) selectedObjects[i]).getOwnerDocument());
- if (query != null) {
- CMDocumentManager mgr = query.getCMDocumentManager();
- if (mgr != null) {
- managers.add(mgr);
- mgr.addListener(fCMDocumentManagerListener);
- }
- }
- }
- /*
- * Add UI refresh adapters and remember notifiers for
- * later removal
- */
- if (selectedObjects[i] instanceof INodeNotifier) {
- selectedNotifiers.add(selectedObjects[i]);
- ((INodeNotifier) selectedObjects[i]).addAdapter(fRefreshAdapter);
- }
- }
- fSelectedCMDocumentManagers = (CMDocumentManager[]) managers.toArray(new CMDocumentManager[managers.size()]);
- fSelectedNotifiers = (INodeNotifier[]) selectedNotifiers.toArray(new INodeNotifier[selectedNotifiers.size()]);
- }
-
-
- preferredSelection = new StructuredSelection(selectedObjects);
- }
- return preferredSelection;
- }
-
- PropertiesRefreshJob getPropertiesRefreshJob() {
- if (fPropertiesRefreshJob == null) {
- fPropertiesRefreshJob = new PropertiesRefreshJob();
- }
- return fPropertiesRefreshJob;
- }
-
public void unconfigure() {
super.unconfigure();
- for (int i = 0; i < fSelectedCMDocumentManagers.length; i++) {
- fSelectedCMDocumentManagers[i].removeListener(fCMDocumentManagerListener);
- }
- if(fPropertiesRefreshJob != null) {
- fPropertiesRefreshJob.cancel();
- fPropertiesRefreshJob.propertySheetPages = null;
- }
fPropertySheetPage = null;
fPropertySourceProvider = null;
+
}
-
}
14 years, 3 months
JBoss Tools SVN: r20671 - in trunk/jst/plugins/org.jboss.tools.jst.jsp: src/org/jboss/tools/jst/jsp/messages and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-03-04 10:18:43 -0500 (Thu, 04 Mar 2010)
New Revision: 20671
Added:
trunk/jst/plugins/org.jboss.tools.jst.jsp/images/cssdialog/style_class.gif
trunk/jst/plugins/org.jboss.tools.jst.jsp/images/cssdialog/style_sheet.gif
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSSelectorPartComposite.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSStyleClassSelector.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSTableDragListener.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSTreeDragListener.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSJSPRecognizer.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorTableModel.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorTreeModel.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorUtils.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSTreeNode.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorFilter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTableContentProvider.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTableViewer.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTransfer.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeContentProvider.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeLabelProvider.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeViewer.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/StyleAttributes.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3288 , https://jira.jboss.org/jira/browse/JBIDE-5965 ,
https://jira.jboss.org/jira/browse/JBIDE-5966 the first version of CSS Style Class selector
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/images/cssdialog/style_class.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.jsp/images/cssdialog/style_class.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/images/cssdialog/style_sheet.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.jsp/images/cssdialog/style_sheet.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2010-03-04 14:47:34 UTC (rev 20670)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/JstUIMessages.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -105,6 +105,7 @@
public static String ENTER_CSS_CLASS_NAME;
public static String CSS_CLASS_NAME_NOT_VALID;
public static String CSS_INVALID_STYLE_PROPERTY;
+ public static String CSS_SELECTOR_TITLE;
public static String JspContentAssistProcessor_CloseELExpression;
public static String JspContentAssistProcessor_CloseELExpressionInfo;
public static String JspContentAssistProcessor_NewELExpression;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2010-03-04 14:47:34 UTC (rev 20670)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2010-03-04 15:18:43 UTC (rev 20671)
@@ -2,6 +2,7 @@
CSS_STYLE_CLASS_EDITOR_DESCRIPTION=Create New CSS Class
CSS_STYLE_CLASS_EDITOR_TITLE=CSS Class
CSS_STYLE_EDITOR_TITLE=CSS Style
+CSS_SELECTOR_TITLE=CSS Selector
CSS_EMPTY_FILE_PATH_MESSAGE=Choose any CSS file
CSS_EMPTY_STYLE_CLASS_MESSAGE=Style class field is empty
CSS_INVALID_STYLE_PROPERTY=Invalid Style class property has been entered.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2010-03-04 14:47:34 UTC (rev 20670)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -37,6 +37,7 @@
import org.jboss.tools.jst.jsp.outline.cssdialog.CSSStyleDialog;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.CSSConstants;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.CSSStyleClassSelector;
/**
* @author Kabanovich Cell Editor for JSP attributes, of which values can be
@@ -132,17 +133,17 @@
context.put("value", value); //$NON-NLS-1$
attributeName = attributeName.toLowerCase();
-// if (attributeName.equalsIgnoreCase(CSSConstants.CLASS)
-// || attributeName.endsWith(CSSConstants.CLASS.toLowerCase())) {
-// CSSClassDialog dialog = new CSSClassDialog(cellEditorWindow.getShell(), null, false);
-// dialog.setCurrentStyleClass(value);
-//
-// if (dialog.open() == Window.OK) {
-// externalEditing = false;
-//
-// return dialog.getSelectorName();
-// }
-// } else
+ if (attributeName.equalsIgnoreCase(CSSConstants.CLASS)
+ || attributeName.endsWith(CSSConstants.CLASS.toLowerCase())) {
+ CSSStyleClassSelector dialog = new CSSStyleClassSelector(cellEditorWindow.getShell());
+ dialog.setCurrentStyleClass(value);
+
+ if (dialog.open() == Window.OK) {
+ externalEditing = false;
+
+ return dialog.getCSSStyleClasses();
+ }
+ } else
if (attributeName.equalsIgnoreCase(CSSConstants.STYLE)
|| attributeName.endsWith(CSSConstants.STYLE.toLowerCase())) {
CSSStyleDialog dialog = new CSSStyleDialog(cellEditorWindow.getShell(),
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2010-03-04 14:47:34 UTC (rev 20670)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -17,7 +17,6 @@
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.observable.ChangeEvent;
import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
import org.eclipse.core.runtime.IStatus;
@@ -92,18 +91,7 @@
}
public Composite createControlPane(Composite parent) {
-
- // Create split component that separates dialog on 2 parts
- Split dialogContainer = new Split(parent, SWT.VERTICAL);
-
- createBrowserComposite(dialogContainer);
- createControlComposite(dialogContainer);
-
- dialogContainer.setWeights(new int[] { DEFAULT_BROWTHER_WEIGHT,
- DEFAULT_CONTROLS_WEIGHT });
- dialogContainer.setLayoutData(new GridData(GridData.FILL,
- GridData.BEGINNING, true, true));
-
+
getStyleAttributes().addChangeListener(new IChangeListener() {
public void handleChange(ChangeEvent event) {
@@ -122,7 +110,18 @@
handleStatusChanged((IStatus) event.diff.getNewValue());
}
});
+
+ // Create split component that separates dialog on 2 parts
+ Split dialogContainer = new Split(parent, SWT.VERTICAL);
+ createBrowserComposite(dialogContainer);
+ createControlComposite(dialogContainer);
+
+ dialogContainer.setWeights(new int[] { DEFAULT_BROWTHER_WEIGHT,
+ DEFAULT_CONTROLS_WEIGHT });
+ dialogContainer.setLayoutData(new GridData(GridData.FILL,
+ GridData.BEGINNING, true, true));
+
return dialogContainer;
}
@@ -226,7 +225,7 @@
* @return String html text representation
*/
public String generateBrowserPage() {
- StringBuffer html = new StringBuffer(Constants.OPEN_DIV_TAG);
+ StringBuffer html = new StringBuffer("<style>span{"); //$NON-NLS-1$
for (Map.Entry<String, String> styleItem : getStyleAttributes()
.entrySet()) {
@@ -235,7 +234,7 @@
+ styleItem.getValue() + Constants.SEMICOLON);
}
- html.append("\">" + getPreviewContent() + Constants.CLOSE_DIV_TAG); //$NON-NLS-1$
+ html.append("}</style><span>" + getPreviewContent() + "</span>"); //$NON-NLS-1$ //$NON-NLS-2$
return html.toString();
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2010-03-04 14:47:34 UTC (rev 20670)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -61,7 +61,9 @@
public static final String IMAGE_LEFT_FILE_LOCATION = "images/cssdialog/left.gif"; //$NON-NLS-1$
public static final String IMAGE_RIGHT_FILE_LOCATION = "images/cssdialog/right.gif"; //$NON-NLS-1$
public static final String IMAGE_SAMPLE_FILE_LOCATION = "images/cssdialog/sample.gif"; //$NON-NLS-1$
-
+ public static final String IMAGE_STYLE_SHEET_LOCATION = "images/cssdialog/style_sheet.gif"; //$NON-NLS-1$
+ public static final String IMAGE_STYLE_CLASS_LOCATION = "images/cssdialog/style_class.gif"; //$NON-NLS-1$
+
public static final int FIRST_COLUMN = 0;
public static final int SECOND_COLUMN = 1;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/StyleAttributes.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/StyleAttributes.java 2010-03-04 14:47:34 UTC (rev 20670)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/StyleAttributes.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -44,6 +44,10 @@
public String put(String name, String value) {
return (String) attributeMap.put(name.toLowerCase(), value);
}
+
+ public void putAll(Map<String, String> t) {
+ attributeMap.putAll(t);
+ }
/**
* Remove attribute with the given name.
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSSelectorPartComposite.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSSelectorPartComposite.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSSelectorPartComposite.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,430 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetAdapter;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.messages.JstUIMessages;
+import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
+import org.jboss.tools.jst.jsp.outline.cssdialog.common.StyleAttributes;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSJSPRecognizer;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSSelectorTableModel;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSSelectorTreeModel;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSTreeNode;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers.CSSSelectorFilter;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers.CSSSelectorTableViewer;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers.CSSSelectorTreeViewer;
+import org.w3c.dom.css.CSSRule;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorPartComposite extends Composite implements
+ SelectionListener {
+
+ private static final int LIST_HEIGHT = 500;
+ private static final int BUTTOND_WIDTH = 50;
+ private static final int LIST_WIDTH = 175;
+
+ /** Existing font family */
+ Composite buttonsContainer;
+ private Button rightButton;
+ private Button leftButton;
+ private String setClasses;
+ private CSSSelectorTreeViewer allCSSStyleClassViewer;
+ private CSSSelectorTableViewer selectedClassesTableViewer;
+ private Map<String, Map<String, String>> allCSSClassStyles;
+ private StyleAttributes styleAttributes;
+ private CSSSelectorTreeModel styleClassTreeModel;
+ private CSSSelectorFilter filter;
+
+ public CSSSelectorPartComposite(StyleAttributes styleAttributes,
+ Composite parentComposite, String setClasses) {
+ super(parentComposite, SWT.NONE);
+ this.setClasses = setClasses;
+ this.styleAttributes = styleAttributes;
+ creatSelectorPart();
+ }
+
+ private void creatSelectorPart() {
+ initControls();
+ createLayout();
+ initListeners();
+ initDND();
+ initDefaultContent();
+ }
+
+ private void initDefaultContent() {
+ IEditorPart editorPart = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (!(editorPart instanceof JSPMultiPageEditor)) {
+ return;
+ }
+ CSSJSPRecognizer recognizer = new CSSJSPRecognizer(
+ (JSPMultiPageEditor) editorPart);
+ if (recognizer.parseCSS() == CSSJSPRecognizer.VOID_RESULT) {
+ return;
+ }
+ styleClassTreeModel = recognizer.getCssStyleClassTreeModel();
+ allCSSClassStyles = recognizer.getCSSStyleMap();
+ allCSSStyleClassViewer.setModel(styleClassTreeModel);
+ String[] selectedClasses = parseSetClasses();
+ selectedClassesTableViewer.setModel(new CSSSelectorTableModel(
+ selectedClasses));
+ updateStyles();
+ }
+
+ private void initDND() {
+ Transfer[] types = new Transfer[] { TextTransfer.getInstance() };
+
+ allCSSStyleClassViewer.addDragSupport(DND.DROP_MOVE, types,
+ new CSSTreeDragListener(this, allCSSStyleClassViewer,
+ selectedClassesTableViewer));
+
+ selectedClassesTableViewer.addDragSupport(DND.DROP_MOVE, types,
+ new CSSTableDragListener(this, allCSSStyleClassViewer,
+ selectedClassesTableViewer));
+
+ allCSSStyleClassViewer.addDropSupport(DND.DROP_MOVE, types, new DropTargetAdapter(){
+ @Override
+ public void drop(DropTargetEvent event) {
+ if (event.data == null || event.data.equals(CSSSelectorTreeViewer.CSS_SELECTOR_TREE_VIWER_ID)) {
+ event.detail = DND.DROP_NONE;
+ return;
+ }
+ }
+ });
+
+ selectedClassesTableViewer.addDropSupport(DND.DROP_MOVE, types, new DropTargetAdapter(){
+ @Override
+ public void drop(DropTargetEvent event) {
+ if (event.data == null || event.data.equals(CSSSelectorTableViewer.CSS_SELECTOR_TABLE_VIWER_ID)) {
+ event.detail = DND.DROP_NONE;
+ return;
+ }
+ }
+ });
+
+ }
+
+ private void initListeners() {
+
+ final Tree tree = allCSSStyleClassViewer.getTree();
+ final Table table = selectedClassesTableViewer.getTable();
+ allCSSStyleClassViewer
+ .addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ TreeItem[] selectedItems = tree.getSelection();
+ if (selectedItems != null && selectedItems.length > 0) {
+ TreeItem selectedItem = selectedItems[selectedItems.length - 1];
+ CSSTreeNode treeNode = (CSSTreeNode) selectedItem
+ .getData();
+ if (!(treeNode.getCssResource() instanceof CSSRule)) {
+ if (allCSSStyleClassViewer
+ .getExpandedState(treeNode)) {
+ allCSSStyleClassViewer.collapseToLevel(
+ treeNode, 1);
+ return;
+ }
+ allCSSStyleClassViewer.expandToLevel(treeNode,
+ 1);
+ return;
+ }
+ selectedClassesTableViewer.add(treeNode.toString());
+ updateStyles();
+ }
+ }
+ });
+
+ tree.addMouseListener(new MouseAdapter() {
+
+ public void mouseDown(MouseEvent e) {
+ if (tree.getSelectionCount() > 0) {
+ selectedClassesTableViewer.getTable().deselectAll();
+ leftButton.setEnabled(false);
+ rightButton.setEnabled(true);
+ }
+ }
+ });
+
+ selectedClassesTableViewer
+ .addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ TableItem[] selectedItems = table.getSelection();
+ if (selectedItems != null && selectedItems.length > 0) {
+ TableItem selectedItem = selectedItems[selectedItems.length - 1];
+ selectedClassesTableViewer.remove(selectedItem
+ .getData());
+ updateStyles();
+ }
+ }
+
+ });
+
+ table.addMouseListener(new MouseAdapter() {
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ if (table.getSelectionCount() > 0) {
+ tree.deselectAll();
+ rightButton.setEnabled(false);
+ leftButton.setEnabled(true);
+ }
+ }
+
+ });
+
+ rightButton.addSelectionListener(this);
+ leftButton.addSelectionListener(this);
+ }
+
+ private void initControls() {
+ allCSSStyleClassViewer = new CSSSelectorTreeViewer(this, SWT.MULTI
+ | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ filter = new CSSSelectorFilter();
+ allCSSStyleClassViewer.addFilter(filter);
+ buttonsContainer = new Composite(this, SWT.NONE);
+ rightButton = new Button(buttonsContainer, SWT.PUSH);
+ leftButton = new Button(buttonsContainer, SWT.PUSH);
+ selectedClassesTableViewer = new CSSSelectorTableViewer(this, SWT.MULTI
+ | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
+ rightButton.setToolTipText(JstUIMessages.ADD_FONT_FAMILY_TIP);
+ ImageDescriptor rightDesc = JspEditorPlugin
+ .getImageDescriptor(Constants.IMAGE_RIGHT_FILE_LOCATION);
+ Image rightImage = rightDesc.createImage();
+ rightButton.setImage(rightImage);
+ rightButton.setEnabled(false);
+ rightButton.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ Button button = (Button) e.getSource();
+ button.getImage().dispose();
+ }
+ });
+
+ leftButton.setToolTipText(JstUIMessages.REMOVE_FONT_FAMILY_TIP);
+
+ ImageDescriptor leftDesc = JspEditorPlugin
+ .getImageDescriptor(Constants.IMAGE_LEFT_FILE_LOCATION);
+ Image leftImage = leftDesc.createImage();
+ leftButton.setImage(leftImage);
+ leftButton.setEnabled(false);
+ leftButton.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ Button button = (Button) e.getSource();
+ button.getImage().dispose();
+ }
+ });
+ }
+
+ private String[] parseSetClasses() {
+ if (setClasses == null || setClasses.length() == 0) {
+ return new String[0];
+ }
+ StringTokenizer stringTokenizer = new StringTokenizer(
+ setClasses.trim(), " ", false); //$NON-NLS-1$
+ java.util.List<String> list = new ArrayList<String>(0);
+ while (stringTokenizer.hasMoreTokens()) {
+ String token = stringTokenizer.nextToken();
+ list.add(token.trim());
+ }
+ return list.toArray(new String[0]);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ Object ob = e.getSource();
+ if (ob.equals(leftButton)) {
+ handleLeftButtonSelection();
+ } else if (ob.equals(rightButton)) {
+ handleRightButtonSelection();
+ } else if (ob.equals(allCSSStyleClassViewer.getTree())) {
+ selectedClassesTableViewer.getTable().deselectAll();
+ leftButton.setEnabled(false);
+ rightButton.setEnabled(true);
+ } else if (ob.equals(selectedClassesTableViewer.getTable())) {
+ allCSSStyleClassViewer.getTree().deselectAll();
+ rightButton.setEnabled(false);
+ leftButton.setEnabled(true);
+ }
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ Object ob = e.getSource();
+ if (ob.equals(leftButton)) {
+ handleLeftButtonSelection();
+ } else if (ob.equals(rightButton)) {
+ handleRightButtonSelection();
+ }
+ }
+
+ private void handleLeftButtonSelection() {
+ TableItem[] selectedItems = selectedClassesTableViewer.getTable()
+ .getSelection();
+
+ for (int i = 0; i < selectedItems.length; i++) {
+ selectedClassesTableViewer.remove(selectedItems[i].getData());
+ }
+ updateStyles();
+ }
+
+ private void handleRightButtonSelection() {
+ TreeItem[] selectedItems = allCSSStyleClassViewer.getTree()
+ .getSelection();
+ if (selectedItems != null && selectedItems.length > 0) {
+ for (int i = 0; i < selectedItems.length; i++) {
+ TreeItem item = selectedItems[i];
+ if (!(((CSSTreeNode) item.getData()).getCssResource() instanceof CSSRule)) {
+ continue;
+ }
+ selectedClassesTableViewer.add(((CSSTreeNode) item.getData())
+ .toString());
+ }
+ }
+ updateStyles();
+ }
+
+ private void createLayout() {
+ final GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 3;
+ setLayout(gridLayout);
+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ setLayoutData(gridData);
+
+ gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gridData.heightHint = LIST_HEIGHT;
+ gridData.widthHint = LIST_WIDTH;
+ allCSSStyleClassViewer.getTree().setLayoutData(gridData);
+
+ gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gridData.heightHint = LIST_HEIGHT;
+ gridData.widthHint = LIST_WIDTH;
+ selectedClassesTableViewer.getTable().setLayoutData(gridData);
+
+ final GridLayout btmContGridLayout = new GridLayout();
+ btmContGridLayout.numColumns = 1;
+ buttonsContainer.setLayout(btmContGridLayout);
+
+ gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gridData.widthHint = BUTTOND_WIDTH;
+ rightButton.setLayoutData(gridData);
+
+ gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gridData.widthHint = BUTTOND_WIDTH;
+ leftButton.setLayoutData(gridData);
+
+ }
+
+ void updateStyles() {
+ String[] selectedItems = getItemsFromSelectedTable();
+ styleAttributes.clear();
+ if (filter == null) {
+ filter = new CSSSelectorFilter();
+ allCSSStyleClassViewer.addFilter(filter);
+ }
+ filter.removeAllFilters();
+ if (selectedItems != null && selectedItems.length != 0) {
+ selectedItems = getSortedStyleClasses(selectedItems);
+ for (int i = 0; i < selectedItems.length; i++) {
+ if (selectedItems[i] != null) {
+ styleAttributes.putAll(allCSSClassStyles
+ .get(selectedItems[i]));
+ filter.addFilterName(selectedItems[i]);
+ }
+ }
+ }
+ allCSSStyleClassViewer.refresh();
+ allCSSStyleClassViewer.getTree().deselectAll();
+ selectedClassesTableViewer.getTable().deselectAll();
+ rightButton.setEnabled(false);
+ leftButton.setEnabled(false);
+ }
+
+ public String getCSSStyleClasses() {
+ StringBuilder stringBuilder = new StringBuilder(""); //$NON-NLS-1$
+ String[] selectedItems = getItemsFromSelectedTable();
+ if (selectedItems != null && selectedItems.length != 0) {
+ for (int i = 0; i < selectedItems.length - 1; i++) {
+ stringBuilder.append(selectedItems[i] + " "); //$NON-NLS-1$
+ }
+ stringBuilder.append(selectedItems[selectedItems.length - 1]);
+ }
+ return stringBuilder.toString();
+ }
+
+ private String[] getSortedStyleClasses(String[] unsortedClasses) {
+ String[] sortedStyleClasses = new String[unsortedClasses.length];
+ if (allCSSClassStyles != null) {
+ Set<String> keySet = allCSSClassStyles.keySet();
+ int iter = 0;
+ for (Iterator<String> iterator = keySet.iterator(); iterator
+ .hasNext();) {
+ String styleClassName = iterator.next();
+ for (int i = 0; i < unsortedClasses.length; i++) {
+ if (unsortedClasses[i].equals(styleClassName)) {
+ sortedStyleClasses[iter] = styleClassName;
+ iter++;
+ continue;
+ }
+ }
+ }
+ }
+ return sortedStyleClasses;
+ }
+
+ private String[] getItemsFromSelectedTable() {
+ TableItem[] selectedTableItems = selectedClassesTableViewer.getTable()
+ .getItems();
+ java.util.List<String> selectedItemsList = new ArrayList<String>(0);
+ if (selectedTableItems != null) {
+ for (int i = 0; i < selectedTableItems.length; i++) {
+ selectedItemsList.add((String) selectedTableItems[i].getData());
+ }
+ }
+ return selectedItemsList.toArray(new String[0]);
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSStyleClassSelector.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSStyleClassSelector.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSStyleClassSelector.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.jst.jsp.messages.JstUIMessages;
+import org.jboss.tools.jst.jsp.outline.cssdialog.AbstractCSSDialog;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSStyleClassSelector extends AbstractCSSDialog{
+
+ private String currentCSSStyleClass;
+ private CSSSelectorPartComposite cssClassComposite;
+ private String selectesCSSStylesClasses;
+
+ public CSSStyleClassSelector(Shell shell) {
+ super(shell);
+ setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX
+ | SWT.APPLICATION_MODAL);
+ }
+
+ @Override
+ protected Composite createControlComposite(Composite parent) {
+ // Create down splitter container
+ Composite controlsContainer = new Composite(parent, SWT.NONE);
+ controlsContainer.setLayout(new GridLayout());
+ controlsContainer.setLayoutData(new GridData(GridData.FILL,
+ GridData.FILL, true, true));
+ cssClassComposite = createCSSClassComposite(controlsContainer);
+ return controlsContainer;
+ }
+
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite composite = (Composite)super.createContents(parent);
+ return composite;
+ }
+
+ private CSSSelectorPartComposite createCSSClassComposite(Composite parent) {
+ return new CSSSelectorPartComposite(getStyleAttributes(), parent, currentCSSStyleClass);
+ }
+
+ public void setCurrentStyleClass(String value) {
+ currentCSSStyleClass = value;
+ }
+
+ public String getCSSStyleClasses (){
+ return selectesCSSStylesClasses;
+ }
+
+ @Override
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == OK) {
+ selectesCSSStylesClasses = cssClassComposite.getCSSStyleClasses();
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(JstUIMessages.CSS_SELECTOR_TITLE);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ setTitle(JstUIMessages.CSS_SELECTOR_TITLE);
+ return super.createDialogArea(parent);
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSTableDragListener.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSTableDragListener.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSTableDragListener.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Tree;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers.CSSSelectorTableViewer;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+@SuppressWarnings("unused")
+public class CSSTableDragListener implements DragSourceListener {
+
+ private Table table;
+ private Tree tree;
+ private CSSSelectorPartComposite parent;
+ private TreeViewer treeViewer;
+ private TableViewer tableViewer;
+
+ public CSSTableDragListener (CSSSelectorPartComposite parent, TreeViewer treeViewer, TableViewer tableViewer){
+ this.table = tableViewer.getTable();
+ this.tree = treeViewer.getTree();
+ this.treeViewer = treeViewer;
+ this.tableViewer = tableViewer;
+ this.parent = parent;
+ }
+
+ public void dragStart(DragSourceEvent event) {
+ event.doit = table.getSelectionCount() > 0;
+ }
+
+ public void dragSetData(DragSourceEvent event) {
+ List<String> selectedItems = new ArrayList<String>(0);
+ TableItem[] selectedTableItems = table.getSelection();
+ if (selectedTableItems != null) {
+ for (int i = 0; i < selectedTableItems.length; i++) {
+ selectedItems.add(selectedTableItems[i].getData()
+ .toString());
+ }
+ }
+ event.data = CSSSelectorTableViewer.CSS_SELECTOR_TABLE_VIWER_ID;
+ }
+
+ public void dragFinished(DragSourceEvent event) {
+ if (event.detail == DND.DROP_MOVE) {
+ TableItem[] selectedTableItems = table.getSelection();
+ if (selectedTableItems != null && selectedTableItems.length > 0) {
+ for (int i = 0; i < selectedTableItems.length; i++) {
+ tableViewer.remove(selectedTableItems[i].getData());
+ }
+ }
+ parent.updateStyles();
+ }
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSTreeDragListener.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSTreeDragListener.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/CSSTreeDragListener.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSTreeNode;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers.CSSSelectorTreeViewer;
+import org.w3c.dom.css.CSSRule;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+@SuppressWarnings("unused")
+public class CSSTreeDragListener implements DragSourceListener {
+
+ private Table table;
+ private Tree tree;
+ private CSSSelectorPartComposite parent;
+ private TreeViewer treeViewer;
+ private TableViewer tableViewer;
+
+ public CSSTreeDragListener (CSSSelectorPartComposite parent, TreeViewer treeViewer, TableViewer tableViewer){
+ this.table = tableViewer.getTable();
+ this.tree = treeViewer.getTree();
+ this.treeViewer = treeViewer;
+ this.tableViewer = tableViewer;
+ this.parent = parent;
+ }
+
+
+ public void dragStart(DragSourceEvent event) {
+ event.doit = tree.getSelectionCount() > 0;
+ }
+
+ public void dragSetData(DragSourceEvent event) {
+ List<String> selectedItems = new ArrayList<String>(0);
+ TreeItem[] selectedTreeItems = tree.getSelection();
+ if (selectedTreeItems != null) {
+ for (int i = 0; i < selectedTreeItems.length; i++) {
+ selectedItems.add(selectedTreeItems[i].getData()
+ .toString());
+ }
+ }
+
+ event.data = CSSSelectorTreeViewer.CSS_SELECTOR_TREE_VIWER_ID;
+ }
+
+ public void dragFinished(DragSourceEvent event) {
+ if (event.detail == DND.DROP_MOVE) {
+ List<String> selectedItems = new ArrayList<String>(0);
+ TreeItem[] selectedTreeItems = tree.getSelection();
+ if (selectedTreeItems != null) {
+ for (int i = 0; i < selectedTreeItems.length; i++) {
+ if (((CSSTreeNode) selectedTreeItems[i].getData())
+ .getCssResource() instanceof CSSRule) {
+ selectedItems.add(selectedTreeItems[i]
+ .getData().toString());
+ }
+ }
+ }
+ for (int i = 0; i < selectedItems.size(); i++) {
+ tableViewer.add(selectedItems.get(i));
+ }
+ parent.updateStyles();
+ }
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSJSPRecognizer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSJSPRecognizer.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSJSPRecognizer.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSNodeList;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclItem;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleDeclaration;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
+import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.web.kb.ICSSContainerSupport;
+import org.jboss.tools.jst.web.kb.PageContextFactory;
+import org.jboss.tools.jst.web.kb.PageContextFactory.CSSStyleSheetDescriptor;
+import org.w3c.dom.css.CSSRule;
+import org.w3c.dom.css.CSSRuleList;
+import org.w3c.dom.css.CSSStyleSheet;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+@SuppressWarnings("restriction")
+public class CSSJSPRecognizer {
+
+ private JSPMultiPageEditor jspMultiPageEditor;
+
+ public static final int OK = 0;
+ public static final int VOID_RESULT = 1;
+ private List<CSSStyleSheet> styleSheets;
+ private List<CSSStyleSheetDescriptor> styleSheetDescriptors;
+ private List<CSSRuleList> cssRuleLists;
+ private CSSRule[] cssRules;
+
+ public CSSJSPRecognizer(JSPMultiPageEditor jspMultiPageEditor) {
+ this.jspMultiPageEditor = jspMultiPageEditor;
+ }
+
+ private List<CSSRuleList> extractCSSRulesLists() {
+ ICSSContainerSupport cssContainerSupport = null;
+ ELContext context = PageContextFactory.createPageContext(getFile());
+ if (!(context instanceof ICSSContainerSupport)) {
+ return null;
+ }
+ cssContainerSupport = (ICSSContainerSupport) context;
+ java.util.List<CSSStyleSheetDescriptor> descrs = cssContainerSupport
+ .getCSSStyleSheetDescriptors();
+ if (descrs == null || descrs.size() == 0) {
+ return null;
+ }
+ styleSheetDescriptors = descrs;
+ java.util.List<CSSRuleList> cssRuleLists = new ArrayList<CSSRuleList>(0);
+ styleSheets = new ArrayList<CSSStyleSheet>(0);
+ for (int i = 0; i < descrs.size(); i++) {
+ styleSheets.add(descrs.get(i).sheet);
+ cssRuleLists.add(descrs.get(i).sheet.getCssRules());
+ }
+ if (cssRuleLists.size() == 0) {
+ return null;
+ }
+ return cssRuleLists;
+ }
+
+ private IFile getFile() {
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ try {
+ smw.init(getDocument());
+ return smw.getFile();
+ } finally {
+ smw.dispose();
+ }
+ }
+
+ private IDocument getDocument() {
+ IDocument document = jspMultiPageEditor.getSourceEditor()
+ .getTextViewer().getDocument();
+ return document;
+ }
+
+ private CSSRule[] extractCSSRules(java.util.List<CSSRuleList> cssRuleLists) {
+ if (cssRuleLists == null) {
+ return null;
+ }
+ java.util.List<CSSRule> cssRules = new ArrayList<CSSRule>(0);
+ for (int i = 0; i < cssRuleLists.size(); i++) {
+ CSSRuleList cssRuleList = cssRuleLists.get(i);
+ for (int j = 0; j < cssRuleList.getLength(); j++) {
+ cssRules.add(cssRuleList.item(j));
+ }
+ }
+ if (cssRules.size() == 0) {
+ return null;
+ }
+ return cssRules.toArray(new CSSRule[0]);
+ }
+
+ public Map<String, Map<String, String>> getCSSStyleMap(
+ CSSRule[] cssRules) {
+ if (cssRules == null) {
+ return null;
+ }
+ Map<String, Map<String, String>> styleMap = new LinkedHashMap<String, Map<String, String>>(
+ 0);
+ for (int i = 0; i < cssRules.length; i++) {
+ ICSSStyleRule styleRule = (ICSSStyleRule) cssRules[i];
+ String styleClassSelector = styleRule.getSelectorText();
+ String[] selectors = CSSSelectorUtils.parseSelectorName(styleClassSelector);
+ for (int j = 0; j < selectors.length; j++) {
+ String styleClassName = selectors[j];
+ ICSSNodeList cssNodeList = styleRule.getChildNodes();
+ if (cssNodeList == null) {
+ continue;
+ }
+ Map<String, String> attrsMap = new LinkedHashMap<String, String>(0);
+ for (int k = 0; k < cssNodeList.getLength(); k++) {
+ ICSSStyleDeclaration styleDeclaration = (ICSSStyleDeclaration) cssNodeList.item(k);
+ ICSSNodeList attrsList = styleDeclaration.getChildNodes();
+ if (attrsList == null) {
+ continue;
+ }
+ for (int l = 0; l < attrsList.getLength(); l++) {
+ ICSSStyleDeclItem styleItem = (ICSSStyleDeclItem) attrsList.item(l);
+ attrsMap.put(styleItem.getPropertyName(), styleItem.getCSSValueText());
+ }
+ }
+ Map<String, String> attrsForCSSStyle = styleMap.get(styleClassName);
+ if (attrsForCSSStyle == null) {
+ styleMap.put(styleClassName, attrsMap);
+ } else {
+ attrsForCSSStyle.putAll(attrsMap);
+ styleMap.remove(styleClassName);
+ styleMap.put(styleClassName, attrsForCSSStyle);
+ }
+ }
+ }
+ return styleMap;
+ }
+
+ public CSSSelectorTreeModel getCssStyleClassTreeModel(CSSStyleSheetDescriptor[] cssSheets){
+ if (cssSheets != null) {
+ return new CSSSelectorTreeModel(cssSheets);
+ }
+ return null;
+ }
+
+ public CSSSelectorTreeModel getCssStyleClassTreeModel(){
+ return getCssStyleClassTreeModel(styleSheetDescriptors.toArray(new CSSStyleSheetDescriptor[0]));
+ }
+
+ public Map<String, Map<String, String>> getCSSStyleMap() {
+ return getCSSStyleMap(this.cssRules);
+ }
+
+ public int parseCSS(){
+ this.cssRuleLists = extractCSSRulesLists();
+ this.cssRules = extractCSSRules(this.cssRuleLists);
+ if (cssRules != null && cssRules.length != 0) {
+ return OK;
+ }
+ return VOID_RESULT;
+ }
+
+ public CSSStyleSheet[] getStyleSheets() {
+ return styleSheets.toArray(new CSSStyleSheet[0]);
+ }
+
+ public CSSRule[] getCssRules() {
+ return cssRules;
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorTableModel.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorTableModel.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorTableModel.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorTableModel {
+
+ private List<String> containerList = new ArrayList<String>(0);
+
+ public List<String> getContainerList() {
+ return containerList;
+ }
+
+ public CSSSelectorTableModel(String... classNames) {
+ initModel(classNames);
+ }
+
+ private void initModel(String... classNames){
+ if (classNames != null) {
+ for (int i = 0; i < classNames.length; i++) {
+ containerList.add(classNames[i]);
+ }
+ }
+ }
+
+
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorTreeModel.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorTreeModel.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorTreeModel.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model;
+
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
+import org.jboss.tools.jst.web.kb.PageContextFactory.CSSStyleSheetDescriptor;
+import org.w3c.dom.css.CSSRule;
+import org.w3c.dom.css.CSSRuleList;
+import org.w3c.dom.css.CSSStyleSheet;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+@SuppressWarnings("restriction")
+public class CSSSelectorTreeModel {
+
+ private CSSStyleSheetDescriptor[] cssSheets;
+ private CSSTreeNode invisibleRoot;
+
+ public CSSSelectorTreeModel(CSSStyleSheet[] cssSheets) {
+ }
+
+ public CSSSelectorTreeModel(CSSStyleSheetDescriptor[] cssSheets) {
+ this.cssSheets = cssSheets;
+ setInvisibleRoot(new CSSTreeNode("")); //$NON-NLS-1$
+ initModel(this.cssSheets);
+ }
+
+ private void initModel(CSSStyleSheetDescriptor[] cssStyleSheets){
+ for (int i = 0; i < cssStyleSheets.length; i++) {
+ CSSStyleSheet styleSheet = cssStyleSheets[i].sheet;
+ CSSTreeNode parentSheet = new CSSTreeNode(cssStyleSheets[i].source);
+ parentSheet.setStyleSheetSource(parentSheet.toString());
+ invisibleRoot.addChild(parentSheet);
+ parentSheet.setCssResource(styleSheet);
+ CSSRuleList cssRuleList = styleSheet.getCssRules();
+ for (int j = 0; j < cssRuleList.getLength(); j++) {
+ CSSRule cssRule = cssRuleList.item(j);
+ String[] selectors = CSSSelectorUtils.parseSelectorName(((ICSSStyleRule)cssRule).getSelectorText());
+ for (int k = 0; k < selectors.length; k++) {
+ CSSTreeNode ruleNode = new CSSTreeNode(selectors[k]);
+ ruleNode.setCssResource(cssRule);
+ ruleNode.setStyleSheetSource(cssStyleSheets[i].source);
+ parentSheet.addChild(ruleNode);
+ }
+ }
+ }
+ }
+
+ public void setInvisibleRoot(CSSTreeNode invisibleRoot) {
+ this.invisibleRoot = invisibleRoot;
+ }
+
+ public CSSTreeNode getInvisibleRoot() {
+ return invisibleRoot;
+ }
+
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorUtils.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorUtils.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSSelectorUtils.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorUtils {
+
+ private static String filterName(String className){
+ className = className.trim();
+ if (className.indexOf(' ') > -1) {
+ return null;
+ }
+ if (className.indexOf('.')==className.lastIndexOf('.')) {
+ if (className.indexOf('.') == 0) {
+ return className.substring(className.indexOf('.')+1);
+ }
+ }
+ return null;
+ }
+
+ public static String[] parseSelectorName(String selectorText){
+ List<String> selectors = new ArrayList<String>(0);
+ StringTokenizer tokenizer = new StringTokenizer(selectorText, ",", false); //$NON-NLS-1$
+ while (tokenizer.hasMoreTokens()) {
+ String selectorName = tokenizer.nextToken();
+ selectorName = filterName(selectorName);
+ if (selectorName != null) {
+ selectors.add(selectorName);
+ }
+ }
+ return selectors.toArray(new String[0]);
+ }
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSTreeNode.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSTreeNode.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/model/CSSTreeNode.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSTreeNode {
+
+ private String name;
+ private List<CSSTreeNode> children = new ArrayList<CSSTreeNode>(0);
+ private CSSTreeNode parent;
+ private Object cssResource;
+ private String styleSheetSource;
+
+ public CSSTreeNode(String n) {
+ name = n;
+ }
+
+ public Object getParent() {
+ return parent;
+ }
+
+ public CSSTreeNode addChild(CSSTreeNode child) {
+ children.add(child);
+ child.parent = this;
+ return this;
+ }
+
+ public List<CSSTreeNode> getChildren() {
+ return children;
+ }
+
+ public boolean hasChildren() {
+ return children.size() > 0;
+ }
+
+ public String toString() {
+ return name;
+ }
+
+ public void setCssResource(Object cssResource) {
+ this.cssResource = cssResource;
+ }
+
+ public Object getCssResource() {
+ return cssResource;
+ }
+
+ public void setStyleSheetSource(String source){
+ styleSheetSource = source;
+ }
+
+ public String getStyleSheetSource(){
+ return styleSheetSource;
+ }
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorFilter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorFilter.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorFilter.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSTreeNode;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorFilter extends ViewerFilter{
+
+ private Set<String> filterNames = new HashSet<String>(0);
+
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (filterNames.contains(((CSSTreeNode)element).toString())) {
+ return false;
+ }
+ return true;
+ }
+
+ public void removeFilterName(String name){
+ filterNames.remove(name);
+ }
+
+ public void addFilterName(String name){
+ filterNames.add(name);
+ }
+
+ public void removeAllFilters(){
+ filterNames.clear();
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTableContentProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTableContentProvider.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTableContentProvider.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.jboss.tools.common.model.ui.attribute.IListContentProvider;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorTableContentProvider implements IListContentProvider{
+
+ @SuppressWarnings("unchecked")
+ public Object[] getElements(Object inputElement) {
+ return ((List<String>)inputElement).toArray();
+ }
+
+ public void dispose() {
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTableViewer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTableViewer.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTableViewer.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSSelectorTableModel;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorTableViewer extends TableViewer{
+
+ public final static String CSS_SELECTOR_TABLE_VIWER_ID = "css_selector_table_viwer"; //$NON-NLS-1$
+ private final static ImageDescriptor CSS_STYLE_CLASS_DESCR = JspEditorPlugin.getImageDescriptor(Constants.IMAGE_STYLE_CLASS_LOCATION);
+
+ public CSSSelectorTableViewer(Composite parent, int style) {
+ super(parent, style);
+ setContentProvider(new CSSSelectorTableContentProvider());
+ setLabelProvider(new LabelProvider(){
+ @Override
+ public Image getImage(Object element) {
+ return CSS_STYLE_CLASS_DESCR.createImage();
+ }
+ });
+ }
+
+ public void setModel(CSSSelectorTableModel model){
+ setInput(model.getContainerList());
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTransfer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTransfer.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTransfer.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,94 @@
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.eclipse.swt.dnd.ByteArrayTransfer;
+import org.eclipse.swt.dnd.TransferData;
+
+public class CSSSelectorTransfer extends ByteArrayTransfer {
+
+ private static CSSSelectorTransfer instance = new CSSSelectorTransfer();
+ private static final String TYPE_NAME = "selector-transfer-format"; //$NON-NLS-1$
+ private static final int TYPEID = registerType(TYPE_NAME);
+
+ private CSSSelectorTransfer() {
+
+ }
+
+ public static CSSSelectorTransfer getInstance(){
+ return instance;
+ }
+
+ @Override
+ protected int[] getTypeIds() {
+ return new int[] { TYPEID };
+ }
+
+ @Override
+ protected String[] getTypeNames() {
+ return new String[] { TYPE_NAME };
+ }
+
+ @Override
+ protected Object nativeToJava(TransferData transferData) {
+ byte[] bytes = (byte[]) super.nativeToJava(transferData);
+ return fromByteArray(bytes);
+ }
+
+ @Override
+ protected void javaToNative(Object object, TransferData transferData) {
+ byte[] bytes = toByteArray((String[]) object);
+ if (bytes != null)
+ super.javaToNative(bytes, transferData);
+ }
+
+ protected byte[] toByteArray(String[] strings) {
+
+ ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+ DataOutputStream out = new DataOutputStream(byteOut);
+
+ byte[] bytes = null;
+
+ try {
+ /* write number of markers */
+ out.writeInt(strings.length);
+
+ /* write markers */
+ for (int i = 0; i < strings.length; i++) {
+ out.writeUTF(strings[i]);
+ }
+ out.close();
+ bytes = byteOut.toByteArray();
+ } catch (IOException e) {
+ // when in doubt send nothing
+ }
+ return bytes;
+ }
+
+ protected String[] fromByteArray(byte[] bytes) {
+ DataInputStream in = new DataInputStream(
+ new ByteArrayInputStream(bytes));
+
+ try {
+ /* read number of gadgets */
+ int n = in.readInt();
+ /* read gadgets */
+ String[] strings = new String[n];
+ for (int i = 0; i < n; i++) {
+ String string = in.readUTF();
+ if (string == null) {
+ return null;
+ }
+ strings[i] = string;
+ }
+ return strings;
+ } catch (IOException e) {
+ return null;
+ }
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeContentProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeContentProvider.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeContentProvider.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSTreeNode;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorTreeContentProvider implements ITreeContentProvider {
+
+ public Object[] getChildren(Object parentElement) {
+ return ((CSSTreeNode)parentElement).getChildren().toArray();
+ }
+
+ public Object getParent(Object element) {
+ return ((CSSTreeNode)element).getParent();
+ }
+
+ public boolean hasChildren(Object element) {
+ return ((CSSTreeNode)element).hasChildren();
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return ((CSSTreeNode)inputElement).getChildren().toArray();
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeLabelProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeLabelProvider.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeLabelProvider.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSTreeNode;
+import org.w3c.dom.css.CSSRule;
+import org.w3c.dom.css.CSSStyleSheet;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorTreeLabelProvider extends LabelProvider {
+
+ private final static ImageDescriptor CSS_STYLE_SHEET_DESCR = JspEditorPlugin.getImageDescriptor(Constants.IMAGE_STYLE_SHEET_LOCATION);
+ private final static ImageDescriptor CSS_STYLE_CLASS_DESCR = JspEditorPlugin.getImageDescriptor(Constants.IMAGE_STYLE_CLASS_LOCATION);
+
+ @Override
+ public Image getImage(Object element) {
+ if (((CSSTreeNode) element).getCssResource() instanceof CSSStyleSheet) {
+ return CSS_STYLE_SHEET_DESCR.createImage();
+ }
+ if (((CSSTreeNode) element).getCssResource() instanceof CSSRule) {
+ return CSS_STYLE_CLASS_DESCR.createImage();
+ }
+ return super.getImage(element);
+ }
+
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeViewer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeViewer.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/cssselector/viewers/CSSSelectorTreeViewer.java 2010-03-04 15:18:43 UTC (rev 20671)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.viewers;
+
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.jst.jsp.outline.cssdialog.cssselector.model.CSSSelectorTreeModel;
+
+/**
+ *
+ * @author yzhishko
+ *
+ */
+
+public class CSSSelectorTreeViewer extends TreeViewer {
+
+ public final static String CSS_SELECTOR_TREE_VIWER_ID = "css_selector_tree_viwer"; //$NON-NLS-1$
+
+ public CSSSelectorTreeViewer(Composite parent, int style) {
+ super(parent, style);
+ setContentProvider(new CSSSelectorTreeContentProvider());
+ setLabelProvider(new CSSSelectorTreeLabelProvider());
+ }
+
+ public void setModel(CSSSelectorTreeModel model){
+ if (model != null) {
+ setInput(model.getInvisibleRoot());
+ }
+ }
+
+}
14 years, 3 months
JBoss Tools SVN: r20670 - branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-03-04 09:47:34 -0500 (Thu, 04 Mar 2010)
New Revision: 20670
Modified:
branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5995
Modified: branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
===================================================================
--- branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2010-03-04 14:45:36 UTC (rev 20669)
+++ branches/jbosstools-3.1.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2010-03-04 14:47:34 UTC (rev 20670)
@@ -50,8 +50,6 @@
import org.jboss.tools.jst.web.kb.PageProcessor;
import org.jboss.tools.jst.web.kb.KbQuery.Type;
import org.jboss.tools.jst.web.kb.taglib.IAttribute;
-import org.jboss.tools.jst.web.kb.taglib.IComponent;
-import org.jboss.tools.jst.web.kb.taglib.ICustomTagLibComponent;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
@@ -126,6 +124,7 @@
processor.createContext(getTextViewer(), offset);
pageContext = processor.getContext();
kbQuery = createKbQuery(processor);
+ kbQuery.setMask(true);
kbQueryAttr = createKbQuery(processor);
}
@@ -647,19 +646,7 @@
}
private Map<String, IAttribute> getAttributes() {
- IComponent[] components = PageProcessor.getInstance().getComponents(kbQuery, pageContext, true);
- Map<String, IAttribute> map = new HashMap<String, IAttribute>();
- for (IComponent component: components) {
- IAttribute[] as = component.getAttributes();
- for (IAttribute a: as) {
- String n = a.getName();
- if(map.containsKey(n) && !(component instanceof ICustomTagLibComponent)) {
- continue;
- }
- map.put(n, a);
- }
- }
- return map;
+ return PageProcessor.getInstance().getAttributesAsMap(kbQuery, pageContext);
}
//////// XMLPropertyDescriptor
14 years, 3 months