JBoss Tools SVN: r42857 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-08-06 04:20:28 -0400 (Mon, 06 Aug 2012)
New Revision: 42857
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
Log:
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-08-06 07:53:29 UTC (rev 42856)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-08-06 08:20:28 UTC (rev 42857)
@@ -150,7 +150,7 @@
public void projectExamplesSectionTest(){
SWTBotTwistie twistieBot = bot.twistieByLabel("JBoss Quickstarts");
int counter = 0;
- while (!twistieBot.isExpanded() || counter>10){
+ while (!twistieBot.isExpanded() && counter>10){
twistieBot.toggle();
counter++;
}
12 years, 5 months
JBoss Tools SVN: r42856 - in trunk/maven/tests/org.jboss.tools.maven.ui.bot.test: META-INF and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: rawagner
Date: 2012-08-06 03:53:29 -0400 (Mon, 06 Aug 2012)
New Revision: 42856
Added:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/ProjectHasNature.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/TableHasRows.java
Removed:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar1/target/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar2/target/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Utils.java
Modified:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.project
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/pom.xml
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar1/.settings/org.eclipse.m2e.core.prefs
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar2/.settings/org.eclipse.m2e.core.prefs
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/AbstractMavenSWTBotTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/ConfiguratorsTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenProjectsTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedEARProjectTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedJSFProjectTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/JBossPerspectiveTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MaterializeLibraryTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenProfileSelectionTest.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/usersettings/settings.xml
Log:
swtbot tests updated and refactored
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.project
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.project 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.project 2012-08-06 07:53:29 UTC (rev 42856)
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -30,6 +35,7 @@
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
<linkedResources>
<link>
@@ -53,6 +59,16 @@
<location>/home/eiden/Java/RedHat/Eclipses/jbds5m5a/studio/plugins/org.jboss.tools.jst.web.kb_3.3.0.v20111208-2115-H35-M5</location>
</link>
<link>
+ <name>lib-org.jboss.tools.jst.web.kb_3.3.0.v20120302-0221-H55-Beta1</name>
+ <type>2</type>
+ <location>/home/eiden/RedHat/Eclipses/JBDS/versions/5.0.0.Beta2/studio/plugins/org.jboss.tools.jst.web.kb_3.3.0.v20120302-0221-H55-Beta1</location>
+ </link>
+ <link>
+ <name>lib-org.jboss.tools.jst.web.kb_3.3.1.v20120706-1741-H89-CR1</name>
+ <type>2</type>
+ <location>/files/RedHat/JBoss/JBDS/versions/5.0.1/studio/plugins/org.jboss.tools.jst.web.kb_3.3.1.v20120706-1741-H89-CR1</location>
+ </link>
+ <link>
<name>lib-org.jboss.tools.tests_3.2.0.v20111108-2302-Beta1</name>
<type>2</type>
<location>/home/eiden/Java/RedHat/Eclipses/jbds5.0.0.M4b/studio/plugins/org.jboss.tools.tests_3.2.0.v20111108-2302-Beta1</location>
@@ -63,6 +79,11 @@
<location>/home/eiden/Java/RedHat/Eclipses/jbds5m5a/studio/plugins/org.jboss.tools.tests_3.2.0.v20111124-2026-H477-M5</location>
</link>
<link>
+ <name>lib-org.jboss.tools.tests_3.2.0.v20120320-2338-Beta3</name>
+ <type>2</type>
+ <location>/home/eiden/RedHat/Eclipses/JBDS/versions/5.0.0.Beta3/studio/plugins/org.jboss.tools.tests_3.2.0.v20120320-2338-Beta3</location>
+ </link>
+ <link>
<name>lib-org.jboss.tools.ui.bot.ext_3.2.0.v20111108-2302-Beta1</name>
<type>2</type>
<location>/home/eiden/Java/RedHat/Eclipses/jbds5.0.0.M4b/studio/plugins/org.jboss.tools.ui.bot.ext_3.2.0.v20111108-2302-Beta1</location>
@@ -72,5 +93,10 @@
<type>2</type>
<location>/home/eiden/Java/RedHat/Eclipses/jbds5m5a/studio/plugins/org.jboss.tools.ui.bot.ext_3.2.0.v20111124-2026-H477-M5</location>
</link>
+ <link>
+ <name>lib-org.jboss.tools.ui.bot.ext_3.2.0.v20120320-2338-Beta3</name>
+ <type>2</type>
+ <location>/home/eiden/RedHat/Eclipses/JBT/versions/3.3CR1/eclipse/plugins/org.jboss.tools.ui.bot.ext_3.2.0.v20120320-2338-Beta3</location>
+ </link>
</linkedResources>
</projectDescription>
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2012-08-06 07:53:29 UTC (rev 42856)
@@ -24,10 +24,9 @@
org.jboss.tools.seam.core,
org.eclipse.datatools.connectivity,
org.eclipse.datatools.connectivity.db.generic,
- org.eclipse.m2e.wtp;bundle-version="0.16.0"
+ org.hamcrest
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Eclipse-RegisterBuddy: org.apache.log4j
Import-Package: org.apache.maven.model
-Export-Package: org.jboss.tools.maven.ui.bot.test
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/pom.xml 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/pom.xml 2012-08-06 07:53:29 UTC (rev 42856)
@@ -13,7 +13,7 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
- <systemProperties>-Djbosstools.test.jboss.home.6.0=${requirementsDirectory}/jboss-6.0.0.Final -Djbosstools.test.jboss.home.5.1=${requirementsDirectory}/jboss-5.1.0.GA -Djbosstools.test.seam.2.0.1.GA.home=${requirementsDirectory}/jboss-seam-2.2.0.GA</systemProperties>
+ <systemProperties>-Djbosstools.test.jboss.home.7.1=${requirementsDirectory}/jboss-as-7.1.1.Final -Djbosstools.test.seam.2.2.0.home=${requirementsDirectory}/jboss-seam-2.2.0.GA -Djbosstools.test.seam.2.3.0.home=${requirementsDirectory}/jboss-seam-2.3.0</systemProperties>
</properties>
<build>
<plugins>
@@ -22,7 +22,7 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>install-as-6.0.0</id>
+ <id>install-as-7.1.1</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack</goal>
@@ -30,9 +30,9 @@
<configuration>
<artifactItems>
<artifactItem>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-distribution</artifactId>
- <version>6.0.0.Final</version>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-dist</artifactId>
+ <version>7.1.1.Final</version>
<type>zip</type>
</artifactItem>
</artifactItems>
@@ -46,7 +46,7 @@
<artifactId>maven-download-plugin</artifactId>
<executions>
<execution>
- <id>install-seam</id>
+ <id>install-seam22</id>
<phase>pre-integration-test</phase>
<goals>
<goal>wget</goal>
@@ -58,15 +58,16 @@
</configuration>
</execution>
<execution>
- <id>install-as-5.1.0</id>
+ <id>install-seam23</id>
<phase>pre-integration-test</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
- <url>http://repository.jboss.org/sourceforge/jboss-5.1.0.GA.zip</url>
- <md5>78322c75ca0c13002a04418b4a8bc920</md5>
+ <url>http://sourceforge.net/projects/jboss/files/JBoss%20Seam/2.3.0.ALPHA/jbos...</url>
<unpack>true</unpack>
+ <outputDirectory>${requirementsDirectory}/jboss-seam-2.3.0</outputDirectory>
+ <md5>07b19de75bcb86b5f4cff3a15d7e2158</md5>
</configuration>
</execution>
</executions>
@@ -79,6 +80,9 @@
<skip>${swtbot.test.skip}</skip>
<testSuite>org.jboss.tools.maven.ui.bot.test</testSuite>
<testClass>org.jboss.tools.maven.ui.bot.test.MavenAllBotTests</testClass>
+ <!-- <environmentVariables>
+ <DISPLAY>:2.0</DISPLAY>
+ </environmentVariables> -->
<dependencies>
<dependency combine.children="append">
<type>p2-installable-unit</type>
@@ -115,14 +119,20 @@
<artifactId>org.jboss.tools.common.jdt.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
-
+
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.common.jdt.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+
<!-- configurator test -->
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.jboss.tools.ws.jaxrs.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
-
+
<!-- seam test -->
<dependency>
<type>p2-installable-unit</type>
@@ -139,9 +149,9 @@
<artifactId>org.eclipse.datatools.enablement.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
-
-
-
+
+
+
<!-- maven -->
<dependency>
<type>p2-installable-unit</type>
@@ -158,7 +168,7 @@
<artifactId>org.jboss.tools.maven.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
- <dependency>
+ <dependency>
<type>p2-installable-unit</type>
<artifactId>org.jboss.tools.maven.seam.feature.feature.group</artifactId>
<version>0.0.0</version>
@@ -198,4 +208,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar1/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar1/.settings/org.eclipse.m2e.core.prefs 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar1/.settings/org.eclipse.m2e.core.prefs 2012-08-06 07:53:29 UTC (rev 42856)
@@ -1,5 +1,4 @@
-#Tue Jan 24 17:11:29 CET 2012
-activeProfiles=common-profile, jboss.repository, jbosss.repository
+activeProfiles=common-profile, jboss, profile.from.settings.xml
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar2/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar2/.settings/org.eclipse.m2e.core.prefs 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/projects/simple-jar2/.settings/org.eclipse.m2e.core.prefs 2012-08-06 07:53:29 UTC (rev 42856)
@@ -1,5 +1,4 @@
-#Tue Jan 24 17:11:28 CET 2012
-activeProfiles=common-profile, jboss.repository, jbosss.repository
+activeProfiles=common-profile, profile.from.settings.xml, jboss
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/AbstractMavenSWTBotTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/AbstractMavenSWTBotTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/AbstractMavenSWTBotTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -10,133 +10,176 @@
************************************************************************************/
package org.jboss.tools.maven.ui.bot.test;
-import java.util.List;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.tests.common.AbstractMavenProjectTestCase;
import org.eclipse.m2e.tests.common.JobHelpers;
import org.eclipse.m2e.tests.common.WorkspaceHelpers;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
-import org.eclipse.swtbot.swt.finder.results.Result;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
-import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
import org.eclipse.ui.IWorkbenchPreferenceConstants;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.IPreferenceConstants;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.util.PrefUtil;
import org.eclipse.wst.validation.ValidationFramework;
+import org.jboss.tools.maven.ui.bot.test.utils.ProjectHasNature;
import org.jboss.tools.test.util.ResourcesUtils;
-import org.junit.After;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.view.ErrorLogView;
import org.junit.AfterClass;
-import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
@SuppressWarnings("restriction")
@RunWith(SWTBotJunit4ClassRunner.class)
public abstract class AbstractMavenSWTBotTest extends AbstractMavenProjectTestCase {
public static final String PACKAGE_EXPLORER = "Package Explorer"; //$NON-NLS-1$
+ public static final int TIMEOUT = 30*1000;
+ public static final int HAS_NATURE_TIMEOUT=10000;
+ private ErrorLogView errorLog;
- protected static SWTWorkbenchBot bot;
+ protected SWTBotExt bot = new SWTBotExt();
@BeforeClass
public static void beforeClass() throws Exception {
- bot = initSWTBot();
+ setUserSettings();
WorkbenchPlugin.getDefault().getPreferenceStore()
.setValue(IPreferenceConstants.RUN_IN_BACKGROUND, true);
PrefUtil.getAPIPreferenceStore().setValue(
IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS, false);
-
+ setUserSettings();
}
- public static SWTWorkbenchBot initSWTBot() throws CoreException {
- SWTWorkbenchBot swtbot = new SWTWorkbenchBot();
- SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
- SWTBotPreferences.TIMEOUT = 1000;
- SWTBotPreferences.PLAYBACK_DELAY = 5;
- waitForIdle();
+ //@AfterClass
+ public final static void cleanUp() throws Exception {
+ boolean buildAutomatically = ResourcesUtils.setBuildAutomatically(false);
+ ValidationFramework.getDefault().suspendAllValidation(true);
try {
- SWTBotView view = swtbot.viewByTitle("Welcome");
- if (view != null) {
- view.close();
- }
- } catch (WidgetNotFoundException ignore) {
+ WorkspaceHelpers.cleanWorkspace();
+ } finally {
+ ResourcesUtils.setBuildAutomatically(buildAutomatically);
+ ValidationFramework.getDefault().suspendAllValidation(false);
}
+ JobHelpers.waitForLaunchesToComplete(30*1000);
+ JobHelpers.waitForJobsToComplete();
+ }
- SWTBotShell[] shells = swtbot.shells();
- for (SWTBotShell shell : shells) {
- final Shell widget = shell.widget;
- Object parent = UIThreadRunnable.syncExec(shell.display,
- new Result<Object>() {
- public Object run() {
- return widget.isDisposed() ? null : widget.getParent();
- }
- });
- if (parent == null) {
- continue;
- }
- shell.close();
+ public void waitForIdle() {
+ JobHelpers.waitForLaunchesToComplete(TIMEOUT);
+ JobHelpers.waitForJobsToComplete();
+ }
+
+ public boolean isMavenProject(String projectName) throws CoreException {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ return project.hasNature(IMavenConstants.NATURE_ID);
+ }
+
+ public boolean hasNature(String projectName, String natureID){
+ try{
+ bot.waitUntil(new ProjectHasNature(projectName, natureID),HAS_NATURE_TIMEOUT);
+ } catch (TimeoutException ex){
+ return false;
}
+ return true;
+ }
- List<? extends SWTBotEditor> editors = swtbot.editors();
- for (SWTBotEditor e : editors) {
- e.close();
+ public void waitForShell(SWTUtilExt botUtil, String shellName) throws InterruptedException {
+ while(!botUtil.isShellActive(shellName)){
+ Thread.sleep(500);
}
+ }
+
+ protected void addDependencies(String projectName, String groupId, String artifactId, String version, String type) throws Exception{
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- return swtbot;
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = factory.newDocumentBuilder();
+ Document docPom = docBuilder.parse(project.getProject().getFile("pom.xml").getContents());
+ Element dependenciesElement = null;
+ if(docPom.getElementsByTagName("dependencies").item(0)==null){
+ dependenciesElement = docPom.createElement("dependencies");
+ } else {
+ dependenciesElement = (Element) docPom.getElementsByTagName("dependencies").item(0);
+ }
+ Element dependencyElement = docPom.createElement("dependency");
+ Element groupIdElement = docPom.createElement("groupId");
+ Element artifactIdElement = docPom.createElement("artifactId");
+ Element versionElement = docPom.createElement("version");
+ Element typeElement = docPom.createElement("type");
+
+ groupIdElement.setTextContent(groupId);
+ artifactIdElement.setTextContent(artifactId);
+ versionElement.setTextContent(version);
+
+ Element root = docPom.getDocumentElement();
+ dependencyElement.appendChild(groupIdElement);
+ dependencyElement.appendChild(artifactIdElement);
+ dependencyElement.appendChild(versionElement);
+ if(type!=null){
+ typeElement.setTextContent(type);
+ dependencyElement.appendChild(typeElement);
+ }
+ dependenciesElement.appendChild(dependencyElement);
+ root.appendChild(dependenciesElement);
+ TransformerFactory transfac = TransformerFactory.newInstance();
+ Transformer trans = transfac.newTransformer();
+ StringWriter xmlAsWriter = new StringWriter();
+ StreamResult result = new StreamResult(xmlAsWriter);
+ DOMSource source = new DOMSource(docPom);
+ trans.transform(source, result);
+ project.getProject().getFile("pom.xml").setContents(new ByteArrayInputStream(xmlAsWriter.toString().getBytes("UTF-8")), 0, null);
}
- @Before
- public void setUp() throws Exception {
- activateSchell();
- super.setUp();
- }
-
- public static void activateSchell() {
- UIThreadRunnable.syncExec(new VoidResult() {
- public void run() {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()
- .forceActive();
- }
- });
+ protected void updateConf(SWTUtilExt botUtil, String projectName){
+ SWTBotTree innerBot = bot.viewByTitle("Package Explorer").bot().tree().select(projectName);
+ ContextMenuHelper.clickContextMenu(innerBot, "Maven","Update Project Configuration...");
+ bot.button("OK").click();
+ botUtil.waitForAll(Long.MAX_VALUE);
+ botUtil.waitForNonIgnoredJobs();
}
- @After
- public void tearDown() throws Exception {
-
+ private static void setUserSettings() throws InterruptedException, IOException, CoreException{
+ SWTBotExt botExt = new SWTBotExt();
+ botExt.menu("Window").menu("Preferences").click();
+ botExt.tree().expandNode("Maven").select("User Settings").click();
+ File f = new File("usersettings/settings.xml");
+ botExt.text(1).setText(f.getAbsolutePath());
+ botExt.button("Update Settings").click();
+ botExt.button("OK").click();
}
- @AfterClass
- public final static void cleanUp() throws Exception {
- boolean buildAutomatically = ResourcesUtils.setBuildAutomatically(false);
- ValidationFramework.getDefault().suspendAllValidation(true);
- try {
- executeAfterClass();
- WorkspaceHelpers.cleanWorkspace();
- } finally {
- ResourcesUtils.setBuildAutomatically(buildAutomatically);
- ValidationFramework.getDefault().suspendAllValidation(false);
- }
- waitForIdle();
+ protected void clearErrorLog(){
+ errorLog = new ErrorLogView();
+ errorLog.clear();
}
- protected static void executeAfterClass() throws Exception {
+ protected void checkErrorLog() {
+ int count = errorLog.getRecordCount();
+ if (count > 0) {
+ errorLog.logMessages();
+ fail("Unexpected messages in Error log, see test log");
+ }
}
-
-
- public static void waitForIdle() {
- JobHelpers.waitForLaunchesToComplete(30*1000);
- JobHelpers.waitForJobsToComplete();
- }
}
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/ConfiguratorsTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/ConfiguratorsTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/ConfiguratorsTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -1,8 +1,5 @@
package org.jboss.tools.maven.ui.bot.test;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
import java.io.ByteArrayInputStream;
import java.io.StringWriter;
@@ -33,7 +30,7 @@
@SuppressWarnings("restriction")
@Require(perspective="Java EE")
-public class ConfiguratorsTest {
+public class ConfiguratorsTest extends AbstractMavenSWTBotTest{
public static final String PROJECT_NAME_JSF="testWEB_JSF";
public static final String PROJECT_NAME_JAXRS="testWEB_JAXRS";
@@ -42,13 +39,14 @@
public static final String JSF_NATURE="org.jboss.tools.jsf.jsfnature";
public static final String JAXRS_NATURE="org.jboss.tools.ws.jaxrs.nature";
public static final String CDI_NATURE="org.jboss.tools.cdi.core.cdinature";
- public static final String JBOSS6_AS_HOME=System.getProperty("jbosstools.test.jboss.home.6.0");
+ public static final String WEB_XML_LOCATION="/WebContent/WEB-INF/web.xml";
+ public static final String JBOSS7_AS_HOME=System.getProperty("jbosstools.test.jboss.home.7.1");
+//seam config, jpa config
- private SWTBotExt botExt = new SWTBotExt();
- private SWTUtilExt botUtil = new SWTUtilExt(botExt);
+ private SWTUtilExt botUtil= new SWTUtilExt(bot);
+
-
@BeforeClass
public static void setup(){
SWTBotExt setup = new SWTBotExt();
@@ -67,29 +65,33 @@
@Test
public void testJSFConfigurator() throws Exception{
createMavenizedDynamicWebProject(PROJECT_NAME_JSF+"_noRuntime", false);
- addDependencies(PROJECT_NAME_JSF+"_noRuntime", "com.sun.faces", "mojarra-jsf-api", "2.0.0-b04");
- assertTrue("Project "+PROJECT_NAME_JSF+"_noRuntime"+" with mojarra dependency doesn't have "+JSF_NATURE+" nature",Utils.hasNature(PROJECT_NAME_JSF+"_noRuntime", JSF_NATURE));
+ addDependencies(PROJECT_NAME_JSF+"_noRuntime", "com.sun.faces", "mojarra-jsf-api", "2.0.0-b04",null);
+ updateConf(botUtil,PROJECT_NAME_JSF+"_noRuntime");
+ assertTrue("Project "+PROJECT_NAME_JSF+"_noRuntime"+" with mojarra dependency doesn't have "+JSF_NATURE+" nature",hasNature(PROJECT_NAME_JSF+"_noRuntime", JSF_NATURE));
clean();
createMavenizedDynamicWebProject(PROJECT_NAME_JSF+"_noRuntime", false);
addFacesConf(PROJECT_NAME_JSF+"_noRuntime");
- assertTrue("Project "+PROJECT_NAME_JSF+"_noRuntime"+" with faces config doesn't have "+JSF_NATURE+" nature",Utils.hasNature(PROJECT_NAME_JSF+"_noRuntime", JSF_NATURE));
+ assertTrue("Project "+PROJECT_NAME_JSF+"_noRuntime"+" with faces config doesn't have "+JSF_NATURE+" nature",hasNature(PROJECT_NAME_JSF+"_noRuntime", JSF_NATURE));
clean();
+
//https://issues.jboss.org/browse/JBIDE-10831
createMavenizedDynamicWebProject(PROJECT_NAME_JSF+"_noRuntime", false);
addServlet(PROJECT_NAME_JSF+"_noRuntime","Faces Servlet","javax.faces.webapp.FacesServlet","1");
- assertTrue("Project "+PROJECT_NAME_JSF+"_noRuntime"+"with servlet in web.xml doesn't have "+JSF_NATURE+" nature",Utils.hasNature(PROJECT_NAME_JSF+"_noRuntime", JSF_NATURE));
+ assertTrue("Project "+PROJECT_NAME_JSF+"_noRuntime"+"with servlet in web.xml doesn't have "+JSF_NATURE+" nature",hasNature(PROJECT_NAME_JSF+"_noRuntime", JSF_NATURE));
IProject facade = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME_JSF+"_noRuntime");
assertTrue("Project "+PROJECT_NAME_JSF+"_noRuntime"+" doesn't have faces-config.xml file",facade.getProject().getFile("faces-config.xml") != null);
+ clean();
createMavenizedDynamicWebProject(PROJECT_NAME_JSF, true);
- assertTrue("Project "+PROJECT_NAME_JSF+" doesn't have "+JSF_NATURE+" nature",Utils.hasNature(PROJECT_NAME_JSF, JSF_NATURE));
+ assertTrue("Project "+PROJECT_NAME_JSF+" doesn't have "+JSF_NATURE+" nature",hasNature(PROJECT_NAME_JSF, JSF_NATURE));
+ clean();
-
//https://issues.jboss.org/browse/JBIDE-8755
createMavenizedDynamicWebProject(PROJECT_NAME_JSF+"_seam", false);
- addDependencies(PROJECT_NAME_JSF+"_seam", "org.jboss.seam.faces", "seam-faces", "3.0.0.Alpha3");
- assertTrue("Project "+PROJECT_NAME_JSF+"_seam"+" with seam-faces3 dependency doesn't have "+JSF_NATURE+" nature",Utils.hasNature(PROJECT_NAME_JSF+"_seam", JSF_NATURE));
+ addDependencies(PROJECT_NAME_JSF+"_seam", "org.jboss.seam.faces", "seam-faces", "3.0.0.Alpha3",null);
+ updateConf(botUtil,PROJECT_NAME_JSF+"_seam");
+ assertTrue("Project "+PROJECT_NAME_JSF+"_seam"+" with seam-faces3 dependency doesn't have "+JSF_NATURE+" nature",hasNature(PROJECT_NAME_JSF+"_seam", JSF_NATURE));
@@ -99,189 +101,185 @@
@Test
public void testCDIConfigurator() throws Exception{
createMavenizedDynamicWebProject(PROJECT_NAME_CDI+"_noRuntime", false);
- addDependencies(PROJECT_NAME_CDI+"_noRuntime", "javax.enterprise", "cdi-api","1.1.EDR1.2");
- assertTrue("Project "+PROJECT_NAME_CDI+"_noRuntime"+" with cdi dependency doesn't have "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI+"_noRuntime", CDI_NATURE));
+ addDependencies(PROJECT_NAME_CDI+"_noRuntime", "javax.enterprise", "cdi-api","1.1.EDR1.2",null);
+ updateConf(botUtil,PROJECT_NAME_CDI+"_noRuntime");
+ assertTrue("Project "+PROJECT_NAME_CDI+"_noRuntime"+" with cdi dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI+"_noRuntime", CDI_NATURE));
+ clean();
createMavenizedEJBProject(PROJECT_NAME_CDI_EJB+"_noRuntime", false);
- addDependencies(PROJECT_NAME_CDI_EJB+"_noRuntime", "javax.enterprise", "cdi-api","1.1.EDR1.2");
- assertTrue("Project "+PROJECT_NAME_CDI_EJB+"_noRuntime"+" with cdi dependency doesn't have "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI_EJB+"_noRuntime", CDI_NATURE));
+ addDependencies(PROJECT_NAME_CDI_EJB+"_noRuntime", "javax.enterprise", "cdi-api","1.1.EDR1.2",null);
+ updateConf(botUtil,PROJECT_NAME_CDI_EJB+"_noRuntime");
+ assertTrue("Project "+PROJECT_NAME_CDI_EJB+"_noRuntime"+" with cdi dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI_EJB+"_noRuntime", CDI_NATURE));
+ clean();
createMavenizedDynamicWebProject(PROJECT_NAME_CDI, true);
- assertFalse("Project "+PROJECT_NAME_CDI+" has "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI, CDI_NATURE));
+ assertFalse("Project "+PROJECT_NAME_CDI+" has "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI, CDI_NATURE));
+ clean();
createMavenizedEJBProject(PROJECT_NAME_CDI_EJB, true);
- assertFalse("Project "+PROJECT_NAME_CDI_EJB+" has "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI_EJB, CDI_NATURE));
+ assertFalse("Project "+PROJECT_NAME_CDI_EJB+" has "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI_EJB, CDI_NATURE));
+ clean();
-
//https://issues.jboss.org/browse/JBIDE-8755
createMavenizedDynamicWebProject(PROJECT_NAME_CDI+"_noRuntime_seam", false);
- addDependencies(PROJECT_NAME_CDI+"_noRuntime_seam", "org.jboss.seam.faces", "seam-faces", "3.0.0.Alpha3");
- assertTrue("Project "+PROJECT_NAME_CDI+"_noRuntime_seam"+" with seam-faces3 dependency doesn't have "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI+"_noRuntime_seam", CDI_NATURE));
+ addDependencies(PROJECT_NAME_CDI+"_noRuntime_seam", "org.jboss.seam.faces", "seam-faces", "3.0.0.Alpha3",null);
+ updateConf(botUtil,PROJECT_NAME_CDI+"_noRuntime_seam");
+ assertTrue("Project "+PROJECT_NAME_CDI+"_noRuntime_seam"+" with seam-faces3 dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI+"_noRuntime_seam", CDI_NATURE));
+ clean();
createMavenizedEJBProject(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", false);
- addDependencies(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", "org.jboss.seam.faces", "seam-faces", "3.0.0.Alpha3");
- assertTrue("Project "+PROJECT_NAME_CDI_EJB+"_noRuntime_seam"+" with seam-faces3 dependency doesn't have "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", CDI_NATURE));
+ addDependencies(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", "org.jboss.seam.faces", "seam-faces", "3.0.0.Alpha3",null);
+ updateConf(botUtil,PROJECT_NAME_CDI_EJB+"_noRuntime_seam");
+ assertTrue("Project "+PROJECT_NAME_CDI_EJB+"_noRuntime_seam"+" with seam-faces3 dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", CDI_NATURE));
clean();
createMavenizedDynamicWebProject(PROJECT_NAME_CDI+"_noRuntime_seam", false);
- addDependencies(PROJECT_NAME_CDI+"_noRuntime_seam", "org.jboss.seam.international", "seam-international", "3.0.0.Alpha1");
- assertTrue("Project "+PROJECT_NAME_CDI+"_noRuntime_seam"+" with seam3 dependency doesn't have "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI+"_noRuntime_seam", CDI_NATURE));
+ addDependencies(PROJECT_NAME_CDI+"_noRuntime_seam", "org.jboss.seam.international", "seam-international", "3.0.0.Alpha1",null);
+ updateConf(botUtil,PROJECT_NAME_CDI+"_noRuntime_seam");
+ assertTrue("Project "+PROJECT_NAME_CDI+"_noRuntime_seam"+" with seam3 dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI+"_noRuntime_seam", CDI_NATURE));
createMavenizedEJBProject(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", false);
- addDependencies(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", "org.jboss.seam.international", "seam-international", "3.0.0.Alpha1");
- assertTrue("Project "+PROJECT_NAME_CDI_EJB+"_noRuntime_seam"+" with seam3 dependency doesn't have "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", CDI_NATURE));
+ addDependencies(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", "org.jboss.seam.international", "seam-international", "3.0.0.Alpha1",null);
+ updateConf(botUtil,PROJECT_NAME_CDI_EJB+"_noRuntime_seam");
+ assertTrue("Project "+PROJECT_NAME_CDI_EJB+"_noRuntime_seam"+" with seam3 dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI_EJB+"_noRuntime_seam", CDI_NATURE));
+ clean();
+ createMavenizedEJBProject(PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-api", false);
+ addDependencies(PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-api", "org.apache.deltaspike.core", "deltaspike-core-api", "incubating-0.1-SNAPSHOT",null);
+ updateConf(botUtil,PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-api");
+ assertTrue("Project "+PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-api"+" with deltaspike-api dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-api", CDI_NATURE));
+ clean();
+
+ createMavenizedDynamicWebProject(PROJECT_NAME_CDI+"_noRuntime_deltaspike-api", false);
+ addDependencies(PROJECT_NAME_CDI+"_noRuntime_deltaspike-api", "org.apache.deltaspike.core", "deltaspike-core-api", "incubating-0.1-SNAPSHOT",null);
+ updateConf(botUtil,PROJECT_NAME_CDI+"_noRuntime_deltaspike-api");
+ assertTrue("Project "+PROJECT_NAME_CDI+"_noRuntime_deltaspike-api"+" with deltaspike-api dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI+"_noRuntime_deltaspike-api", CDI_NATURE));
+ clean();
+
+ createMavenizedEJBProject(PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-impl", false);
+ addDependencies(PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-impl", "org.apache.deltaspike.core", "deltaspike-core-impl", "incubating-0.1-SNAPSHOT",null);
+ updateConf(botUtil,PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-impl");
+ assertTrue("Project "+PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-impl"+" with deltaspike-impl dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI_EJB+"_noRuntime_deltaspike-impl", CDI_NATURE));
+ clean();
+
+ createMavenizedDynamicWebProject(PROJECT_NAME_CDI+"_noRuntime_deltaspike-impl", false);
+ addDependencies(PROJECT_NAME_CDI+"_noRuntime_deltaspike-impl", "org.apache.deltaspike.core", "deltaspike-core-impl", "incubating-0.1-SNAPSHOT",null);
+ updateConf(botUtil,PROJECT_NAME_CDI+"_noRuntime_deltaspike-impl");
+ assertTrue("Project "+PROJECT_NAME_CDI+"_noRuntime_deltaspike-impl"+" with deltaspike-impl dependency doesn't have "+CDI_NATURE+" nature.",hasNature(PROJECT_NAME_CDI+"_noRuntime_deltaspike-impl", CDI_NATURE));
+
}
@Test
public void testJAXRSConfigurator() throws Exception {
createMavenizedDynamicWebProject(PROJECT_NAME_JAXRS+"_noRuntime", false);
- addDependencies(PROJECT_NAME_JAXRS+"_noRuntime", "com.cedarsoft.rest", "jersey", "1.0.0");
- assertTrue("Project "+PROJECT_NAME_JAXRS+"_noRuntime"+" with jersey dependency doesn't have "+JAXRS_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_JAXRS+"_noRuntime", JAXRS_NATURE));
+ addDependencies(PROJECT_NAME_JAXRS+"_noRuntime", "com.cedarsoft.rest", "jersey", "1.0.0",null);
+ updateConf(botUtil,PROJECT_NAME_JAXRS+"_noRuntime");
+ assertTrue("Project "+PROJECT_NAME_JAXRS+"_noRuntime"+" with jersey dependency doesn't have "+JAXRS_NATURE+" nature.",hasNature(PROJECT_NAME_JAXRS+"_noRuntime", JAXRS_NATURE));
clean();
+
createMavenizedDynamicWebProject(PROJECT_NAME_JAXRS+"_noRuntime", false);
- addDependencies(PROJECT_NAME_JAXRS+"_noRuntime", "org.jboss.jbossas", "jboss-as-resteasy", "6.1.0.Final");
- assertTrue("Project "+PROJECT_NAME_JAXRS+"_noRuntime"+" with resteasy dependency doesn't have "+JAXRS_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_JAXRS+"_noRuntime", JAXRS_NATURE));
+ addDependencies(PROJECT_NAME_JAXRS+"_noRuntime", "org.jboss.jbossas", "jboss-as-resteasy", "6.1.0.Final",null);
+ updateConf(botUtil,PROJECT_NAME_JAXRS+"_noRuntime");
+ assertTrue("Project "+PROJECT_NAME_JAXRS+"_noRuntime"+" with resteasy dependency doesn't have "+JAXRS_NATURE+" nature.",hasNature(PROJECT_NAME_JAXRS+"_noRuntime", JAXRS_NATURE));
+ clean();
createMavenizedDynamicWebProject(PROJECT_NAME_JAXRS, true);
- assertTrue("Project "+PROJECT_NAME_JAXRS+" doesn't have "+JAXRS_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_JAXRS, JAXRS_NATURE));
+ assertTrue("Project "+PROJECT_NAME_JAXRS+" doesn't have "+JAXRS_NATURE+" nature.",hasNature(PROJECT_NAME_JAXRS, JAXRS_NATURE));
}
private void createMavenizedDynamicWebProject(String projectName, boolean runtime) throws Exception{
- botExt.menu("File").menu("New").menu("Dynamic Web Project").click();
- botExt.textWithLabel("Project name:").setText(projectName);
+ bot.menu("File").menu("New").menu("Dynamic Web Project").click();
+ bot.textWithLabel("Project name:").setText(projectName);
if(runtime){
- botExt.button("New Runtime...").click();
- Thread.sleep(500);
- botExt.tree().expandNode("JBoss Community").select("JBoss 6.x Runtime");
- botExt.button("Next >").click();
- botExt.textWithLabel("Home Directory").setText(JBOSS6_AS_HOME);
- botExt.button("Finish").click();
+ bot.button("New Runtime...").click();
+ waitForShell(botUtil, "New Server Runtime Environment");
+ bot.tree().expandNode("JBoss Community").select("JBoss 7.1 Runtime");
+ bot.button("Next >").click();
+ bot.textWithLabel("Home Directory").setText(JBOSS7_AS_HOME);
+ bot.button("Finish").click();
} else {
- botExt.comboBoxInGroup("Target runtime").setSelection("<None>");
+ bot.comboBoxInGroup("Target runtime").setSelection("<None>");
}
- Utils.waitForShell(botUtil, "New Dynamic Web Project");
- botExt.button("Next >").click();
- Utils.waitForShell(botUtil, "New Dynamic Web Project");
- botExt.button("Next >").click();
- Utils.waitForShell(botUtil, "New Dynamic Web Project");
- botExt.checkBox("Generate web.xml deployment descriptor").select();
- botExt.button("Finish").click();
+ waitForShell(botUtil, "New Dynamic Web Project");
+ bot.button("Next >").click();
+ waitForShell(botUtil, "New Dynamic Web Project");
+ bot.button("Next >").click();
+ waitForShell(botUtil, "New Dynamic Web Project");
+ bot.checkBox("Generate web.xml deployment descriptor").select();
+ bot.button("Finish").click();
botUtil.waitForAll(Long.MAX_VALUE);
- Utils.waitForIdle();
- SWTBotTreeItem item = botExt.viewByTitle("Package Explorer").bot().tree().getTreeItem(projectName).select();
+ waitForIdle();
+ SWTBotTreeItem item = bot.viewByTitle("Package Explorer").bot().tree().getTreeItem(projectName).select();
item.pressShortcut(Keystrokes.ALT,Keystrokes.LF);
- SWTBot shellProperties = botExt.shell("Properties for "+projectName).activate().bot();
+ SWTBot shellProperties = bot.shell("Properties for "+projectName).activate().bot();
shellProperties.tree().select("Project Facets");
shellProperties.tree(1).getTreeItem("JBoss Maven Integration").check();
botUtil.waitForAll();
Thread.sleep(500);
- botExt.hyperlink("Further configuration required...").click();
- botExt.button("OK").click();
- botExt.button("OK").click();
+ bot.hyperlink("Further configuration required...").click();
+ bot.button("OK").click();
+ bot.button("OK").click();
botUtil.waitForAll();
- assertTrue(projectName+ " doesn't have maven nature",Utils.isMavenProject(projectName));
- updateConf(projectName);
+ assertTrue(projectName+ " doesn't have maven nature",isMavenProject(projectName));
+ updateConf(botUtil,projectName);
+ assertFalse("Project "+projectName+" has "+CDI_NATURE+" nature.",hasNature(projectName, CDI_NATURE)); //false always
if(runtime){
- assertTrue("Project "+projectName+" doesn't have "+JSF_NATURE+" nature.",Utils.hasNature(projectName, JSF_NATURE));
- assertTrue("Project "+projectName+" doesn't have "+JAXRS_NATURE+" nature.",Utils.hasNature(projectName, JAXRS_NATURE));
- assertFalse("Project "+projectName+" has "+CDI_NATURE+" nature.",Utils.hasNature(projectName, CDI_NATURE));
+ assertTrue("Project "+projectName+" doesn't have "+JSF_NATURE+" nature.",hasNature(projectName, JSF_NATURE));
+ assertTrue("Project "+projectName+" doesn't have "+JAXRS_NATURE+" nature.",hasNature(projectName, JAXRS_NATURE));
} else {
- assertFalse("Project "+projectName+" has "+JSF_NATURE+" nature.",Utils.hasNature(projectName, JSF_NATURE));
- assertFalse("Project "+projectName+" has "+JAXRS_NATURE+" nature.",Utils.hasNature(projectName, JAXRS_NATURE));
- assertFalse("Project "+projectName+" has "+CDI_NATURE+" nature.",Utils.hasNature(projectName, CDI_NATURE));
+ assertFalse("Project "+projectName+" has "+JSF_NATURE+" nature.",hasNature(projectName, JSF_NATURE));
+ assertFalse("Project "+projectName+" has "+JAXRS_NATURE+" nature.",hasNature(projectName, JAXRS_NATURE));
}
}
private void createMavenizedEJBProject(String projectName, boolean runtime)throws Exception{
- botExt.menu("File").menu("New").menu("EJB Project").click();
- botExt.textWithLabel("Project name:").setText(projectName);
+ bot.menu("File").menu("New").menu("EJB Project").click();
+ bot.textWithLabel("Project name:").setText(projectName);
if(runtime){
- botExt.button("New Runtime...").click();
- Thread.sleep(500);
- botExt.tree().expandNode("JBoss Community").select("JBoss 6.x Runtime");
- botExt.button("Next >").click();
- botExt.textWithLabel("Home Directory").setText(JBOSS6_AS_HOME);
- botExt.button("Finish").click();
+ bot.button("New Runtime...").click();
+ waitForShell(botUtil,"New Server Runtime Environment");
+ bot.tree().expandNode("JBoss Community").select("JBoss 7.1 Runtime");
+ bot.button("Next >").click();
+ bot.textWithLabel("Home Directory").setText(JBOSS7_AS_HOME);
+ bot.button("Finish").click();
} else {
- botExt.comboBoxInGroup("Target runtime").setSelection("<None>");
+ bot.comboBoxInGroup("Target runtime").setSelection("<None>");
}
- Utils.waitForShell(botUtil, "New EJB Project");
- botExt.button("Finish").click();
+ waitForShell(botUtil,"New EJB Project");
+ bot.button("Finish").click();
botUtil.waitForAll(Long.MAX_VALUE);
- Utils.waitForIdle();
- SWTBotTreeItem item = botExt.viewByTitle("Package Explorer").bot().tree().getTreeItem(projectName).select();
+ waitForIdle();
+ SWTBotTreeItem item = bot.viewByTitle("Package Explorer").bot().tree().getTreeItem(projectName).select();
item.pressShortcut(Keystrokes.ALT,Keystrokes.LF);
- SWTBot shellProperties = botExt.shell("Properties for "+projectName).activate().bot();
- shellProperties.tree().select("Project Facets");
- shellProperties.tree(1).getTreeItem("JBoss Maven Integration").check();
+ waitForShell(botUtil,"Properties for "+projectName);
+ bot.tree().select("Project Facets");
+ bot.tree(1).getTreeItem("JBoss Maven Integration").check();
botUtil.waitForAll();
Thread.sleep(500);
- botExt.hyperlink("Further configuration required...").click();
- botExt.comboBoxWithLabel("Packaging:").setSelection("ejb");
- botExt.button("OK").click();
- botExt.button("OK").click();
+ bot.hyperlink("Further configuration required...").click();
+ bot.comboBoxWithLabel("Packaging:").setSelection("ejb");
+ bot.button("OK").click();
+ bot.button("OK").click();
botUtil.waitForAll();
- assertTrue(projectName+ " doesn't has maven nature",Utils.isMavenProject(projectName));
- updateConf(projectName);
- assertFalse("Project "+projectName+" has "+JSF_NATURE+" nature.",Utils.hasNature(projectName, JSF_NATURE));
- assertFalse("Project "+projectName+" has "+JAXRS_NATURE+" nature.",Utils.hasNature(projectName, JAXRS_NATURE));
- assertFalse("Project "+projectName+" has "+CDI_NATURE+" nature.",Utils.hasNature(projectName, CDI_NATURE));
+ assertTrue(projectName+ " doesn't have maven nature",isMavenProject(projectName));
+ updateConf(botUtil,projectName);
+ assertFalse("Project "+projectName+" has "+JSF_NATURE+" nature.",hasNature(projectName, JSF_NATURE));
+ assertFalse("Project "+projectName+" has "+JAXRS_NATURE+" nature.",hasNature(projectName, JAXRS_NATURE));
+ assertFalse("Project "+projectName+" has "+CDI_NATURE+" nature.",hasNature(projectName, CDI_NATURE));
}
- private void addDependencies(String projectName, String groupId, String artifactId, String version) throws Exception{
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
-
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = factory.newDocumentBuilder();
- Document docPom = docBuilder.parse(project.getProject().getFile("pom.xml").getContents());
- Element dependenciesElement = docPom.createElement("dependencies");
- Element dependencyElement = docPom.createElement("dependency");
- Element groupIdElement = docPom.createElement("groupId");
- Element artifactIdElement = docPom.createElement("artifactId");
- Element versionElement = docPom.createElement("version");
-
- groupIdElement.setTextContent(groupId);
- artifactIdElement.setTextContent(artifactId);
- versionElement.setTextContent(version);
-
- Element root = docPom.getDocumentElement();
- dependencyElement.appendChild(groupIdElement);
- dependencyElement.appendChild(artifactIdElement);
- dependencyElement.appendChild(versionElement);
- dependenciesElement.appendChild(dependencyElement);
- root.appendChild(dependenciesElement);
- TransformerFactory transfac = TransformerFactory.newInstance();
- Transformer trans = transfac.newTransformer();
- StringWriter xmlAsWriter = new StringWriter();
- StreamResult result = new StreamResult(xmlAsWriter);
- DOMSource source = new DOMSource(docPom);
- trans.transform(source, result);
- project.getProject().getFile("pom.xml").setContents(new ByteArrayInputStream(xmlAsWriter.toString().getBytes("UTF-8")), 0, null);
- botUtil.waitForAll();
- updateConf(projectName);
- }
-
- private void updateConf(String projectName){
- SWTBotTree innerBot = botExt.viewByTitle("Package Explorer").bot().tree().select(projectName);
- ContextMenuHelper.clickContextMenu(innerBot, "Maven","Update Project Configuration...");
- botExt.button("OK").click();
- botUtil.waitForAll(Long.MAX_VALUE);
- botUtil.waitForNonIgnoredJobs();
- }
-
private void addFacesConf(String projectName) throws InterruptedException{
- SWTBotTree innerBot = botExt.viewByTitle("Package Explorer").bot().tree().select(projectName);
+ SWTBotTree innerBot = bot.viewByTitle("Package Explorer").bot().tree().select(projectName);
ContextMenuHelper.clickContextMenu(innerBot, "New","Other...");
- botExt.tree().expandNode("JBoss Tools Web").expandNode("JSF").select("Faces Config");
- botExt.button("Next >").click();
- botExt.button("Browse...").click();
- botExt.tree().expandNode(projectName).expandNode("WebContent").select("WEB-INF");
- botExt.button("OK").click();
- botExt.button("Finish").click();
- updateConf(projectName);
+ bot.tree().expandNode("JBoss Tools Web").expandNode("JSF").select("Faces Config");
+ bot.button("Next >").click();
+ bot.button("Browse...").click();
+ bot.tree().expandNode(projectName).expandNode("WebContent").select("WEB-INF");
+ bot.button("OK").click();
+ bot.button("Finish").click();
+ updateConf(botUtil,projectName);
}
private void addServlet(String projectName, String servletName, String servletClass, String load) throws Exception{
@@ -289,7 +287,7 @@
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = factory.newDocumentBuilder();
- Document docPom = docBuilder.parse(facade.getProject().getFile("/WebContent/WEB-INF/web.xml").getContents());
+ Document docPom = docBuilder.parse(facade.getProject().getFile(WEB_XML_LOCATION).getContents());
Element servletElement = docPom.createElement("servlet");
Element servletNameElement = docPom.createElement("servlet-name");
Element servletClassElement = docPom.createElement("servlet-class");
@@ -310,8 +308,8 @@
StreamResult result = new StreamResult(xmlAsWriter);
DOMSource source = new DOMSource(docPom);
trans.transform(source, result);
- facade.getProject().getFile("/WebContent/WEB-INF/web.xml").setContents(new ByteArrayInputStream(xmlAsWriter.toString().getBytes("UTF-8")), 0, null);
+ facade.getProject().getFile(WEB_XML_LOCATION).setContents(new ByteArrayInputStream(xmlAsWriter.toString().getBytes("UTF-8")), 0, null);
botUtil.waitForAll();
- updateConf(projectName);
+ updateConf(botUtil,projectName);
}
}
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenProjectsTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenProjectsTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenProjectsTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -6,12 +6,12 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.bindings.keys.KeyStroke;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
-
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.maven.ui.bot.test.utils.TableHasRows;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
@@ -23,30 +23,38 @@
public class CreateMavenProjectsTest extends AbstractMavenSWTBotTest{
public static final String REPO_URL = "http://repo1.maven.org/maven2";
- protected static SWTWorkbenchBot bot = new SWTWorkbenchBot();
+ public static final String NEXUS_URL = "https://repository.jboss.org/nexus/content/repositories/releases/";
+ private SWTUtilExt botUtil= new SWTUtilExt(bot);
+
@BeforeClass
public static void setup(){
SWTBotExt setup = new SWTBotExt();
setup.menu("Window").menu("Show View").menu("Other...").click();
setup.tree().expandNode("Java").select("Package Explorer").click();
setup.button("OK").click();
+
}
@Test
public void updateRepositories() throws InterruptedException, CoreException {
- SWTBotExt botExt = new SWTBotExt();
- botExt.menu("Window").menu("Show View").menu("Other...").click();
+ bot.menu("Window").menu("Show View").menu("Other...").click();
+ waitForShell(botUtil, "Show View");
+ bot.tree().expandNode("Maven").select("Maven Repositories");
+ bot.button("OK").click();
+ bot.viewByTitle("Maven Repositories");
waitForIdle();
- botExt.tree().expandNode("Maven").select("Maven Repositories");
- botExt.button("OK").click();
- SWTBot b = botExt.viewByTitle("Maven Repositories").bot();
- AbstractMavenSWTBotTest.waitForIdle();
- b.tree().expandNode("Global Repositories").getNode("central (" + REPO_URL + ")").contextMenu("Rebuild Index").click();
- botExt.button("OK").click();
- SWTUtilExt util = new SWTUtilExt(botExt);
- util.waitForAll();
- util.waitForJobs(Long.MAX_VALUE,"Rebuilding Indexes");
+ bot.tree().expandNode("Global Repositories").getNode("central (" + REPO_URL + ")").contextMenu("Rebuild Index").click();
+ bot.button("OK").click();
+ botUtil.waitForAll();
+ botUtil.waitForJobs(Long.MAX_VALUE,"Rebuilding Indexes");
+ bot.tree().expandNode("Global Repositories").getNode("jboss (" + NEXUS_URL + ")").contextMenu("Rebuild Index").click();
+ bot.button("OK").click();
+ botUtil.waitForAll();
+ botUtil.waitForJobs(Long.MAX_VALUE,"Rebuilding Indexes");
+ bot.tree().expandNode("Global Repositories").getNode("jboss (" + NEXUS_URL + ")").contextMenu("Update Index").click();
+ botUtil.waitForAll();
+ botUtil.waitForJobs(Long.MAX_VALUE,"Updating Indexes");
}
@Test
@@ -55,7 +63,7 @@
createSimpleMavenProject(projectName, "jar");
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
assertNoErrors(project);
- assertTrue(Utils.isMavenProject(projectName));
+ assertTrue(isMavenProject(projectName));
buildProject(projectName,"5 Maven build...", "jar","-0.0.1-SNAPSHOT");
}
@@ -64,32 +72,30 @@
@Test
public void createSimpleJarMavenizedProject() throws Exception{
String projectName = "JarMavenized";
- SWTBotExt botExt = new SWTBotExt();
- botExt.menu("File").menu("New").menu("Other...").click();
+ bot.menu("File").menu("New").menu("Other...").click();
+ waitForShell(botUtil, "New");
+ bot.tree().expandNode("Java").select("Java Project");
+ bot.button("Next >").click();
+ bot.textWithLabel("Project name:").setText(projectName);
+ bot.button("Finish").click();
waitForIdle();
- SWTBot shell = botExt.shell("New").activate().bot();
- shell.tree().expandNode("Java").select("Java Project");
- shell.button("Next >").click();
- shell.textWithLabel("Project name:").setText(projectName);
- shell.button("Finish").click();
- waitForIdle();
- SWTBot explorer = botExt.viewByTitle("Package Explorer").bot();
- explorer.tree().getTreeItem(projectName).select().pressShortcut(Keystrokes.ALT,Keystrokes.LF);
+ bot.viewByTitle("Package Explorer");
+ bot.tree().getTreeItem(projectName).select().pressShortcut(Keystrokes.ALT,Keystrokes.LF);
+ waitForShell(botUtil, "Properties for "+projectName);
+ bot.tree().select("Project Facets");
+ Thread.sleep(500);
+ bot.link(0).click("Convert to faceted form...");
Thread.sleep(1000);
- botExt.tree().select("Project Facets");
- Thread.sleep(500);
- botExt.link(0).click("Convert to faceted form...");
- waitForIdle();
- botExt.tree(1).getTreeItem("JBoss Maven Integration").check();
+ bot.tree(1).getTreeItem("JBoss Maven Integration").check();
Thread.sleep(500);
- botExt.hyperlink("Further configuration required...").click();
- botExt.comboBoxWithLabel("Packaging:").setSelection("jar");
- botExt.button("OK").click();
- botExt.button("OK").click();
+ bot.hyperlink("Further configuration required...").click();
+ bot.comboBoxWithLabel("Packaging:").setSelection("jar");
+ bot.button("OK").click();
+ bot.button("OK").click();
waitForIdle();
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
assertNoErrors(project);
- assertTrue(Utils.isMavenProject(projectName));
+ assertTrue(isMavenProject(projectName));
buildProject(projectName,"5 Maven build...", "jar","-0.0.1-SNAPSHOT");
}
@@ -98,49 +104,47 @@
@Test
public void createSimpleWarMavenizedProject() throws Exception{
String projectName = "WarMavenized";
- SWTBotExt botExt = new SWTBotExt();
- botExt.menu("File").menu("New").menu("Other...").click();
+ bot.menu("File").menu("New").menu("Other...").click();
+ waitForShell(botUtil,"New");
+ bot.tree().expandNode("Web").select("Dynamic Web Project");
+ bot.button("Next >").click();
+ bot.textWithLabel("Project name:").setText(projectName);
+ bot.button("Modify...").click();
+ bot.tree().getTreeItem("JBoss Maven Integration").check();
+ bot.button("OK").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.checkBox("Generate web.xml deployment descriptor").select();
+ bot.button("Next >").click();
+ bot.button("Finish").click();
waitForIdle();
- SWTBot shell = botExt.shell("New").activate().bot();
- shell.tree().expandNode("Web").select("Dynamic Web Project");
- shell.button("Next >").click();
- botExt.textWithLabel("Project name:").setText(projectName);
- botExt.button("Modify...").click();
- botExt.tree().getTreeItem("JBoss Maven Integration").check();
- botExt.button("OK").click();
- botExt.button("Next >").click();
- botExt.button("Next >").click();
- botExt.checkBox("Generate web.xml deployment descriptor").select();
- botExt.button("Next >").click();
- botExt.button("Finish").click();
+ bot.button("No").click();
waitForIdle();
- botExt.button("No").click();
- waitForIdle();
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
assertNoErrors(project);
- assertTrue(Utils.isMavenProject(projectName));
+ assertTrue(isMavenProject(projectName));
buildProject(projectName,"5 Maven build...", "war","-0.0.1-SNAPSHOT");
}
-
+
@Test
public void createSimpleJSFProjectArchetype() throws Exception {
String projectName = "JsfQuickstart";
- createSimpleMavenProjectArchetype(projectName,"weld-jsf-jee-minimal", "Nexus Indexer");
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- assertNoErrors(project);
- assertTrue(Utils.isMavenProject(projectName));
- buildProject(projectName, "6 Maven build...", "war",""); //version is 1.0.0
+ createSimpleMavenProjectArchetype(projectName,"maven-archetype-jsfwebapp", "Nexus Indexer");
+ //IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ //assertNoErrors(project);
+ assertTrue(isMavenProject(projectName));
+ buildProject(projectName, "5 Maven build...", "war",""); //version is 1.0.0
}
@Test
public void createSimpleJarProjectArchetype() throws Exception {
String projectName = "ArchetypeQuickstart";
- createSimpleMavenProjectArchetype(projectName,"maven-archetype-quickstart", "Nexus Indexer");
+ createSimpleMavenProjectArchetype(projectName,"maven-archetype-quickstart", "Internal");
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
assertNoErrors(project);
- assertTrue(Utils.isMavenProject(projectName));
- buildProject(projectName, "6 Maven build...", "jar","-0.0.1-SNAPSHOT");
+ assertTrue(isMavenProject(projectName));
+ buildProject(projectName, "4 Maven build...", "jar","-0.0.1-SNAPSHOT");
}
private void createSimpleMavenProjectArchetype(String projectName,String projectType, String catalog) throws InterruptedException,CoreException {
@@ -156,6 +160,8 @@
shell.comboBox().setSelection(catalog);
SWTUtilExt botUtil = new SWTUtilExt(botExt);
botUtil.waitForAll();
+ botExt.waitUntil(new TableHasRows(botExt.table(),projectType),100000);
+ Thread.sleep(10000);
int index = botExt.table(0).indexOf(projectType, "Artifact Id");
if (index == -1) {
fail(projectType + " not found");
@@ -165,7 +171,7 @@
shell.comboBoxWithLabel("Group Id:").setText(projectName);
shell.comboBoxWithLabel("Artifact Id:").setText(projectName);
shell.button("Finish").click();
- waitForJobsToComplete();
+ waitForIdle();
}
private void createSimpleMavenProject(String projectName, String projectType) throws InterruptedException, CoreException {
@@ -190,7 +196,10 @@
Thread.sleep(500);
SWTBotTreeItem item = explorer.tree().getTreeItem(projectName).select();
SWTBotExt swtBot = new SWTBotExt();
- item.contextMenu("Run As").menu(mavenBuild).click();
+ item.pressShortcut(Keystrokes.SHIFT,Keystrokes.ALT,KeyStroke.getInstance("X"));
+ Thread.sleep(1000);
+ item.pressShortcut(KeyStroke.getInstance("M"));
+ swtBot.waitForShell("Edit Configuration");
swtBot.textWithLabel("Goals:").setText("clean package");
swtBot.button("Run").click();
waitForIdle();
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedEARProjectTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedEARProjectTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedEARProjectTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -1,7 +1,18 @@
package org.jboss.tools.maven.ui.bot.test;
-import static org.junit.Assert.assertTrue;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.StringWriter;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -18,18 +29,20 @@
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
@Require(perspective="Java EE")
-public class CreateMavenizedEARProjectTest {
+public class CreateMavenizedEARProjectTest extends AbstractMavenSWTBotTest{
public static final String WAR_PROJECT_NAME="earWeb";
public static final String EJB_PROJECT_NAME="earEJB";
public static final String EAR_PROJECT_NAME="ear";
+
+ private SWTUtilExt botUtil= new SWTUtilExt(bot);
- private SWTBotExt botext = new SWTBotExt();
- private SWTUtilExt botUtil = new SWTUtilExt(botext);
-
@BeforeClass
public static void setup(){
SWTBotExt setup = new SWTBotExt();
@@ -45,80 +58,123 @@
Thread.sleep(500);
createEJBProject(EJB_PROJECT_NAME);
Thread.sleep(500);
- botext.menu("File").menu("Enterprise Application Project").click();
- botext.textWithLabel("Project name:").setText(EAR_PROJECT_NAME);
- botext.button("Modify...").click();
- botext.tree().getTreeItem("JBoss Maven Integration").check();
- botext.button("OK").click();
- botext.button("Next >").click();
- botext.button("Select All").click();
- botext.button("Next >").click();
- botext.comboBoxWithLabel("Packaging:").setSelection("ear");
- botext.button("Finish").click();
- Utils.waitForIdle();
- assertTrue(Utils.isMavenProject(EAR_PROJECT_NAME));
+ bot.menu("File").menu("Enterprise Application Project").click();
+ bot.textWithLabel("Project name:").setText(EAR_PROJECT_NAME);
+ bot.button("Modify...").click();
+ bot.tree().getTreeItem("JBoss Maven Integration").check();
+ bot.button("OK").click();
+ bot.button("Next >").click();
+ bot.button("Select All").click();
+ bot.button("Next >").click();
+ bot.comboBoxWithLabel("Packaging:").setSelection("ear");
+ bot.button("Finish").click();
+ waitForIdle();
+ assertTrue("EAR project isn't maven project", isMavenProject(EAR_PROJECT_NAME));
installProject(WAR_PROJECT_NAME);
installProject(EJB_PROJECT_NAME);
- botext.viewByTitle("Project Explorer").bot().tree().getTreeItem(EAR_PROJECT_NAME).contextMenu("Run As").menu("5 Maven build...").click();
- Utils.waitForIdle();
- botext.textWithLabel("Goals:").setText("clean package");
- botext.button("Run").click();
- Utils.waitForIdle();
+ addDependencies(EAR_PROJECT_NAME, "org.jboss.tools", WAR_PROJECT_NAME, "0.0.1-SNAPSHOT", "war");
+ addDependencies(EAR_PROJECT_NAME, "org.jboss.tools", EJB_PROJECT_NAME, "0.0.1-SNAPSHOT", "ejb");
+ confEarMavenPlugn(EAR_PROJECT_NAME);
+ bot.viewByTitle("Project Explorer").bot().tree().getTreeItem(EAR_PROJECT_NAME).contextMenu("Run As").menu("3 Maven build...").click();
+ waitForIdle();
+ bot.textWithLabel("Goals:").setText("clean package");
+ bot.button("Run").click();
+ waitForIdle();
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(EAR_PROJECT_NAME);
project.getFolder("target").refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
IFolder earFolder = project.getFolder("target/" + EAR_PROJECT_NAME + "-0.0.1-SNAPSHOT");
assertTrue(earFolder +" is missing ", earFolder.exists());
+ assertTrue(WAR_PROJECT_NAME+ ".war is missing in ear",project.getFile("target/" +EAR_PROJECT_NAME+ "-0.0.1-SNAPSHOT/" +WAR_PROJECT_NAME+ "-0.0.1-SNAPSHOT.war").exists());
+ assertTrue(EJB_PROJECT_NAME+ ".jar is missing in ear",project.getFile("target/" +EAR_PROJECT_NAME+ "-0.0.1-SNAPSHOT/" +EJB_PROJECT_NAME+ "-0.0.1-SNAPSHOT.jar").exists());
}
private void createWarProject(String projectName) throws CoreException, InterruptedException{
- botext.menu("File").menu("Dynamic Web Project").click();
- botext.textWithLabel("Project name:").setText(projectName);
- botext.button("Next >").click();
- botext.button("Next >").click();
- botext.checkBox("Generate web.xml deployment descriptor").select();
- botext.button("Finish").click();
+ bot.menu("File").menu("Dynamic Web Project").click();
+ bot.textWithLabel("Project name:").setText(projectName);
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.checkBox("Generate web.xml deployment descriptor").select();
+ bot.button("Finish").click();
botUtil.waitForAll(Long.MAX_VALUE);
- SWTBotTreeItem item = botext.viewByTitle("Package Explorer").bot().tree().getTreeItem(projectName).select();
+ SWTBotTreeItem item = bot.viewByTitle("Package Explorer").bot().tree().getTreeItem(projectName).select();
item.pressShortcut(Keystrokes.ALT,Keystrokes.LF);
- SWTBot shellProperties = botext.shell("Properties for "+projectName).activate().bot();
+ waitForShell(botUtil, "Properties for "+projectName);
+ SWTBot shellProperties = bot.shell("Properties for "+projectName).activate().bot();
shellProperties.tree().select("Project Facets");
shellProperties.tree(1).getTreeItem("JBoss Maven Integration").check();
- Utils.waitForIdle();
+ waitForIdle();
Thread.sleep(500);
- botext.hyperlink("Further configuration required...").click();
- botext.button("OK").click();
- botext.button("OK").click();
+ bot.hyperlink("Further configuration required...").click();
+ bot.button("OK").click();
+ bot.button("OK").click();
botUtil.waitForAll(Long.MAX_VALUE);
- assertTrue("Web project doesn't have maven nature",Utils.isMavenProject(projectName));
+ assertTrue("Web project doesn't have maven nature",isMavenProject(projectName));
}
private void createEJBProject(String projectName) throws CoreException, InterruptedException{
- botext.menu("File").menu("EJB Project").click();
- botext.textWithLabel("Project name:").setText(projectName);
- botext.button("Modify...").click();
- botext.tree().getTreeItem("JBoss Maven Integration").check();
- botext.button("OK").click();
- botext.button("Next >").click();
- botext.button("Next >").click();
- botext.button("Next >").click();
- botext.comboBoxWithLabel("Packaging:").setSelection("ejb");
- botext.button("Finish").click();
+ bot.menu("File").menu("EJB Project").click();
+ bot.textWithLabel("Project name:").setText(projectName);
+ bot.button("Modify...").click();
+ bot.tree().getTreeItem("JBoss Maven Integration").check();
+ bot.button("OK").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.comboBoxWithLabel("Packaging:").setSelection("ejb");
+ bot.button("Finish").click();
botUtil.waitForAll(Long.MAX_VALUE);
- assertTrue("EJB project doesn't have maven nature", Utils.isMavenProject(projectName));
+ assertTrue("EJB project doesn't have maven nature", isMavenProject(projectName));
}
private void installProject(String projectName) throws InterruptedException{
- botext.menu("Window").menu("Show View").menu("Other...").click();
- botext.tree().expandNode("Java").select("Package Explorer").click();
- botext.button("OK").click();
- SWTBotTree innerBot = botext.viewByTitle("Package Explorer").bot().tree().select(projectName);
+ bot.menu("Window").menu("Show View").menu("Other...").click();
+ bot.tree().expandNode("Java").select("Package Explorer").click();
+ bot.button("OK").click();
+ SWTBotTree innerBot = bot.viewByTitle("Package Explorer").bot().tree().select(projectName);
ContextMenuHelper.clickContextMenu(innerBot,"Run As","5 Maven build...");
- botext.textWithLabel("Goals:").setText("clean package install");
- botext.button("Run").click();
- Utils.waitForIdle();
+ bot.textWithLabel("Goals:").setText("clean install");
+ bot.button("Run").click();
+ waitForIdle();
botUtil.waitForAll();
}
+ private void confEarMavenPlugn(String projectName) throws ParserConfigurationException, SAXException, IOException, CoreException, TransformerException{
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = factory.newDocumentBuilder();
+ Document docPom = docBuilder.parse(project.getProject().getFile("pom.xml").getContents());
+ Element configurationElement = (Element) docPom.getElementsByTagName("configuration").item(0);
+ Element modulesElement = docPom.createElement("modules");
+ Element warModuleElement = docPom.createElement("webModule");
+ Element ejbModuleElement = docPom.createElement("ejbModule");
+ Element groupIdWarElement = docPom.createElement("groupId");
+ Element artifactIdWarElement = docPom.createElement("artifactId");
+ Element groupIdEJBElement = docPom.createElement("groupId");
+ Element artifactIdEJBElement = docPom.createElement("artifactId");
+
+ groupIdWarElement.setTextContent("org.jboss.tools");
+ groupIdEJBElement.setTextContent("org.jboss.tools");
+ artifactIdWarElement.setTextContent(WAR_PROJECT_NAME);
+ artifactIdEJBElement.setTextContent(EJB_PROJECT_NAME);
+
+ warModuleElement.appendChild(groupIdWarElement);
+ warModuleElement.appendChild(artifactIdWarElement);
+ ejbModuleElement.appendChild(groupIdEJBElement);
+ ejbModuleElement.appendChild(artifactIdEJBElement);
+ modulesElement.appendChild(warModuleElement);
+ modulesElement.appendChild(ejbModuleElement);
+ configurationElement.appendChild(modulesElement);
+
+ TransformerFactory transfac = TransformerFactory.newInstance();
+ Transformer trans = transfac.newTransformer();
+ StringWriter xmlAsWriter = new StringWriter();
+ StreamResult result = new StreamResult(xmlAsWriter);
+ DOMSource source = new DOMSource(docPom);
+ trans.transform(source, result);
+ project.getProject().getFile("pom.xml").setContents(new ByteArrayInputStream(xmlAsWriter.toString().getBytes("UTF-8")), 0, null);
+ }
+
}
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedJSFProjectTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedJSFProjectTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedJSFProjectTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -1,11 +1,10 @@
package org.jboss.tools.maven.ui.bot.test;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.hamcrest.MatcherAssert.assertThat;
+
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.StringWriter;
-
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -14,7 +13,6 @@
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
-
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -23,13 +21,17 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
-import org.eclipse.m2e.tests.common.WorkspaceHelpers;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -41,103 +43,69 @@
//TODO deployment
@SuppressWarnings("restriction")
@Require(perspective = "Web Development")
-public class CreateMavenizedJSFProjectTest{
- public static final String JBOSS6_AS_HOME=System.getProperty("jbosstools.test.jboss.home.6.0");
+public class CreateMavenizedJSFProjectTest extends AbstractMavenSWTBotTest{
+ public static final String JBOSS7_AS_HOME=System.getProperty("jbosstools.test.jboss.home.7.1");
public static final String POM_FILE = "pom.xml";
- public static final String PROJECT_NAME6="JSFProject6";
public static final String PROJECT_NAME7="JSFProject7";
- public static final String PROJECT_NAME6_v1="JSFProject6_1.2";
public static final String PROJECT_NAME7_v1="JSFProject7_1.2";
- public static final String SERVER_RUNTIME6="JBoss 6.x Runtime";
- public static final String SERVER_RUNTIME7="JBoss 7.x Runtime";
- public static final String SERVER6="JBoss AS 6.x";
- public static final String SERVER7="JBoss AS 7.x";
+ public static final String SERVER_RUNTIME7="JBoss 7.1 Runtime";
+ public static final String SERVER7="JBoss AS 7.1";
public static final String GROUPID ="javax.faces";
public static final String ARTIFACTID ="jsf-api";
public static final String JSF_VERSION_1_1_02 ="1.1.02";
public static final String JSF_VERSION_1_2 ="2.0";
public static final String JSF_VERSION_2 ="2.0";
+
+ private SWTUtilExt botUtil= new SWTUtilExt(bot);
- protected static SWTWorkbenchBot bot;
- private SWTUtilExt botUtil = new SWTUtilExt(bot);
-
-
@BeforeClass
public final static void beforeClass() throws Exception {
- bot = AbstractMavenSWTBotTest.initSWTBot();
SWTBotExt setup = new SWTBotExt();
setup.menu("Window").menu("Show View").menu("Other...").click();
setup.tree().expandNode("Java").select("Package Explorer").click();
setup.button("OK").click();
}
- @Test
- public void createJSFProjectTest_AS6_v2() throws InterruptedException, CoreException{
- createJSFProject(SERVER_RUNTIME6, SERVER6, JBOSS6_AS_HOME,"JSF 2.0", PROJECT_NAME6);
- }
-
- @Test
- public void activateMavenFacet_AS6_v2() throws InterruptedException, CoreException{
- activateMavenFacet(PROJECT_NAME6);
- }
-
- @Test
- public void buildProject_AS6_v2() throws CoreException, ParserConfigurationException, SAXException, IOException, TransformerException, InterruptedException{
- addDependencies(PROJECT_NAME6, JSF_VERSION_2);
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME6);
+ //@Test
+ public void createJSFProjectTest_AS7_JSFv2() throws InterruptedException, CoreException, ParserConfigurationException, SAXException, IOException, TransformerException{
+ createJSFProject(SERVER_RUNTIME7, SERVER7, JBOSS7_AS_HOME,"JSF 2.0", PROJECT_NAME7);
+ activateMavenFacet(PROJECT_NAME7);
+ addDependencies(PROJECT_NAME7, JSF_VERSION_2);
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME7);
assertNoErrors(project);
- buildProject(PROJECT_NAME6);
+ buildProject(PROJECT_NAME7);
}
- /*
- @Test
- public void deployProject_AS6_v2() throws ParserConfigurationException, SAXException, IOException, CoreException, TransformerException{
- addServerToPom(PROJECT_NAME6, JBOSS6_AS_HOME);
- deployModule(PROJECT_NAME6);
- }
- */
-
@Test
- public void createJSFProjectTest_AS6_v1() throws InterruptedException, CoreException{
- createJSFProject(SERVER_RUNTIME6, SERVER6, JBOSS6_AS_HOME,"JSF 1.2", PROJECT_NAME6_v1);
- }
-
- @Test
- public void activateMavenFacet_AS6_v1() throws InterruptedException, CoreException{
- activateMavenFacet(PROJECT_NAME6_v1);
- }
-
- @Test
- public void buildProject_AS6_v1() throws CoreException, ParserConfigurationException, SAXException, IOException, TransformerException, InterruptedException{
- addDependencies(PROJECT_NAME6_v1, JSF_VERSION_1_2);
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME6_v1);
+ public void createJSFProjectTest_AS7_JSFv1() throws InterruptedException, CoreException, ParserConfigurationException, SAXException, IOException, TransformerException{
+ createJSFProject(SERVER_RUNTIME7, SERVER7, JBOSS7_AS_HOME,"JSF 1.2", PROJECT_NAME7_v1);
+ activateMavenFacet(PROJECT_NAME7_v1);
+ addDependencies(PROJECT_NAME7_v1, JSF_VERSION_1_2);
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME7_v1);
assertNoErrors(project);
- buildProject(PROJECT_NAME6_v1);
+ buildProject(PROJECT_NAME7_v1);
}
private void createJSFProject(String serverRuntime, String server, String serverHome, String jsfVersion, String projectName) throws InterruptedException, CoreException{
bot.menu("File").menu("New").menu("JSF Project").click();
- SWTBot shell = bot.shell("New JSF Project").activate().bot();
- shell.textWithLabel("Project Name*").setText(projectName);
- shell.comboBox(0).setSelection(jsfVersion);
- shell.comboBox(1).setSelection("JSFKickStartWithoutLibs");
- shell.button("Next >").click();
- Thread.sleep(1000);
- shell.button("New...").click();
- SWTBot shellRuntime = bot.shell("New Server Runtime").activate().bot();
- Thread.sleep(500);
- shellRuntime.tree().expandNode("JBoss Community").select(serverRuntime);
- shellRuntime.button("Next >").click();
- shellRuntime.textWithLabel("Home Directory").setText(serverHome);
- shellRuntime.button("Finish").click();
- Thread.sleep(500);
- shell.button(1).click();
- shellRuntime = bot.shell("New Server").activate().bot();
- shellRuntime.tree().expandNode("JBoss Community").select(server);
- shellRuntime.button("Finish").click();
+ bot.textWithLabel("Project Name*").setText(projectName);
+ bot.comboBox(0).setSelection(jsfVersion);
+ bot.comboBox(1).setSelection("JSFKickStartWithoutLibs");
+ bot.button("Next >").click();
+ bot.button("New...").click();
+ waitForShell(botUtil,"New Server Runtime");
+ bot.tree().expandNode("JBoss Community").select(serverRuntime);
+ bot.button("Next >").click();
+ bot.textWithLabel("Home Directory").setText(serverHome);
+ bot.button("Finish").click();
+ waitForShell(botUtil,"New JSF Project");
+ bot.button(1).click();
+ waitForShell(botUtil,"New Server");
+ bot.tree().expandNode("JBoss Community").select(server);
+ bot.button("Finish").click();
botUtil.waitForAll(Long.MAX_VALUE);
- shell.button("Finish").click();;
+ bot.button("Finish").click();;
botUtil.waitForAll(Long.MAX_VALUE);
}
@@ -173,26 +141,18 @@
}
private void activateMavenFacet(String projectName) throws InterruptedException, CoreException{
- SWTBot explorer = bot.viewByTitle("Package Explorer").bot();
- SWTBotTreeItem item = explorer.tree().getTreeItem(projectName).select();
- Thread.sleep(500);
+ SWTBotTreeItem item = bot.viewByTitle("Package Explorer").bot().tree().getTreeItem(projectName).select();
item.pressShortcut(Keystrokes.ALT,Keystrokes.LF);
- Thread.sleep(1000);
- SWTBot shellProperties = bot.shell("Properties for "+projectName).activate().bot();
- shellProperties.tree().select("Project Facets");
+ waitForShell(botUtil,"Properties for "+projectName);
+ bot.tree().select("Project Facets");
+ bot.tree(1).getTreeItem("JBoss Maven Integration").check();
+ botUtil.waitForAll();
Thread.sleep(500);
- //botExt.link(0).click("Convert to faceted form...");
+ bot.hyperlink("Further configuration required...").click();
+ bot.button("OK").click();
+ bot.button("OK").click();
waitForIdle();
- shellProperties.tree(1).getTreeItem("JBoss Maven Integration").check();
- Thread.sleep(500);
- SWTBotExt swtBot = new SWTBotExt();
- swtBot.hyperlink("Further configuration required...").click();
- swtBot.button("OK").click();
- swtBot.button("OK").click();
- waitForIdle();
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- assertNoErrors(project);
- assertTrue(Utils.isMavenProject(projectName));
+ assertTrue(projectName+ " doesn't have maven nature", isMavenProject(projectName));
}
private void buildProject(String projectName) throws CoreException{
@@ -213,69 +173,4 @@
assertFalse(warFolder.getFolder(webInfPath.append("dev")).exists());
assertTrue(warFolder.getFolder(webInfPath.append("lib")).exists());
}
-
- private void addServerToPom(String projectName, String serverLocation) throws ParserConfigurationException, SAXException, IOException, CoreException, TransformerException{
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = factory.newDocumentBuilder();
- Document docPom = docBuilder.parse(project.getFile("pom.xml").getContents());
- Element pluginElement = docPom.createElement("plugin");
- Element groupIdElement = docPom.createElement("groupId");
- Element artifactIdElement = docPom.createElement("artifactId");
- Element versionElement = docPom.createElement("version");
- Element configurationElement = docPom.createElement("configuration");
- Element jbossHomeElement = docPom.createElement("jbossHome");
- Element serverNameElement = docPom.createElement("serverName");
- Element fileNameElement = docPom.createElement("fileName");
-
- groupIdElement.setTextContent("org.codehaus.mojo");
- artifactIdElement.setTextContent("jboss-maven-plugin");
- versionElement.setTextContent("1.5.0");
- jbossHomeElement.setTextContent(serverLocation);
- serverNameElement.setTextContent("default");
- fileNameElement.setTextContent("target"+projectName+".war");
-
- Element root = docPom.getDocumentElement();
- Element buildElement = (Element)root.getElementsByTagName("build").item(0);
- Node plugins = buildElement.getElementsByTagName("plugins").item(0);
- configurationElement.appendChild(serverNameElement);
- configurationElement.appendChild(jbossHomeElement);
- configurationElement.appendChild(fileNameElement);
- pluginElement.appendChild(configurationElement);
- pluginElement.appendChild(versionElement);
- pluginElement.appendChild(artifactIdElement);
- pluginElement.appendChild(groupIdElement);
- plugins.appendChild(pluginElement);
- //save pom
- TransformerFactory transfac = TransformerFactory.newInstance();
- Transformer trans = transfac.newTransformer();
- StringWriter xmlAsWriter = new StringWriter();
- StreamResult result = new StreamResult(xmlAsWriter);
- DOMSource source = new DOMSource(docPom);
- trans.transform(source, result);
- project.getFile("pom.xml").setContents(new ByteArrayInputStream(xmlAsWriter.toString().getBytes("UTF-8")), 0, null);
- waitForIdle();
- }
-
- private void deployModule(String projectName){
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- SWTBot explorer = bot.viewByTitle("Package Explorer").bot();
- SWTBotTreeItem item = explorer.tree().getTreeItem(projectName).select();
- SWTBotExt swtBot = new SWTBotExt();
- item.contextMenu("Run As").menu("5 Maven build...").click();
- waitForIdle();
- swtBot.textWithLabel("Goals:").setText("jboss:hard-deploy");
- swtBot.button("Run").click();
- waitForIdle();
- }
-
-
- private static void waitForIdle() {
- AbstractMavenSWTBotTest.waitForIdle();
- }
-
- private static void assertNoErrors(IProject project) throws CoreException {
- WorkspaceHelpers.assertNoErrors(project);
- }
-
-}
+}
\ No newline at end of file
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -11,27 +11,14 @@
package org.jboss.tools.maven.ui.bot.test;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
import java.io.File;
-import java.io.FilenameFilter;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
import java.util.Properties;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
import org.eclipse.datatools.connectivity.ConnectionProfileException;
import org.eclipse.datatools.connectivity.ProfileManager;
@@ -43,262 +30,128 @@
import org.eclipse.datatools.connectivity.drivers.IPropertySet;
import org.eclipse.datatools.connectivity.drivers.PropertySetImpl;
import org.eclipse.datatools.connectivity.drivers.models.TemplateDescriptor;
-import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.tests.common.WorkspaceHelpers;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IPerspectiveRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerType;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
-import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-/**
- * @author Snjeza
- *
- */
@SuppressWarnings("restriction")
-@Require(perspective="Seam")
-public class CreateMavenizedSeamProjectTest{
-
- protected static final long IDLE_TIME = 1 * 60 * 1000L;
+@Require(perspective = "Java EE")
+public class CreateMavenizedSeamProjectTest extends AbstractMavenSWTBotTest {
- private static final String CONNECTION_PROFILE_NAME = "DefaultDS";
-
- private static final String SEAM_RUNTIME_NAME = "Seam 2.2";
-
- private static final String JBOSS_AS_RUNTIME_NAME = "JBoss AS 5.1 Runtime";
-
- public static final String PACKAGE_EXPLORER = "Package Explorer"; //$NON-NLS-1$
-
- private static final String JBOSS_AS_SERVER_NAME = "JBoss AS 5.1 Server";
-
- public static final String JBOSS_AS_HOST = "localhost"; //$NON-NLS-1$
-
- public static final String JBOSS_AS_DEFAULT_CONFIGURATION_NAME = "default"; //$NON-NLS-1$
-
- public static final String HSQL_DRIVER_DEFINITION_ID
- = "DriverDefn.Hypersonic DB"; //$NON-NLS-1$
-
- public static final String HSQL_DRIVER_NAME = "Hypersonic DB"; //$NON-NLS-1$
-
- public static final String HSQL_DRIVER_TEMPLATE_ID
- = "org.eclipse.datatools.enablement.hsqldb.1_8.driver"; //$NON-NLS-1$
-
- public static final String DTP_DB_URL_PROPERTY_ID
- = "org.eclipse.datatools.connectivity.db.URL"; //$NON-NLS-1$
-
+ public static final String SEAM_WEB_PROJECT = "seamWeb";
+ public static final String SEAM_EAR_PROJECT = "seamEar";
+ public static final String JBOSS_AS_7_1 = System.getProperty("jbosstools.test.jboss.home.7.1");
+ public static final String SEAM_2_3 = System.getProperty("jbosstools.test.seam.2.3.0.home");
+ public static final String SEAM_2_3_NAME = "jboss-seam-2.3.0";
+ public static final String SEAM_2_2 = System.getProperty("jbosstools.test.seam.2.2.0.home");
+ public static final String SEAM_2_2_NAME = "jboss-seam-2.2.0";
+ public static final String CONNECTION_PROFILE_NAME = "DefaultDS";
+ public static final String HSQL_DRIVER_DEFINITION_ID ="DriverDefn.Hypersonic DB";
+ public static final String HSQL_DRIVER_NAME ="Hypersonic DB";
+ public static final String HSQL_DRIVER_TEMPLATE_ID = "org.eclipse.datatools.enablement.hsqldb.1_8.driver";
+ public static final String DTP_DB_URL_PROPERTY_ID = "org.eclipse.datatools.connectivity.db.URL";
public static final String HSQL_PROFILE_ID = "org.eclipse.datatools.enablement.hsqldb.connectionProfile";
-
- public static final String JBOSS_AS_HOME = System.getProperty("jbosstools.test.jboss.home.5.1");
-
- public static final String JBOSS_AS_RUNTIME_ID = "org.jboss.ide.eclipse.as.runtime.51";
+ public static final String HSQLDB_DRIVER_LOCATION ="lib/hsqldb.jar";
+ public static final String CURRENT_SEAM_2_3 = "2.3.0.Beta2";
+ public static final String CURRENT_SEAM_2_2 ="2.2.2.Final";
- public static final String JBOSS_AS_SERVER_ID = "org.jboss.ide.eclipse.as.51";
-
- public static final String SEAM_HOME_PROPERTY = System.getProperty("jbosstools.test.seam.2.0.1.GA.home");
+
+ private SWTUtilExt botUtil = new SWTUtilExt(bot);
- public static final String HSQLDB_DRIVER_JAR_NAME = "hsqldb.jar"; //$NON-NLS-1$
-
- public static final String HSQLDB_DRIVER_LOCATION = "lib/ + HSQLDB_DRIVER_JAR_NAME";//$NON-NLS-1$
-
- public static final String PROJECT_NAME_WAR = "MavenizedSeamProjectWar";
-
- public static final String TEST_PROJECT_NAME_WAR = "MavenizedSeamProjectWar-test";
-
- public static final String PARENT_PROJECT_NAME_WAR = "MavenizedSeamProjectWar-parent";
-
-
- public static final String PROJECT_NAME = "MavenizedSeamProject";
-
- public static final String EAR_PROJECT_NAME = "MavenizedSeamProject-ear";
-
- public static final String EJB_PROJECT_NAME = "MavenizedSeamProject-ejb";
-
- public static final String TEST_PROJECT_NAME = "MavenizedSeamProject-test";
-
- public static final String PARENT_PROJECT_NAME = "MavenizedSeamProject-parent";
-
- public static final String DEPLOY_TYPE_EAR = "EAR";
-
- public static final String DEPLOY_TYPE_WAR = "WAR";
-
- protected static SWTWorkbenchBot bot;
-
@BeforeClass
- public final static void beforeClass() throws Exception {
- bot = AbstractMavenSWTBotTest.initSWTBot();
-
- String asLocation = JBOSS_AS_HOME;
-
- String runtimeType = JBOSS_AS_RUNTIME_ID;
- String serverType = JBOSS_AS_SERVER_ID;
-
- createJBossServer(new File(asLocation), serverType, runtimeType, JBOSS_AS_SERVER_NAME, JBOSS_AS_RUNTIME_NAME);
-
- String seamPath = SEAM_HOME_PROPERTY;
- createSeamRuntime(SEAM_RUNTIME_NAME, seamPath, SeamVersion.SEAM_2_2);
-
- createDriver(asLocation, HSQLDB_DRIVER_LOCATION);
-
- activateSchell();
-
- createNewSeamWebProjectWizard(PROJECT_NAME, DEPLOY_TYPE_EAR);
-
- createNewSeamWebProjectWizard(PROJECT_NAME_WAR, DEPLOY_TYPE_WAR);
+ public static void setup() {
+ SWTBotExt setup = new SWTBotExt();
+ setup.menu("Window").menu("Show View").menu("Other...").click();
+ setup.tree().expandNode("Java").select("Package Explorer").click();
+ setup.button("OK").click();
}
-
-
-
- private static void removeProjects() throws Exception {
+
+ @Test
+ public void createSeamProjectTest() throws InterruptedException, ConnectionProfileException, IOException, CoreException{
+ createSeamProject(SEAM_WEB_PROJECT,"2.3", "WAR", "Disable Library Configuration");
+ createSeamProject(SEAM_EAR_PROJECT,"2.3", "EAR", "Disable Library Configuration");
+ //checkErrors(); TODO QuickFix Project
WorkspaceHelpers.cleanWorkspace();
+ createSeamProject(SEAM_WEB_PROJECT,"2.2", "WAR", "Disable Library Configuration");
+ createSeamProject(SEAM_EAR_PROJECT,"2.2", "EAR", "Disable Library Configuration");
+ //checkErrors();
}
-
- private static void removeServers() throws CoreException {
- IServer server = ServerCore.findServer(JBOSS_AS_SERVER_NAME);
- IServerWorkingCopy wc = server.createWorkingCopy();
- IModule[] modules = wc.getModules();
- IProgressMonitor monitor = new NullProgressMonitor();
- wc.modifyModules(new IModule[] {} , modules, monitor);
- wc.save(true, monitor);
- server.publish(IServer.PUBLISH_INCREMENTAL, monitor);
- waitForIdle();
- server.getRuntime().delete();
- server.delete();
- waitForIdle();
- }
-
- protected static void switchPerspective(final String pid) {
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IPerspectiveRegistry perspectiveRegistry = workbench
- .getPerspectiveRegistry();
- IPerspectiveDescriptor perspective = perspectiveRegistry
- .findPerspectiveWithId(pid);
- workbench.getActiveWorkbenchWindow().getActivePage()
- .setPerspective(perspective);
- }
- });
- }
- @Before
- public void setUp() throws Exception {
- activateSchell();
- }
-
- private static void activateSchell() {
- AbstractMavenSWTBotTest.activateSchell();
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @AfterClass
- public final static void afterClass() throws Exception {
- boolean buildAutomatically = ResourcesUtils.setBuildAutomatically(false);
- ValidationFramework.getDefault().suspendAllValidation(true);
- try {
- removeServers();
- removeProjects();
- } finally {
- ResourcesUtils.setBuildAutomatically(buildAutomatically);
- ValidationFramework.getDefault().suspendAllValidation(false);
+ private void checkErrors() throws CoreException{
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ for(IProject project: projects){
+ assertNoErrors(project);
}
- waitForIdle();
}
- protected static void createJBossServer(File asLocation, String serverType, String runtimeType, String name, String runtimeName) throws CoreException {
- if (!asLocation.isDirectory()) {
- return;
+ private void createSeamProject(String name, String version, String type, String JSFLibrary) throws InterruptedException, ConnectionProfileException, IOException, CoreException {
+ createDriver(JBOSS_AS_7_1, HSQLDB_DRIVER_LOCATION);
+ if(version.equals("2.3")){
+ createSeamRuntime(SEAM_2_3_NAME, SEAM_2_3, SeamVersion.SEAM_2_3);
+ } else if(version.equals("2.2")){
+ createSeamRuntime(SEAM_2_2_NAME, SEAM_2_2, SeamVersion.SEAM_2_2);
}
- IPath jbossAsLocationPath = new Path(asLocation.getAbsolutePath());
-
- IServer[] servers = ServerCore.getServers();
- for (int i = 0; i < servers.length; i++) {
- IRuntime runtime = servers[i].getRuntime();
- if(runtime != null && runtime.getLocation().equals(jbossAsLocationPath)) {
- return;
- }
+ bot.menu("File").menu("New").menu("Other...").click();
+ waitForShell(botUtil, "New");
+ bot.tree().expandNode("Seam").select("Seam Web Project");
+ bot.button("Next >").click();
+ waitForShell(botUtil, "New Seam Project");
+ bot.textWithLabel("Project name:").setText(name);
+ bot.button("New Runtime...").click();
+ waitForShell(botUtil, "New Server Runtime Environment");
+ bot.tree().expandNode("JBoss Community").select("JBoss 7.1 Runtime");
+ bot.button("Next >").click();
+ bot.textWithLabel("Home Directory").setText(JBOSS_AS_7_1);
+ bot.button("Finish").click();
+ bot.button("New...").click();
+ waitForShell(botUtil, "New Server");
+ bot.tree().expandNode("JBoss Community").select("JBoss AS 7.1");
+ bot.button("Finish").click();
+ bot.button("Modify...").click();
+ waitForShell(botUtil, "Project Facets");
+ bot.tree().getTreeItem("Seam").contextMenu("Change Version...").click();
+ waitForShell(botUtil, "Change Version");
+ bot.comboBoxWithLabel("Version:").setSelection(version);
+ bot.button("OK").click();
+ bot.tree().getTreeItem("JBoss Maven Integration").check();
+ bot.button("OK").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ assertTrue("Seam project doesn't have war packaging set by default", bot.comboBoxWithLabel("Packaging:").selection() == "war");
+ String seamVersion = bot.textWithLabel("Seam Maven version:").getText();
+ if(version.equals("2.3")){
+ assertTrue(version+ " Seam project has " + seamVersion + " set by default", seamVersion.equals(CURRENT_SEAM_2_3));
+ } else if(version.equals("2.2")){
+ assertTrue(version+ " Seam project has " + seamVersion + " set by default", seamVersion.equals(CURRENT_SEAM_2_2));
}
-
- IRuntime runtime = null;
- IRuntime[] runtimes = ServerCore.getRuntimes();
- for (int i = 0; i < runtimes.length; i++) {
- if (runtimes[0].getLocation().equals(jbossAsLocationPath)) {
- runtime = runtimes[0].createWorkingCopy();
- break;
- }
+ bot.button("Next >").click();
+ bot.comboBoxWithLabel("Type:").setSelection("Disable Library Configuration");
+ bot.button("Next >").click();
+ if(version.equals("2.3")){
+ bot.comboBox(0).setSelection(SEAM_2_3_NAME);
+ } else if(version.equals("2.2")){
+ bot.comboBox(0).setSelection(SEAM_2_2_NAME);
}
-
- IProgressMonitor progressMonitor = new NullProgressMonitor();
- if (runtime == null) {
- runtime = createRuntime(runtimeName, asLocation.getAbsolutePath(), progressMonitor, runtimeType);
- }
- if (runtime != null) {
- createServer( runtime, serverType, name, progressMonitor);
- }
+ bot.radio(type).click();
+ bot.button("Finish").click();
+ waitForShell(botUtil, "Open Associated Perspective?");
+ bot.button("No").click();
+ botUtil.waitForNonIgnoredJobs();
}
- protected static IRuntime createRuntime(String runtimeName, String jbossASLocation, IProgressMonitor progressMonitor, String runtimeType) throws CoreException {
- IRuntimeWorkingCopy runtime = null;
- String type = null;
- String version = null;
- String runtimeId = null;
- IPath jbossAsLocationPath = new Path(jbossASLocation);
- IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(type, version, runtimeType);
- if (runtimeTypes.length > 0) {
- runtime = runtimeTypes[0].createRuntime(runtimeId, progressMonitor);
- runtime.setLocation(jbossAsLocationPath);
- if(runtimeName!=null) {
- runtime.setName(runtimeName);
- }
- ((RuntimeWorkingCopy) runtime).setAttribute("org.jboss.ide.eclipse.as.core.runtime.configurationName", JBOSS_AS_DEFAULT_CONFIGURATION_NAME); //$NON-NLS-1$
-
- return runtime.save(false, progressMonitor);
- }
- return runtime;
- }
-
- protected static void createDriver(String jbossASLocation, String driverLocation) throws ConnectionProfileException, IOException {
- if(ProfileManager.getInstance().getProfileByName(CONNECTION_PROFILE_NAME) != null) {
+ protected static void createDriver(String jbossASLocation,String driverLocation) throws ConnectionProfileException,IOException {
+ if (ProfileManager.getInstance().getProfileByName(CONNECTION_PROFILE_NAME) != null) {
return;
}
String driverPath = new File(jbossASLocation + driverLocation).getCanonicalPath(); //$NON-NLS-1$
-
+
DriverInstance driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
if (driver == null) {
TemplateDescriptor descr = TemplateDescriptor.getDriverTemplateDescriptor(HSQL_DRIVER_TEMPLATE_ID);
@@ -316,8 +169,10 @@
props.setProperty(id, value == null ? "" : value); //$NON-NLS-1$
}
props.setProperty(DTP_DB_URL_PROPERTY_ID, "jdbc:hsqldb:."); //$NON-NLS-1$
- props.setProperty(IDriverMgmtConstants.PROP_DEFN_TYPE, descr.getId());
- props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST, driverPath);
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_TYPE,
+ descr.getId());
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST,
+ driverPath);
instance.setBaseProperties(props);
DriverManager.getInstance().removeDriverInstance(instance.getID());
@@ -326,48 +181,25 @@
}
driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
- if (driver != null && ProfileManager.getInstance().getProfileByName(CONNECTION_PROFILE_NAME) == null) { //$NON-NLS-1$
+ if (driver != null && ProfileManager.getInstance().getProfileByName(CONNECTION_PROFILE_NAME) == null) {
// create profile
Properties props = new Properties();
- props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID, HSQL_DRIVER_DEFINITION_ID);
- props.setProperty(IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID, ""); //$NON-NLS-1$
- props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID));
- props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID));
- props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID));
- props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID, "Default"); //$NON-NLS-1$
- props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, ""); //$NON-NLS-1$
- props.setProperty(IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID, "false"); //$NON-NLS-1$
- props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID));
+ props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID, HSQL_DRIVER_DEFINITION_ID);
+ props.setProperty(IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID,"");
+ props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID,driver.getProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID,driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID,driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID,"Default");
+ props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, "");
+ props.setProperty(IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID,"false");
+ props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID,driver.getProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID));
props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.URL_PROP_ID));
-
- ProfileManager.getInstance().createProfile(CONNECTION_PROFILE_NAME, "The JBoss AS Hypersonic embedded database", HSQL_PROFILE_ID, props, "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ProfileManager.getInstance().createProfile(CONNECTION_PROFILE_NAME,"The JBoss AS Hypersonic embedded database", HSQL_PROFILE_ID, props, "", false);
}
-
+
}
- protected static IServerWorkingCopy createServer(IRuntime runtime, String runtimeType, String name, IProgressMonitor progressMonitor) throws CoreException {
- IServerType serverType = ServerCore.findServerType(runtimeType);
- IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
- server.setHost(JBOSS_AS_HOST);
- server.setName(name);
-
- // JBossServer.DEPLOY_DIRECTORY
- String deployVal = runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("deploy").toOSString(); //$NON-NLS-1$ //$NON-NLS-2$
- ((ServerWorkingCopy) server).setAttribute("org.jboss.ide.eclipse.as.core.server.deployDirectory", deployVal); //$NON-NLS-1$
-
- // IDeployableServer.TEMP_DEPLOY_DIRECTORY
- String deployTmpFolderVal = runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("tmp").append("jbosstoolsTemp").toOSString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ((ServerWorkingCopy) server).setAttribute("org.jboss.ide.eclipse.as.core.server.tempDeployDirectory", deployTmpFolderVal); //$NON-NLS-1$
-
- // If we'd need to set up a username / pw for JMX, do it here.
-// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_USERNAME, authUser);
-// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_PASSWORD, authPass);
-
- server.save(false, progressMonitor);
- return server;
- }
-
protected static void createSeamRuntime(String name, String seamPath, SeamVersion seamVersion) {
SeamRuntime seamRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(name);
if (seamRuntime != null) {
@@ -381,214 +213,9 @@
rt.setDefault(true);
rt.setVersion(seamVersion);
SeamRuntimeManager.getInstance().addRuntime(rt);
+ } else {
+ fail("Invalid seam runtime.");
}
}
- public static void createNewSeamWebProjectWizard(String projectName, String deployType) throws Exception {
- waitForIdle();
- bot.menu("File").menu("New").menu("Seam Web Project").click();
-
- SWTBotShell mainShell = bot.shell("New Seam Project");
- mainShell.activate();
-
- bot.textWithLabel("Project name:").setText(projectName);
- bot.button("Modify...").click();
- SWTBotShell shell = bot.shell("Project Facets");
- shell.activate();
-
- SWTBotTree treeWidget = bot.tree();
- SWTBotTreeItem jmi = treeWidget.getTreeItem("JBoss Maven Integration");
- jmi.check();
-
- bot.button("OK").click();
-
- mainShell.activate();
-
- bot.comboBox(0).setSelection(JBOSS_AS_RUNTIME_NAME);
- bot.comboBox(2).setSelection(JBOSS_AS_SERVER_NAME);
-
- bot.button("Next >").click();
- bot.button("Next >").click();
- bot.button("Next >").click();
- bot.button("Next >").click();
-
- bot.comboBox(0).setSelection("Library Provided by Target Runtime");
- bot.button("Next >").click();
-
- bot.comboBox(0).setSelection(SEAM_RUNTIME_NAME);
- String otherType = DEPLOY_TYPE_EAR;
- if (DEPLOY_TYPE_EAR.equals(deployType)) {
- otherType = DEPLOY_TYPE_WAR;
- }
- final SWTBotRadio radio = bot.radio(deployType);
- final SWTBotRadio otherRadio = bot.radio(otherType);
- radio.click();
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- radio.widget.setSelection(true);
- otherRadio.widget.setSelection(false);
- Event event = new Event();
- event.time = (int) System.currentTimeMillis();
- event.widget = radio.widget;
- event.display = Display.getCurrent();
- radio.widget.notifyListeners(SWT.Selection, event);
- }
- });
- //comboBox(1) = Libraries
- bot.comboBox(2).setSelection("HSQL");
- bot.comboBox(3).setSelection(CONNECTION_PROFILE_NAME);
- bot.button("Finish").click();
-
- waitForIdle();
- }
-
- @Test
- public void testAsLocation() {
- String asLocation = JBOSS_AS_HOME;
- assertTrue("Invalid JBoss AS location:" + asLocation, new File(asLocation).isDirectory());
- }
-
- @Test
- public void testSeamLocation() {
- String seamLocation = SEAM_HOME_PROPERTY;
- assertTrue("Invalid Seam Runtime location:" + seamLocation, new File(seamLocation).isDirectory());
- }
-
- @Test
- public void testErrors() throws Exception {
- checkErrors(PROJECT_NAME);
- checkErrors(EAR_PROJECT_NAME);
- checkErrors(EJB_PROJECT_NAME);
- checkErrors(TEST_PROJECT_NAME);
- checkErrors(PARENT_PROJECT_NAME);
- checkErrors(PROJECT_NAME_WAR);
- checkErrors(TEST_PROJECT_NAME_WAR);
- checkErrors(PARENT_PROJECT_NAME_WAR);
- }
-
- private void checkErrors(String projectName) throws CoreException {
- waitForIdle();
- List<IMarker> markers = new ArrayList<IMarker>();
- IProject project = ResourcesPlugin.getWorkspace().getRoot()
- .getProject(projectName);
- IMarker[] projectMarkers = project.findMarkers(IMarker.PROBLEM, true,
- IResource.DEPTH_INFINITE);
- for (int i = 0; i < projectMarkers.length; i++) {
- if (projectMarkers[i].getAttribute(IMarker.SEVERITY,
- IMarker.SEVERITY_ERROR) == IMarker.SEVERITY_ERROR) {
- if (!"org.eclipse.m2e.core.maven2Problem.lifecycleMapping".equals(projectMarkers[i].getType())) {
- markers.add(projectMarkers[i]);
- }
- }
- }
- assertTrue("The '" + projectName + "' contains errors.", markers.size() == 0);
- }
-
- @Test
- public void testMavenProjects() throws Exception {
- isMavenProject(PROJECT_NAME);
- isMavenProject(EAR_PROJECT_NAME);
- isMavenProject(EJB_PROJECT_NAME);
- isMavenProject(TEST_PROJECT_NAME);
- isMavenProject(PARENT_PROJECT_NAME);
- isMavenProject(PROJECT_NAME_WAR);
- isMavenProject(TEST_PROJECT_NAME_WAR);
- isMavenProject(PARENT_PROJECT_NAME_WAR);
- }
-
- private void isMavenProject(String projectName) throws CoreException {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- assertTrue("The '" + projectName + "' project isn't a Maven project.", project.hasNature(IMavenConstants.NATURE_ID));
- }
-
- // see https://jira.jboss.org/browse/JBIDE-6587
- @Test
- public void testMavenWarArchive() throws Exception {
- final SWTBotView packageExplorer = bot.viewByTitle("Package Explorer");
- SWTBot innerBot = packageExplorer.bot();
- innerBot.activeShell().activate();
- SWTBotTree tree = innerBot.tree();
- final SWTBotTreeItem warProjectItem = tree.getTreeItem(PROJECT_NAME_WAR);
- warProjectItem.select();
-
- SWTBotMenu runAs = tree.contextMenu("Run As");
- runAs.menu("5 Maven build...").click();
- waitForIdle();
- SWTBotShell shell = bot.shell("Edit Configuration");
- shell.activate();
- SWTBot b = shell.bot();
- b.textWithLabel("Goals:").setText("clean package");
- b.button("Run").click();
- waitForIdle();
-
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME_WAR);
- project.getFolder("target").refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
-
- IFolder warFolder = project.getFolder("target/" + PROJECT_NAME_WAR + "-0.0.1-SNAPSHOT");
-
- assertTrue(warFolder +" is missing ", warFolder.exists());
-
- IPath webInfPath = new Path("WEB-INF");
- assertFalse(warFolder.getFolder(webInfPath.append("src")).exists());
- assertFalse(warFolder.getFolder(webInfPath.append("dev")).exists());
- assertTrue(warFolder.getFolder(webInfPath.append("lib")).exists());
-
- }
-
- private static void waitForIdle() {
- AbstractMavenSWTBotTest.waitForIdle();
- }
-
- public static void delay(long waitTimeMillis) {
- Display display = Display.getCurrent();
- if (display != null) {
- long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
- while (System.currentTimeMillis() < endTimeMillis) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.update();
- }
- // Otherwise, perform a simple sleep.
- else {
- try {
- Thread.sleep(waitTimeMillis);
- } catch (InterruptedException e) {
- // Ignored.
- }
- }
- }
-
-
- // see https://jira.jboss.org/browse/JBIDE-6767
- @Test
- public void testLibraries() throws Exception {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(EAR_PROJECT_NAME);
- File rootDirectory = new File(project.getLocation().toOSString(), "EarContent");
- String[] libs = rootDirectory.list(new FilenameFilter() {
-
- public boolean accept(File dir, String name) {
- if (name.endsWith(".jar")) {
- return true;
- }
- return false;
- }
- });
- assertTrue(libs.length == 0);
- File libDirectory = new File (rootDirectory,"lib");
- if (libDirectory.isDirectory()) {
- libs = libDirectory.list(new FilenameFilter() {
-
- public boolean accept(File dir, String name) {
- if (name.endsWith(".jar")) {
- return true;
- }
- return false;
- }
- });
- assertTrue(libs.length == 0);
- }
- }
-
-}
+}
\ No newline at end of file
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/JBossPerspectiveTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/JBossPerspectiveTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/JBossPerspectiveTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -10,9 +10,6 @@
******************************************************************************/
package org.jboss.tools.maven.ui.bot.test;
-import junit.framework.TestCase;
-
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
@@ -26,7 +23,7 @@
*
*/
@RunWith(SWTBotJunit4ClassRunner.class)
-public class JBossPerspectiveTest extends TestCase {
+public class JBossPerspectiveTest extends AbstractMavenSWTBotTest {
/**
* Tests JBoss perspective has Maven stuff
@@ -34,8 +31,6 @@
*/
@Test
public void testJBossPerspective() throws WorkbenchException {
- SWTWorkbenchBot bot = new SWTWorkbenchBot();
- bot.viewByTitle("Welcome").close();
bot.menu("Window").menu("Open Perspective").menu("Other...").click();
SWTBotShell shell = bot.shell("Open Perspective");
shell.activate();
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MaterializeLibraryTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MaterializeLibraryTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MaterializeLibraryTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -3,15 +3,17 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.hamcrest.Matcher;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -20,8 +22,7 @@
private String projectName = "example";
- private SWTBotExt botExt = new SWTBotExt();
- private SWTUtilExt botUtil = new SWTUtilExt(botExt);
+ private SWTUtilExt botUtil= new SWTUtilExt(bot);
@BeforeClass
public static void setup(){
@@ -29,41 +30,30 @@
setup.menu("Window").menu("Show View").menu("Other...").click();
setup.tree().expandNode("Java").select("Package Explorer").click();
setup.button("OK").click();
+ setup.menu("Window").menu("Preferences").click();
+ setup.waitForShell("Preferences");
+ setup.tree().expandNode("JBoss Tools").select("Project Examples");
+ setup.checkBox("Show Project Ready wizard").deselect();
+ setup.checkBox("Show readme/cheatsheet file").deselect();
+ setup.button("OK").click();
}
+ @SuppressWarnings("restriction")
@Test
public void testMaterializeLibrary() throws Exception{
- botExt.menu("New").menu("Example...").click();
- botExt.tree().expandNode("JBoss Tools").select("Project Examples");
+ bot.menu("New").menu("Example...").click();
+ bot.tree().expandNode("JBoss Tools").select("Project Examples");
waitForIdle();
- botExt.button("Next >").click();
- waitForIdle();
- while(!botUtil.isShellActive("New Project Example")){
- Thread.sleep(500);
- }
- botExt.tree().expandNode("JBoss Maven Archetypes").select("Spring MVC Project");
- botExt.button("Next >").click();
- botExt.button("Next >").click();
- botExt.button("Next >").click();
- botExt.comboBoxWithLabel("Group Id:").setText(projectName);
- botExt.comboBoxWithLabel("Artifact Id:").setText(projectName);
- botExt.button("Finish").click();
-
-
-
- /* old wizard
- botExt.button("Finish").click();
- while(!botUtil.isShellActive("New JBoss Project")){
- Thread.sleep(500);
- }
- botExt.comboBoxWithLabel("Project name").setText(projectName);
- botExt.comboBoxWithLabel("Package").setText(projectName);
- botExt.button("Next >").click();
- botExt.button("Finish").click();
- */
- botUtil.waitForNonIgnoredJobs();
- Thread.sleep(5000);
- botExt.activeShell().bot().button("Finish").click();
+ bot.button("Next >").click();
+ waitForShell(botUtil, "New Project Example");
+ bot.tree().expandNode("JBoss Maven Archetypes").select("Spring MVC Project");
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.comboBoxWithLabel("Project name").setText(projectName);
+ bot.comboBoxWithLabel("Package").setText(projectName);
+ bot.button("Finish").click();
+ botUtil.waitForAll(Long.MAX_VALUE);
+
final SWTBotView packageExplorer = bot.viewByTitle("Package Explorer");
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
SWTBotTree tree = packageExplorer.bot().tree();
@@ -72,21 +62,23 @@
item.select().pressShortcut(Keystrokes.SHIFT,Keystrokes.F10);
KeyStroke k = KeyStroke.getInstance("M");
item.pressShortcut(k);
+ waitForShell(botUtil, "Materialize Classpath Library");
+ bot.button("OK").click();
+ Thread.sleep(1000);
+ bot.activeShell().activate();
+ bot.button("OK").click();
waitForIdle();
- botExt.button("OK").click();
- Thread.sleep(500);
- botExt.button("OK").click();
- waitForIdle();
- assertFalse(project.getName()+" is still a maven project!",Utils.isMavenProject(project.getName()));
+ assertFalse(project.getName()+" is still a maven project!",isMavenProject(project.getName()));
testExcludedResources(project);
+ assertNoErrors(project);
}
private void testExcludedResources(IProject project) throws Exception{
final SWTBotView packageExplorer = bot.viewByTitle("Package Explorer");
packageExplorer.bot().tree().getTreeItem(project.getName()).select().pressShortcut(Keystrokes.ALT,Keystrokes.LF);
- botExt.tree().select("Java Build Path");
- botExt.tabItem("Source").activate();
- for(SWTBotTreeItem item: botExt.tree(1).getAllItems()){
+ bot.tree().select("Java Build Path");
+ bot.tabItem("Source").activate();
+ for(SWTBotTreeItem item: bot.tree(1).getAllItems()){
for(SWTBotTreeItem itemToCheck: item.getItems()){
if(itemToCheck.getText().startsWith("Included")){
assertTrue("(All) expected in Included patterns",itemToCheck.getText().endsWith("(All)"));
@@ -95,6 +87,7 @@
}
}
}
+ bot.button("OK").click();
}
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -21,13 +21,14 @@
*/
@RunWith(RequirementAwareSuite.class)
@Suite.SuiteClasses({
- CreateMavenizedSeamProjectTest.class,
- CreateMavenizedEARProjectTest.class,
- CreateMavenizedJSFProjectTest.class,
- //MavenProfileSelectionTest.class, //failures
- MaterializeLibraryTest.class,
- CreateMavenProjectsTest.class,
- ConfiguratorsTest.class
+ CreateMavenizedSeamProjectTest.class, //OK
+ CreateMavenizedEARProjectTest.class, //OK
+ CreateMavenizedJSFProjectTest.class, //OK
+ MavenProfileSelectionTest.class, //OK
+ MaterializeLibraryTest.class, //OK
+ ConfiguratorsTest.class, //OK
+ CreateMavenProjectsTest.class, //OK but, bad jsf archetype
+ JBossPerspectiveTest.class
})
public class MavenAllBotTests {
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenProfileSelectionTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenProfileSelectionTest.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenProfileSelectionTest.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -6,22 +6,28 @@
import java.util.HashSet;
import java.util.Set;
-import org.apache.maven.model.Profile;
+import org.codehaus.plexus.util.FileUtils;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.bindings.keys.KeyStroke;
import org.eclipse.jface.bindings.keys.ParseException;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.m2e.tests.common.JobHelpers;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -32,104 +38,87 @@
public class MavenProfileSelectionTest extends AbstractMavenSWTBotTest {
public static final String AUTOACTIVATED_PROFILE_IN_POM = "active-profile";
- public static final String AUTOACTIVATED_PROFILE_IN_USER_SETTINGS = "profile.from.settings.xml";
- public static final String COMMON_PROFILE = "common-profile";
+ public static final String[] AUTOACTIVATED_PROFILES_IN_USER_SETTINGS = {"profile.from.settings.xml", "jboss"};
+ public static final String[] COMMON_PROFILES = {"common-profile"};
+ public static final String[] ALL_PROFILES = {"inactive-profile", "common-profile", "active-profile"};
+ private SWTUtilExt botUtil= new SWTUtilExt(bot);
+
@BeforeClass
- public static void setup(){
+ public static void setup() {
SWTBotExt setup = new SWTBotExt();
setup.menu("Window").menu("Show View").menu("Package Explorer").click();
}
+ @After
+ public void after() throws InterruptedException, CoreException, IOException{
+ doCleanWorkspace();
+ }
+
@Test
- public void testOpenMavenProfiles() throws Exception {
- setUserSettings();
- IProject project = importProject("projects/simple-jar/pom.xml");
+ public void testOpenMavenProfiles() throws IOException, InterruptedException, CoreException, ParseException{
+ importMavenProject("projects/simple-jar/pom.xml");
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("simple-jar");
waitForJobsToComplete();
testAutoActivatedProfiles();
- bot.menu("Window").menu("Show View").menu("Project Explorer").click();
- final SWTBotView packageExplorer = bot.viewByTitle("Project Explorer");
- SWTBot innerBot = packageExplorer.bot();
- innerBot.activeShell().activate();
- SWTBotTree tree = innerBot.tree();
- SWTBotTreeItem projectItem = tree.getTreeItem(project.getName());
- projectItem.select();
- openProfilesDialog(projectItem);
- Thread.sleep(2000);
- //activate all profiles
- SWTBot shell = bot.shell("Select Maven profiles").activate().bot();
- shell.button("Select All").click();
- String selectedProfiles = shell.textWithLabel("Active profiles for simple-jar :").getText();
- shell.button("OK").click();
-
- testActivatedProfiles(project.getName(), selectedProfiles, false);
- Thread.sleep(1000);
- openProfilesDialog(projectItem);
+ bot.viewByTitle("Package Explorer").bot().tree().select("simple-jar").pressShortcut(Keystrokes.CTRL, Keystrokes.ALT,KeyStroke.getInstance("P"));
+ waitForShell(botUtil,"Select Maven profiles");
+
+ //activate all profiles
+ bot.button("Select All").click();
+ bot.button("OK").click();
+ waitForIdle();
+ testActivatedProfiles(project.getName(), ALL_PROFILES);
+ bot.viewByTitle("Package Explorer").bot().tree().select("simple-jar").pressShortcut(Keystrokes.CTRL, Keystrokes.ALT,KeyStroke.getInstance("P"));
+
//disable all profiles
- shell = bot.shell("Select Maven profiles").activate().bot();
- shell.button("Deselect all").click();
- selectedProfiles = bot.textWithLabel("Active profiles for simple-jar :").getText();
+ waitForShell(botUtil,"Select Maven profiles");
+ bot.button("Deselect all").click();
bot.button("OK").click();
-
- testActivatedProfiles(project.getName(), selectedProfiles, true);
+ waitForIdle();
+ testActivatedProfiles(project.getName(), null);
}
- @Test
- public void testOpenMultipleMavenProfiles() throws Exception{
- IProject project = importProject("projects/simple-jar/pom.xml");
- IProject project1 = importProject("projects/simple-jar1/pom.xml");
- IProject project2 = importProject("projects/simple-jar2/pom.xml");
+ //@Test
+ public void testOpenMultipleMavenProfiles() throws IOException, InterruptedException, CoreException, ParseException{
+ importMavenProject("projects/simple-jar/pom.xml");
+ importMavenProject("projects/simple-jar1/pom.xml");
+ importMavenProject("projects/simple-jar2/pom.xml");
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("simple-jar");
+ IProject project1 = ResourcesPlugin.getWorkspace().getRoot().getProject("simple-jar1");
+ IProject project2 = ResourcesPlugin.getWorkspace().getRoot().getProject("simple-jar2");
waitForJobsToComplete();
- final SWTBotView packageExplorer = bot.viewByTitle("Project Explorer");
- SWTBot innerBot = packageExplorer.bot();
- innerBot.activeShell().activate();
- SWTBotTree tree = innerBot.tree();
- tree.select("simple-jar","simple-jar1","simple-jar2").pressShortcut(Keystrokes.CTRL, Keystrokes.ALT,KeyStroke.getInstance("P"));
+ bot.viewByTitle("Package Explorer").bot().tree().select("simple-jar","simple-jar1","simple-jar2").pressShortcut(Keystrokes.CTRL, Keystrokes.ALT,KeyStroke.getInstance("P"));
SWTBot shell = bot.shell("Select Maven profiles").activate().bot();
shell.button("Select All").click();
shell.button("Activate").click();
shell.button("OK").click();
- testActivatedProfiles(project.getName(), COMMON_PROFILE+", "+AUTOACTIVATED_PROFILE_IN_USER_SETTINGS, false);
- testActivatedProfiles(project1.getName(), COMMON_PROFILE+", "+AUTOACTIVATED_PROFILE_IN_USER_SETTINGS, false);
- testActivatedProfiles(project2.getName(), COMMON_PROFILE+", "+AUTOACTIVATED_PROFILE_IN_USER_SETTINGS, false);
+ waitForIdle();
+ testActivatedProfiles(project.getName(), COMMON_PROFILES);
+ testActivatedProfiles(project1.getName(), COMMON_PROFILES);
+ testActivatedProfiles(project2.getName(), COMMON_PROFILES);
}
- private void setUserSettings() throws InterruptedException, IOException, CoreException{
- SWTBotExt botExt = new SWTBotExt();
- botExt.menu("Window").menu("Preferences").click();
- botExt.tree().expandNode("Maven").select("User Settings").click();
- File f = new File("usersettings/settings.xml");
- botExt.text(1).setText(f.getAbsolutePath());
- botExt.button("OK").click();
- }
-
- private void openProfilesDialog(SWTBotTreeItem projectItem) throws ParseException, InterruptedException{
+ private void openProfilesDialog(SWTBotTreeItem projectItem) throws ParseException{
projectItem.pressShortcut(Keystrokes.CTRL, Keystrokes.ALT,KeyStroke.getInstance("P"));
- //projectItem.pressShortcut(Keystrokes.DOWN);
- //projectItem.pressShortcut(Keystrokes.LF);
final SWTBotShell selectDialogShell = bot.shell("Select Maven profiles");
assertEquals("Select Maven profiles", selectDialogShell.getText());
- Thread.sleep(1000);
}
- private void testActivatedProfiles(String projectName, String expectedProfiles, boolean defaultProfile){
- String[] parsedexpectedProfiles = expectedProfiles.split(", ");
- String empty = "";
+ private void testActivatedProfiles(String projectName, String[] expectedProfiles) {
Set<String> setOfExpectedProfiles = new HashSet<String>();
- Collections.addAll(setOfExpectedProfiles, parsedexpectedProfiles);
- setOfExpectedProfiles.add(AUTOACTIVATED_PROFILE_IN_USER_SETTINGS);
- if(defaultProfile){
- setOfExpectedProfiles.add(AUTOACTIVATED_PROFILE_IN_POM);
+ if(expectedProfiles != null){
+ Collections.addAll(setOfExpectedProfiles, expectedProfiles);
+ for(String act: AUTOACTIVATED_PROFILES_IN_USER_SETTINGS){
+ setOfExpectedProfiles.add(act);
+ }
}
- setOfExpectedProfiles.remove(empty);
-
IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().getMavenProject("org.jboss.tools.maven.tests", projectName, "1.0.0-SNAPSHOT");
assertNotNull("facade is null",facade);
Set<String> setOfProfilesFacade = new HashSet<String>();
- for(Profile profile : facade.getMavenProject().getActiveProfiles()){
- setOfProfilesFacade.add(profile.getId());
- }
+ setOfProfilesFacade.addAll(MavenPlugin.getProjectConfigurationManager().getResolverConfiguration(facade.getProject()).getActiveProfileList());
+ setOfProfilesFacade.remove("");
assertEquals("Selected profiles in project " +projectName+ " doesn't match", setOfExpectedProfiles, setOfProfilesFacade);
}
@@ -137,6 +126,51 @@
IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().getMavenProject("org.jboss.tools.maven.tests", "simple-jar", "1.0.0-SNAPSHOT");
assertNotNull("facade is null",facade);
assertEquals("Auto Activated profiles from pom.xml doesn't match", AUTOACTIVATED_PROFILE_IN_POM, facade.getMavenProject().getActiveProfiles().get(0).getId());
- assertEquals("Auto Activated profiles from settings.xml doesn't match", AUTOACTIVATED_PROFILE_IN_USER_SETTINGS, facade.getMavenProject().getActiveProfiles().get(1).getId());
+ assertEquals("Auto Activated profiles from settings.xml doesn't match", AUTOACTIVATED_PROFILES_IN_USER_SETTINGS[0], facade.getMavenProject().getActiveProfiles().get(1).getId());
+ assertEquals("Auto Activated profiles from settings.xml doesn't match", AUTOACTIVATED_PROFILES_IN_USER_SETTINGS[1], facade.getMavenProject().getActiveProfiles().get(2).getId());
}
+
+ private void importMavenProject(String pomPath) throws IOException, InterruptedException{
+ bot.menu("File").menu("Import...").click();
+ waitForShell(botUtil, "Import");
+ bot.tree().expandNode("Maven").select("Existing Maven Projects").click();
+ bot.button("Next >").click();
+ waitForShell(botUtil, "Import Maven Projects");
+ bot.comboBoxWithLabel("Root Directory:").setText((new File(pomPath)).getParentFile().getCanonicalPath());
+ bot.button("Refresh").click();
+ waitForShell(botUtil, "Import Maven Projects");
+ Thread.sleep(5000);
+ bot.button("Finish").click();
+ botUtil.waitForAll();
+ }
+
+
+ private static void doCleanWorkspace() throws InterruptedException, CoreException, IOException {
+ final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ workspace.run(new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ IProject[] projects = workspace.getRoot().getProjects();
+ for(int i = 0; i < projects.length; i++ ) {
+ projects[i].delete(false, false, monitor);
+ }
+ }
+ }, new NullProgressMonitor());
+
+ JobHelpers.waitForJobsToComplete(new NullProgressMonitor());
+
+ File[] files = workspace.getRoot().getLocation().toFile().listFiles();
+ if(files != null) {
+ for(File file : files) {
+ if(!".metadata".equals(file.getName())) {
+ if(file.isDirectory()) {
+ FileUtils.deleteDirectory(file);
+ } else {
+ if(!file.delete()) {
+ throw new IOException("Could not delete file " + file.getCanonicalPath());
+ }
+ }
+ }
+ }
+ }
+ }
}
Deleted: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Utils.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Utils.java 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Utils.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -1,35 +0,0 @@
-package org.jboss.tools.maven.ui.bot.test;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.m2e.core.internal.IMavenConstants;
-import org.jboss.tools.ui.bot.ext.SWTUtilExt;
-
-@SuppressWarnings("restriction")
-public class Utils {
-
-
- public static boolean isMavenProject(String projectName) throws CoreException {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- return project.hasNature(IMavenConstants.NATURE_ID);
- }
-
- public static boolean hasNature(String projectName, String natureID) throws CoreException {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- return project.hasNature(natureID);
- }
-
- public static void waitForIdle() throws InterruptedException {
- AbstractMavenSWTBotTest.waitForIdle();
- }
-
- public static void waitForShell(SWTUtilExt util, String shellName) throws InterruptedException {
- Thread.sleep(1000);
- while(!util.isShellActive(shellName)){
- Thread.sleep(500);
- }
- }
-
-}
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/ProjectHasNature.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/ProjectHasNature.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/ProjectHasNature.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -0,0 +1,26 @@
+package org.jboss.tools.maven.ui.bot.test.utils;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
+
+public class ProjectHasNature extends DefaultCondition{
+
+ private IProject project;
+ private String natureID;
+
+ public ProjectHasNature(String projectName, String natureID){
+ this.project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ this.natureID=natureID;
+
+ }
+
+ public boolean test() throws Exception {
+ return project.hasNature(natureID);
+ }
+
+ public String getFailureMessage() {
+ return "Project "+project+" doesn't not have nature "+natureID;
+ }
+
+}
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/TableHasRows.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/TableHasRows.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/utils/TableHasRows.java 2012-08-06 07:53:29 UTC (rev 42856)
@@ -0,0 +1,25 @@
+package org.jboss.tools.maven.ui.bot.test.utils;
+
+import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+
+public class TableHasRows extends DefaultCondition {
+ private final String projectType;
+ private final SWTBotTable table;
+
+ // initialize
+ public TableHasRows(SWTBotTable table, String projectType) {
+ this.table = table;
+ this.projectType = projectType;
+ }
+
+ // return true if the condition matches, false otherwise
+ public boolean test() {
+ return table.indexOf(projectType, "Artifact Id")!=-1;
+ }
+
+ // provide a human readable error message
+ public String getFailureMessage() {
+ return "Timed out waiting for " + table + " to contain rows.";
+ }
+ }
\ No newline at end of file
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/usersettings/settings.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/usersettings/settings.xml 2012-08-04 01:24:50 UTC (rev 42855)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/usersettings/settings.xml 2012-08-06 07:53:29 UTC (rev 42856)
@@ -2,10 +2,48 @@
<settings>
<profiles>
<profile>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
<id>profile.from.settings.xml</id>
</profile>
+ <profile>
+ <id>jboss</id>
+ <repositories>
+ <repository>
+ <id>jboss</id>
+ <name>jboss</name>
+ <url>https://repository.jboss.org/nexus/content/repositories/releases/
+ </url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss</id>
+ <name>jboss</name>
+ <url>https://repository.jboss.org/nexus/content/repositories/releases/
+ </url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
</profiles>
+ <activeProfiles>
+ <activeProfile>profile.from.settings.xml</activeProfile>
+ <activeProfile>jboss</activeProfile>
+ </activeProfiles>
</settings>
\ No newline at end of file
12 years, 5 months
JBoss Tools SVN: r42855 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-03 21:24:50 -0400 (Fri, 03 Aug 2012)
New Revision: 42855
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
JBIDE-12199
https://issues.jboss.org/browse/JBIDE-12199
Verifying legal types of a normal scoped bean.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-04 01:23:40 UTC (rev 42854)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-04 01:24:50 UTC (rev 42855)
@@ -1851,6 +1851,7 @@
String typeSignature = type.getSignature();
int kind = Signature.getTypeSignatureKind(typeSignature);
if(kind == Signature.ARRAY_TYPE_SIGNATURE) {
+ if("Object[]".equals(type.getSimpleName()) && bean.getLegalTypes().size() > 1) continue; //There is another type
addProblem(MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE_2, type.getSimpleName(), bean.getElementName()), CDIPreferences.UNPROXYABLE_BEAN_TYPE, reference, bean.getResource());
} else if(type.isPrimitive()) {
// - Primitive types cannot be proxied by the container.
12 years, 5 months
JBoss Tools SVN: r42854 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-03 21:23:40 -0400 (Fri, 03 Aug 2012)
New Revision: 42854
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
Log:
JBIDE-12199
https://issues.jboss.org/browse/JBIDE-12199
Verifying legal types of a normal scoped bean. Tests are added.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2012-08-03 19:36:35 UTC (rev 42853)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2012-08-04 01:23:40 UTC (rev 42854)
@@ -172,6 +172,12 @@
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE, "TestType[]", "ArrayProducer.produce2()"), 8);
}
+ public void testNormalBeanWithArrayType() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/unproxyable/ArrayProducer.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE_2, "TestType[]", "ArrayProducer.produce()"), 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE_2, "TestType[]", "ArrayProducer.produce2()"), 8);
+ }
+
/**
* 5.4.1. Unproxyable bean types
* - Primitive types cannot be proxied by the container.
@@ -188,6 +194,14 @@
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE, "boolean", "NumberProducer.foo3"), 21);
}
+ public void testNormalScopedBeanWithUnproxyableType() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/unproxyable/NumberProducer.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE_2, "int", "NumberProducer.produce()"), 9);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE_2, "long", "NumberProducer.foo"), 16);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE_2, "Short", "NumberProducer.foo2"), 21);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE_2, "boolean", "NumberProducer.foo3"), 21);
+ }
+
/**
* 5.4.1. Unproxyable bean types
* - Classes which don't have a non-private constructor with no parameters cannot be proxied by the container.
@@ -228,6 +242,14 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE, "String", "Opportunity.t"), 26);
}
+ public void testNormalScopedFinalBean() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/Tuna_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE_2, "Tuna_Broken", "Tuna_Broken"), 21);
+
+ file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalClass/Opportunity.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE_2, "String", "Opportunity.t"), 32);
+ }
+
/**
* 5.4.1. Unproxyable bean types
* - Classes which have final methods cannot be proxied by the container.
@@ -240,6 +262,10 @@
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM, "Tuna_Broken", "Tuna_Broken"), 23);
AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM.substring(0, 0) + ".*", 25);
+
+ file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/Tuna_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM_2, "Tuna_Broken", "Tuna_Broken"), 21);
+
}
/**
12 years, 5 months
JBoss Tools SVN: r42853 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-03 15:36:35 -0400 (Fri, 03 Aug 2012)
New Revision: 42853
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
Log:
JBIDE-12199
https://issues.jboss.org/browse/JBIDE-12199
Verifying legal types of a normal scoped bean.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-03 14:32:10 UTC (rev 42852)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-03 19:36:35 UTC (rev 42853)
@@ -661,6 +661,7 @@
// validate
validateTyped(bean);
validateBeanScope(bean);
+ validateNormalBeanScope(bean);
if (bean instanceof IProducer) {
validateProducer(context, (IProducer) bean);
@@ -1833,6 +1834,61 @@
}
}
+ private void validateNormalBeanScope(IBean bean) {
+ if(bean.getScope()!=null && bean.getScope().isNorlmalScope()) {
+ ITextSourceReference reference = null;
+ Set<IScopeDeclaration> scopes = bean.getScopeDeclarations();
+ if(!scopes.isEmpty()) {
+ reference = scopes.iterator().next();
+ } else {
+ reference = bean.getNameLocation(false);
+ }
+ if(reference == null) {
+ return;
+ }
+ for (IParametedType type: bean.getLegalTypes()) {
+ // - Array types cannot be proxied by the container.
+ String typeSignature = type.getSignature();
+ int kind = Signature.getTypeSignatureKind(typeSignature);
+ if(kind == Signature.ARRAY_TYPE_SIGNATURE) {
+ addProblem(MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_ARRAY_TYPE_2, type.getSimpleName(), bean.getElementName()), CDIPreferences.UNPROXYABLE_BEAN_TYPE, reference, bean.getResource());
+ } else if(type.isPrimitive()) {
+ // - Primitive types cannot be proxied by the container.
+ addProblem(MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_PRIMITIVE_TYPE_2, type.getSimpleName(), bean.getElementName()), CDIPreferences.UNPROXYABLE_BEAN_TYPE, reference, bean.getResource());
+ } else if(type.getType().exists() && !"java.lang.Object".equals(type.getType().getFullyQualifiedName())) {
+ try {
+ if(Flags.isFinal(type.getType().getFlags())) {
+ // - Classes which are declared final cannot be proxied by the container.
+ addProblem(MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_FINAL_TYPE_2, type.getSimpleName(), bean.getElementName()), CDIPreferences.UNPROXYABLE_BEAN_TYPE, reference, bean.getResource());
+ } else {
+ IMethod[] methods = type.getType().getMethods();
+ boolean hasDefaultConstructor = false;
+ boolean hasConstructor = false;
+ for (IMethod method : methods) {
+ hasConstructor = hasConstructor || method.isConstructor();
+ hasDefaultConstructor = hasDefaultConstructor || (method.isConstructor() && !Flags.isPrivate(method.getFlags()) && method.getParameterNames().length==0);
+ if(Flags.isFinal(method.getFlags())) {
+ // - Classes which have final methods cannot be proxied by the container.
+ addProblem(MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM_2, type.getSimpleName(), bean.getElementName()), CDIPreferences.UNPROXYABLE_BEAN_TYPE, reference, bean.getResource());
+ hasDefaultConstructor = true;
+ break;
+ }
+ }
+ if(!hasDefaultConstructor && hasConstructor) {
+ // - Classes which don't have a non-private constructor with no parameters cannot be proxied by the container.
+ addProblem(MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_NPC_2, type.getSimpleName(), bean.getElementName()), CDIPreferences.UNPROXYABLE_BEAN_TYPE, reference, bean.getResource());
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
+
+ }
+ }
+
+ }
+
/**
* Validates class bean which may be both a session and decorator (or interceptor).
*
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2012-08-03 14:32:10 UTC (rev 42852)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2012-08-03 19:36:35 UTC (rev 42853)
@@ -32,6 +32,11 @@
public static String UNPROXYABLE_BEAN_TYPE_WITH_NPC;
public static String UNPROXYABLE_BEAN_FINAL_TYPE;
public static String UNPROXYABLE_BEAN_TYPE_WITH_FM;
+ public static String UNPROXYABLE_BEAN_ARRAY_TYPE_2;
+ public static String UNPROXYABLE_BEAN_PRIMITIVE_TYPE_2;
+ public static String UNPROXYABLE_BEAN_TYPE_WITH_NPC_2;
+ public static String UNPROXYABLE_BEAN_FINAL_TYPE_2;
+ public static String UNPROXYABLE_BEAN_TYPE_WITH_FM_2;
public static String DECORATOR_RESOLVES_TO_FINAL_CLASS;
public static String DECORATOR_RESOLVES_TO_FINAL_METHOD;
public static String DUPLCICATE_EL_NAME;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2012-08-03 14:32:10 UTC (rev 42852)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2012-08-03 19:36:35 UTC (rev 42853)
@@ -13,6 +13,13 @@
UNPROXYABLE_BEAN_TYPE_WITH_NPC=Injection point whose declared type ({0} is a class with a non-private constructor with no parameters) cannot be proxied by the container resolves to a bean {1} with a normal scope [JSR-299 �5.4.1]
UNPROXYABLE_BEAN_FINAL_TYPE=Injection point whose declared type ({0} is a final class) cannot be proxied by the container resolves to a bean {1} with a normal scope [JSR-299 �5.4.1]
UNPROXYABLE_BEAN_TYPE_WITH_FM=Injection point whose declared type ({0} is a class with final methods) cannot be proxied by the container resolves to a bean {1} with a normal scope [JSR-299 �5.4.1]
+
+UNPROXYABLE_BEAN_ARRAY_TYPE_2=Bean {1} with a normal scope cannot have as legal an array type {0} that cannot be proxied by the container [JSR-299 �5.4.1]
+UNPROXYABLE_BEAN_PRIMITIVE_TYPE_2=Bean {1} with a normal scope cannot have as legal a primitive type {0} that cannot be proxied by the container [JSR-299 �5.4.1]
+UNPROXYABLE_BEAN_TYPE_WITH_NPC_2=Bean {1} with a normal scope cannot have as legal a type {0} (with a non-private constructor with no parameters) that cannot be proxied by the container [JSR-299 �5.4.1]
+UNPROXYABLE_BEAN_FINAL_TYPE_2=Bean {1} with a normal scope cannot have as legal a type {0} (final class) that cannot be proxied by the container [JSR-299 �5.4.1]
+UNPROXYABLE_BEAN_TYPE_WITH_FM_2=Bean {1} with a normal scope cannot have as legal a type {0} (with final methods) that cannot be proxied by the container [JSR-299 �5.4.1]
+
DECORATOR_RESOLVES_TO_FINAL_CLASS=Decorator must not be bound to a managed bean implemented by a class {0} which is declared final [JSR-299 �8.3]
DECORATOR_RESOLVES_TO_FINAL_METHOD=Decorator matches a managed bean {0} with a non-static, non-private, final method {1}, and the decorator also implements that method [JSR-299 �8.3]
12 years, 5 months
JBoss Tools SVN: r42852 - trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-08-03 10:32:10 -0400 (Fri, 03 Aug 2012)
New Revision: 42852
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/CSSSelectorJBIDE3288.java
Log:
Fix for JBT 3.4
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/CSSSelectorJBIDE3288.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/CSSSelectorJBIDE3288.java 2012-08-03 13:53:38 UTC (rev 42851)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/CSSSelectorJBIDE3288.java 2012-08-03 14:32:10 UTC (rev 42852)
@@ -8,6 +8,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.test.WidgetVariables;
@@ -98,6 +99,7 @@
SWTBotTreeItem tiStyleClass = tree.getAllItems()[0].expand().getNode("styleClass");
tiStyleClass.select(); //$NON-NLS-1$
tiStyleClass.click(); //$NON-NLS-1$
+ util.waitForButtonIsFound("...", Timing.time3S());
bot.button("...").click(); //$NON-NLS-1$
}
12 years, 5 months
JBoss Tools SVN: r42851 - branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-03 09:53:38 -0400 (Fri, 03 Aug 2012)
New Revision: 42851
Modified:
branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/AbstractPortletExampleGatein.java
Log:
Changed the examples label
Modified: branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/AbstractPortletExampleGatein.java
===================================================================
--- branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/AbstractPortletExampleGatein.java 2012-08-03 12:20:10 UTC (rev 42850)
+++ branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/example/AbstractPortletExampleGatein.java 2012-08-03 13:53:38 UTC (rev 42851)
@@ -17,7 +17,7 @@
@Override
public String getExampleCategory() {
- return "Portlet for GateIn 3.1/EPP 5.x";
+ return "Portlet for JBoss Enterprise Portal Platform 5.x/GateIn 3.1";
}
@Override
12 years, 5 months
JBoss Tools SVN: r42850 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-08-03 08:20:10 -0400 (Fri, 03 Aug 2012)
New Revision: 42850
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces4PanelTemplate.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/resources/TestProject/WebContent/pages/facets.jsp
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panel.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml
Log:
https://issues.jboss.org/browse/JBIDE-6072 - rich:panel was updated for RF4 UI, tests were updated.
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces4PanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces4PanelTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFaces4PanelTemplate.java 2012-08-03 12:20:10 UTC (rev 42850)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.List;
+import java.util.Map;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * It is used to render <code>rich:panel</code> from RichFaces 4 library.
+ *
+ * @author dmaliarevich
+ */
+public class RichFaces4PanelTemplate extends RichFacesPanelTemplate {
+
+ @Override
+ protected void renderHeaderFacet(Element headerFacet,
+ nsIDOMElement headerDiv, VpeCreationData creationData,
+ VpePageContext pageContext, nsIDOMDocument visualDocument) {
+
+ Map<String, List<Node>> children = VisualDomUtil.findFacetElements(headerFacet, pageContext);
+ VpeChildrenInfo headerInfo = new VpeChildrenInfo(headerDiv);
+ if (((children != null) && (children.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0))) {
+ for (Node node : children.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ headerInfo.addSourceChild(node);
+ }
+ }
+ creationData.addChildrenInfo(headerInfo);
+ }
+
+ @Override
+ protected Map<String, List<Node>> getHeaderFacetChildren(
+ Element headerFacet, VpePageContext pageContext) {
+ return null;
+ }
+ @Override
+ protected Map<String, List<Node>> getFooterFacetChildren(
+ Element footerFacet, VpePageContext pageContext) {
+ return null;
+ }
+
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java 2012-08-03 12:20:10 UTC (rev 42850)
@@ -27,17 +27,19 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+/**
+ * Default template for <code>rich:panel</code> component.
+ * <p>
+ * It is used to render <code>rich:panel</code> for RichFaces untill version 3.3.
+ */
public class RichFacesPanelTemplate extends VpeAbstractTemplate {
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
+ ComponentUtil.setCSSLink(pageContext, "panel/panel.css", "richFacesPanel"); //$NON-NLS-1$ //$NON-NLS-2$
Element sourceElement = (Element)sourceNode;
-
nsIDOMElement div = visualDocument.createElement("div"); //$NON-NLS-1$
-
VpeCreationData creationData = new VpeCreationData(div);
-
- ComponentUtil.setCSSLink(pageContext, "panel/panel.css", "richFacesPanel"); //$NON-NLS-1$ //$NON-NLS-2$
String styleClass = "dr-pnl rich-panel"; //$NON-NLS-1$
String styleClassAttrName = "styleClass"; //$NON-NLS-1$
@@ -57,10 +59,13 @@
* Find elements from the f:facet
*/
Map<String, List<Node>> headerFacetChildren = null;
+ Map<String, List<Node>> footerFacetChildren = null;
Element headerFacet = SourceDomUtil.getFacetByName(pageContext,
sourceElement, RichFaces.NAME_FACET_HEADER);
+ Element footerFacet = SourceDomUtil.getFacetByName(pageContext,
+ sourceElement, RichFaces.NAME_FACET_FOOTER);
if (headerFacet != null) {
- headerFacetChildren = VisualDomUtil.findFacetElements(headerFacet, pageContext);
+ headerFacetChildren = getHeaderFacetChildren(headerFacet, pageContext);
nsIDOMElement headerDiv = visualDocument.createElement(HTML.TAG_DIV);
/*
* By adding attribute VPE-FACET to this visual node
@@ -75,12 +80,15 @@
headerDiv.setAttribute(HTML.ATTR_CLASS, headerClass);
headerDiv.setAttribute(HTML.ATTR_STYLE,
ComponentUtil.getHeaderBackgoundImgStyle());
-
- VpeChildrenInfo headerInfo = new VpeChildrenInfo(headerDiv);
- headerInfo.addSourceChild(headerFacet);
- creationData.addChildrenInfo(headerInfo);
+ /*
+ * https://issues.jboss.org/browse/JBIDE-6072
+ * Render the header: differs for RF3.3 and RF4
+ */
+ renderHeaderFacet(headerFacet, headerDiv, creationData, pageContext, visualDocument);
}
-
+ if (footerFacet != null) {
+ footerFacetChildren = getHeaderFacetChildren(footerFacet, pageContext);
+ }
/*
* Encode rich:panel content
*/
@@ -103,7 +111,13 @@
bodyInfo.addSourceChild(node);
}
}
-
+ boolean footerHtmlElementsPresents = ((footerFacetChildren != null) && (footerFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+ if (footerHtmlElementsPresents) {
+ for (Node node : footerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ bodyInfo.addSourceChild(node);
+ }
+ }
/*
* Add the rest panel's content
*/
@@ -112,10 +126,25 @@
bodyInfo.addSourceChild(child);
}
creationData.addChildrenInfo(bodyInfo);
-
+
return creationData;
}
+ protected void renderHeaderFacet(Element headerFacet, nsIDOMElement headerDiv,
+ VpeCreationData creationData, VpePageContext pageContext, nsIDOMDocument visualDocument) {
+ VpeChildrenInfo headerInfo = new VpeChildrenInfo(headerDiv);
+ headerInfo.addSourceChild(headerFacet);
+ creationData.addChildrenInfo(headerInfo);
+ }
+
+ protected Map<String, List<Node>> getHeaderFacetChildren(Element headerFacet, VpePageContext pageContext) {
+ return VisualDomUtil.findFacetElements(headerFacet, pageContext);
+ }
+
+ protected Map<String, List<Node>> getFooterFacetChildren(Element footerFacet, VpePageContext pageContext) {
+ return VisualDomUtil.findFacetElements(footerFacet, pageContext);
+ }
+
/* (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)
*/
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 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -618,6 +618,7 @@
</vpe:tag>
<vpe:tag name="rich:panel" case-sensitive="yes">
+ <vpe:if test="tld_version('max=3.3')">
<vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelTemplate">
<vpe:resize>
@@ -629,6 +630,19 @@
<vpe:drop container="yes" />
</vpe:dnd>
</vpe:template>
+ </vpe:if>
+
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFaces4PanelTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
</vpe:tag>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/collapsiblePanel.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -1,13 +1,12 @@
<tests>
<test id="panel">
- <DIV CLASS="dr-pnl rich-panel ">
- <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header "
- STYLE="display: none;">
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body ">
+ <DIV CLASS="dr-pnl rich-panel">
+ <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header" >
<SPAN CLASS="vpe-text">
Panel Header
</SPAN>
+ </DIV>
+ <DIV CLASS="dr-pnl-b rich-panel-body">
<SPAN CLASS="vpe-text">
Panel Content
</SPAN>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -81,10 +81,6 @@
</rich:columnGroup>
</f:facet>
</rich:dataTable>
- <rich:panel id="column5">
- <f:facet name="header">
- <h:outputText value="Column" />
- </f:facet>
<rich:dataTable id="table1" value="#{bookList.bookList}" var="book"
style="text-align:center;color:Orchid;font-style:italic;font-size:small;border-style:dotted;background-color:Turquoise;border-color:Orchid;text-decoration:underline;font-family:Arial;border-width:thick;font-weight:bolder"
columnClasses="evenRow, oddRow" sortMode="multi">
@@ -133,7 +129,6 @@
<h:outputText value="#{book.numOfCopies}" />
</rich:column>
</rich:dataTable>
- </rich:panel>
</h:form>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -20,150 +20,139 @@
<SPAN>footer1</SPAN>
</TD>
</test>
- <test id="column5">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Column
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <TABLE ID="table1" VALUE="#{bookList.bookList}" VAR="book"
- STYLE="border: thick dotted Orchid; text-align: center; color: Orchid; font-style: italic; font-size: small; background-color: Turquoise; text-decoration: underline; font-family: Arial; font-weight: bolder;"
- COLUMNCLASSES="evenRow, oddRow" SORTMODE="multi" CLASS="dr-table rich-table">
- <COLGROUP SPAN="3">
- </COLGROUP>
- <THEAD>
- <TR CLASS="dr-table-header rich-table-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <TD CLASS="dr-table-headercell rich-table-headercell" COLSPAN="100"
- SCOPE="colgroup">
- <SPAN CLASS="vpe-text">
- #{msg.pageTitle}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-subheader rich-table-subheader">
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOPE="col">
- <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{msg.priceColumnName}
- </SPAN>
- </SPAN>
+ <test id="table1">
+ <TABLE VALUE="#{bookList.bookList}" VAR="book"
+ STYLE="border: thick dotted Orchid; text-align: center; color: Orchid; font-style: italic; font-size: small; background-color: Turquoise; text-decoration: underline; font-family: Arial; font-weight: bolder;"
+ COLUMNCLASSES="evenRow, oddRow" SORTMODE="multi" CLASS="dr-table rich-table">
+ <COLGROUP SPAN="3">
+ </COLGROUP>
+ <THEAD>
+ <TR CLASS="dr-table-header rich-table-header"
+ STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ <TD CLASS="dr-table-headercell rich-table-headercell" COLSPAN="100"
+ SCOPE="colgroup">
+ <SPAN CLASS="vpe-text">
+ #{msg.pageTitle}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-subheader rich-table-subheader">
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ #{msg.priceColumnName}
+ </SPAN>
+ </SPAN>
- </TD>
- <TD STYLE="display: none;" CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOPE="col">
- <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{msg.titleColumnName}
- </SPAN>
- </SPAN>
+ </TD>
+ <TD STYLE="display: none;" CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ #{msg.titleColumnName}
+ </SPAN>
+ </SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOPE="col">
- <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{msg.priceColumnName}
- </SPAN>
- </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ #{msg.priceColumnName}
+ </SPAN>
+ </SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOPE="col">
- <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{msg.titleColumnName}
- </SPAN>
- </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ #{msg.titleColumnName}
+ </SPAN>
+ </SPAN>
- </TD>
- </TR>
- </THEAD>
- <TFOOT>
- <TR CLASS="dr-table-subfooter rich-table-subfooter">
- <TD CLASS="dr-table-subfootercell rich-table-subfootercell"
- SCOPE="col">
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{msg.priceColumnName}
- </SPAN>
- </SPAN>
- </TD>
- <TD STYLE="display: none;" CLASS="dr-table-subfootercell rich-table-subfootercell"
- SCOPE="col">
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{msg.titleColumnName}
- </SPAN>
- </SPAN>
- </TD>
- <TD CLASS="dr-table-subfootercell rich-table-subfootercell"
- SCOPE="col">
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{msg.priceColumnName}
- </SPAN>
- </SPAN>
- </TD>
- <TD CLASS="dr-table-subfootercell rich-table-subfootercell"
- SCOPE="col">
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{msg.titleColumnName}
- </SPAN>
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-footer rich-table-footer"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <TD CLASS="dr-table-footercell rich-table-footercell" COLSPAN="100"
- SCOPE="colgroup">
- <SPAN CLASS="vpe-text">
- #{msg.priceColumnName}
- </SPAN>
- </TD>
- </TR>
- </TFOOT>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD SORTBY="#{book.price}" ID="col2" STYLECLASS="btn"
- CLASS="dr-table-cell rich-table-cell btn evenRow">
+ </TD>
+ </TR>
+ </THEAD>
+ <TFOOT>
+ <TR CLASS="dr-table-subfooter rich-table-subfooter">
+ <TD CLASS="dr-table-subfootercell rich-table-subfootercell"
+ SCOPE="col">
+ <SPAN>
<SPAN CLASS="vpe-text">
- #{book.price}
+ #{msg.priceColumnName}
</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-row rich-table-row">
- <TD STYLE="display: none;" ID="col3" SORTBY="#{book.numOfCopies}"
- VISIBLE="false" BREAKBEFORE="true"
- CLASS="dr-table-cell rich-table-cell evenRow">
+ </SPAN>
+ </TD>
+ <TD STYLE="display: none;" CLASS="dr-table-subfootercell rich-table-subfootercell"
+ SCOPE="col">
+ <SPAN>
<SPAN CLASS="vpe-text">
- #{book.numOfCopies}
+ #{msg.titleColumnName}
</SPAN>
- </TD>
- <TD SORTBY="#{book.price}" ID="col4"
- STYLE="border: thick dotted Cornsilk; text-align: center; color: Turquoise; font-style: italic; font-size: small; background-color: PaleVioletRed; text-decoration: line-through; font-family: Bookman Old Style; font-weight: bold;"
- CLASS="dr-table-cell rich-table-cell oddRow">
+ </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subfootercell rich-table-subfootercell"
+ SCOPE="col">
+ <SPAN>
<SPAN CLASS="vpe-text">
- #{book.price}
+ #{msg.priceColumnName}
</SPAN>
- </TD>
- <TD ID="col5" SORTBY="#{book.numOfCopies}" VISIBLE="true"
- CLASS="dr-table-cell rich-table-cell evenRow">
+ </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subfootercell rich-table-subfootercell"
+ SCOPE="col">
+ <SPAN>
<SPAN CLASS="vpe-text">
- #{book.numOfCopies}
+ #{msg.titleColumnName}
</SPAN>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </DIV>
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-footer rich-table-footer"
+ STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ <TD CLASS="dr-table-footercell rich-table-footercell" COLSPAN="100"
+ SCOPE="colgroup">
+ <SPAN CLASS="vpe-text">
+ #{msg.priceColumnName}
+ </SPAN>
+ </TD>
+ </TR>
+ </TFOOT>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD SORTBY="#{book.price}" ID="col2" STYLECLASS="btn"
+ CLASS="dr-table-cell rich-table-cell btn evenRow">
+ <SPAN CLASS="vpe-text">
+ #{book.price}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-row rich-table-row">
+ <TD STYLE="display: none;" ID="col3" SORTBY="#{book.numOfCopies}"
+ VISIBLE="false" BREAKBEFORE="true" CLASS="dr-table-cell rich-table-cell evenRow">
+ <SPAN CLASS="vpe-text">
+ #{book.numOfCopies}
+ </SPAN>
+ </TD>
+ <TD SORTBY="#{book.price}" ID="col4"
+ STYLE="border: thick dotted Cornsilk; text-align: center; color: Turquoise; font-style: italic; font-size: small; background-color: PaleVioletRed; text-decoration: line-through; font-family: Bookman Old Style; font-weight: bold;"
+ CLASS="dr-table-cell rich-table-cell oddRow">
+ <SPAN CLASS="vpe-text">
+ #{book.price}
+ </SPAN>
+ </TD>
+ <TD ID="col5" SORTBY="#{book.numOfCopies}" VISIBLE="true"
+ CLASS="dr-table-cell rich-table-cell evenRow">
+ <SPAN CLASS="vpe-text">
+ #{book.numOfCopies}
+ </SPAN>
+ </TD>
+ </TR>
+ </TABLE>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -19,14 +19,10 @@
<h:outputText value="#{book.price}" />
</rich:columns>
</rich:dataTable>
- <rich:panel id="columns1" styleClass="btn" style=" height : 138px;">
- <f:facet name="header">
- <h:outputText value="Columns" />
- </f:facet>
- <rich:dataTable value="#{dataTableScrollerBean.model}" var="model"
- width="750"
- style="text-align:center;color:Orchid;font-style:italic;font-size:x-large;border-style:dotted;background-color:Turquoise;
- border-color:Cornsilk;text-decoration:overline;font-family:Agency FB,Arial,Arial Baltic,Arial Black,Arial CE,Arial CYR,Arial Cyr,Arial Greek,Arial Narrow,Arial Rounded MT Bold,Arial TUR,Blackadder ITC,Bodoni MT,Bodoni MT Black,Bodoni MT Condensed,Book Antiqua,Bookman Old Style,Bookshelf Symbol 7,Bradley Hand ITC,Calisto MT,Castellar,Century Gothic,Century Schoolbook,Comic Sans MS,Copperplate Gothic Bold,Copperplate Gothic Light,Courier,Courier New,Courier New Baltic,Courier New CE,Courier New CYR,Courier New Cyr,Courier New Greek,Courier New TUR,Curlz MT,Edwardian Script ITC,Elephant,Engravers MT,Eras Bold ITC,Eras Demi ITC,Eras Light ITC,Eras Medium ITC,Estrangelo Edessa,Felix Titling,Fixedsys,Forte,Franklin Gothic Book,Franklin Gothic Demi,Franklin Gothic Demi Cond,Franklin Gothic Heavy,Franklin Gothic Medium,Franklin Gothic Medium Cond,French Script MT,Garamond,Gautami,Georgia,Gigi,Gill Sans MT,Gill Sans MT Condensed,Gill Sans MT Ext Condensed Bold,Gill Sans !
Ultra Bold,Gill Sans Ultra Bold Condensed,Gloucester MT Extra Condensed,Goudy Old Style,Goudy Stout,Haettenschweiler,Impact,Imprint MT Shadow,Latha,Lucida Console,Lucida Sans,Lucida Sans Typewriter,Lucida Sans Unicode,MS Outlook,MS Reference Sans Serif,MS Reference Specialty,MS Sans Serif,MS Serif,MT Extra,MV Boli,Maiandra GD,Mangal,Marlett,Microsoft Sans Serif,Modern,Monotype Corsiva,OCR A Extended,Palace Script MT,Palatino Linotype,Papyrus,Perpetua,Perpetua Titling MT,Pristina,Raavi,Rage Italic,Rockwell,Rockwell Condensed,Rockwell Extra Bold,Roman,Script,Script MT Bold,Shruti,Small Fonts,Sylfaen,Symbol,System,Tahoma,Terminal,Times New Roman,Times New Roman Baltic,Times New Roman CE,Times New Roman CYR,Times New Roman Cyr,Times New Roman Greek,Times New Roman TUR,Trebuchet MS,Tunga,Tw Cen MT,Tw Cen MT Condensed,Tw Cen MT Condensed Extra Bold,Verdana,WST_Czec,WST_Engl,WST_Fren,WST_Germ,WST_Ital,WST_Span,WST_Swed,Webdings,Wingdings,Wingdings 2,Wingdings 3;border-width:thick;!
font-weight:bold;">
+
+ <rich:dataTable id="columns1"
+ value="#{dataTableScrollerBean.model}" var="model" width="750"
+ style="text-align:center;color:Orchid;font-style:italic;font-size:x-large;border-style:dotted;background-color:Turquoise; border-color:Cornsilk;text-decoration:overline;font-family:Agency FB,Arial,Arial Baltic,Arial Black,Arial CE,Arial CYR,Arial Cyr,Arial Greek,Arial Narrow,Arial Rounded MT Bold,Arial TUR,Blackadder ITC,Bodoni MT,Bodoni MT Black,Bodoni MT Condensed,Book Antiqua,Bookman Old Style,Bookshelf Symbol 7,Bradley Hand ITC,Calisto MT,Castellar,Century Gothic,Century Schoolbook,Comic Sans MS,Copperplate Gothic Bold,Copperplate Gothic Light,Courier,Courier New,Courier New Baltic,Courier New CE,Courier New CYR,Courier New Cyr,Courier New Greek,Courier New TUR,Curlz MT,Edwardian Script ITC,Elephant,Engravers MT,Eras Bold ITC,Eras Demi ITC,Eras Light ITC,Eras Medium ITC,Estrangelo Edessa,Felix Titling,Fixedsys,Forte,Franklin Gothic Book,Franklin Gothic Demi,Franklin Gothic Demi Cond,Franklin Gothic Heavy,Franklin Gothic Medium,Franklin Gothic Medium Cond,French Scrip!
t MT,Garamond,Gautami,Georgia,Gigi,Gill Sans MT,Gill Sans MT Condensed,Gill Sans MT Ext Condensed Bold,Gill Sans Ultra Bold,Gill Sans Ultra Bold Condensed,Gloucester MT Extra Condensed,Goudy Old Style,Goudy Stout,Haettenschweiler,Impact,Imprint MT Shadow,Latha,Lucida Console,Lucida Sans,Lucida Sans Typewriter,Lucida Sans Unicode,MS Outlook,MS Reference Sans Serif,MS Reference Specialty,MS Sans Serif,MS Serif,MT Extra,MV Boli,Maiandra GD,Mangal,Marlett,Microsoft Sans Serif,Modern,Monotype Corsiva,OCR A Extended,Palace Script MT,Palatino Linotype,Papyrus,Perpetua,Perpetua Titling MT,Pristina,Raavi,Rage Italic,Rockwell,Rockwell Condensed,Rockwell Extra Bold,Roman,Script,Script MT Bold,Shruti,Small Fonts,Sylfaen,Symbol,System,Tahoma,Terminal,Times New Roman,Times New Roman Baltic,Times New Roman CE,Times New Roman CYR,Times New Roman Cyr,Times New Roman Greek,Times New Roman TUR,Trebuchet MS,Tunga,Tw Cen MT,Tw Cen MT Condensed,Tw Cen MT Condensed Extra Bold,Verdana,WST_Czec,WST!
_Engl,WST_Fren,WST_Germ,WST_Ital,WST_Span,WST_Swed,Webdings,Wi!
ngdings,
Wingdings 2,Wingdings 3;border-width:thick;font-weight:bold;">
<f:facet name="header">
<h:outputText value="Cars Available"></h:outputText>
</f:facet>
@@ -41,7 +37,6 @@
style="font-style:italic;" />
</rich:columns>
</rich:dataTable>
- </rich:panel>
</h:form>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -5,58 +5,48 @@
</TD>
</test>
<test id="columns1">
- <DIV CLASS="dr-pnl rich-panel btn" STYLE="height: 138px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Columns
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <TABLE WIDTH="750" VALUE="#{dataTableScrollerBean.model}" VAR="model"
- STYLE="border: thick dotted Cornsilk; text-align: center; color: Orchid; font-style: italic; font-size: x-large; background-color: Turquoise; text-decoration: overline; font-weight: bold;"
- CLASS="dr-table rich-table">
- <COLGROUP SPAN="1">
- </COLGROUP>
- <THEAD>
- <TR CLASS="dr-table-header rich-table-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <TD CLASS="dr-table-headercell rich-table-headercell" COLSPAN="100"
- SCOPE="colgroup">
- <SPAN CLASS="vpe-text">
- Cars Available
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-subheader rich-table-subheader">
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOPE="col">
- <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
- <SPAN>
- <SPAN CLASS="vpe-text">
- #{columns.header}
- </SPAN>
- </SPAN>
-
- </TD>
- </TR>
- </THEAD>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD VALUE="#{dataTableScrollerBean.columns}" VAR="columns"
- INDEX="ind" SORTBY="#{model[ind].price}" CLASS="dr-table-cell rich-table-cell">
+ <TABLE WIDTH="750" VALUE="#{dataTableScrollerBean.model}" VAR="model"
+ STYLE="border: thick dotted Cornsilk; text-align: center; color: Orchid; font-style: italic; font-size: x-large; background-color: Turquoise; text-decoration: overline; font-weight: bold;"
+ CLASS="dr-table rich-table">
+ <COLGROUP SPAN="1">
+ </COLGROUP>
+ <THEAD>
+ <TR CLASS="dr-table-header rich-table-header"
+ STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ <TD CLASS="dr-table-headercell rich-table-headercell" COLSPAN="100"
+ SCOPE="colgroup">
+ <SPAN CLASS="vpe-text">
+ Cars Available
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-subheader rich-table-subheader">
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
+ <SPAN>
<SPAN CLASS="vpe-text">
- #{model[ind].model}
+ #{columns.header}
</SPAN>
- <SPAN CLASS="vpe-text">
- #{model[ind].mileage} miles
- </SPAN>
- <SPAN STYLE="font-style: italic;">
- #{model[ind].price}$
- </SPAN>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </DIV>
+ </SPAN>
+
+ </TD>
+ </TR>
+ </THEAD>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD VALUE="#{dataTableScrollerBean.columns}" VAR="columns" INDEX="ind"
+ SORTBY="#{model[ind].price}" CLASS="dr-table-cell rich-table-cell">
+ <SPAN CLASS="vpe-text">
+ #{model[ind].model}
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ #{model[ind].mileage} miles
+ </SPAN>
+ <SPAN STYLE="font-style: italic;">
+ #{model[ind].price}$
+ </SPAN>
+ </TD>
+ </TR>
+ </TABLE>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -49,12 +49,9 @@
<f:selectItem itemValue="suggestion 5" />
</rich:comboBox>
-<rich:panel styleClass="btn" id="complexCombo">
- <f:facet name="header">
- <h:outputText value="Combo Box"/>
- </f:facet>
<form>
- <rich:comboBox defaultLabel="Enter some value" width="150">
+ <rich:comboBox id="complexCombo"
+ defaultLabel="Enter some value" width="150">
<f:selectItem itemValue="item 1"/>
<f:selectItem itemValue="item 2"/>
<f:selectItem itemValue="item 3"/>
@@ -68,6 +65,6 @@
<f:selectItem itemValue="item 12"/>
</rich:comboBox>
</form>
-</rich:panel>
+
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -84,39 +84,27 @@
</DIV>
</test>
<test id="complexCombo">
- <DIV CLASS="dr-pnl rich-panel btn">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Combo Box
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <FORM STYLE="-moz-user-modify: read-write;">
- <DIV STYLE="width: 150px;">
- <DIV STYLE="position: static; z-index: 0;">
- <DIV CLASS="rich-combobox-font rich-combobox" STYLE="position: static; z-index: 0;">
- <DIV CLASS="rich-combobox-font rich-combobox-shell" STYLE="width: 150px; z-index: 1;">
- <INPUT TYPE="text"
- CLASS="rich-combobox-font-disabled rich-combobox-input-inactive"
- STYLE="width: 133px;" VALUE="Enter some value" />
+ <DIV STYLE="width: 150px;">
+ <DIV STYLE="position: static; z-index: 0;">
+ <DIV CLASS="rich-combobox-font rich-combobox" STYLE="position: static; z-index: 0;">
+ <DIV CLASS="rich-combobox-font rich-combobox-shell" STYLE="width: 150px; z-index: 1;">
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-disabled rich-combobox-input-inactive"
+ STYLE="width: 133px;" VALUE="Enter some value" />
- <INPUT TYPE="text"
- CLASS="rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"
- READONLY="true" VPE-USER-TOGGLE-ID="0" STYLE="" />
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"
+ READONLY="true" VPE-USER-TOGGLE-ID="0" STYLE="" />
- <INPUT TYPE="text"
- CLASS="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"
- READONLY="true" VPE-USER-TOGGLE-ID="0" STYLE="" />
+ <INPUT TYPE="text"
+ CLASS="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"
+ READONLY="true" VPE-USER-TOGGLE-ID="0" STYLE="" />
- <DIV CLASS="rich-combobox-strut rich-combobox-font" STYLE="width: 140px;">
- Struts
- </DIV>
- </DIV>
- </DIV>
+ <DIV CLASS="rich-combobox-strut rich-combobox-font" STYLE="width: 140px;">
+ Struts
</DIV>
</DIV>
- </FORM>
+ </DIV>
</DIV>
</DIV>
</test>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -36,10 +36,7 @@
<h:outputText value="col3" />
<h:outputText value="col4" />
</rich:dataDefinitionList>
- <rich:panel id="dataDefinitionList1">
- <f:facet name="header">
- <h:outputText value="Data Defenition list" />
- </f:facet>
+
<h:form>
<rich:dataDefinitionList id="defList" rows="3" title="Book Store"
style="text-align:center;color:PaleVioletRed;font-style:oblique;font-size:x-large;border-style:dotted;background-color:Grey;border-color:Cornsilk;text-decoration:overline;font-family:Arial TUR;border-width:thick;font-weight:bolder;"
@@ -51,7 +48,6 @@
<h:outputText value="Number of copies:"></h:outputText>
</rich:dataDefinitionList>
</h:form>
- </rich:panel>
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -100,16 +100,8 @@
</DL>
</test>
- <test id="dataDefinitionList1">
- <DIV CLASS="dr-pnl rich-panel ">
- <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header "
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Data Defenition list
-</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body ">
- <FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
+ <test id="defList">
+
<DL
STYLE="border: thick dotted Cornsilk; text-align: center; color: PaleVioletRed; font-style: oblique; font-size: x-large; background-color: Grey; text-decoration: overline; font-family: Arial TUR; font-weight: bolder;"
CLASS="listClass">
@@ -153,8 +145,5 @@
</SPAN>
</DD>
</DL>
- </FORM>
- </DIV>
- </DIV>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -124,11 +124,8 @@
handleStyleClass="handleStyle" rangeStyleClass="rangeStyle"
trackStyleClass="trackStyle" trailerStyleClass="trailerStyle"
style="color:yellow" />
-<rich:panel id="dataFilterSliderWithDataTable">
- <f:facet name="header">
- <h:outputText value="Data Filter Slider" />
- </f:facet>
- <a4j:form id="form1" reRender="list-body" ajaxSubmit="true"
+
+ <a4j:form id="dataFilterSliderWithDataTable" reRender="list-body" ajaxSubmit="true"
ignoreDupResponses="true" requestDelay="100">
<a4j:region id="stat1">
<a4j:outputPanel id="slider-body">
@@ -189,6 +186,6 @@
</a4j:outputPanel>
</a4j:region>
</a4j:form>
-</rich:panel>
+
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -43,160 +43,148 @@
</DIV>
</test>
<test id="dataFilterSliderWithDataTable">
+ <DIV STYLE="-moz-user-modify: read-write;">
+ <DIV ID="stat1" STYLE="-moz-user-modify: read-write;">
+ <DIV ID="slider-body" STYLE="-moz-user-modify: read-write;">
+ <DIV CLASS="slider-container rich-dataFilterSlider-container evenRow">
+ <DIV CLASS="range rich-dataFilterSlider-range " STYLE="width: 459px;">
+ <DIV CLASS="range-decor rich-dataFilterSlider-range-decor">
+ <DIV CLASS="trailer rich-dataFilterSlider-trailer " STYLE="left: -38px;">
+ <DIV CLASS="track rich-dataFilterSlider-track " STYLE="width: 200px;">
+ <DIV CLASS="handle rich-dataFilterSlider-handle " STYLE="left: 0px;">
+ <IMG WIDTH="7px" HEIGHT="8px" BORDER="0px"
+ SRC="/.*resources/dataFilterSlider/pos.gif/" />
- <DIV CLASS="dr-pnl rich-panel ">
- <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header "
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Data Filter Slider
-</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body ">
- <DIV ID="form1" STYLE="-moz-user-modify: read-write;">
- <DIV ID="stat1" STYLE="-moz-user-modify: read-write;">
- <DIV ID="slider-body" STYLE="-moz-user-modify: read-write;">
- <DIV CLASS="slider-container rich-dataFilterSlider-container evenRow">
- <DIV CLASS="range rich-dataFilterSlider-range " STYLE="width: 459px;">
- <DIV CLASS="range-decor rich-dataFilterSlider-range-decor">
- <DIV CLASS="trailer rich-dataFilterSlider-trailer " STYLE="left: -38px;">
- <DIV CLASS="track rich-dataFilterSlider-track " STYLE="width: 200px;">
- <DIV CLASS="handle rich-dataFilterSlider-handle " STYLE="left: 0px;">
- <IMG WIDTH="7px" HEIGHT="8px" BORDER="0px"
- SRC="/.*resources/dataFilterSlider/pos.gif/" />
-
- </DIV>
- </DIV>
- </DIV>
</DIV>
</DIV>
- <INPUT TYPE="text"
- CLASS="slider-input-field rich-dataFilterSlider-input-field "
- VALUE="10000" />
- <BR STYLE="clear: both;" />
-
</DIV>
</DIV>
- <DIV ID="list-body" STYLE="-moz-user-modify: read-write;">
- <TABLE STYLE="-moz-user-modify: read-only;">
- <TR>
- <TD>
- <DIV>
- <TABLE CLASS="list-table1" ROWCLASSES="list-row3">
- <TBODY>
- <TR>
- <TD STYLE="border: 0px hidden ; padding: 0px;">
- <TABLE WIDTH="100%" BORDER="0" CLASS="list-table1">
- <TBODY>
- <TR CLASS="list-row3">
- <TD CLASS="evenRow">
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">#{category}</SPAN>
- </A>
- </TD>
- </TR>
- </TBODY>
- <COLGROUP>
- <COL STYLE="-moz-user-modify: read-write;" />
+ </DIV>
+ <INPUT TYPE="text"
+ CLASS="slider-input-field rich-dataFilterSlider-input-field "
+ VALUE="10000" />
+ <BR STYLE="clear: both;" />
- </COLGROUP>
- </TABLE>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </TD>
- </TR>
- </TABLE>
- <TABLE STYLE="-moz-user-modify: read-only;">
- <TR>
- <TD>
- <DIV>
- <TABLE CLASS="list-table1" ROWCLASSES="list-row1, list-row2">
- <TBODY>
- <TR>
- <TD STYLE="border: 0px hidden ; padding: 0px;">
- <TABLE WIDTH="100%" BORDER="0" CLASS="list-table1">
- <THEAD>
- <TR>
- <TH CLASS="list-header">
- <SPAN>
- <SPAN CLASS="headerText">
- Make
-</SPAN>
- </SPAN>
- </TH>
- <TH CLASS="list-header">
- <SPAN>
- <SPAN CLASS="headerText">
- Model
-</SPAN>
- </SPAN>
- </TH>
- <TH CLASS="list-header">
- <SPAN>
- <SPAN CLASS="headerText">
- #{inventoryList.priceColumnName}
-</SPAN>
- </SPAN>
- </TH>
- <TH CLASS="list-header">
- <SPAN>
- <SPAN CLASS="headerText">
- #{inventoryList.mileageColumnName}
-</SPAN>
- </SPAN>
- </TH>
- </TR>
- </THEAD>
- <TBODY>
- <TR CLASS="list-row1">
- <TD CLASS="column">
- <SPAN CLASS="vpe-text">
- #{category.make}
-</SPAN>
- </TD>
- <TD CLASS="column">
- <SPAN CLASS="vpe-text">
- #{category.model}
-</SPAN>
- </TD>
- <TD CLASS="column">
- <SPAN CLASS="vpe-text">
- #{category.price}
-</SPAN>
- </TD>
- <TD CLASS="column">
- <SPAN CLASS="vpe-text">
- #{category.mileage}
-</SPAN>
- </TD>
- </TR>
- </TBODY>
- <COLGROUP>
- <COL STYLE="-moz-user-modify: read-write;" />
+ </DIV>
+ </DIV>
+ <DIV ID="list-body" STYLE="-moz-user-modify: read-write;">
+ <TABLE STYLE="-moz-user-modify: read-only;">
+ <TR>
+ <TD>
+ <DIV>
+ <TABLE CLASS="list-table1" ROWCLASSES="list-row3">
+ <TBODY>
+ <TR>
+ <TD STYLE="border: 0px hidden ; padding: 0px;">
+ <TABLE WIDTH="100%" BORDER="0" CLASS="list-table1">
+ <TBODY>
+ <TR CLASS="list-row3">
+ <TD CLASS="evenRow">
+ <A STYLE="-moz-user-modify: read-write;" CLASS="">
+ <SPAN CLASS="vpe-text">#{category}</SPAN>
+ </A>
+ </TD>
+ </TR>
+ </TBODY>
+ <COLGROUP>
+ <COL STYLE="-moz-user-modify: read-write;" />
- <COL STYLE="-moz-user-modify: read-write;" />
+ </COLGROUP>
+ </TABLE>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ <TABLE STYLE="-moz-user-modify: read-only;">
+ <TR>
+ <TD>
+ <DIV>
+ <TABLE CLASS="list-table1" ROWCLASSES="list-row1, list-row2">
+ <TBODY>
+ <TR>
+ <TD STYLE="border: 0px hidden ; padding: 0px;">
+ <TABLE WIDTH="100%" BORDER="0" CLASS="list-table1">
+ <THEAD>
+ <TR>
+ <TH CLASS="list-header">
+ <SPAN>
+ <SPAN CLASS="headerText">
+ Make
+ </SPAN>
+ </SPAN>
+ </TH>
+ <TH CLASS="list-header">
+ <SPAN>
+ <SPAN CLASS="headerText">
+ Model
+ </SPAN>
+ </SPAN>
+ </TH>
+ <TH CLASS="list-header">
+ <SPAN>
+ <SPAN CLASS="headerText">
+ #{inventoryList.priceColumnName}
+ </SPAN>
+ </SPAN>
+ </TH>
+ <TH CLASS="list-header">
+ <SPAN>
+ <SPAN CLASS="headerText">
+ #{inventoryList.mileageColumnName}
+ </SPAN>
+ </SPAN>
+ </TH>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR CLASS="list-row1">
+ <TD CLASS="column">
+ <SPAN CLASS="vpe-text">
+ #{category.make}
+ </SPAN>
+ </TD>
+ <TD CLASS="column">
+ <SPAN CLASS="vpe-text">
+ #{category.model}
+ </SPAN>
+ </TD>
+ <TD CLASS="column">
+ <SPAN CLASS="vpe-text">
+ #{category.price}
+ </SPAN>
+ </TD>
+ <TD CLASS="column">
+ <SPAN CLASS="vpe-text">
+ #{category.mileage}
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ <COLGROUP>
+ <COL STYLE="-moz-user-modify: read-write;" />
- <COL STYLE="-moz-user-modify: read-write;" />
+ <COL STYLE="-moz-user-modify: read-write;" />
- <COL STYLE="-moz-user-modify: read-write;" />
+ <COL STYLE="-moz-user-modify: read-write;" />
- </COLGROUP>
- </TABLE>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </DIV>
- </DIV>
+ <COL STYLE="-moz-user-modify: read-write;" />
+
+ </COLGROUP>
+ </TABLE>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
</DIV>
</DIV>
-
+ </DIV>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -14,34 +14,23 @@
<h:form>
<rich:dataGrid value="#{bean.dtList}" var="data" columns="2"
elements="4" id="dataGrid">
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="#{data.number}"></h:outputText>
- </f:facet>
- <h:outputText value="#{data.field1}" />
- </rich:panel>
+ <h:outputText value="#{data.field1}" />
</rich:dataGrid>
<rich:dataGrid value="#{bean.dtList}" var="data" id="dataGrid2">
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
<h:outputText value="#{data.field1}" />
</rich:dataGrid>
- <rich:panel id="dataGrid3">
- <f:facet name="header">
- <h:outputText value="Data Grid and Data Scroller" />
- </f:facet>
+
<rich:dataGrid value="#{dataTableScrollerBean.allCars}" var="car"
columns="3" elements="9" width="600px" styleClass="btn"
align="center" bgcolor="color:red" border="15" captionClass="btn"
- headerClass="evenRow" footerClass="oddRow">
+ headerClass="evenRow" footerClass="oddRow"
+ id="dataGrid3">
<f:facet name="header">
<h:outputText value="Header of Data Grid" />
</f:facet>
- <rich:panel bodyClass="pbody"
- style=" width : 270px; height : 180px;">
- <f:facet name="header">
- <h:outputText value="#{car.make} #{car.model}"></h:outputText>
- </f:facet>
+
<h:panelGrid columns="2" rowClasses="evenRow, oddRow">
<h:outputText value="Price:" styleClass="label"></h:outputText>
<h:outputText value="#{car.price}" />
@@ -52,13 +41,13 @@
<h:outputText value="Stock:" styleClass="label"></h:outputText>
<h:outputText value="#{car.stock}" />
</h:panelGrid>
- </rich:panel>
+
<f:facet name="footer">
<rich:datascroller
style="text-align:center; color:Orchid;font-style:italic;border-style:dotted;background-color:DarkViolet;border-color:Cornsilk;text-decoration:underline;font-family:Bodoni MT Black;border-font-weight:bolder; width : 824px; height:45"></rich:datascroller>
</f:facet>
</rich:dataGrid>
- </rich:panel>
+
</h:form>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataGrid.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -1,81 +1,39 @@
<tests>
<test id="dataGrid">
-
<TABLE VALUE="#{bean.dtList}" VAR="data" COLUMNS="2" ELEMENTS="4"
- ID="dataGrid" CLASS="dr-table rich-table">
+ CLASS="dr-table rich-table">
<COLGROUP SPAN="2">
</COLGROUP>
<TBODY>
- <TR CLASS="dr-table-row rich-table-row">
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN>
- #{data.number}
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN>
- #{data.field1}
- </SPAN>
- </DIV>
- </DIV>
+ <TR CLASS="dr-table-row rich-table-row ">
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+ </SPAN>
</TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN>
- #{data.number}
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN>
- #{data.field1}
- </SPAN>
- </DIV>
- </DIV>
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+ </SPAN>
</TD>
</TR>
- <TR CLASS="dr-table-row rich-table-row">
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN>
- #{data.number}
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN>
- #{data.field1}
- </SPAN>
- </DIV>
- </DIV>
+ <TR CLASS="dr-table-row rich-table-row ">
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+ </SPAN>
</TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN>
- #{data.number}
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN>
- #{data.field1}
- </SPAN>
- </DIV>
- </DIV>
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <SPAN CLASS="vpe-text">
+ #{data.field1}
+ </SPAN>
</TD>
</TR>
</TBODY>
</TABLE>
</test>
- <test id="dataGrid2">
-
+ <test id="dataGrid2">
<TABLE VALUE="#{bean.dtList}" VAR="data" ID="dataGrid2"
CLASS="dr-table rich-table">
<COLGROUP SPAN="1">
@@ -114,40 +72,32 @@
</TBODY>
</TABLE>
</test>
+
<test id="dataGrid3">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Data Grid and Data Scroller
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <TABLE WIDTH="600px" BORDER="15" BGCOLOR="color:red" ALIGN="center"
- VALUE="#{dataTableScrollerBean.allCars}" VAR="car" COLUMNS="3"
- ELEMENTS="9" STYLECLASS="btn" CAPTIONCLASS="btn" HEADERCLASS="evenRow"
- FOOTERCLASS="oddRow" CLASS="dr-table rich-table btn">
- <COLGROUP SPAN="3">
- </COLGROUP>
- <THEAD>
- <TR CLASS="dr-table-header rich-table-header evenRow"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <TD CLASS="dr-table-headercell rich-table-headercell evenRow"
- COLSPAN="100" SCOPE="colgroup">
- <SPAN CLASS="vpe-text">
- Header of Data Grid
- </SPAN>
- </TD>
- </TR>
- </THEAD>
- <TFOOT>
- <TR CLASS="dr-table-footer rich-table-footer oddRow"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <TD CLASS="dr-table-footercell rich-table-footercell oddRow"
- COLSPAN="100" SCOPE="colgroup">
- <DIV ALIGN="center" CLASS="rich-datascr"
- STYLE="border-style: dotted; border-color: Cornsilk; text-align: center; color: Orchid; font-style: italic; background-color: DarkViolet; text-decoration: underline; font-family: Bodoni MT Black; width: 824px;">
- <TABLE CELLSPACING="1" CELLPADDING="0" BORDER="0"
+
+ <TABLE WIDTH="600px" BORDER="15" BGCOLOR="color:red" ALIGN="center"
+ VALUE="#{dataTableScrollerBean.allCars}" VAR="car" COLUMNS="3"
+ ELEMENTS="9" STYLECLASS="btn" CAPTIONCLASS="btn" HEADERCLASS="evenRow"
+ FOOTERCLASS="oddRow" ID="dataGrid3" CLASS="dr-table rich-table btn">
+ <COLGROUP SPAN="3">
+ </COLGROUP>
+ <THEAD>
+ <TR CLASS="dr-table-header rich-table-header evenRow " STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ <TD CLASS="dr-table-headercell rich-table-headercell evenRow "
+ COLSPAN="100" SCOPE="colgroup">
+ <SPAN CLASS="vpe-text">
+ Header of Data Grid
+ </SPAN>
+ </TD>
+ </TR>
+ </THEAD>
+ <TFOOT>
+ <TR CLASS="dr-table-footer rich-table-footer oddRow " STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ <TD CLASS="dr-table-footercell rich-table-footercell oddRow "
+ COLSPAN="100" SCOPE="colgroup">
+ <DIV ALIGN="center" CLASS="rich-datascr"
+ STYLE="text-align: center; color: Orchid; font-style: italic; border-style: dotted; background-color: DarkViolet; border-color: Cornsilk; text-decoration: underline; font-family: Bodoni MT Black; width: 824px;">
+ <TABLE CELLSPACING="1" CELLPADDING="0" BORDER="0"
CLASS="rich-dtascroller-table">
<TBODY>
<TR>
@@ -200,596 +150,504 @@
</TR>
</TBODY>
</TABLE>
- </DIV>
- </TD>
- </TR>
- </TFOOT>
- <TBODY>
- <TR CLASS="dr-table-row rich-table-row">
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </DIV>
+ </TD>
+ </TR>
+ </TFOOT>
+ <TBODY>
+ <TR CLASS="dr-table-row rich-table-row ">
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.price}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.mileage}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.vin}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- </TR>
- <TR CLASS="dr-table-row rich-table-row">
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.stock}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.price}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.mileage}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- </TR>
- <TR CLASS="dr-table-row rich-table-row">
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.vin}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.stock}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 270px; height: 180px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
<SPAN CLASS="vpe-text">
- #{car.make} #{car.model}
+ #{car.price}
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body pbody">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- Price:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.price}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Mileage:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.mileage}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRow">
- <TD>
- <SPAN CLASS="label">
- VIN:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.vin}
- </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRow">
- <TD>
- <SPAN CLASS="label">
- Stock:
- </SPAN>
- </TD>
- <TD>
- <SPAN CLASS="vpe-text">
- #{car.stock}
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.mileage}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.vin}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-row rich-table-row ">
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.price}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.mileage}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.vin}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.price}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.mileage}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.vin}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.price}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.mileage}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.vin}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-row rich-table-row ">
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.price}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.mileage}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.vin}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.price}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.mileage}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.vin}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell ">
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ Price:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.price}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Mileage:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.mileage}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="evenRow">
+ <TD>
+ <SPAN CLASS="label">
+ VIN:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.vin}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRow">
+ <TD>
+ <SPAN CLASS="label">
+ Stock:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{car.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -12,7 +12,8 @@
<body>
<h1>dataList</h1>
-<rich:dataList var="data" value="#{bean.dtList}" rows="4" id="dataList">
+<rich:dataList var="data" value="#{bean.dtList}" rows="4"
+ id="dataList">
<h:outputText value="field1:"></h:outputText>
<h:outputText value="#{data.field1} " />
<h:outputText value="field2:"></h:outputText>
@@ -22,11 +23,8 @@
<h:outputText value="number:"></h:outputText>
<h:outputText value="#{data.number}" />
</rich:dataList>
-<rich:panel id="dataList2">
- <f:facet name="header">
- <h:outputText value="Data List" />
- </f:facet>
- <rich:dataList id="list" var="book" value="#{bookList.bookList}"
+
+<rich:dataList id="list" var="book" value="#{bookList.bookList}"
rows="3" rowClasses="evenRow, oddRow" title="Book Store"
styleClass="btn">
<h:outputText value="#{book.name}" />
@@ -38,6 +36,5 @@
<h:outputText value="#{book.numOfCopies} " />
<br />
</rich:dataList>
-</rich:panel>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataList.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -14,16 +14,8 @@
</LI>
</UL>
</test>
- <test id="dataList2">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Data List
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <UL ID="list" VAR="book" VALUE="#{bookList.bookList}" ROWS="3"
+ <test id="list">
+ <UL VAR="book" VALUE="#{bookList.bookList}" ROWS="3"
ROWCLASSES="evenRow, oddRow" STYLECLASS="btn" CLASS="dr-list rich-datalist btn">
<LI CLASS="dr-list-item rich-list-item evenRow">
<SPAN CLASS="vpe-text">
@@ -49,7 +41,5 @@
</LI>
</UL>
- </DIV>
- </DIV>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -10,65 +10,17 @@
<link href="/WebContent/pages/components/main.css" rel="stylesheet" type="text/css"/>
</head>
<body>
-<rich:panel style="width : 780px; height : 702px;" id="dataTable">
- <f:facet name="header">
- <h:outputText value="Data Table & Spacer & DataScroller" />
- </f:facet>
- <rich:datascroller for="auction" maxPages="3" align="right"
- boundaryControls="hide" styleClass="evenRow"
+ <rich:datascroller id="datascroller"
+ for="auction" maxPages="3" align="right" boundaryControls="hide" styleClass="evenRow"
inactiveStyle="text-align:center;color:red;font-style:italic;border-style:none;background-color:green;text-decoration:overline;font-weight:bolder;"
selectedStyle="text-align:right;color:Navy;font-style:italic;background-color:PaleVioletRed;text-decoration:overline;font-weight:bolder;"
style="text-align:center;color:Orchid;font-style:italic;font-size:small;background-color:Turquoise;text-decoration:line-through;font-weight:bolder;" />
- <rich:spacer height="30" width="700"
- style="background-color:red; width : 748px;" styleClass="btn" />
- <rich:dataTable id="auction" value="#{auctionDataModel}"
- columnClasses="col1,col2,col3,col4" var="item" rows="10" width="100%"
- columnsWidth="50" bgcolor="green" border="10" headerClass="btn"
- footerClass="btn" sortMode="multi" style="color:red" styleClass="btn">
- <f:facet name="header">
- <h:outputText value="Header of the table" />
- </f:facet>
- <f:facet name="footer">
- <h:outputText value="Footer of the table" />
- </f:facet>
- <rich:column sortBy="#{item.description}"
- sortIcon="/pages/images/icons/copy.gif">
- <f:facet name="header">
- <h:outputText value="Description" />
- </f:facet>
- <h:outputText value="#{item.description}" />
- </rich:column>
+
+ <rich:dataTable id="auction">
<rich:column>
- <f:facet name="header">
- <h:outputText value="Highest Bid" />
- </f:facet>
- <h:outputText id="highestBid" value="#{item.highestBid}">
- <f:convertNumber pattern="$#,##0.00" />
- </h:outputText>
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Your Bid" />
- </f:facet>
-
- <rich:message for="bid" />
- <br />
- <h:inputText id="bid" value="#{item.bid}" label="Bid">
- <f:validateDoubleRange minimum="0" maximum="1000000" />
- </h:inputText>
- <a4j:commandLink id="bid_link" actionListener="#{item.placeBid}"
- value="Place a bid!" reRender="bid,amount,highestBid" />
-
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Amount" />
- </f:facet>
- <h:outputText id="amount" value="#{item.amount}">
- <f:convertNumber pattern="$#,##0.00" />
- </h:outputText>
- </rich:column>
+ Col1
+ </rich:column>
</rich:dataTable>
-</rich:panel>
+
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -1,14 +1,5 @@
<tests>
- <test id="dataTable">
-
- <DIV CLASS="dr-pnl rich-panel" STYLE="width: 780px; height: 702px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Data Table & Spacer & DataScroller
-</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
+ <test id="datascroller">
<DIV ALIGN="right" CLASS="rich-datascr evenRow"
STYLE="text-align: center; color: Orchid; font-style: italic; font-size: small; background-color: Turquoise; text-decoration: line-through; font-weight: bolder;">
<TABLE CELLSPACING="1" CELLPADDING="0" BORDER="0"
@@ -39,114 +30,5 @@
</TBODY>
</TABLE>
</DIV>
- <IMG WIDTH="700" HEIGHT="30" SRC="/.*resources/spacer/spacer.gif/"
- STYLE="background-color: red; width: 748px;" CLASS="rich-spacer btn" />
-
- <TABLE WIDTH="100%" BORDER="10" BGCOLOR="green" ID="auction"
- VALUE="#{auctionDataModel}" COLUMNCLASSES="col1,col2,col3,col4"
- VAR="item" ROWS="10" COLUMNSWIDTH="50" HEADERCLASS="btn"
- FOOTERCLASS="btn" SORTMODE="multi" STYLE="color: red;" STYLECLASS="btn"
- CLASS="dr-table rich-table btn">
- <COLGROUP SPAN="4">
- <COL WIDTH="50" />
-
- </COLGROUP>
- <THEAD>
- <TR CLASS="dr-table-header rich-table-header btn"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <TD CLASS="dr-table-headercell rich-table-headercell btn"
- COLSPAN="100" SCOPE="colgroup">
- <SPAN CLASS="vpe-text">
- Header of the table
-</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-subheader rich-table-subheader btn">
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell btn"
- SCOPE="col">
- <IMG SRC="/.*ve/unresolved_image.gif/" STYLE="vertical-align: middle;" />
- <SPAN>
- <SPAN CLASS="vpe-text">
- Description
-</SPAN>
- </SPAN>
-
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell btn"
- SCOPE="col">
- <SPAN>
- <SPAN CLASS="vpe-text">
- Highest Bid
-</SPAN>
- </SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell btn"
- SCOPE="col">
- <SPAN>
- <SPAN CLASS="vpe-text">
- Your Bid
-</SPAN>
- </SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell btn"
- SCOPE="col">
- <SPAN>
- <SPAN CLASS="vpe-text">
- Amount
-</SPAN>
- </SPAN>
- </TD>
- </TR>
- </THEAD>
- <TFOOT>
- <TR CLASS="dr-table-footer rich-table-footer btn"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <TD CLASS="dr-table-footercell rich-table-footercell btn"
- COLSPAN="100" SCOPE="colgroup">
- <SPAN CLASS="vpe-text">
- Footer of the table
-</SPAN>
- </TD>
- </TR>
- </TFOOT>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD SORTBY="#{item.description}" SORTICON="/pages/images/icons/copy.gif"
- CLASS="dr-table-cell rich-table-cell col1">
- <SPAN CLASS="vpe-text">
- #{item.description}
-</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell col2">
- <SPAN>
- #{item.highestBid}
-</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell col3">
- <SPAN>
- Validation message
- <BR VPE:PSEUDO-ELEMENT="yes"/>
-
- </SPAN>
- <BR STYLE="-moz-user-modify: read-write;" />
-
- <SPAN CLASS="vpe-text">
- <SPAN CLASS="vpe-text">
- </SPAN>
- <INPUT VALUE="#{item.bid}" />
-
- </SPAN>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Place a bid!</SPAN>
- </A>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell col4">
- <SPAN>
- #{item.amount}
-</SPAN>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </DIV>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panel.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panel.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panel.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -1,13 +1,12 @@
<tests>
<test id="panel">
- <DIV CLASS="dr-pnl rich-panel ">
- <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header "
- STYLE="display: none;">
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body ">
+ <DIV CLASS="dr-pnl rich-panel">
+ <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header" >
<SPAN CLASS="vpe-text">
Panel Header
</SPAN>
+ </DIV>
+ <DIV CLASS="dr-pnl-b rich-panel-body">
<SPAN CLASS="vpe-text">
Panel Content
</SPAN>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -12,7 +12,8 @@
</head>
<body>
<f:view>
- <rich:toolBar id="toolBar" itemSeparator="line">
+<h1>************ id="toolBar1" ************</h1>
+ <rich:toolBar id="toolBar1" itemSeparator="line">
<rich:toolBarGroup>
<h:outputLabel value="Edit" for="edit" />
</rich:toolBarGroup>
@@ -27,12 +28,11 @@
<h:commandButton styleClass="barsearchbutton" value="Search" />
</rich:toolBarGroup>
</rich:toolBar>
- <rich:panel id="toolBar2">
- <f:facet name="header">
- <h:outputText value="Tool Bar & Tool Bar Group" />
- </f:facet>
- <rich:toolBar contentClass="btn" height="26" itemSeparator="line"
- separatorClass="btn" styleClass="btn">
+
+ <h1>************ id="toolBar2" ************</h1>
+ <rich:toolBar id="toolBar2"
+ contentClass="btn" height="26" itemSeparator="line"
+ separatorClass="btn" styleClass="btn" id="toolBar2">
<rich:toolBarGroup
style="font-style:italic;background-color:Cornsilk;text-decoration:overline;font-family:Arial Narrow;font-weight:bolder;"
width="500">
@@ -51,10 +51,12 @@
<h:graphicImage value="images/icons/filter.gif" styleClass="pic" />
</rich:toolBarGroup>
</rich:toolBar>
+
+ <h1>************ id="toolBar3" ************</h1>
<h:form>
- <rich:toolBar height="34"
- contentStyle="color:PaleVioletRed;font-size:medium;font-style:italic;background-color:FloralWhite;font-family:Arial TUR;font-weight:bolder;"
- itemSeparator="line" styleClass="evenRow" separatorClass="btn">
+ <rich:toolBar id="toolBar3"
+ height="34" itemSeparator="line" styleClass="evenRow" separatorClass="btn"
+ contentStyle="color:PaleVioletRed;font-size:medium;font-style:italic;background-color:FloralWhite;font-family:Arial TUR;font-weight:bolder;">
<rich:toolBarGroup itemSeparator="grid">
<h:graphicImage id="edit" value="images/icons/edit.gif" />
<h:outputLabel value="Edit" for="edit" />
@@ -74,74 +76,9 @@
</rich:toolBarGroup>
</rich:toolBar>
</h:form>
- <h:form>
- <h:panelGrid columns="3" width="100%" cellpadding="0" cellspacing="0"
- style="margin-bottom : 4px">
- <rich:panel bodyClass="rich-laguna-panel-no-header">
- <h:panelGrid columns="8">
- <h:outputText value="Group Separator:" />
- <a4j:commandLink value="Line" reRender="bar">
- <a4j:actionparam name="gs" value="line"
- assignTo="#{tbBean.groupSeparator}" />
- </a4j:commandLink>
-
- <a4j:commandLink value="Grid" reRender="bar">
- <a4j:actionparam name="gs" value="grid"
- assignTo="#{tbBean.groupSeparator}" />
- </a4j:commandLink>
-
- <a4j:commandLink value="Disc" reRender="bar">
- <a4j:actionparam name="gs" value="disc"
- assignTo="#{tbBean.groupSeparator}" />
- </a4j:commandLink>
-
- <a4j:commandLink value="Square" reRender="bar">
- <a4j:actionparam name="gs" value="square"
- assignTo="#{tbBean.groupSeparator}" />
- </a4j:commandLink>
-
- <a4j:commandLink value="None" reRender="bar">
- <a4j:actionparam name="gs" value="none"
- assignTo="#{tbBean.groupSeparator}" />
- </a4j:commandLink>
- </h:panelGrid>
- </rich:panel>
- <h:panelGroup style="padding-left : 4px">
- <br />
- </h:panelGroup>
- <rich:panel bodyClass="rich-laguna-panel-no-header">
- <h:panelGrid columns="8">
- <h:outputText value="Group Item Separator:" />
- <a4j:commandLink value="Line" reRender="bar">
- <a4j:actionparam name="gs" value="line"
- assignTo="#{tbBean.groupItemSeparator}" />
- </a4j:commandLink>
-
- <a4j:commandLink value="Grid" reRender="bar">
- <a4j:actionparam name="gs" value="grid"
- assignTo="#{tbBean.groupItemSeparator}" />
- </a4j:commandLink>
-
- <a4j:commandLink value="Disc" reRender="bar">
- <a4j:actionparam name="gs" value="disc"
- assignTo="#{tbBean.groupItemSeparator}" />
- </a4j:commandLink>
-
- <a4j:commandLink value="Square" reRender="bar">
- <a4j:actionparam name="gs" value="square"
- assignTo="#{tbBean.groupItemSeparator}" />
- </a4j:commandLink>
-
- <a4j:commandLink value="None" reRender="bar">
- <a4j:actionparam name="gs" value="none"
- assignTo="#{tbBean.groupItemSeparator}" />
- </a4j:commandLink>
- </h:panelGrid>
- </rich:panel>
- </h:panelGrid>
- </h:form>
-
- <rich:toolBar contentClass="btn"
+
+ <h1>************ id="toolBar4" ************</h1>
+ <rich:toolBar id="toolBar4" contentClass="btn"
contentStyle="color:PaleVioletRed;font-size:medium;font-style:italic;background-color:FloralWhite;font-family:Arial TUR;font-weight:bolder;"
id="bar" height="30" itemSeparator="#{tbBean.groupSeparator}"
style="color:Cornsilk;font-style:italic;background-color:Orchid;text-decoration:underline;font-family:Arial Narrow,Bodoni MT;font-weight:bold;">
@@ -160,7 +97,7 @@
<h:outputText value="Group3.2"></h:outputText>
</rich:toolBarGroup>
</rich:toolBar>
- </rich:panel>
+
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml 2012-08-03 11:57:14 UTC (rev 42849)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml 2012-08-03 12:20:10 UTC (rev 42850)
@@ -1,6 +1,6 @@
<tests>
- <test id="toolBar">
- <TABLE WIDTH="100%" CLASS="dr-toolbar-ext rich-toolbar"
+ <test id="toolBar1">
+ <TABLE WIDTH="100%" CLASS="dr-toolbar-ext rich-toolbar"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
<TBODY>
<TR VALIGN="middle">
@@ -69,15 +69,7 @@
</TABLE>
</test>
<test id="toolBar2">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Tool Bar & Tool Bar Group
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <TABLE WIDTH="100%" HEIGHT="26" CLASS="dr-toolbar-ext rich-toolbar btn"
+ <TABLE WIDTH="100%" HEIGHT="26" CLASS="dr-toolbar-ext rich-toolbar btn"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
<TBODY>
<TR VALIGN="middle">
@@ -169,8 +161,9 @@
</TR>
</TBODY>
</TABLE>
- <FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
- <TABLE WIDTH="100%" HEIGHT="34"
+ </test>
+ <test id="toolBar3">
+ <TABLE WIDTH="100%" HEIGHT="34"
CLASS="dr-toolbar-ext rich-toolbar evenRow"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
<TBODY>
@@ -285,107 +278,9 @@
</TR>
</TBODY>
</TABLE>
- </FORM>
- <FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
- <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BORDER="0"
- STYLE="margin-bottom: 4px; -moz-user-modify: read-write;">
- <TBODY>
- <TR>
- <TD>
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-b rich-panel-body rich-laguna-panel-no-header">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR>
- <TD>
- <SPAN CLASS="vpe-text">
- Group Separator:
- </SPAN>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Line</SPAN>
- </A>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Grid</SPAN>
- </A>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Disc</SPAN>
- </A>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Square</SPAN>
- </A>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">None</SPAN>
- </A>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- <TD>
- <SPAN STYLE="padding-left: 4px; -moz-user-modify: read-write;">
- <BR STYLE="-moz-user-modify: read-write;" />
-
- </SPAN>
- </TD>
- <TD>
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-b rich-panel-body rich-laguna-panel-no-header">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR>
- <TD>
- <SPAN CLASS="vpe-text">
- Group Item Separator:
- </SPAN>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Line</SPAN>
- </A>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Grid</SPAN>
- </A>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Disc</SPAN>
- </A>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">Square</SPAN>
- </A>
- </TD>
- <TD>
- <A STYLE="-moz-user-modify: read-write;" CLASS="">
- <SPAN CLASS="vpe-text">None</SPAN>
- </A>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </FORM>
- <TABLE WIDTH="100%" HEIGHT="30" CLASS="dr-toolbar-ext rich-toolbar"
+ </test>
+ <test id="toolBar4">
+ <TABLE WIDTH="100%" HEIGHT="30" CLASS="dr-toolbar-ext rich-toolbar"
STYLE="/background-image: url\(.*resources/common/background.gif\); color: Cornsilk; font-style: italic; background-color: Orchid; text-decoration: underline; font-family: Arial Narrow,Bodoni MT; font-weight: bold;/">
<TBODY>
<TR VALIGN="middle">
@@ -468,7 +363,5 @@
</TR>
</TBODY>
</TABLE>
- </DIV>
- </DIV>
</test>
</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/resources/TestProject/WebContent/pages/facets.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/resources/TestProject/WebContent/pages/facets.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/resources/TestProject/WebContent/pages/facets.jsp 2012-08-03 12:20:10 UTC (rev 42850)
@@ -0,0 +1,1308 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+
+<html>
+<head>
+<title></title>
+<link href="/css/main.css" rel="stylesheet" type="text/css" />
+<style type="text/css">
+h1 {
+ background-color: white;
+}
+
+.label {
+ font-weight: bold;
+}
+
+.whiteLine {
+ background-color: white;
+ border: 1px solid black;
+}
+
+.panel {
+ background-color: SteelBlue;
+ border: 1px solid black;
+ vertical-align: top;
+}
+
+.goldPanel {
+ background-color: gold;
+ border: 1px solid black;
+}
+
+.greenPanel {
+ background-color: forestGreen;
+ border: 1px solid black;
+}
+
+.indianRedPanel {
+ background-color: IndianRed;
+ border: 1px solid black;
+}
+
+.thistlePanel {
+ background-color: thistle;
+ border: 1px solid black;
+}
+
+.orangePanel {
+ background-color: orange;
+ border: 1px solid black;
+}
+
+.darkBluePanel {
+ background-color: DarkSlateBlue;
+ border: 1px solid black;
+}
+
+.darkVioletPanel {
+ background-color: DarkViolet;
+ border: 1px solid black;
+}
+</style>
+</head>
+<body>
+<f:view>
+ <h1>1) h:panelGrid</h1>
+
+ <h:panelGrid columns="2" styleClass="panel">
+ <h:panelGrid columns="2" border="5" width="150" rules="all"
+ frame="above" cellpadding="4" cellspacing="6" bgcolor="silver"
+ style="COLOR: #ff0080; BACKGROUND-COLOR: #ffff00; TEXT-DECORATION: underline; FONT-STYLE: italic; FONT-WEIGHT: bold; FONT-SIZE: medium; FONT-FAMILY: 'Arial Black';"
+ styleClass="goldPanel" captionClass="myStyle0" columnClasses=""
+ rowClasses="" headerClass="" footerClass="">
+ <f:facet name="footer">
+ <h:commandButton value="CB">CB</h:commandButton>
+ <p>part 111</p>
+ <p>part 222</p>
+ <input type="button" value="Input Button">Input Button</input>
+ Just Text
+ </f:facet>
+ <h:outputText value="begin" />
+
+ </h:panelGrid>
+ <h:panelGrid columns="2" border="5" width="150" rules="all"
+ frame="above" cellpadding="4" cellspacing="6" bgcolor="silver"
+ style="COLOR: #ff0080; BACKGROUND-COLOR: green; TEXT-DECORATION: underline; FONT-STYLE: italic; FONT-WEIGHT: bold; FONT-SIZE: small; FONT-FAMILY: 'Arial Black';"
+ styleClass="greenPanel" captionClass="myStyle0" columnClasses=""
+ rowClasses="" headerClass="" footerClass="">
+ <f:facet name="footer">
+ <p>part 111</p>
+ <p>part 222</p>
+ <input type="button" value="Input Button">Input Button</input>
+ Just Text
+ </f:facet>
+ <h:outputText value="begin" />
+ </h:panelGrid>
+ </h:panelGrid>
+
+ <h1>2) h:dataTable</h1>
+
+<h:dataTable border="1">
+ <f:facet name="header">
+<h:outputText value="AAAAAAA" />
+HHHHHHH1111Text111111
+<h:outputText value="BBBBBBBBBBBBBBB" />
+HHHHHHH222Text2222222
+</f:facet>
+</h:dataTable>
+
+ <h:panelGrid columns="4" border="1" styleClass="panel">
+ <h:panelGroup>
+ <h:outputText styleClass="whiteLine"> Correct table </h:outputText>
+ <h:dataTable value="#{user.list}" var="item" styleClass="goldPanel">
+ <f:facet name="header">
+ <h:outputText>Header</h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Footer</h:outputText>
+ </f:facet>
+ <f:facet name="caption">
+ <h:outputText>Caption</h:outputText>
+ </f:facet>
+ <h:column>
+ <h:outputText>Column 1</h:outputText>
+ </h:column>
+ </h:dataTable>
+ </h:panelGroup>
+
+ <h:panelGroup>
+ <h:outputText styleClass="whiteLine">
+ Plain HTML in facets with JSF tags
+ <p></p>
+ And plus the second jsf components in facets
+ </h:outputText>
+ <h:dataTable value="#{user.list}" var="item" border="1"
+ styleClass="greenPanel">
+ <f:facet name="header">
+ <h:outputText>Header</h:outputText>
+ <h:outputText>Header2</h:outputText>
+ <p>Part 111</p>
+ Some HTML text
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Footer</h:outputText>
+ <h:outputText>Footer2</h:outputText>
+ <p>Part 111</p>
+ Some HTML text
+ </f:facet>
+ <f:facet name="caption">
+ <h:outputText>Caption</h:outputText>
+ <p>Part 111</p>
+ Some HTML text
+ </f:facet>
+ </h:dataTable>
+ </h:panelGroup>
+
+ <h:panelGroup>
+ <h:outputText styleClass="whiteLine"> Only plain HTML in Caption </h:outputText>
+ <h:dataTable value="#{user.list}" var="item" border="1"
+ styleClass="indianRedPanel">
+ <f:facet name="header">
+ <h:outputText>Header1</h:outputText>
+ <h:outputText>Header2</h:outputText>
+ <h:outputText>Header3</h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Footer1</h:outputText>
+ <h:outputText>Footer2</h:outputText>
+ <h:outputText>Footer3</h:outputText>
+ </f:facet>
+ <f:facet name="caption">
+ <p>Part 111</p>
+ Some HTML text
+ </f:facet>
+ <h:column>
+ <h:outputText>Column 1</h:outputText>
+ </h:column>
+ <h:column>
+ <h:outputText>Column 2</h:outputText>
+ </h:column>
+ <h:column>
+ <h:outputText>Column 3</h:outputText>
+ </h:column>
+ </h:dataTable>
+ </h:panelGroup>
+
+ <h:panelGroup>
+ <h:outputText styleClass="whiteLine"> Only plain HTML in facets and columns </h:outputText>
+ <h:dataTable value="#{user.list}" var="item"
+ styleClass="thistlePanel">
+ <f:facet name="header">
+ <p>Part 111</p>
+ Some HTML text
+ </f:facet>
+ <f:facet name="footer">
+ <p>Part 111</p>
+ Some HTML text
+ </f:facet>
+ <f:facet name="caption">
+ <p>Part 111</p>
+ Some HTML text
+ </f:facet>
+ <h:column>
+ <h:outputText>Column 1</h:outputText>
+ </h:column>
+ <h:column>
+ <h:outputText>Column 2</h:outputText>
+ </h:column>
+ <h:column>
+ <h:outputText>Column 3</h:outputText>
+ </h:column>
+ </h:dataTable>
+ </h:panelGroup>
+
+ </h:panelGrid>
+
+ <h1>3) h:column</h1>
+ <h:outputText> Correct table </h:outputText>
+ <h:dataTable value="#{user.list}" var="item" styleClass="panel"
+ columnClasses="goldPanel">
+ <f:facet name="header">
+ <h:outputText>Table Header</h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Table Footer</h:outputText>
+ </f:facet>
+ <f:facet name="caption">
+ <h:outputText styleClass="whiteLine">Table Caption</h:outputText>
+ </f:facet>
+ <h:column footerClass="greenPanel" headerClass="greenPanel">
+ <f:facet name="header">
+ <h:outputText>Col 1 header1</h:outputText>
+ <h:outputText>Col 1 header2</h:outputText>
+ <h:outputText>Col 1 header3</h:outputText>
+ <span>COL1HEAD</span> C1HText
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Col 1 footer1</h:outputText>
+ <h:outputText>Col 1 footer2</h:outputText>
+ <h:outputText>Col 1 footer3</h:outputText>
+ <span>COL1FOOT</span> C1FText
+ </f:facet>
+ <h:outputText>[Column 1] </h:outputText>
+ <h:outputText value="#{item}" />
+ </h:column>
+ <h:column footerClass="indianRedPanel" headerClass="indianRedPanel">
+ <f:facet name="header">
+ <span>COL2HEAD</span> C2FHead
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL2FOOT</span> C2FText
+ </f:facet>
+ <h:outputText>[Column 2] </h:outputText>
+ <h:outputText value="#{item}" />
+ </h:column>
+ <h:column footerClass="thistlePanel" headerClass="thistlePanel">
+ <f:facet name="header">
+ <f:facet name="header">
+ <span>COL3HEAD</span> C3FHead
+ </f:facet>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Col 3 footer</h:outputText>
+ </f:facet>
+ <h:outputText>[Column 3] </h:outputText>
+ <h:outputText value="#{item}" />
+ </h:column>
+ </h:dataTable>
+
+ <h1>4) rich:panel</h1>
+ <rich:panel>
+ <f:facet name="header">
+ PHead111
+ <h:outputText>PanelHeader1</h:outputText>
+ <h:outputText>PanelHeader2</h:outputText>
+ <h:outputText>PanelHeader3</h:outputText>
+ <span>P1Head</span> PHead
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Col 1 footer3</h:outputText>
+ <span>COL1FOOT</span> C1FText
+ FooterFacet
+ </f:facet>
+ Panel Content
+ </rich:panel>
+
+ <h1>5) rich:simpleTogglePanel</h1>
+ <rich:simpleTogglePanel id="simpleTogglePanel" switchType="client"
+ label="STP LABEL">
+ <f:facet name="header">
+ STPHead111
+ <h:outputText>STPHeader1</h:outputText>
+ <h:outputText>STPHeader2</h:outputText>
+ <h:outputText>STPHeader3</h:outputText>
+ <span>STP1Head</span> STPHead
+ </f:facet>
+ <f:facet name="footer">
+ STPFoot111
+ <h:outputText>STPFooter1</h:outputText>
+ <h:outputText>STPFooter2</h:outputText>
+ <h:outputText>STPFooter3</h:outputText>
+ <span>STP1Foot</span> STPFoot
+ </f:facet>
+ [rich:simpleTogglePanel CONTENT]
+ </rich:simpleTogglePanel>
+
+ <h1>6) rich:togglePanel</h1>
+ <rich:togglePanel switchType="client" stateOrder="closed,tip1,tip2">
+ <f:facet name="closed">
+ <h:outputText value="Closed" />
+ <rich:toggleControl>
+ <rich:toggleControl switchToState="tip1" value="#{user.next}" />
+ </rich:toggleControl>
+ </f:facet>
+ <f:facet name="tip1">
+ <h:outputText value="TIP 1" />
+ <h:panelGrid columns="2">
+ <rich:toggleControl switchToState="closed" value="#{user.close}" />
+ <rich:toggleControl switchToState="tip2" value="#{user.next}" />
+ </h:panelGrid>
+ </f:facet>
+ <f:facet name="tip2">
+ <h:outputText value="TIP 2" />
+ <h:panelGrid columns="2">
+ <rich:toggleControl switchToState="closed" value="#{user.close}" />
+ <rich:toggleControl switchToState="tip1" value="#{user.previous}" />
+ </h:panelGrid>
+ </f:facet>
+ </rich:togglePanel>
+ <rich:togglePanel switchType="client" stateOrder="tip2,tip1,closed">
+ <f:facet name="closed">
+ STPFoot111
+ <h:outputText>STPFooter1</h:outputText>
+ <h:outputText>STPFooter2</h:outputText>
+ <h:outputText>STPFooter3</h:outputText>
+ <span>STP1Foot</span> STPFoot
+ <h:outputText value="CLOSE" />
+ </f:facet>
+ <f:facet name="tip1">
+ <h:panelGroup>
+ <h:outputText value="TIPPPP111" />
+ <rich:toggleControl switchToState="tip2" value="#{user.next}" />
+ <h:outputText value="TIPPPP111" />
+ </h:panelGroup>
+ <h:outputText value="TIPPP222222" />
+ </f:facet>
+ <f:facet name="tip2">
+ <h:outputText value="TIP 2" />
+ </f:facet>
+ </rich:togglePanel>
+
+ <h1>7) tabPanel</h1>
+ <h:panelGrid columns="3">
+
+ <rich:tabPanel switchType="ajax">
+ <rich:tab label="First">
+ Here is tab #1
+ </rich:tab>
+ <rich:tab label="Second" disabled="true">
+ Here is tab #2
+ </rich:tab>
+ <rich:tab label="Third">
+ Here is tab #3
+ </rich:tab>
+ </rich:tabPanel>
+
+ <rich:tabPanel switchType="ajax">
+ <rich:tab label="First">
+ <f:facet name="label">
+ Tab Label 1
+ <h:outputText>Tab Label 111</h:outputText>
+ <h:outputText>Tab Label 222</h:outputText>
+ <h:outputText>Tab Label 333</h:outputText>
+ <span>TabLabelSpan1 </span> TabLabelSpan2
+ </f:facet>
+ Here is tab #1
+ </rich:tab>
+ <rich:tab disabled="true">
+ <f:facet name="label">
+ Tab Label 2
+ <h:outputText>Tab Label 2-111</h:outputText>
+ <h:outputText>Tab Label 2-222</h:outputText>
+ <h:outputText>Tab Label 2-333</h:outputText>
+ <span>TabLabelSpan2-1 </span> TabLabelSpan2-2
+ </f:facet>
+ Here is tab #2
+ </rich:tab>
+ <rich:tab label="Third">
+ Here is tab #3
+ </rich:tab>
+ </rich:tabPanel>
+ </h:panelGrid>
+
+ <br></br>
+ <h1>8) rich:dataTable</h1>
+ <br></br>
+
+ <h:panelGrid styleClass="panel" columns="3">
+
+ <rich:dataTable var="row" value="#{user.list}" rowKeyVar="rowKey"
+ rowClasses="goldPanel panel" columns="2">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <rich:column rowspan="2">
+ <rich:spacer />
+ </rich:column>
+ <rich:column colspan="3">
+ <h:outputText value="FIELDS" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="field1" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="field2" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="field3" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="#{rowKey}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}">
+ </h:outputText>
+ </rich:column>
+ </rich:columnGroup>
+
+ <f:facet name="footer">
+
+ <rich:columnGroup>
+ <rich:column></rich:column>
+ <rich:column>
+ <h:outputText value="footer1" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="footer2" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="footer3" />
+ </rich:column>
+
+ </rich:columnGroup>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <rich:dataTable var="row" value="#{user.list}" rowKeyVar="rowKey"
+ rowClasses="goldPanel panel">
+ <f:facet name="caption">
+ TableCaptionText
+ <h:outputText>Caption 1</h:outputText>
+ <h:outputText>Caption 2</h:outputText>
+ <h:outputText>Caption 3</h:outputText>
+ <span>TableCaption1</span> TableCaption2
+ </f:facet>
+ <f:facet name="header">
+ Table1HText2
+ <h:outputText>Table header1</h:outputText>
+ <h:outputText>Table header2</h:outputText>
+ <h:outputText>Table header3</h:outputText>
+ <span>Table1HEAD</span> Table1HText2
+ </f:facet>
+ <f:facet name="footer">
+ TableC1FText2
+ <h:outputText>Table FOOTER1</h:outputText>
+ <h:outputText>Table FOOTER2</h:outputText>
+ <h:outputText>Table FOOTER3</h:outputText>
+ <span>Table1FOOT</span> Table1FText2
+ </f:facet>
+
+ <rich:column>
+ <h:outputText value="#{rowKey}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{row}">
+ </h:outputText>
+ </rich:column>
+
+ </rich:dataTable>
+ </h:panelGrid>
+
+ <br></br>
+ <h1>9) rich:column</h1>
+
+ <h:panelGrid styleClass="panel" columns="3">
+
+ <rich:dataTable var="row" value="#{user.list}" rowKeyVar="rowKey"
+ rowClasses="greenPanel">
+ <f:facet name="header">
+ Table1HText2
+ <h:outputText>Table header1</h:outputText>
+ <h:outputText>Table header2</h:outputText>
+ <h:outputText>Table header3</h:outputText>
+ <span>Table1HEAD</span> Table1HText2
+ </f:facet>
+ <f:facet name="footer">
+ TableC1FText2
+ <h:outputText>Table FOOTER1</h:outputText>
+ <h:outputText>Table FOOTER2</h:outputText>
+ <h:outputText>Table FOOTER3</h:outputText>
+ <span>Table1FOOT</span> Table1FText2
+ </f:facet>
+
+ <rich:column>
+ <h:outputText value="#{rowKey}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText>Col 1 header1</h:outputText>
+ <h:outputText>Col 1 header2</h:outputText>
+ <h:outputText>Col 1 header3</h:outputText>
+ <span>COL1HEAD</span> C1HText
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Col 1 footer1</h:outputText>
+ <h:outputText>Col 1 footer2</h:outputText>
+ <h:outputText>Col 1 footer3</h:outputText>
+ <span>COL1FOOT</span> C1FText
+ </f:facet>
+ <h:outputText value="[column 1] #{row}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <span>COL2HEAD</span> C2FHead
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL2FOOT</span> C2FText
+ </f:facet>
+ <h:outputText value="[column 2] #{row}">
+ </h:outputText>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <span>COL3HEAD</span> C3Head
+ <h:outputText value="[header 3]" />
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL3FOOT</span> C3Foot
+ <h:outputText value="[footer 3]" />
+ </f:facet>
+ <h:outputText value="[column 3] #{row}">
+ </h:outputText>
+ </rich:column>
+
+ </rich:dataTable>
+ </h:panelGrid>
+
+ <h1>10) rich:subTable</h1>
+ <h:panelGrid columns="3" styleClass="panel">
+ <rich:dataTable value="#{user.users}" var="users" border="1">
+ <rich:column colspan="3" styleClass="orangePanel">
+ <h:outputText value="#{users.name} #{users.lastName}" />
+ </rich:column>
+
+ <rich:subTable value="#{users.list}" var="book1"
+ rowClasses="goldPanel, greenPanel">
+ <rich:column>
+ <h:outputText value="#{book1}" />
+ </rich:column>
+ <rich:column colspan="2" breakBefore="true">
+ <h:outputText value="#{book1}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book1}" />
+ </rich:column>
+ </rich:subTable>
+
+ <rich:subTable value="#{user.list}" var="book2"
+ columnClasses="indianRedPanel, thistlePanel">
+ <rich:column rowspan="2">
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ <rich:column rowspan="2">
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ <rich:column colspan="2" breakBefore="true">
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book2}" />
+ </rich:column>
+ </rich:subTable>
+ </rich:dataTable>
+
+ <rich:dataTable value="#{user.users}" var="users" border="1">
+ <rich:column colspan="3" styleClass="orangePanel">
+ <h:outputText value="#{users.name} #{users.lastName}" />
+ </rich:column>
+
+ <rich:subTable value="#{users.list}" var="book3"
+ rowClasses="goldPanel, greenPanel" headerClass="darkVioletPanel"
+ footerClass="darkBluePanel">
+
+ <f:facet name="caption">
+ TableCaptionText
+ <h:outputText>Caption 1</h:outputText>
+ <h:outputText>Caption 2</h:outputText>
+ <h:outputText>Caption 3</h:outputText>
+ <span>TableCaption1</span> TableCaption2
+ </f:facet>
+ <f:facet name="header">
+ Table1HText2
+ <h:outputText>Table header1</h:outputText>
+ <h:outputText>Table header2</h:outputText>
+ <h:outputText>Table header3</h:outputText>
+ <span>Table1HEAD</span> Table1HText2
+ </f:facet>
+ <f:facet name="footer">
+ TableC1FText2
+ <h:outputText>Table FOOTER1</h:outputText>
+ <h:outputText>Table FOOTER2</h:outputText>
+ <h:outputText>Table FOOTER3</h:outputText>
+ <span>Table1FOOT</span> Table1FText2
+ </f:facet>
+
+ <rich:column>
+ <h:outputText value="#{book3}" />
+ </rich:column>
+ <rich:column colspan="2" breakBefore="true">
+ <h:outputText value="#{book3}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book3}" />
+ </rich:column>
+ </rich:subTable>
+
+ <rich:subTable value="#{user.list}" var="book4"
+ columnClasses="indianRedPanel, thistlePanel"
+ headerClass="darkVioletPanel" footerClass="darkBluePanel">
+
+ <f:facet name="caption">
+ TableCaptionText
+ <h:outputText>Caption 1</h:outputText>
+ <h:outputText>Caption 2</h:outputText>
+ <h:outputText>Caption 3</h:outputText>
+ <span>TableCaption1</span> TableCaption2
+ </f:facet>
+ <f:facet name="header">
+ Table1HText2
+ <h:outputText>Table header1</h:outputText>
+ <h:outputText>Table header2</h:outputText>
+ <h:outputText>Table header3</h:outputText>
+ <span>Table1HEAD</span> Table1HText2
+ </f:facet>
+ <f:facet name="footer">
+ TableC1FText2
+ <h:outputText>Table FOOTER1</h:outputText>
+ <h:outputText>Table FOOTER2</h:outputText>
+ <h:outputText>Table FOOTER3</h:outputText>
+ <span>Table1FOOT</span> Table1FText2
+ </f:facet>
+
+ <rich:column rowspan="2">
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ <rich:column rowspan="2">
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ <rich:column colspan="2" breakBefore="true">
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book4}" />
+ </rich:column>
+ </rich:subTable>
+ </rich:dataTable>
+
+ <rich:dataTable value="#{user.users}" var="users" border="1">
+ <rich:column colspan="4" styleClass="orangePanel">
+ <h:outputText value="#{users.name} #{users.lastName}" />
+ </rich:column>
+
+ <rich:subTable value="#{users.list}" var="book5"
+ rowClasses="goldPanel, greenPanel">
+ <rich:column headerClass="darkVioletPanel"
+ footerClass="darkBluePanel">
+ <f:facet name="header">
+ <h:outputText>Col 111111111 header1</h:outputText>
+ <h:outputText>Col 111111111 header2</h:outputText>
+ <h:outputText>Col 111111111 header3</h:outputText>
+ <span>COL1111111111HEAD</span> C1111111111HText
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Col 1111111111 footer1</h:outputText>
+ <h:outputText>Col 1111111111 footer2</h:outputText>
+ <h:outputText>Col 1111111111 footer3</h:outputText>
+ <span>COL1111111111FOOT</span> C1111111111FText
+ </f:facet>
+ <h:outputText value="#{book5}" />
+ </rich:column>
+ <rich:column colspan="2" breakBefore="true"
+ headerClass="darkVioletPanel" footerClass="darkBluePanel">
+ <f:facet name="header">
+ <span>COL2HEAD</span> C2FHead
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL2FOOT</span> C2FText
+ </f:facet>
+
+ <h:outputText value="#{book5}" />
+ </rich:column>
+ <rich:column headerClass="darkVioletPanel"
+ footerClass="darkBluePanel">
+ <f:facet name="header">
+ <span>COL3HEAD</span> C3Head
+ <h:outputText value="[header 3]" />
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL3FOOT</span> C3Foot
+ <h:outputText value="[footer 3]" />
+ </f:facet>
+ <h:outputText value="#{book5}" />
+ </rich:column>
+ </rich:subTable>
+
+ <rich:subTable value="#{user.list}" var="book6"
+ columnClasses="indianRedPanel, thistlePanel" headerClass="goldPanel"
+ footerClass="thistlePanel">
+ <rich:column rowspan="2" headerClass="darkVioletPanel"
+ footerClass="darkBluePanel">
+ <f:facet name="header">
+ <h:outputText>Col 12222222 header1</h:outputText>
+ <h:outputText>Col 12222222 header2</h:outputText>
+ <h:outputText>Col 12222222 header3</h:outputText>
+ <span>COL12222222HEAD</span> C12222222HText
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText>Col 12222222 footer1</h:outputText>
+ <h:outputText>Col 12222222 footer2</h:outputText>
+ <h:outputText>Col 12222222 footer3</h:outputText>
+ <span>COL12222222FOOT</span> C12222222FText
+ </f:facet>
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <span>COL22222222HEAD</span> C22222222FHead
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL22222222FOOT</span> C22222222FText
+ </f:facet>
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <span>COL32222222HEAD</span> C32222222Head
+ <h:outputText value="[header 3]2222222" />
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL32222222FOOT</span> C32222222Foot
+ <h:outputText value="[footer 3]" />
+ </f:facet>
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ <rich:column rowspan="2">
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ <rich:column breakBefore="true">
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ <rich:column colspan="2" breakBefore="true">
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{book6}" />
+ </rich:column>
+ </rich:subTable>
+ </rich:dataTable>
+ </h:panelGrid>
+
+ <h1>11) rich:extendedDataTable</h1>
+ <h:panelGrid columns="3" styleClass="panel">
+ <rich:extendedDataTable value="#{user.list}" var="item1" width="200px"
+ height="200px">
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText>Header</h:outputText>
+ </f:facet>
+ <h:outputText value="#{item1}" />
+ </rich:column>
+ </rich:extendedDataTable>
+
+ <rich:extendedDataTable value="#{user.list}" var="item" width="500px"
+ height="200px">
+ <rich:column sortable="false">
+ <f:facet name="header">
+ <h:outputText value="Flag" />
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="Footer1" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+ <rich:column sortable="true">
+ <f:facet name="header">
+ <h:outputText value="State Name" />
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="Footer2" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="State Capital" />
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="Footer3" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+ <rich:column sortable="false">
+ <f:facet name="header">
+ <h:outputText value="Time Zone" />
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="Footer4" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+ </rich:extendedDataTable>
+
+ <rich:extendedDataTable value="#{user.list}" var="item" width="600px"
+ height="200px">
+ <rich:column sortable="false">
+ <f:facet name="header">
+ <h:outputText value="F1" />
+ <h:outputText value="F2" />
+ <h:outputText value="F3" />
+ <span>S1</span> T1
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="FF1" />
+ <h:outputText value="FF2" />
+ <h:outputText value="FF3" />
+ <span>SS1</span> TT1
+ </f:facet>
+
+ <h:outputText value="#{item}" />
+ </rich:column>
+ <rich:column sortable="true">
+ <f:facet name="header">
+ <span>COL2HEAD</span> C2FHead
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL2FOOT</span> C2FText
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="State Capital" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+ <rich:column sortable="false" width="300px">
+ <f:facet name="header">
+ <h:outputText value="Time Zone" />
+ <span>COL3HEAD</span> C3Head
+ <h:outputText value="[header 3]" />
+ </f:facet>
+ <f:facet name="footer">
+ <span>COL3FOOT</span> C3Foot
+ <h:outputText value="[footer 3]" />
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:column>
+ </rich:extendedDataTable>
+ </h:panelGrid>
+
+ <h1>12) rich:dataGrid</h1>
+
+ <h:panelGrid columns="2" styleClass="panel">
+ <rich:dataGrid value="#{user.list}" var="item" columns="2"
+ elements="4">
+ <f:facet name="caption">
+ <h:outputText value="Caption #{item}"></h:outputText>
+ </f:facet>
+ <f:facet name="header">
+ <h:outputText value="Header #{item}"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:dataGrid>
+
+ <rich:dataGrid value="#{user.list}" var="item" columns="3"
+ elements="3">
+ <f:facet name="caption">
+ <p>Part 111</p>
+ Some HTML text
+ </f:facet>
+ <f:facet name="header">
+ <span>HEAD</span>
+ <h:outputText value="#{item}"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:dataGrid>
+
+ <rich:dataGrid value="#{user.list}" var="item" columns="2"
+ elements="6">
+ <f:facet name="header">
+ HEAD
+ <h:outputText value="#{item}"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:dataGrid>
+
+ <rich:dataGrid value="#{user.list}" var="item" columns="2"
+ elements="3">
+ <f:facet name="caption">
+ CText1
+ <h:outputText value="C1" />
+ <h:outputText value="C2" />
+ <h:outputText value="C3" />
+ <span>CapS1</span> CapT1
+ </f:facet>
+ <f:facet name="header">
+ W1
+ <h:outputText value="F1" />
+ <h:outputText value="F2" />
+ <h:outputText value="F3" />
+ <span>S1</span> T1
+ </f:facet>
+ <f:facet name="footer">
+ WW1
+ <h:outputText value="FF1" />
+ <h:outputText value="FF2" />
+ <h:outputText value="FF3" />
+ <span>SS1</span> TT1
+ </f:facet>
+ <h:outputText value="#{item}" />
+ </rich:dataGrid>
+ <rich:dataGrid value="#{user.list}" var="item" columns="2"
+ elements="4">
+ <h:outputText value="#{item}" />
+ </rich:dataGrid>
+ </h:panelGrid>
+
+ <h1>13) rich:dataDefinitionList</h1>
+
+ <h:panelGrid columns="3" styleClass="panel">
+
+ <rich:dataDefinitionList var="car" value="#{user.list}" rows="3"
+ first="2" title="Cars" styleClass="greenPanel">
+ <f:facet name="term">
+ <h:outputText value="#{car}"></h:outputText>
+ </f:facet>
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car}" />
+ <br />
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car}" />
+ <br />
+ </rich:dataDefinitionList>
+
+ <rich:dataDefinitionList var="car" value="#{user.list}" rows="3"
+ first="2" title="Cars" styleClass="greenPanel">
+ <f:facet name="term">
+ <h:outputText value="[term]"></h:outputText>
+ </f:facet>
+ <f:facet name="header">
+ <h:outputText value="[header]"></h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="[footer]"></h:outputText>
+ </f:facet>
+ <h:outputText value="Price:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car}" />
+ <br />
+ </rich:dataDefinitionList>
+
+ <rich:dataDefinitionList var="car" value="#{user.list}" rows="3"
+ first="2" title="Cars" styleClass="greenPanel">
+ <f:facet name="caption">
+ CText1
+ <h:outputText value="C1" />
+ <h:outputText value="C2" />
+ <h:outputText value="C3" />
+ <span>CapS1</span> CapT1
+ </f:facet>
+ <f:facet name="header">
+ W1
+ <h:outputText value="F1" />
+ <h:outputText value="F2" />
+ <h:outputText value="F3" />
+ <span>S1</span> T1
+ </f:facet>
+ <f:facet name="term">
+ Term1
+ <h:outputText value="T1" />
+ <h:outputText value="T2" />
+ <h:outputText value="T3" />
+ <span>TS1</span> TT1
+ </f:facet>
+ <f:facet name="myfacet">
+ MYF1
+ <h:outputText value="MYF-OUT-1" />
+ <h:outputText value="MYF-OUT-2" />
+ <h:outputText value="MYF-OUT-3" />
+ <span>MYF-S1</span> MYF-T1
+ </f:facet>
+ <f:facet name="footer">
+ WW1
+ <h:outputText value="FF1" />
+ <h:outputText value="FF2" />
+ <h:outputText value="FF3" />
+ <span>SS1</span> TT1
+ </f:facet>
+ <h:outputText value="Mileage:" styleClass="label"></h:outputText>
+ <h:outputText value="#{car}" />
+ myt1
+ <h:outputText value="myt1" />
+ <h:outputText value="myt2" />
+ <h:outputText value="myt3" />
+ <span>myt-S1</span> myt-T1
+ <br />
+ </rich:dataDefinitionList>
+ </h:panelGrid>
+
+ <h1>14) rich:inplaceInput</h1>
+ <h:panelGrid columns="3" styleClass="panel">
+ <rich:inplaceInput value="#{user.name}" showControls="true" />
+ <rich:inplaceInput value="#{user.name}" showControls="true">
+ <f:facet name="controls">
+ <h:panelGroup>
+ <h:commandButton value="Save" type="button" />
+ <h:commandButton value="Close" type="button" />
+ </h:panelGroup>
+ </f:facet>
+ </rich:inplaceInput>
+
+ <rich:inplaceInput value="#{user.name}" showControls="true">
+ <f:facet name="controls">
+ <h:commandButton value="Save" type="button" />
+ <h:commandButton value="Close" type="button" />
+ </f:facet>
+ </rich:inplaceInput>
+
+ <rich:inplaceInput value="#{user.name}" showControls="true">
+ <f:facet name="controls">
+ <h:commandButton value="Save" type="button" />
+ <h:commandButton value="Close" type="button" />
+ </f:facet>
+ myt1
+ <h:outputText value="myt1" />
+ <h:outputText value="myt2" />
+ <h:outputText value="myt3" />
+ <span>myt-S1</span> myt-T1
+ <br />
+ </rich:inplaceInput>
+
+ <rich:inplaceInput value="#{user.name}" showControls="true">
+ <f:facet name="controls">
+ <h:commandButton value="Save" type="button" />
+ <h:commandButton value="Close" type="button" />
+ </f:facet>
+ <f:facet name="header">
+ W1
+ <h:outputText value="F1" />
+ <h:outputText value="F2" />
+ <h:outputText value="F3" />
+ <span>S1</span> T1
+ </f:facet>
+ <f:facet name="term">
+ Term1
+ <h:outputText value="T1" />
+ <h:outputText value="T2" />
+ <h:outputText value="T3" />
+ <span>TS1</span> TT1
+ </f:facet>
+ myt1
+ <h:outputText value="myt1" />
+ <h:outputText value="myt2" />
+ <h:outputText value="myt3" />
+ <span>myt-S1</span> myt-T1
+ <br />
+ </rich:inplaceInput>
+
+ <rich:inplaceInput value="#{user.name}" showControls="true">
+ <f:facet name="controls">
+ WW1
+ <h:outputText value="FF1" />
+ <h:outputText value="FF2" />
+ <h:outputText value="FF3" />
+ <span>SS1</span> TT1
+ </f:facet>
+ </rich:inplaceInput>
+
+ </h:panelGrid>
+
+<h1> 15) rich:orderingList </h1>
+
+<h:panelGrid columns="3" styleClass="panel">
+
+<rich:orderingList value="#{user.list}" var="item" listHeight="300" listWidth="350">
+ <f:facet name="caption">
+ <h:outputText value="List Caption" />
+ </f:facet>
+ <rich:column width="180">
+ <f:facet name="header">
+ <h:outputText value="Song Name" />
+ </f:facet>
+ <h:outputText value="[You must be evil] #{item}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Artist Name" />
+ </f:facet>
+ <h:outputText value="[Chris Rea] #{item}"></h:outputText>
+ </rich:column>
+ </rich:orderingList>
+
+ <rich:orderingList value="#{user.list}" var="item" controlsHorizontalAlign="left">
+ <f:facet name="heder">
+ CCCW1
+ <h:outputText value="CCCF1" />
+ <h:outputText value="CCCF2" />
+ <h:outputText value="CCCF3" />
+ <span>CCCS1</span> CCCT1
+ </f:facet>
+ <f:facet name="caption">
+ CCCW1
+ <h:outputText value="CCCF1" />
+ <h:outputText value="CCCF2" />
+ <h:outputText value="CCCF3" />
+ <span>CCCS1</span> CCCT1
+ </f:facet>
+ <rich:column>
+ <f:facet name="header">
+ W1
+ <h:outputText value="F1" />
+ <h:outputText value="F2" />
+ <h:outputText value="F3" />
+ <span>S1</span> T1
+ <h:outputText value="Song Name" />
+ </f:facet>
+ <h:outputText value="[You must be evil] #{item}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <f:facet name="footer">
+ WW1
+ <h:outputText value="FF1" />
+ <h:outputText value="FF2" />
+ <h:outputText value="FF3" />
+ <span>SS1</span> TT1
+ <h:outputText value="Artist Name" />
+ </f:facet>
+ <h:outputText value="[Chris Rea] #{item}"></h:outputText>
+ </rich:column>
+ </rich:orderingList>
+
+ <rich:orderingList value="#{user.list}" var="item" >
+ <f:facet name="topControl">
+ U1
+ <h:outputText value="UF1" />
+ <h:outputText value="UF2" />
+ <h:outputText value="UF3" />
+ <span>S1</span> T1
+ </f:facet>
+ <f:facet name="upControl">
+ UU1
+ <h:outputText value="UUFF1" />
+ <h:outputText value="UUFF2" />
+ <h:outputText value="UUFF3" />
+ <span>UUSS1</span> UUTT1
+ </f:facet>
+ <f:facet name="downControl">
+ D1
+ <h:outputText value="DF1" />
+ <h:outputText value="DF2" />
+ <h:outputText value="DF3" />
+ <span>DS1</span> DT1
+ </f:facet>
+ <f:facet name="bottomControl">
+ DDW1
+ <h:outputText value="DDF1" />
+ <h:outputText value="DDF2" />
+ <h:outputText value="DDF3" />
+ <span>DDS1</span> DDT1
+ </f:facet>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Song Name" />
+ </f:facet>
+ <h:outputText value="[You must be evil] #{item}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <f:facet name="footer">
+ WW1
+ <h:outputText value="FF1" />
+ <h:outputText value="FF2" />
+ <h:outputText value="FF3" />
+ <span>SS1</span> TT1
+ <h:outputText value="Artist Name" />
+ </f:facet>
+ <h:outputText value="[Chris Rea] #{item}"></h:outputText>
+ </rich:column>
+ </rich:orderingList>
+
+
+</h:panelGrid>
+
+<h1> 16) rich:progressBar </h1>
+
+<h:panelGrid columns="3" styleClass="panel">
+
+ <rich:progressBar value="67" style="color:red" styleClass="btn" mode="client"
+ id="progressBar">
+ <f:facet name="initial">
+ <h:outputText value="Process doesn't started yet" />
+ </f:facet>
+ <f:facet name="complete">
+ <h:outputText value="Process Done" />
+ </f:facet>
+ </rich:progressBar>
+
+ <rich:progressBar value="45">
+ <f:facet name="initial">
+ W1
+ <h:outputText value="F1" />
+ <h:outputText value="F2" />
+ <h:outputText value="F3" />
+ <span>S1</span> T1
+ </f:facet>
+ <f:facet name="complete">
+ WW1
+ <h:outputText value="FF1" />
+ <h:outputText value="FF2" />
+ <h:outputText value="FF3" />
+ <span>SS1</span> TT1
+ </f:facet>
+ </rich:progressBar>
+
+ <rich:progressBar value="30" label="Progres Bar" style="color:red" styleClass="btn" mode="client">
+ <f:facet name="complete">
+ WW1
+ <h:outputText value="FF1" />
+ <h:outputText value="FF2" />
+ <h:outputText value="FF3" />
+ <span>SS1</span> TT1
+ </f:facet>
+ <h:outputText> first text </h:outputText>
+ <h:outputText> Download speed 100 Mbit/s </h:outputText>
+ <h:outputText> last text </h:outputText>
+ </rich:progressBar>
+ <rich:progressBar value="30" >
+ </rich:progressBar>
+ <rich:progressBar value="45">
+ </rich:progressBar>
+</h:panelGrid> </f:view> </body> </html>
\ No newline at end of file
12 years, 5 months
JBoss Tools SVN: r42849 - branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-03 07:57:14 -0400 (Fri, 03 Aug 2012)
New Revision: 42849
Modified:
branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
Log:
Expand the xulrunner plugin
Modified: branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
===================================================================
--- branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-08-03 06:55:05 UTC (rev 42848)
+++ branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-08-03 11:57:14 UTC (rev 42849)
@@ -45,6 +45,9 @@
<testSuite>org.jboss.tools.portlet.ui.bot.test</testSuite>
<testClass>${test.class}</testClass>
<skip>${swtbot.test.skip}</skip>
+ <explodedBundles>
+ <explodedBundle>org.mozilla.xulrunner.gtk.linux.x86_64</explodedBundle>
+ </explodedBundles>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
12 years, 5 months
JBoss Tools SVN: r42848 - in trunk/as: tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-03 02:55:05 -0400 (Fri, 03 Aug 2012)
New Revision: 42848
Modified:
trunk/as/features/org.jboss.ide.eclipse.as.test.feature/feature.xml
trunk/as/tests/pom.xml
Log:
JBIDE-12363 unit tests
Modified: trunk/as/features/org.jboss.ide.eclipse.as.test.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.test.feature/feature.xml 2012-08-03 06:54:29 UTC (rev 42847)
+++ trunk/as/features/org.jboss.ide.eclipse.as.test.feature/feature.xml 2012-08-03 06:55:05 UTC (rev 42848)
@@ -19,6 +19,7 @@
<!-- JBIDE-10013 MOVE to new component, openshift <plugin id="org.jboss.ide.eclipse.as.egit.test" download-size="0" install-size="0" version="0.0.0" unpack="false" /> -->
<plugin id="org.jboss.ide.eclipse.as.management.as7.tests" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<plugin id="org.jboss.ide.eclipse.as.test" download-size="0" install-size="0" version="0.0.0" />
+ <plugin id="org.jboss.tools.as.test.core" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.ide.eclipse.as.ui.test" download-size="0" install-size="0" version="0.0.0" unpack="false" />
<!-- JBIDE-10013 MOVE to new component, openshift <plugin id="org.jboss.tools.openshift.express.client.test" download-size="0" install-size="0" version="0.0.0" unpack="false" /> -->
Modified: trunk/as/tests/pom.xml
===================================================================
--- trunk/as/tests/pom.xml 2012-08-03 06:54:29 UTC (rev 42847)
+++ trunk/as/tests/pom.xml 2012-08-03 06:55:05 UTC (rev 42848)
@@ -14,6 +14,7 @@
<module>org.jboss.ide.eclipse.as.archives.integration.test</module>
<module>org.jboss.ide.eclipse.as.management.as7.tests</module>
<module>org.jboss.ide.eclipse.as.test</module>
+ <module>org.jboss.tools.as.test.core</module>
<module>org.jboss.ide.eclipse.as.ui.test</module>
</modules>
</project>
12 years, 5 months