JBoss Tools SVN: r5726 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-01-15 12:46:27 -0500 (Tue, 15 Jan 2008)
New Revision: 5726
Modified:
trunk/seam/docs/reference/en/modules/creating_new_seam.xml
trunk/seam/docs/reference/en/modules/intro.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-234 - updating the chapters according to Svetlana Mukhina remarks
Modified: trunk/seam/docs/reference/en/modules/creating_new_seam.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/creating_new_seam.xml 2008-01-15 17:45:25 UTC (rev 5725)
+++ trunk/seam/docs/reference/en/modules/creating_new_seam.xml 2008-01-15 17:46:27 UTC (rev 5726)
@@ -142,10 +142,16 @@
</imageobject>
</mediaobject>
</figure>
+
+ <para>The last section on this wizard step is <property>Configurations</property>. Here, you
+ can select one of the pre-defined project configurations either Dynamic Web Project with
+ Seam 1.2 or with Seam 2.0 that's the latest release but just only a technology
+ preview. In addition, you can create your own configuration. Choosing Default
+ Configuration for jBoss 4.2 Runtime allows you later to specify your own set of facets
+ for adding extra functionality to your project. For more details about facets, see next
+ section.</para>
- <para>The last section on this wizard step is <property>Configurations</property>. You can
- select one of the pre-defined project configurations or create your own. Having all
- needed options arranged click on <emphasis>
+ <para>Having all necessary options arranged click on <emphasis>
<property>Next</property>
</emphasis> to pass on to the other wizard.</para>
@@ -154,9 +160,12 @@
<title>Select the Project Facets</title>
<para>This page of the wizard allows you to enable or disable specific facets that define
- necessary characteristics for the project. The moment you switch to this wizard form,
+ necessary characteristics for the project. In time you switch to this wizard form,
all critical facets are already checked for the chosen Dynamic Web Project.</para>
+ <para>Notice that this page of the wizard also allows you to specify the necessary version for
+ any facet. </para>
+
<figure>
<title>Project Facets Selection</title>
<mediaobject>
@@ -292,8 +301,8 @@
</mediaobject>
</figure>
- <para>Finally, as we are arranging the Seam Web project, the last step we should do is to adjust project
- configurations associated with Seam.</para>
+ <para>Finally, as we are arranging the Seam Web project, the last step we should do is to
+ adjust project configurations associated with the Seam.</para>
</section>
<section id="seamFacet">
@@ -315,10 +324,11 @@
</listitem>
</itemizedlist>
<para>For that click on <emphasis>
- <property>Add</property>
- </emphasis> button in the <property>General</property> section. Notice that in this wizard presented below you can create a Seam runtime only for that
- version which was selected in the <link linkend="projectFacets">Project Facets</link>
- wizard (version 1.2 in our case).</para>
+ <property>Add</property>
+ </emphasis> button in the <property>General</property> section. Notice that in this
+ wizard presented below you can create a Seam runtime only for that version which was
+ selected in the <link linkend="projectFacets">Project Facets</link> wizard (version 1.2
+ in our case).</para>
<figure>
<title>Seam Runtime Creation</title>
@@ -348,17 +358,21 @@
</imageobject>
</mediaobject>
</figure>
-
+
<itemizedlist>
<listitem>
- <para>and create a <emphasis>
+ <para>and then specify a <emphasis>
<property>Connection profile</property>
- </emphasis> clicking on <emphasis>
- <property>New</property>
- </emphasis> button and selecting the necessary connection profile.</para>
+ </emphasis> appropriate for your database.</para>
+
</listitem>
</itemizedlist>
+ <para>By default, <emphasis>
+ <property>DefaultDS</property></emphasis> value of Connection profile is set here. You can organise the
+ other one by clicking on <emphasis>
+ <property>New</property>
+ </emphasis> button and selecting necessary for you type of connection profile.</para>
<figure>
<title>Connection Profile Options</title>
<mediaobject>
@@ -367,7 +381,7 @@
</imageobject>
</mediaobject>
</figure>
-
+
<figure>
<title>Connection Profile Selecting</title>
<mediaobject>
@@ -378,11 +392,10 @@
</figure>
<para>Other Database fields are describing a Database and a connection to it.</para>
- <para>In the <property>Code Generation</property> section you can edit a package name for
+ <para>In the <property>Code Generation</property> section the wizard have already put the names for your
<property>Session Bean</property>, <property>Entity Bean</property> and
- <property>Test</property>.</para>
+ <property>Test</property> packages. Of course, you can change them to any others likable for you.</para>
-
<figure>
<title>Code Generation Section</title>
<mediaobject>
@@ -395,7 +408,7 @@
<para>Click on <emphasis>
<property>Finish</property>
</emphasis> to generate a project.</para>
-
- <para></para>
+
+ <para/>
</section>
</chapter>
Modified: trunk/seam/docs/reference/en/modules/intro.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/intro.xml 2008-01-15 17:45:25 UTC (rev 5725)
+++ trunk/seam/docs/reference/en/modules/intro.xml 2008-01-15 17:46:27 UTC (rev 5726)
@@ -6,25 +6,43 @@
<keyword>JBoss Tools</keyword>
<keyword>Seam</keyword>
<keyword>JBDS</keyword>
- </keywordset>
+ </keywordset>
</chapterinfo>
-
+
<title>Introduction</title>
-
+
<section>
-
+
<title>What is Seam?</title>
<para>This introduction will help you to understand what is <property>Seam</property>.</para>
- <para><property>Seam</property> is a fully featured application framework on top of Java EE 5. It is also one of the most popular enterprise Java framework today. Seam deeply integrates many other
- standard-based or open source frameworks (e.g., JSF, EJB3, JMS, Web Services, jBPM, JBoss Rules, Ajax4jsf, RichFaces, Facelets, Spring, iText, Quartz, TestNG, etc.), and
- provides a single programming model for developers to "drive" those underlying frameworks via simple annotated POJOs (Plain Old Java Objects). It makes life easier
- for developers to tackle complex enterprise applications with many component frameworks.</para>
+ <para><property>Seam</property> is a fully featured application framework on top of Java EE
+ 5. It is also one of the most popular enterprise Java framework today. Seam deeply
+ integrates many other standard-based or open source frameworks (e.g., JSF, EJB3, JMS,
+ Web Services, jBPM, JBoss Rules, Ajax4jsf, RichFaces, Facelets, Spring, iText, Quartz,
+ TestNG, etc.), and provides a single programming model for developers to
+ "drive" those underlying frameworks via simple annotated POJOs (Plain
+ Old Java Objects). It makes life easier for developers to tackle complex enterprise
+ applications with many component frameworks.</para>
</section>
-
+
<section>
+ <title>Installation into Eclipse</title>
+
+ <para>Here, we are going to explain how to install Seam plugin into Eclipse.</para>
+
+ <para>The first thing you should do is to download <ulink
+ url="http://labs.jboss.com/jbossseam/download/index.html">Seam distribution</ulink>
+ and extract it in any folder. Then, simply put /plugins and /features folders
+ from your distribution into the same ones of your eclipse directory. To ensure the
+ eclipse have detected a new plugin run it with -clean option, i.e. eclipse -clean.</para>
+
+ </section>
+
+ <section>
<title>Other relevant resources on the topic</title>
-
- <para>On JBoss you can find a set of benefits and other extra information on <ulink url="http://www.jboss.com/products/seam">Seam Framework</ulink>.</para>
-
- </section>
- </chapter>
+
+ <para>On JBoss you can find a set of benefits and other extra information on <ulink
+ url="http://www.jboss.com/products/seam">Seam Framework</ulink>.</para>
+
+ </section>
+</chapter>
16 years, 5 months
JBoss Tools SVN: r5725 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-15 12:45:25 -0500 (Tue, 15 Jan 2008)
New Revision: 5725
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1580
new template was added
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-01-15 17:44:17 UTC (rev 5724)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-01-15 17:45:25 UTC (rev 5725)
@@ -52,14 +52,19 @@
- public static final String ATTR_ID = "ID";
- public static final String ATTR_TYPE ="TYPE";
- public static final String ATTR_TEXT ="TEXT";
- public static final String ATTR_CLASS ="CLASS";
- public static final String ATTR_TITLE ="TITLE";
- public static final String ATTR_NAME ="NAME";
- public static final String ATTR_VALUE ="VALUE";
- public static final String ATTR_STYLE ="STYLE";
- public static final String ATTR_SIZE ="SIZE";
- public static final String ATTR_MULTIPLE = "MULTIPLE";
+ public static final String ATTR_ID = "ID";
+ public static final String ATTR_TYPE ="TYPE";
+ public static final String ATTR_TEXT ="TEXT";
+ public static final String ATTR_CLASS ="CLASS";
+ public static final String ATTR_TITLE ="TITLE";
+ public static final String ATTR_NAME ="NAME";
+ public static final String ATTR_VALUE ="VALUE";
+ public static final String ATTR_STYLE ="STYLE";
+ public static final String ATTR_SIZE ="SIZE";
+ public static final String ATTR_MULTIPLE = "MULTIPLE";
+ public static final String ATTR_COLSPAN = "colspan";
+ public static final String ATTR_CELLSPACING = "cellspacing";
+ public static final String ATTR_CELLPADDING = "cellpadding";
+ public static final String ATTR_WIDTH = "WIDTH";
+ public static final String ATTR_HEIGHT = "HEIGHT";
}
\ No newline at end of file
16 years, 5 months
JBoss Tools SVN: r5724 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: resources/richFacesTest/WebContent/pages/JBIDE/1580 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-15 12:44:17 -0500 (Tue, 15 Jan 2008)
New Revision: 5724
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/JBIDE-1580-4button.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/JBIDE-1580-8button.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1580Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1580
junits for new template was added
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/JBIDE-1580-4button.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/JBIDE-1580-4button.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/JBIDE-1580-4button.xhtml 2008-01-15 17:44:17 UTC (rev 5724)
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+
+<body>
+<rich:listShuttle sourceValue="#{person.source}"
+ targetValue="#{person.target}" var="items" targetListWidth="200"
+ sourceCaptionLabel="source label" targetCaptionLabel="target label"
+ orderControlsVerticalAlign="top" fastMoveControlsVisible="false"
+ fastOrderControlsVisible="false">
+
+ <rich:column>
+ <h:outputText value="#{items}"></h:outputText>
+ </rich:column>
+
+</rich:listShuttle>
+
+</body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/JBIDE-1580-8button.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/JBIDE-1580-8button.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/JBIDE/1580/JBIDE-1580-8button.xhtml 2008-01-15 17:44:17 UTC (rev 5724)
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+
+<body>
+<rich:listShuttle sourceValue="#{person.source}"
+ targetValue="#{person.target}" var="items" targetListWidth="200"
+ sourceCaptionLabel="source label" targetCaptionLabel="target label"
+ orderControlsVerticalAlign="top">
+
+ <rich:column>
+ <h:outputText value="#{items}"></h:outputText>
+ </rich:column>
+
+</rich:listShuttle>
+
+</body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml 2008-01-15 17:44:17 UTC (rev 5724)
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+
+<body>
+<rich:listShuttle sourceValue="#{person.source}"
+ targetValue="#{person.target}" var="items" targetListWidth="200"
+ sourceCaptionLabel="source label" targetCaptionLabel="target label"
+ orderControlsVerticalAlign="top">
+
+ <rich:column>
+ <h:outputText value="#{items}"></h:outputText>
+ </rich:column>
+
+</rich:listShuttle>
+
+</body>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-01-15 17:42:36 UTC (rev 5723)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-01-15 17:44:17 UTC (rev 5724)
@@ -16,6 +16,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1579Test;
+import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1580Test;
import org.jboss.tools.vpe.ui.test.VpeTestSetup;
import org.jboss.tools.vpe.ui.test.beans.ImportBean;
@@ -35,7 +36,7 @@
suite.addTestSuite(RichFacesComponentTest.class);
suite.addTestSuite(JBIDE1579Test.class);
-
+ suite.addTestSuite(Jbide1580Test.class);
// $JUnit-END$
List<ImportBean> projectToImport = new ArrayList<ImportBean>();
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-01-15 17:42:36 UTC (rev 5723)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-01-15 17:44:17 UTC (rev 5724)
@@ -211,4 +211,9 @@
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
"components/contextMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
}
+
+ public void testListShuttle() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/listShuttle.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1580Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1580Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/Jbide1580Test.java 2008-01-15 17:44:17 UTC (rev 5724)
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.vpe.richfaces.test.jbide;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+/**
+ *
+ *
+ * @author sdzmitrovich
+ *
+ */
+public class Jbide1580Test extends VpeTest {
+
+ public static final String IMPORT_PROJECT_NAME = "richFacesTest";
+
+ public static final String FILE_NAME1 = "JBIDE/1580/JBIDE-1580-8button.xhtml";
+ public static final String FILE_NAME2 = "JBIDE/1580/JBIDE-1580-4button.xhtml";
+
+ public Jbide1580Test(String name) {
+ super(name);
+ }
+
+ public void testUsualState() throws Throwable {
+
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME1,
+ IMPORT_PROJECT_NAME);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ // get dom document
+ nsIDOMDocument document = getVpeVisualDocument(part);
+ assertNotNull(document);
+
+ // get dom element
+ nsIDOMElement element = document.getDocumentElement();
+ assertNotNull(element);
+
+ // get root node
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "img" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_IMG);
+
+ Assert.assertEquals(8, elements.size());
+
+ // check exception
+ if (getException() != null) {
+ throw getException();
+ }
+
+ }
+
+ public void testWithoutSomeButton() throws Throwable {
+
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME2,
+ IMPORT_PROJECT_NAME);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ // get dom document
+ nsIDOMDocument document = getVpeVisualDocument(part);
+ assertNotNull(document);
+
+ // get dom element
+ nsIDOMElement element = document.getDocumentElement();
+ assertNotNull(element);
+
+ // get root node
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "img" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_IMG);
+
+ Assert.assertEquals(4, elements.size());
+
+ // check exception
+ if (getException() != null) {
+ throw getException();
+ }
+
+ }
+
+}
16 years, 5 months
JBoss Tools SVN: r5723 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: resources/shuttle and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-15 12:42:36 -0500 (Tue, 15 Jan 2008)
New Revision: 5723
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_copy.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_copy_all.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_down.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_first.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_last.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_remove.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_remove_all.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_up.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/shuttle.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1580
new template was added
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_copy.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_copy.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_copy_all.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_copy_all.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_down.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_down.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_first.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_first.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_last.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_last.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_remove.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_remove.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_remove_all.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_remove_all.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_up.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_up.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/shuttle.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/shuttle.css (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/shuttle.css 2008-01-15 17:42:36 UTC (rev 5723)
@@ -0,0 +1,47 @@
+.rich-shuttle-box {
+ background-color: #FFF;
+ border-color: #C0C0C0;
+ border-width: 1px;
+ border-style: solid;
+ overflow: auto;
+ //display:block;
+}
+
+.rich-shuttle-caption-label {
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+}
+
+.rich-shuttle-button-content {
+ padding: 0 4px 0 1px;
+ text-align: left;
+ white-space: nowrap;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+}
+
+.rich-shuttle-button-content img {
+ margin-right: 2px;
+ vertical-align: middle;
+}
+
+.rich-shuttle-control {
+ border: 1px solid;
+ margin-bottom: 3px;
+ border-color: #C0C0C0;
+}
+
+.rich-shuttle-button {
+ background: top left repeat-x;
+ padding: 2px;
+ cursor: pointer;
+ background-color: #E3DED5;
+ color: #000;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+}
+
+.rich-shuttle-controls {
+ padding: 0 8px 5px 8px;
+}
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-01-15 17:42:36 UTC (rev 5723)
@@ -0,0 +1,586 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * @author Sergey Dzmitrovich
+ *
+ */
+public class RichFacesListShuttleTemplate extends VpeAbstractTemplate {
+
+ /**
+ * source caption key
+ */
+ private static final String SOURCE_CAPTION = "sourceCaption";
+
+ /**
+ * target caption key
+ */
+ private static final String TARGET_CAPTION = "targetCaption";
+
+ /**
+ * path to css
+ */
+ private static final String STYLE_PATH = "shuttle/shuttle.css";
+
+ /**
+ * default value of width of box(list)
+ */
+ private static final String DEFAULT_LIST_WIDTH = "140px";
+
+ /**
+ * default value of height of box(list)
+ */
+ private static final String DEFAULT_LIST_HEIGHT = "140px";
+
+ /**
+ * attribute name of width of source list
+ */
+ private static final String ATTR_SOURCE_LIST_WIDTH = "sourceListWidth";
+
+ /**
+ * attribute name of width of target list
+ */
+ private static final String ATTR_TARGET_LIST_WIDTH = "targetListWidth";
+
+ /**
+ * attribute name of height of source list
+ */
+ private static final String ATTR_LISTS_HEIGHT = "listsHeight";
+
+ /**
+ * If this attribute in source node is "false", 'Copy All' and 'Remove All'
+ * controls aren't displayed
+ */
+ private static final String ATTR_FAST_MOVE_CONTROLS_VIZIBLE = "fastMoveControlsVisible";
+
+ /**
+ * If this attribute in source node is "false", 'Top' and 'Bottom' controls
+ * aren't displayed.
+ */
+ private static final String ATTR_FAST_ORDER_CONTROLS_VIZIBLE = "fastOrderControlsVisible";
+
+ /**
+ * If this attribute in source node is "false", 'Copy' and 'Remove' controls
+ * aren't displayed
+ */
+ private static final String ATTR_MOVE_CONTROLS_VIZIBLE = "moveControlsVisible";
+
+ /**
+ * If this attribute in source node is "false", 'Up' and 'Down' controls
+ * aren't displayed.
+ */
+ private static final String ATTR_ORDER_CONTROLS_VIZIBLE = "orderControlsVisible";
+
+ /**
+ * default button align
+ */
+ private static final String DEFAULT_BUTTON_ALIGN = "middle";
+
+ /**
+ * Customizes vertically a position of move/copy controls relatively to
+ * lists
+ */
+ private static final String ATTR_MOVE_CONTROLS_VERTICAL_ALIGN = "moveControlsVerticalAlign";
+
+ /**
+ *
+ * Customizes vertically a position of order controls relatively to lists
+ */
+ private static final String ATTR_ORDER_CONTROLS_VERTICAL_ALIGN = "orderControlsVerticalAlign";
+
+ /**
+ * button images
+ */
+ private static final Map<String, String> buttonImages;
+
+ static {
+ buttonImages = new HashMap<String, String>();
+
+ // images of the first set of buttons
+ buttonImages.put("copyAllControl", "shuttle/arrow_copy_all.gif");
+ buttonImages.put("copyControl", "shuttle/arrow_copy.gif");
+ buttonImages.put("removeControl", "shuttle/arrow_remove.gif");
+ buttonImages.put("removeAllControl", "shuttle/arrow_remove_all.gif");
+
+ // images of the second set of buttons
+ buttonImages.put("topControl", "shuttle/arrow_first.gif");
+ buttonImages.put("upControl", "shuttle/arrow_up.gif");
+ buttonImages.put("downControl", "shuttle/arrow_down.gif");
+ buttonImages.put("bottomControl", "shuttle/arrow_last.gif");
+
+ }
+
+ /**
+ * default labels
+ */
+ private static final Map<String, String> defaultLabels;
+
+ static {
+ defaultLabels = new HashMap<String, String>();
+
+ // values of the first set of buttons
+ defaultLabels.put("copyAllControl", "Copy all");
+ defaultLabels.put("copyControl", "Copy");
+ defaultLabels.put("removeControl", "Remove");
+ defaultLabels.put("removeAllControl", "Remove All");
+
+ // images of the second set of buttons
+ defaultLabels.put("topControl", "First");
+ defaultLabels.put("upControl", "Up");
+ defaultLabels.put("downControl", "Down");
+ defaultLabels.put("bottomControl", "Last");
+
+ // caption labels
+ defaultLabels.put("sourceCaption", "");
+ defaultLabels.put("targetCaption", "");
+
+ }
+
+ /**
+ * "fast move" buttons block
+ */
+ private static final List<String> fastMoveButtons;
+
+ static {
+ fastMoveButtons = new ArrayList<String>();
+ fastMoveButtons.add("copyAllControl");
+ fastMoveButtons.add("removeAllControl");
+ }
+
+ /**
+ * "move" buttons block
+ */
+ private static final List<String> moveButtons;
+
+ static {
+ moveButtons = new ArrayList<String>();
+ moveButtons.add("copyControl");
+ moveButtons.add("removeControl");
+ }
+
+ /**
+ * "fast order" buttons block
+ */
+ private static final List<String> fastOrderButtons;
+
+ static {
+ fastOrderButtons = new ArrayList<String>();
+ fastOrderButtons.add("topControl");
+ fastOrderButtons.add("bottomControl");
+
+ }
+
+ /**
+ * "order" buttons block
+ */
+ private static final List<String> orderButtons;
+
+ static {
+ orderButtons = new ArrayList<String>();
+ orderButtons.add("upControl");
+ orderButtons.add("downControl");
+
+ }
+
+ /**
+ * labels for controls
+ */
+ private final Map<String, String> labels = new HashMap<String, String>();
+
+ /**
+ * source buttons
+ */
+ private final List<String> sourceButtons = new ArrayList<String>();
+
+ /**
+ * target buttons
+ */
+ private final List<String> targetButtons = new ArrayList<String>();
+
+ /**
+ * value of vertical-align attribute for source (copy/remove) buttons
+ */
+ private String sourceButtonsAlign;
+
+ /**
+ * value of vertical-align attribute for source (up/down/top/bottom) buttons
+ */
+ private String targetButtonsAlign;
+
+ /**
+ * value of height attribute of lists (source/target)
+ */
+ private String listsHeight;
+
+ /**
+ * value of width attribute of source list
+ */
+ private String sourceListsWidth;
+
+ /**
+ * value of width attribute of target list
+ */
+ private String targetListsWidth;
+
+ /**
+ *
+ */
+ public RichFacesListShuttleTemplate() {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext,
+ * org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument,
+ * org.mozilla.interfaces.nsIDOMElement, java.lang.Object,
+ * java.lang.String, java.lang.String)
+ */
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext,
+ * org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "shuttle");
+
+ // cast to Element
+ Element sourceElement = (Element) sourceNode;
+
+ // get children
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+
+ // prepare data
+ prepareData(sourceElement);
+
+ // create table element
+ nsIDOMElement basicTable = visualDocument.createElement(HTML.TAG_TABLE);
+ ComponentUtil.copyAttributes(sourceNode, basicTable);
+ VpeCreationData creationData = new VpeCreationData(basicTable);
+
+ // create caption
+ nsIDOMElement caption = createCaption(visualDocument);
+ if (caption != null)
+ basicTable.appendChild(caption);
+
+ // create "tr" tag
+ nsIDOMElement basicTr = visualDocument.createElement(HTML.TAG_TR);
+
+ // create source box
+ nsIDOMElement sourceBoxTd = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement sourceBox = createBox(visualDocument, creationData,
+ children);
+ sourceBox.setAttribute(HTML.ATTR_STYLE, "width:" + sourceListsWidth
+ + ";height:" + listsHeight + ";");
+ sourceBoxTd.appendChild(sourceBox);
+
+ // create source buttons
+ nsIDOMElement sourceButtonsTd = visualDocument
+ .createElement(HTML.TAG_TD);
+ nsIDOMElement sourceButtonsBlock = createButtonsBlock(visualDocument,
+ sourceButtons);
+ sourceButtonsTd.appendChild(sourceButtonsBlock);
+
+ // set vertical-align attribute for source buttons
+ sourceButtonsTd.setAttribute(HTML.ATTR_STYLE, "vertical-align: "
+ + sourceButtonsAlign);
+
+ // create target box
+ nsIDOMElement targetBoxTd = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement targetBox = createBox(visualDocument, creationData,
+ children);
+ targetBox.setAttribute(HTML.ATTR_STYLE, "width:" + targetListsWidth
+ + ";height:" + listsHeight + ";");
+ targetBoxTd.appendChild(targetBox);
+
+ // create target buttons
+ nsIDOMElement targetButtonsTd = visualDocument
+ .createElement(HTML.TAG_TD);
+ nsIDOMElement targetButtonsBlock = createButtonsBlock(visualDocument,
+ targetButtons);
+ targetButtonsTd.appendChild(targetButtonsBlock);
+
+ // set vertical-align attribute for target buttons
+ targetButtonsTd.setAttribute(HTML.ATTR_STYLE, "vertical-align: "
+ + targetButtonsAlign);
+
+ // add all blocks to "tr"
+ basicTr.appendChild(sourceBoxTd);
+ basicTr.appendChild(sourceButtonsTd);
+ basicTr.appendChild(targetBoxTd);
+ basicTr.appendChild(targetButtonsTd);
+
+ // add "tr" to table
+ basicTable.appendChild(basicTr);
+
+ return creationData;
+ }
+
+ /**
+ * create caption of listShuttle component
+ *
+ * caption is "tr" tag which contain two "td" tags
+ *
+ * @param sourceCaptionLabel
+ * @param targetCaptionLabel
+ * @param visualDocument
+ * @return
+ */
+ private nsIDOMElement createCaption(nsIDOMDocument visualDocument) {
+
+ // check sourceCaptionLabel
+ if ((labels.get(SOURCE_CAPTION).length() == 0)
+ && (labels.get(TARGET_CAPTION).length() == 0))
+ return null;
+
+ // basic element for caption is "tr" tag
+ nsIDOMElement caption = visualDocument.createElement(HTML.TAG_TR);
+
+ // create source caption label
+ caption.appendChild(createCaptionLabel(visualDocument, labels
+ .get(SOURCE_CAPTION)));
+ // create target caption label
+ caption.appendChild(createCaptionLabel(visualDocument, labels
+ .get(TARGET_CAPTION)));
+
+ return caption;
+
+ }
+
+ /**
+ * create caption label
+ *
+ * @param visualDocument
+ * @param label
+ * @return
+ */
+ private nsIDOMElement createCaptionLabel(nsIDOMDocument visualDocument,
+ String label) {
+
+ // create "td" for target caption label
+ nsIDOMElement captionLabelTd = visualDocument
+ .createElement(HTML.TAG_TD);
+
+ // set attributes
+ captionLabelTd.setAttribute(HTML.ATTR_COLSPAN, "2");
+ captionLabelTd.setAttribute(HTML.ATTR_CLASS,
+ "rich-shuttle-caption-label");
+
+ // add to "td" value of captionLabel
+ nsIDOMText captionLabelText = visualDocument.createTextNode(label);
+
+ captionLabelTd.appendChild(captionLabelText);
+
+ return captionLabelTd;
+
+ }
+
+ /**
+ * create box (list)
+ *
+ * @param visualDocument
+ * @param creationData
+ * @return
+ */
+ private nsIDOMElement createBox(nsIDOMDocument visualDocument,
+ VpeCreationData creationData, List<Node> children) {
+
+ nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ div.setAttribute(HTML.ATTR_CLASS, "rich-shuttle-box");
+ // create table element
+ nsIDOMElement box = visualDocument.createElement(HTML.TAG_TABLE);
+ // box.setAttribute(HTML.ATTR_CLASS, "rich-shuttle-box");
+
+ // create "tr" for box
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
+ tr.setAttribute(HTML.ATTR_STYLE, "vertical-align:top");
+
+ VpeChildrenInfo trInfo = new VpeChildrenInfo(tr);
+ creationData.addChildrenInfo(trInfo);
+
+ // add children to "tr" element
+ for (Node child : children) {
+ if ("column".equals(child.getLocalName())) {
+ trInfo.addSourceChild(child);
+ }
+ }
+
+ // add "tr" to table
+ box.appendChild(tr);
+ div.appendChild(box);
+ return div;
+ }
+
+ /**
+ * create buttons block
+ *
+ * @param visualDocument
+ * @param buttonNames
+ * @return
+ */
+ private nsIDOMElement createButtonsBlock(nsIDOMDocument visualDocument,
+ List<String> buttonNames) {
+
+ // create "div"
+ nsIDOMElement buttonsBlock = visualDocument.createElement(HTML.TAG_DIV);
+ buttonsBlock.setAttribute(HTML.ATTR_CLASS, "rich-shuttle-controls");
+
+ for (String buttonId : buttonNames) {
+
+ buttonsBlock.appendChild(createButton(visualDocument, labels
+ .get(buttonId), buttonImages.get(buttonId)));
+
+ }
+
+ return buttonsBlock;
+
+ }
+
+ /**
+ * create button
+ *
+ * @param visualDocument
+ * @param buttonValue
+ * @param buttonImage
+ * @return
+ */
+ private nsIDOMElement createButton(nsIDOMDocument visualDocument,
+ String buttonValue, String buttonImageFile) {
+
+ nsIDOMElement buttonSpace = visualDocument.createElement(HTML.TAG_DIV);
+ buttonSpace.setAttribute(HTML.ATTR_CLASS, "rich-shuttle-control");
+
+ // button represent "div" element
+ nsIDOMElement button = visualDocument.createElement(HTML.TAG_DIV);
+ button.setAttribute(HTML.ATTR_CLASS, "rich-shuttle-button");
+ button.setAttribute(HTML.ATTR_STYLE, ComponentUtil
+ .getBackgoundImgStyle("shuttle/button.gif"));
+
+ // button represent "div" element
+ nsIDOMElement buttonContent = visualDocument
+ .createElement(HTML.TAG_DIV);
+ buttonContent.setAttribute(HTML.ATTR_CLASS,
+ "rich-shuttle-button-content");
+
+ nsIDOMElement buttonImage = visualDocument.createElement(HTML.TAG_IMG);
+
+ buttonImage.setAttribute(HTML.ATTR_WIDTH, "15");
+ buttonImage.setAttribute(HTML.ATTR_HEIGHT, "15");
+ buttonImage
+ .setAttribute(HTML.ATTR_CLASS, "rich-shuttle-button-content");
+ ComponentUtil.setImg(buttonImage, buttonImageFile);
+
+ nsIDOMText buttonText = visualDocument.createTextNode(buttonValue);
+
+ buttonContent.appendChild(buttonImage);
+ buttonContent.appendChild(buttonText);
+
+ button.appendChild(buttonContent);
+ buttonSpace.appendChild(button);
+
+ return buttonSpace;
+
+ }
+
+ /**
+ * prepare data
+ *
+ * @param sourceElement
+ */
+ void prepareData(Element sourceElement) {
+
+ // prepare labels
+ labels.clear();
+
+ Set<String> labelsKeys = defaultLabels.keySet();
+ for (String key : labelsKeys) {
+
+ String label = sourceElement.getAttribute(key + "Label");
+ if (label != null)
+ labels.put(key, label);
+ else
+ labels.put(key, defaultLabels.get(key));
+ }
+
+ // prepare source buttons
+ sourceButtons.clear();
+ if (!"false".equalsIgnoreCase(sourceElement
+ .getAttribute(ATTR_FAST_MOVE_CONTROLS_VIZIBLE)))
+ sourceButtons.addAll(fastMoveButtons);
+ if (!"false".equalsIgnoreCase(sourceElement
+ .getAttribute(ATTR_MOVE_CONTROLS_VIZIBLE)))
+ sourceButtons
+ .addAll(sourceButtons.size() == 0 ? 0 : 1, moveButtons);
+
+ // prepare target buttons
+ targetButtons.clear();
+ if (!"false".equalsIgnoreCase(sourceElement
+ .getAttribute(ATTR_FAST_ORDER_CONTROLS_VIZIBLE)))
+ targetButtons.addAll(fastOrderButtons);
+ if (!"false".equalsIgnoreCase(sourceElement
+ .getAttribute(ATTR_ORDER_CONTROLS_VIZIBLE)))
+ targetButtons.addAll(targetButtons.size() == 0 ? 0 : 1,
+ orderButtons);
+
+ // prepare buttons attributes
+ sourceButtonsAlign = sourceElement
+ .getAttribute(ATTR_MOVE_CONTROLS_VERTICAL_ALIGN) != null ? sourceElement
+ .getAttribute(ATTR_MOVE_CONTROLS_VERTICAL_ALIGN)
+ : DEFAULT_BUTTON_ALIGN;
+
+ targetButtonsAlign = sourceElement
+ .getAttribute(ATTR_ORDER_CONTROLS_VERTICAL_ALIGN) != null ? sourceElement
+ .getAttribute(ATTR_ORDER_CONTROLS_VERTICAL_ALIGN)
+ : DEFAULT_BUTTON_ALIGN;
+
+ // prepare lists attributes
+ listsHeight = sourceElement.getAttribute(ATTR_LISTS_HEIGHT) != null ? sourceElement
+ .getAttribute(ATTR_LISTS_HEIGHT)
+ : DEFAULT_LIST_HEIGHT;
+
+ sourceListsWidth = sourceElement.getAttribute(ATTR_SOURCE_LIST_WIDTH) != null ? sourceElement
+ .getAttribute(ATTR_SOURCE_LIST_WIDTH)
+ : DEFAULT_LIST_WIDTH;
+
+ targetListsWidth = sourceElement.getAttribute(ATTR_TARGET_LIST_WIDTH) != null ? sourceElement
+ .getAttribute(ATTR_TARGET_LIST_WIDTH)
+ : DEFAULT_LIST_WIDTH;
+ }
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-01-15 17:40:34 UTC (rev 5722)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-01-15 17:42:36 UTC (rev 5723)
@@ -718,6 +718,42 @@
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes"/>
</vpe:template>
- </vpe:tag>
-
+ </vpe:tag>
+
+ <vpe:tag name="rich:listShuttle" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesListShuttleTemplate">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="column" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="BlockFormat" addChildren="deny" />
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
+ </vpe:tag>
+
</vpe:templates>
\ No newline at end of file
16 years, 5 months
JBoss Tools SVN: r5722 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/src/org/jboss/tools/jsf/vpe/html/test.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-15 12:40:34 -0500 (Tue, 15 Jan 2008)
New Revision: 5722
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/src/org/jboss/tools/jsf/vpe/html/test/HtmlTestPlugin.java
Log:
update comments
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/src/org/jboss/tools/jsf/vpe/html/test/HtmlTestPlugin.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/src/org/jboss/tools/jsf/vpe/html/test/HtmlTestPlugin.java 2008-01-15 17:05:25 UTC (rev 5721)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.html.test/src/org/jboss/tools/jsf/vpe/html/test/HtmlTestPlugin.java 2008-01-15 17:40:34 UTC (rev 5722)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+* Copyright (c) 2007 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:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
package org.jboss.tools.jsf.vpe.html.test;
import java.net.URL;
16 years, 5 months
JBoss Tools SVN: r5721 - trunk/documentation/guides/userguide/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-01-15 12:05:25 -0500 (Tue, 15 Jan 2008)
New Revision: 5721
Modified:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/first_seam.xml
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/jsp_application.xml
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-235 remarks+links+info added
Modified: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/first_seam.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/first_seam.xml 2008-01-15 16:16:04 UTC (rev 5720)
+++ trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/first_seam.xml 2008-01-15 17:05:25 UTC (rev 5721)
@@ -27,7 +27,7 @@
<para>This section helps you to create a simple Seam project.</para>
<para>To create a new web application in <property>Seam</property>, you should create a Seam web
project. This section provides all the necessary steps to organize a new project with appropriate
- tooling and adjust the settings that match your needs.</para>
+ tooling and adjust the settings that match your needs. In order to find out more information, see <ulink url="../../../seam/en/html_single/index.html">Seam Dev Tools Reference guide</ulink></para>
<para>First, select <emphasis>
<property>New > Project ... > Seam > Seam Web Project</property>
</emphasis>. You will be prompted to enter a name and a location directory for your new
@@ -76,7 +76,7 @@
</mediaobject>
</figure>
<para>A dynamic web application contains both web pages and Java code. The wizard will ask you
- where you want to put those files. You can just leave the default values.</para>
+ where you want to put those files. You can just leave the default values or choose another folder.</para>
<figure>
<title>Select Directory Names for Web Pages and Java Files</title>
@@ -88,7 +88,7 @@
</figure>
- <para>In the next screen, you will be able to select where those library JARs come from. The
+ <para>On the next form, you will be able to select where those library JARs come from. The
easiest is just to select the JARs provided by the JBoss AS runtime associated with this
project. That is why it is important to chose the right JBoss AS 4.2 runtime in the project
setup window.</para>
@@ -221,7 +221,7 @@
<property>WebContent/home.xhtml file</property>
</emphasis> and edit it in the visual editor. Notice that the visual editor lets you both the
XHTML code and the rendered page. The rendered view is designed to make it easy to find stuff
- in a complex XHTML page.</para>
+ in a complex XHTML page. If you'd like to learn more about the VPE, read the Editors section in the <ulink url="../../../jsf/en/html_single/index.html">Visual Web Tools Reference guide</ulink>.</para>
<figure>
<title>Making Changes in the Visual Editor</title>
@@ -545,6 +545,7 @@
<para>Seam Tools - New and Noteworthy: <ulink
url="http://fisheye.jboss.org/browse/~raw,r=3993/JBossTools/trunk/documentatio..."
>What's new and noteworthy</ulink></para>
+ <para>Max Andersen's blogs: <ulink url="http://blog.xam.dk/">Max's blog</ulink>, <ulink url="http://in.relation.to/Bloggers/Max">In Relation To...</ulink></para>
</section>
</chapter>
Modified: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2008-01-15 16:16:04 UTC (rev 5720)
+++ trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2008-01-15 17:05:25 UTC (rev 5721)
@@ -233,7 +233,7 @@
<itemizedlist>
<listitem>
- <para>Installation process includes JBoss Enterprise Application Platform. Select <emphasis>
+ <para>Installation process includes <ulink url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application Platform</ulink>. Select <emphasis>
<property>Yes</property>
</emphasis> to use it in JBoss Developer Studio.</para>
</listitem>
@@ -257,9 +257,8 @@
<itemizedlist>
<listitem>
- <para>Check your installation paths and see the components will be installed. Click <emphasis>
- <property>Next</property>
- </emphasis> to start installation.</para>
+ <para>Check your installation paths and see the components to install. If you'd like to change something, press <emphasis><property>Previous</property></emphasis> button. Click <emphasis>
+ <property>Next</property></emphasis> to start installation. </para>
</listitem>
</itemizedlist>
@@ -356,7 +355,7 @@
<itemizedlist>
<listitem>
- <para>to create new Seam, jBPM Process, JSF or Struts projects using JBDS wizards</para>
+ <para>to create new Seam projects, jBPM Process, JSF or Struts projects using JBDS wizards</para>
</listitem>
</itemizedlist>
@@ -437,7 +436,7 @@
<?dbhtml filename="FAQ.html"?>
<title>FAQ</title>
<para>For easy reference to JBoss Developer Studio related questions, our FAQ provides answers to
- our most "popular" questions. The sections of questions are organized by type. </para>
+ the most "popular" questions. The sections of questions are organized by type. </para>
<!-- <section id="Before_Installing">
<title>Before Installing, Tutorials, Examples, Readme Files</title>
<para><emphasis role="bold">I'm looking for examples, do you have any?</emphasis></para>
@@ -534,7 +533,7 @@
<title>Troubleshooting, Problems, Configuration, Error Messages</title>
<para>
<emphasis role="bold">Is it possible to increase the performance of Eclipse after installing
- your product? My Eclipse now crawls.</emphasis>
+ your product?</emphasis>
</para>
<para>JBoss Developer Studio preconfigures eclipse via the eclipse.ini file to allocate extra
memory, but if you for some reason need more memory then by default, you can manually make
Modified: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/jsp_application.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/jsp_application.xml 2008-01-15 16:16:04 UTC (rev 5720)
+++ trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/jsp_application.xml 2008-01-15 17:05:25 UTC (rev 5721)
@@ -13,20 +13,20 @@
<note>
<title>Note:</title>
<para>We highly recommend developing in <property>Seam</property>. This chapter is for users
- who for some reason cannot use <property>Seam</property>.</para>
+ who for some reason cannot use Seam.</para>
</note>
<para>In this chapter you'll find out how to create a simple JSP application using the JBoss
Developer Studio. The application will show a classic "Hello World!" on
the page.</para>
<para>We'll assume that you have already launched JBoss Developer Studio and also that
- the Web Development perspective is the current perspective. (If not, make it active by
+ the Web Development perspective is the current perspective. 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 Web Development from the Select Perspective
- dialog box.)</para>
+ dialog box.</para>
<section id="SettingUpTheProject">
<?dbhtml filename="SettingUpTheProject.html"?>
<title>Setting Up the Project</title>
Modified: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml 2008-01-15 16:16:04 UTC (rev 5720)
+++ trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml 2008-01-15 17:05:25 UTC (rev 5721)
@@ -16,7 +16,7 @@
<section id="JBossbundled">
<?dbhtml filename="JBossbundled.html"?>
<title>How to Manage the JBoss AS Bundled in JBDS</title>
- <para>This section covers the basics of working with the JBoss server supported directly by JBDS via bundled plug-in.</para>
+ <para>This section covers the basics of working with the JBoss server supported directly by JBDS via bundled AS plug-in. To read more about AS plug-in, read <ulink url="../../../as/en/html_single/index.html">Server Manager guide</ulink>.</para>
<section id="StartingServer">
<?dbhtml filename="StartingServer.html"?>
<title>Starting JBoss server</title>
16 years, 5 months
JBoss Tools SVN: r5720 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test: src/org/jboss/tools/jsf/vpe/facelets/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-15 11:16:04 -0500 (Tue, 15 Jan 2008)
New Revision: 5720
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/faceletsTest.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
Log:
Code adjustment for facelets JUnit tests
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/faceletsTest.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/faceletsTest.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/faceletsTest.xhtml 2008-01-15 16:16:04 UTC (rev 5720)
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<head>
+<title>All Test</title>
+</head>
+
+<body bgcolor="#ffffff">
+<ui:component binding="#{backingBean.menu}">
+ <ul id="mainMenu">
+ <li><a href="#{link.uri}">#{link.text}</a></li>
+ </ul>
+</ui:component>
+<ui:include src="insert.xhtml">
+ <ui:param name="user" value="#{person.name}" />
+</ui:include>
+<ui:fragment binding="#{uiCache['searchResult']}">
+ <ul id="mainMenu">
+ <li><a href="#{link.uri}">#{link.text}</a></li>
+ </ul>
+</ui:fragment>
+<ui:decorate template="./insert.xhtml">
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+</ui:decorate>
+<ui:remove>
+ This will be removed.
+</ui:remove>
+<ui:debug hotkey="d" rendered="#{initParam.debugMode}" />
+<ui:composition template="./insert.xhtml">
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+</ui:composition>
+<ui:repeat value="#{company.departments}" var="dept">
+ <dt>#{dept.name}</dt>
+ <dd>#{dept.lastName}, #{dept.firstName}</dd>
+</ui:repeat>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-15 16:06:11 UTC (rev 5719)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-15 16:16:04 UTC (rev 5720)
@@ -445,4 +445,14 @@
assertEquals(message, contextString, text.getNodeValue());
}
+ /**
+ * Test for all facelets tags
+ *
+ * @throws Throwable
+ */
+ public void testAllTags() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/faceletsTest.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ }
+
}
16 years, 5 months
JBoss Tools SVN: r5719 - in trunk/hibernatetools/tests/org.hibernate.eclipse.console.test: src/org/hibernate/eclipse/console/test/mappingproject and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-01-15 11:06:11 -0500 (Tue, 15 Jan 2008)
New Revision: 5719
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/
Removed:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/.lib/
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java
Log:
rename .lib to lib
Copied: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib (from rev 5713, trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/.lib)
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java 2008-01-15 16:00:55 UTC (rev 5718)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java 2008-01-15 16:06:11 UTC (rev 5719)
@@ -56,7 +56,6 @@
public static String PROJECT_NAME = "MappingTestProject";
public static String RESOURCE_PATH = "res/project/";
- public static String RES_LIB_FNAME = ".lib";
private static FileFilter fileFilter = new FileFilter(){
public boolean accept(File pathname) {
@@ -67,6 +66,7 @@
public boolean accept(File pathname) {
//exclude ".svn" and other unnessesary folders
if (pathname.getName().charAt(0) == '.') return false;
+ if (LIB_FOLDER.equals(pathname.getName())) return false;
return pathname.isDirectory();
}};
@@ -165,9 +165,9 @@
javaProject.getPackageFragmentRoot(dst);
}
- File libFolder = new File(res.getAbsolutePath()+"/" + RES_LIB_FNAME);
+ File libFolder = new File(res.getAbsolutePath()+"/" + LIB_FOLDER);
if ( !libFolder.exists() )
- throw new RuntimeException("Folder " + RESOURCE_PATH + RES_LIB_FNAME + " not found!");
+ throw new RuntimeException("Folder " + RESOURCE_PATH + "/" + LIB_FOLDER + " not found!");
List<IPath> libs = new ArrayList<IPath>();
16 years, 5 months
JBoss Tools SVN: r5718 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-01-15 11:00:55 -0500 (Tue, 15 Jan 2008)
New Revision: 5718
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextShortVariable.java
Log:
Comment added
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextShortVariable.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextShortVariable.java 2008-01-15 15:55:59 UTC (rev 5717)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamContextShortVariable.java 2008-01-15 16:00:55 UTC (rev 5718)
@@ -1,5 +1,17 @@
package org.jboss.tools.seam.core;
+/**
+ * A seam variable can be accessed by a short name if seam package
+ * is imported. In this model we duplicate variable, the copy has
+ * name equal to short name of original. This interface is designed
+ * for instantiating a duplication object.
+ *
+ * @author Viacheslav Kabanovich
+ */
public interface ISeamContextShortVariable extends ISeamContextVariable {
+ /**
+ * Returns variable with full name used to create this instance.
+ * @return
+ */
public ISeamContextVariable getOriginal();
}
16 years, 5 months
JBoss Tools SVN: r5717 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-15 10:55:59 -0500 (Tue, 15 Jan 2008)
New Revision: 5717
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
Log:
Code adjustment for richfaces JUnit tests
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-01-15 15:53:16 UTC (rev 5716)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2008-01-15 15:55:59 UTC (rev 5717)
@@ -10,21 +10,10 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.test;
-import java.util.ArrayList;
-import java.util.List;
-
import org.eclipse.core.resources.IFile;
-import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.FileEditorInput;
-import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
-import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
import org.jboss.tools.vpe.ui.test.VpeTest;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
-import org.mozilla.interfaces.nsIDOMText;
/**
* Class for testing all RichFaces components
@@ -139,10 +128,10 @@
}
public void testOrderingList() throws PartInitException, Throwable {
- performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/orderingList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/orderingList.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
}
-
+
public void testPaint2D() throws PartInitException, Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
"components/paint2D.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
@@ -218,71 +207,8 @@
"components/componentControl.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
}
- public void testcontextMenu() throws Throwable {
- nsIDOMElement element = performTestForRichFacesComponent("components/contextMenu.xhtml");
-
- nsIDOMNode node = (nsIDOMNode) element
- .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
-
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
-
- // find "span" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_SPAN);
-
- assertEquals("Component's content is not shown", 4, elements.size());
-
- nsIDOMElement elementSpan = (nsIDOMElement) elements.get(1)
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- nsIDOMText text = (nsIDOMText) elementSpan.getFirstChild()
- .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
-
- nsIDOMElement elementSpan1 = (nsIDOMElement) elements.get(3)
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- nsIDOMText text1 = (nsIDOMText) elementSpan1.getFirstChild()
- .queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
-
- assertEquals("Component's content is not shown", text.getNodeValue(),
- "Zoom In");
- assertEquals("Component's content is not shown", text1.getNodeValue(),
- "Zoom Out");
-
+ public void testContextMenu() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(
+ "components/contextMenu.xhtml", IMPORT_PROJECT_NAME)); // $NON-NLS-1$
}
-
- /**
- *
- * @param componentPage
- * @return
- * @throws Throwable
- */
- private nsIDOMElement performTestForRichFacesComponent(String componentPage)
- throws Throwable {
- TestUtil.waitForJobs();
- // set exception
- setException(null);
-
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath(componentPage,
- IMPORT_PROJECT_NAME);
-
- assertNotNull("Could not open specified file " + file.getFullPath(),
- file);
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input);
- // open and get editor
- JSPMultiPageEditor part = openEditor(input);
-
- // get dom document
- nsIDOMDocument document = getVpeVisualDocument(part);
- nsIDOMElement element = document.getDocumentElement();
-
- // check that element is not null
- assertNotNull(element);
-
- return element;
- }
-
}
16 years, 5 months