JBoss Tools SVN: r4233 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-16 10:34:22 -0400 (Tue, 16 Oct 2007)
New Revision: 4233
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
Log:
JBIDE-682
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2007-10-16 14:34:15 UTC (rev 4232)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2007-10-16 14:34:22 UTC (rev 4233)
@@ -106,6 +106,12 @@
public void loadServletVersion() {
String currentServletVersion = support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true);
+ String vs = context.getServletVersion();
+ if(vs != null && vs.length() > 0 && !vs.equals(currentServletVersion)) {
+ context.setServletVersion(vs);
+ support.getPropertyEditorAdapterByName("servletVersion").setValue(vs);
+ }
+
if(context != null && context.getProjectTemplate() != null) {
String prefServletVersion = context.getProjectTemplate().getProjectVersion().getPreferredServletVersion();
if(prefServletVersion != null) {
17 years, 3 months
JBoss Tools SVN: r4232 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-16 10:34:15 -0400 (Tue, 16 Oct 2007)
New Revision: 4232
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java
Log:
JBIDE-682
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java 2007-10-16 13:50:35 UTC (rev 4231)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java 2007-10-16 14:34:15 UTC (rev 4232)
@@ -11,6 +11,7 @@
package org.jboss.tools.jst.web.project.helpers;
import java.util.*;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.*;
import org.jboss.tools.jst.web.context.RegisterServerContext;
@@ -38,6 +39,8 @@
protected RegisterServerContext registry;
+ Map<String, String> prefs = new HashMap<String, String>();
+
public NewWebProjectContext() {
registry = new RegisterServerContext(RegisterServerContext.PROJECT_MODE_NEW);
initRegistry();
@@ -94,6 +97,9 @@
public void setServletVersion(String value) {
servletVersion = value;
registry.setServletVersion(value);
+ if(version != null) {
+ prefs.put(version, value);
+ }
}
public String getServletVersion() {
@@ -112,6 +118,18 @@
if(version != null && version.equals(value)) return;
version = value;
projectTemplateEdit = template.getProjectTemplate(version, projectTemplate);
+
+ String sv = prefs.get(version);
+ if(sv != null) {
+ setServletVersion(sv);
+ }
+
+ String pref = projectTemplateEdit.getProjectVersion().getPreferredServletVersion();
+ if(pref != null && compareServletVersions(pref, servletVersion) > 0) {
+ setServletVersion(pref);
+ } else if(servletVersion != null) {
+ prefs.put(version, servletVersion);
+ }
}
public IWebProjectTemplate getTemplate() {
17 years, 3 months
JBoss Tools SVN: r4231 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-16 09:50:35 -0400 (Tue, 16 Oct 2007)
New Revision: 4231
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
Log:
JBIDE-682
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2007-10-16 13:50:27 UTC (rev 4230)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2007-10-16 13:50:35 UTC (rev 4231)
@@ -61,6 +61,7 @@
private void initServletSupport() {
String defaultServletVersion = servletPreference.getValue();
+
XEntityData entityData = XEntityDataImpl.create(
new String[][]{{"WebPrjCreateStepDirs", ""}, {"servletVersion", ""}});
entityData.setValue("servletVersion", defaultServletVersion);
@@ -94,6 +95,7 @@
public void setVisible(boolean visible) {
if (visible) {
lock = true;
+ loadServletVersion();
appRegister.loadApplicationName();
lock = false;
}
@@ -101,6 +103,21 @@
super.setVisible(visible);
}
+ public void loadServletVersion() {
+ String currentServletVersion = support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true);
+
+ if(context != null && context.getProjectTemplate() != null) {
+ String prefServletVersion = context.getProjectTemplate().getProjectVersion().getPreferredServletVersion();
+ if(prefServletVersion != null) {
+ int i = context.compareServletVersions(prefServletVersion, currentServletVersion);
+ if(i > 0) {
+ context.setServletVersion(prefServletVersion);
+ support.getPropertyEditorAdapterByName("servletVersion").setValue(prefServletVersion);
+ }
+ }
+ }
+ }
+
private boolean lock = false;
private boolean validatePage() {
@@ -108,6 +125,9 @@
try {
appRegister.commit();
String msg = appRegister.getErrorMessage();
+ if(msg == null) {
+ msg = context.validateServletVersion();
+ }
if(msg != null) {
setErrorMessage(msg);
return false;
17 years, 3 months
JBoss Tools SVN: r4230 - in trunk/jst/plugins/org.jboss.tools.jst.web: src/org/jboss/tools/jst/web/context and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-16 09:50:27 -0400 (Tue, 16 Oct 2007)
New Revision: 4230
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/ProjectTemplate.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/version/ProjectVersion.java
Log:
JBIDE-682
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2007-10-16 13:49:41 UTC (rev 4229)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2007-10-16 13:50:27 UTC (rev 4230)
@@ -467,6 +467,7 @@
<value name="2.2"/>
<value name="2.3"/>
<value name="2.4"/>
+ <value name="2.5"/>
</Constraint>
<Editor name="List"/>
</XModelAttribute>
@@ -749,6 +750,7 @@
<Constraint loader="List">
<value name="2.3"/>
<value name="2.4"/>
+ <value name="2.5"/>
</Constraint>
<Editor name="List"/>
</XModelAttribute>
@@ -960,6 +962,7 @@
<Constraint loader="List">
<value name="2.3"/>
<value name="2.4"/>
+ <value name="2.5"/>
</Constraint>
<Editor name="List"/>
</XModelAttribute>
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java 2007-10-16 13:49:41 UTC (rev 4229)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/RegisterServerContext.java 2007-10-16 13:50:27 UTC (rev 4230)
@@ -70,6 +70,10 @@
servletVersion = v;
}
+ public String getServletVersion() {
+ return servletVersion;
+ }
+
public void setProjectHandle(IProject p) {
project = p;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java 2007-10-16 13:49:41 UTC (rev 4229)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/NewWebProjectContext.java 2007-10-16 13:50:27 UTC (rev 4230)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.*;
import org.jboss.tools.jst.web.context.RegisterServerContext;
+import org.jboss.tools.jst.web.project.version.ProjectVersion;
public abstract class NewWebProjectContext {
public static final String ATTR_NAME = "name";
@@ -94,6 +95,10 @@
servletVersion = value;
registry.setServletVersion(value);
}
+
+ public String getServletVersion() {
+ return servletVersion;
+ }
public RegisterServerContext getRegisterServerContext() {
return registry;
@@ -117,4 +122,30 @@
return projectTemplateEdit;
}
+ public String validateServletVersion() {
+ if(projectTemplateEdit == null) return null;
+ ProjectVersion v = projectTemplateEdit.getProjectVersion();
+ if(v == null) return null;
+ String pref = v.getPreferredServletVersion();
+ if(pref == null) return null;
+ int c = compareServletVersions(pref, servletVersion);
+ if(c > 0) {
+ return "Servlet version must be at least " + pref;
+ }
+ return null;
+ }
+
+ public int compareServletVersions(String sv1, String sv2) {
+ if(sv1.equals(sv2)) return 0;
+ if(sv1.length() == 0 || sv2.length() == 0) return 0;
+ int i1 = sv1.indexOf('.');
+ int i2 = sv2.indexOf('.');
+ if(i1 < 0 || i2 < 0) return sv1.compareTo(sv2);
+ String p1 = sv1.substring(0, i1);
+ String p2 = sv2.substring(0, i2);
+ int r = p1.compareTo(p2);
+ if(r != 0) return r;
+ return compareServletVersions(sv1.substring(i1 + 1), sv2.substring(i2 + 1));
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/ProjectTemplate.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/ProjectTemplate.java 2007-10-16 13:49:41 UTC (rev 4229)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/helpers/ProjectTemplate.java 2007-10-16 13:50:27 UTC (rev 4230)
@@ -39,6 +39,10 @@
this.projectVersion = version;
}
+ public ProjectVersion getProjectVersion() {
+ return projectVersion;
+ }
+
public void init(String name, String root) {
this.root = new File(root);
this.location = new File(root, name);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/version/ProjectVersion.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/version/ProjectVersion.java 2007-10-16 13:49:41 UTC (rev 4229)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/version/ProjectVersion.java 2007-10-16 13:50:27 UTC (rev 4230)
@@ -36,6 +36,8 @@
String projectTemplatesLocation;
String[] order = new String[0];
+ String preferredServletVersion = null;
+
ProjectVersion(ProjectVersions versions) {
this.versions = versions;
}
@@ -60,6 +62,10 @@
return projectTemplatesLocation;
}
+ public String getPreferredServletVersion() {
+ return preferredServletVersion;
+ }
+
public String getErrorMessage() {
LibraryReference core = null;
LibraryReference common = null;
@@ -94,6 +100,10 @@
void load(Element e) {
element = e;
name = e.getAttribute("displayName"); //$NON-NLS-1$
+ String sv = e.getAttribute("servlet-version");
+ if(sv != null && sv.trim().length() > 0) {
+ preferredServletVersion = sv.trim();
+ }
ArrayList<LibraryReference> ls = new ArrayList<LibraryReference>();
NodeList nl = e.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
17 years, 3 months
JBoss Tools SVN: r4229 - in trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates: jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-16 09:49:41 -0400 (Tue, 16 Oct 2007)
New Revision: 4229
Modified:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
Log:
JBIDE-682
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2007-10-16 13:31:24 UTC (rev 4228)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2007-10-16 13:49:41 UTC (rev 4229)
@@ -4,13 +4,13 @@
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.1" />
</version>
- <version displayName="JSF 1.2">
+ <version displayName="JSF 1.2" servlet-version="2.5">
<lib type="core" location="../lib/jsf-1.2"/>
<lib type="common" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.2" />
</version>
- <version displayName="JSF 1.2 with Facelets">
+ <version displayName="JSF 1.2 with Facelets" servlet-version="2.5">
<lib type="core" location="../lib/jsf-1.2" />
<lib type="common" location="../lib/facelets" />
<lib type="common" location="../lib/ApacheCommon2.3" />
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml 2007-10-16 13:31:24 UTC (rev 4228)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/web.xml 2007-10-16 13:49:41 UTC (rev 4229)
@@ -4,6 +4,11 @@
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
#else
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml 2007-10-16 13:31:24 UTC (rev 4228)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml 2007-10-16 13:49:41 UTC (rev 4229)
@@ -4,6 +4,11 @@
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
#else
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/WebContent/WEB-INF/web.xml 2007-10-16 13:31:24 UTC (rev 4228)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/WebContent/WEB-INF/web.xml 2007-10-16 13:49:41 UTC (rev 4229)
@@ -4,6 +4,11 @@
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
#else
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
@@ -11,7 +16,7 @@
<web-app>
#end
-#if ($servlet_version == "2.4")
+#if ($servlet_version == "2.4" || $servlet_version == "2.5")
<description>Facelets StarterKit</description>
<display-name>Facelets</display-name>
#else
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/WebContent/WEB-INF/web.xml 2007-10-16 13:31:24 UTC (rev 4228)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/WebContent/WEB-INF/web.xml 2007-10-16 13:49:41 UTC (rev 4229)
@@ -1,6 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#if ($servlet_version == "2.4")
+<web-app version="2.4"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#else
+<web-app version="2.5"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+#end
<description>Facelets StarterKit</description>
<display-name>jsf12KickStart</display-name>
<context-param>
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/WebContent/WEB-INF/web.xml 2007-10-16 13:31:24 UTC (rev 4228)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/WebContent/WEB-INF/web.xml 2007-10-16 13:49:41 UTC (rev 4229)
@@ -4,6 +4,11 @@
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#elseif ($servlet_version == "2.5")
+<web-app version="2.5"
+xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
#else
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
@@ -11,7 +16,7 @@
<web-app>
#end
-#if ($servlet_version == "2.4")
+#if ($servlet_version == "2.4" || $servlet_version == "2.5")
<description>Facelets StarterKit</description>
<display-name>Facelets</display-name>
#else
17 years, 3 months
JBoss Tools SVN: r4228 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-16 09:31:24 -0400 (Tue, 16 Oct 2007)
New Revision: 4228
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-991 Validate seam project names before creating them
Issue is fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-10-16 13:19:40 UTC (rev 4227)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-10-16 13:31:24 UTC (rev 4228)
@@ -605,7 +605,7 @@
status = ProjectCreationDataModelProviderNew.validateName(earProjectName);
if (!status.isOK())
return ValidatorFactory.createErrormessage(propertyName,
- SeamUIMessages.VALIDATOR_FACTORY_TEST_PROJECT +
+ SeamUIMessages.VALIDATOR_FACTORY_EAR_PROJECT +
earProjectName +
SeamUIMessages.VALIDATOR_FACTORY_PROJECT_ALREADY_EXISTS);
@@ -613,7 +613,7 @@
status = ProjectCreationDataModelProviderNew.validateName(ejbProjectName);
if (!status.isOK())
return ValidatorFactory.createErrormessage(propertyName,
- SeamUIMessages.VALIDATOR_FACTORY_TEST_PROJECT +
+ SeamUIMessages.VALIDATOR_FACTORY_EJB_PROJECT +
ejbProjectName +
SeamUIMessages.VALIDATOR_FACTORY_PROJECT_ALREADY_EXISTS);
}
17 years, 3 months
JBoss Tools SVN: r4227 - branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-16 09:19:40 -0400 (Tue, 16 Oct 2007)
New Revision: 4227
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-16 13:19:33 UTC (rev 4226)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-16 13:19:40 UTC (rev 4227)
@@ -55,9 +55,10 @@
String width = sourceElement.getAttribute(WIDTH_ATTR_PANELMENU);
String style = sourceElement.getAttribute(STYLE_ATTR_PANELMENU);
- String styleClass = sourceElement.getAttribute(STYLECLASS_ATTR_PANELMENU);
-
- if(width != null) {
+ String styleClass = sourceElement
+ .getAttribute(STYLECLASS_ATTR_PANELMENU);
+
+ if (width != null) {
style += "" + "; width:" + width;
}
@@ -149,8 +150,8 @@
}
public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, Document visualDocument, Node visualNode,
- Object data, String name, String value) {
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
return true;
}
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r4226 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: internal/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-16 09:19:33 -0400 (Tue, 16 Oct 2007)
New Revision: 4226
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-991 Validate seam project names before creating them
Issue is fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-10-16 13:14:30 UTC (rev 4225)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-10-16 13:19:33 UTC (rev 4226)
@@ -342,6 +342,14 @@
public static String VALIDATOR_FACTORY_SEAM_RUNTIME_IS_NOT_SELECTED;
public static String VALIDATOR_FACTORY_SELECTED_PROJECT;
+
+ public static String VALIDATOR_FACTORY_TEST_PROJECT;
+
+ public static String VALIDATOR_FACTORY_EAR_PROJECT;
+
+ public static String VALIDATOR_FACTORY_EJB_PROJECT;
+
+ public static String VALIDATOR_FACTORY_PROJECT_ALREADY_EXISTS;
public static String SEAM_TARGET_RUNTIME;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-10-16 13:14:30 UTC (rev 4225)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-10-16 13:19:33 UTC (rev 4226)
@@ -48,6 +48,7 @@
import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
import org.eclipse.wst.common.project.facet.ui.AbstractFacetWizardPage;
import org.eclipse.wst.common.project.facet.ui.IFacetWizardPage;
+import org.eclipse.wst.common.frameworks.internal.operations.ProjectCreationDataModelProviderNew;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -372,6 +373,10 @@
validatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor
.getName(), new PackageNameValidator(
sessionBeanPkgNameditor.getName(), "session beans")); //$NON-NLS-1$
+ validatorDelegate.addValidatorForProperty(
+ IFacetDataModelProperties.FACET_PROJECT_NAME,
+ new ProjectNamesDuplicationValidator(
+ IFacetDataModelProperties.FACET_PROJECT_NAME));
}
jBossHibernateDbTypeEditor
@@ -568,6 +573,54 @@
}
}
+ class ProjectNamesDuplicationValidator implements IValidator {
+ String propertyName;
+
+ /**
+ */
+ public ProjectNamesDuplicationValidator (String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ /**
+ * @see IValidator#validate(Object, Object)
+ */
+ public Map<String, String> validate(Object value, Object context) {
+ final String projectName = (String)value;
+
+ IDataModel model = (IDataModel)context;
+ final String deployAs = model.getStringProperty(
+ ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS);
+
+ final String testProjectName = projectName + "-test";
+ IStatus status = ProjectCreationDataModelProviderNew.validateName(testProjectName);
+ if (!status.isOK())
+ return ValidatorFactory.createErrormessage(propertyName,
+ SeamUIMessages.VALIDATOR_FACTORY_TEST_PROJECT +
+ testProjectName +
+ SeamUIMessages.VALIDATOR_FACTORY_PROJECT_ALREADY_EXISTS);
+
+ if (ISeamFacetDataModelProperties.DEPLOY_AS_EAR.equals(deployAs)) {
+ final String earProjectName = projectName + "-ear";
+ status = ProjectCreationDataModelProviderNew.validateName(earProjectName);
+ if (!status.isOK())
+ return ValidatorFactory.createErrormessage(propertyName,
+ SeamUIMessages.VALIDATOR_FACTORY_TEST_PROJECT +
+ earProjectName +
+ SeamUIMessages.VALIDATOR_FACTORY_PROJECT_ALREADY_EXISTS);
+
+ final String ejbProjectName = projectName + "-ejb";
+ status = ProjectCreationDataModelProviderNew.validateName(ejbProjectName);
+ if (!status.isOK())
+ return ValidatorFactory.createErrormessage(propertyName,
+ SeamUIMessages.VALIDATOR_FACTORY_TEST_PROJECT +
+ ejbProjectName +
+ SeamUIMessages.VALIDATOR_FACTORY_PROJECT_ALREADY_EXISTS);
+ }
+ return ValidatorFactory.NO_ERRORS;
+ }
+ }
+
public class NewSeamRuntimeAction extends
ButtonFieldEditor.ButtonPressedAction {
/**
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-10-16 13:14:30 UTC (rev 4225)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-10-16 13:19:33 UTC (rev 4226)
@@ -135,6 +135,10 @@
VALIDATOR_FACTORY_DRIVER_CLASS_PROPERTY_IS_EMPTY_FOR_SELECTED=Driver Class proberty is empty for selected '
VALIDATOR_FACTORY_CONNECTION_PROFILE=' connection profile
VALIDATOR_FACTORY_SEAM_RUNTIME_IS_NOT_SELECTED=Seam Runtime is not selected
+VALIDATOR_FACTORY_TEST_PROJECT=Test project '
+VALIDATOR_FACTORY_EAR_PROJECT=EAR project '
+VALIDATOR_FACTORY_EJB_PROJECT=EJB project '
+VALIDATOR_FACTORY_PROJECT_ALREADY_EXISTS=' already exists. Please select other name for new Seam project.
SEAM_PROJECT_WIZARD_PAGE1_FILE_CONTAINER_MUST_BE_SPECIFIED=File container must be specified
SEAM_RUNTIME_LIST_FIELD_EDITOR_RUNTIME_NAME_IS_NOT_CORRECT=Runtime name is not correct
SEAM_GENERATE_ENTITIES_WIZARD_CAN_NOT_GENERATE_SEAM_ENTITIES=Can't generate seam entities
17 years, 3 months
JBoss Tools SVN: r4225 - in branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: resources/panelMenuGroup and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-16 09:14:30 -0400 (Tue, 16 Oct 2007)
New Revision: 4225
Added:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevron.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronUp.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/disc.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/grid.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangle.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangleDown.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangleUp.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/points.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevron.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevron.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronUp.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronUp.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/disc.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/disc.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/grid.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/grid.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css 2007-10-16 13:14:30 UTC (rev 4225)
@@ -0,0 +1,57 @@
+.rich-pmenu-group-icon {
+ width: 16;
+ height: 16;
+ vspace: 0;
+ hspace: 0;
+ vertical-align: middle;
+}
+
+.rich-pmenu-group-disabled {
+ color: #B1ADA7;
+}
+
+.dr-pmenu-top-group-div {
+ border-color: #C4C0B9;
+}
+
+.dr-pmenu-top-group-div {
+ border: 1px solid;
+ margin-bottom: 3px;
+ padding: 1px;
+ border-color: #C4C0B9;
+}
+
+.dr-pmenu-top-self-div {
+ border-top: 1px solid;
+ margin-bottom: 3px;
+ padding: 1px;
+ border-color: #C4C0B9;
+}
+
+.dr-pmenu-top-group {
+ background-color: #D4CFC7;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ background-position: left top;
+ background-repeat: repeat-x;
+ cursor: pointer;
+ height: 20px;
+ padding: 2px 1px 2px 2px;
+ width: 100%;
+}
+
+.dr-pmenu-selected-item {
+ font-style: italic;
+}
+
+.dr-pmenu-group-self-label {
+ padding-left: 5px;
+ width: 100%;
+}
+
+.rich-pmenu-group-self-label {
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+}
\ No newline at end of file
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangle.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangle.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangleDown.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangleDown.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangleUp.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/triangleUp.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/points.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/points.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css 2007-10-16 13:14:30 UTC (rev 4225)
@@ -0,0 +1,71 @@
+
+.dr-pmenu-top-group-div {
+ border-color:#C4C0B9;
+}
+
+.dr-pmenu-top-group-div {
+ border:1px solid;
+ margin-bottom:3px;
+ padding:1px;
+ border-color:#C4C0B9;
+
+}
+
+.dr-pmenu-top-group {
+ background-color:#D4CFC7;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ font-weight:bold;
+}
+
+.dr-pmenu-top-group {
+ background-position:left top;
+ background-repeat:repeat-x;
+ cursor:pointer;
+ height:20px;
+ padding:2px 1px 2px 2px;
+ width:100%;
+}
+
+.dr-pmenu-nowrap {
+ white-space:nowrap;
+}
+
+element.style {
+ width:100%;
+}
+
+
+.dr-pmenu-group-self-label {
+ padding-left:5px;
+}
+
+.dr-pmenu-item-disabled {
+ color:#B1ADA7;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ margin-top:1px;
+ padding:2px 1px 1px;
+}
+
+.dr-pmenu-item {
+ cursor:pointer;
+ margin-top:1px;
+ padding:2px 1px 1px;
+}
+
+.dr-pmenu-item {
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+}
+
+.dr-pmenu-nowrap {
+ white-space:nowrap;
+}
+
+.dr-pmenu-top-self-div {
+ border-top: 1px solid;
+ border-color: #C4C0B9;
+}
\ No newline at end of file
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-16 13:14:30 UTC (rev 4225)
@@ -0,0 +1,456 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+
+public class RichFacesPanelMenuGroupTemplate extends VpeAbstractTemplate {
+
+ private static final String NAME_COMPONENT = "panelMenuGroup";
+
+ private static final String PANEL_MENU_END_TAG = ":panelMenu";
+
+ private static final String PANEL_MENU_GROUP_END_TAG = ":panelMenuGroup";
+
+ private static final String PANEL_MENU_ITEM_END_TAG = ":panelMenuItem";
+
+ // *******************************************************************************
+ // * Panel menu attribytes.
+ // ******************************************************************************/
+ private static final String PANEL_MENU_ATTR_ICON_GROUP_POSITION = "iconGroupPosition";
+
+ private static final String PANEL_MENU_ATTR_ICON_TOP_GROUP_POSITION = "iconGroupTopPosition";
+
+ private static final String PANEL_MENU_ATTR_ICON_COLLAPSED_GROUP = "iconCollapsedGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_COLLAPSED_TOP_GROUP = "iconCollapsedTopGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_EXPANDED_GROUP = "iconExpandedGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_EXPANDED_TOP_GROUP = "iconExpandedTopGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_DISABLE_GROUP = "iconDisableGroup";
+
+ private static final String PANEL_MENU_ATTR_ICON_TOP_DISABLE_GROUP = "iconTopDisableGroup";
+
+ private static final String PANEL_MENU_ATTR_DISABLED_GROUP_CLASS = "disabledGroupClass";
+
+ private static final String PANEL_MENU_ATTR_DISABLED_GROUP_STYLE = "disabledGroupStyle";
+
+ private static final String PANEL_MENU_ATTR_TOP_GROUP_CLASS = "topGroupClass";
+
+ private static final String PANEL_MENU_ATTR_GROUP_CLASS = "groupClass";
+
+ private static final String PANEL_MENU_ATTR_TOP_GROUP_STYLE = "topGroupStyle";
+
+ private static final String PANEL_MENU_ATTR_GROUP_STYLE = "groupStyle";
+
+ // *******************************************************************************
+ // * Panel menu group attribytes.
+ // ******************************************************************************/
+ private static final String PANEL_MENU_GROUP_ATTR_DISABLED_STYLE = "disabledStyle";
+
+ private static final String PANEL_MENU_GROUP_ATTR_DISABLED_CLASS = "disabledClass";
+
+ private static final String PANEL_MENU_GROUP_ATTR_DISABLED = "disabled";
+
+ private static final String PANEL_MENU_GROUP_ATTR_ICON_EXPANDED = "iconExpanded";
+
+ private static final String PANEL_MENU_GROUP_ATTR_ICON_COLLAPSED = "iconCollapsed";
+
+ private static final String PANEL_MENU_GROUP_ATTR_ICON_DISABLED = "iconDisabled";
+
+ private static final String PANEL_MENU_GROUP_ATTR_ICON_LABEL = "label";
+
+ private static final String COMPONENT_ATTR_VPE_SUPPORT = "vpeSupport";
+
+ private static final String COMPONENT_ATTR_VPE_USER_TOGGLE_ID = "vpe-user-toggle-id";
+
+ private static final String PANEL_MENU_GROUP_ICON_SPACER_PATH = "/panelMenuGroup/spacer.gif";
+
+ private static final String STYLE_PATH = "/panelMenuGroup/style.css";
+
+ private static final String EMPTY_DIV_STYLE = "display: none;";
+
+ private static final Map<String, String> DEFAULT_ICON_MAP = new HashMap<String, String>();
+
+ static {
+ DEFAULT_ICON_MAP.put("chevron", "/panelMenuGroup/chevron.gif");
+ DEFAULT_ICON_MAP.put("chevronUp", "/panelMenuGroup/chevronUp.gif");
+ DEFAULT_ICON_MAP.put("chevronDown", "/panelMenuGroup/chevronDown.gif");
+ DEFAULT_ICON_MAP.put("triangle", "/panelMenuGroup/triangle.gif");
+ DEFAULT_ICON_MAP.put("triangleUp", "/panelMenuGroup/triangleUp.gif");
+ DEFAULT_ICON_MAP
+ .put("triangleDown", "/panelMenuGroup/triangleDown.gif");
+ DEFAULT_ICON_MAP.put("disc", "/panelMenuGroup/disc.gif");
+ DEFAULT_ICON_MAP.put("grid", "/panelMenuGroup/grid.gif");
+ }
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ nsIDOMElement div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, EMPTY_DIV_STYLE);
+ return new VpeCreationData(div);
+ }
+
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
+
+ public static VpeCreationData encode(VpePageContext pageContext,
+ VpeCreationData creationData, Element sourceParentElement,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement parentVisualElement, boolean expanded,
+ int activeChildId) {
+ boolean disabled = false;
+ Element parent = getRichPanelParent(sourceElement);
+
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, NAME_COMPONENT);
+
+ if (expanded == true) {
+ activeChildId = -1;
+ }
+
+ nsIDOMElement div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ parentVisualElement.appendChild(div);
+ div.setAttribute(COMPONENT_ATTR_VPE_SUPPORT, NAME_COMPONENT);
+ div.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String
+ .valueOf(activeChildId));
+
+ if ("true".equalsIgnoreCase(sourceParentElement
+ .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ disabled = true;
+ } else if ("true".equalsIgnoreCase(parent
+ .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ disabled = true;
+ } else if ("true".equalsIgnoreCase(sourceElement
+ .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ disabled = true;
+ }
+
+ buildTable(pageContext, sourceParentElement, parent, sourceElement,
+ visualDocument, div, expanded, disabled, activeChildId);
+
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+
+ if (!children.isEmpty()) {
+ nsIDOMElement childSpan = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(childSpan);
+ for (Node child : children) {
+ if (!child.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)
+ && !child.getNodeName().endsWith(
+ PANEL_MENU_ITEM_END_TAG)) {
+ if (childrenInfo.getSourceChildren() == null
+ || childrenInfo.getSourceChildren().size() == 0) {
+ div.appendChild(childSpan);
+ }
+ childrenInfo.addSourceChild(child);
+ } else {
+ if (expanded && !disabled) {
+ if (child.getNodeName().endsWith(
+ PANEL_MENU_GROUP_END_TAG)) {
+ RichFacesPanelMenuGroupTemplate.encode(pageContext,
+ creationData, sourceParentElement,
+ (Element) child, visualDocument, div, true,
+ -1);
+ } else {
+ RichFacesPanelMenuItemTemplate
+ .encode(pageContext, creationData,
+ sourceParentElement,
+ (Element) child, visualDocument,
+ div, false);
+ }
+ }
+
+ if (childrenInfo.getSourceChildren() != null
+ && childrenInfo.getSourceChildren().size() > 0) {
+ creationData.addChildrenInfo(childrenInfo);
+ childSpan = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ childrenInfo = new VpeChildrenInfo(childSpan);
+ }
+ }
+ }
+
+ if (childrenInfo.getSourceChildren() != null
+ && childrenInfo.getSourceChildren().size() > 0) {
+ creationData.addChildrenInfo(childrenInfo);
+ }
+ }
+
+ return creationData;
+ }
+
+ private static final void buildTable(VpePageContext pageContext,
+ Element sourceParentElement, Element parent, Element sourceElement,
+ nsIDOMDocument visualDocument, nsIDOMElement div, boolean expanded,
+ boolean disabled, int activeChildId) {
+ String disabledStyle = sourceElement
+ .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_STYLE);
+ String disableClass = null;
+ String style = sourceElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ String styleClass = sourceElement
+ .getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+
+ if (disabledStyle == null) {
+ disabledStyle = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_STYLE);
+ }
+
+ if (sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_CLASS) != null) {
+ disableClass = sourceElement
+ .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_CLASS);
+ } else if (sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_CLASS) != null) {
+ disableClass = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_CLASS);
+ } else {
+ disableClass = "rich-pmenu-group-disabled";
+ }
+
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ div.appendChild(table);
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+
+ nsIDOMElement tableBody = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tableBody);
+
+ nsIDOMElement column1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ column1.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String
+ .valueOf(activeChildId));
+ tableBody.appendChild(column1);
+
+ nsIDOMElement img1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ column1.appendChild(img1);
+ ComponentUtil.setImg(img1, PANEL_MENU_GROUP_ICON_SPACER_PATH);
+ img1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-pmenu-group-icon");
+
+ nsIDOMElement column2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tableBody.appendChild(column2);
+ column2.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "width: 100%;");
+
+ nsIDOMText name = visualDocument.createTextNode(sourceElement
+ .getAttribute(PANEL_MENU_GROUP_ATTR_ICON_LABEL));
+ column2.appendChild(name);
+ column2.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String
+ .valueOf(activeChildId));
+
+ nsIDOMElement column3 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ column3.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String
+ .valueOf(activeChildId));
+ tableBody.appendChild(column3);
+
+ nsIDOMElement img2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ column3.appendChild(img2);
+ img2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-pmenu-group-icon");
+ ComponentUtil.setImg(img2, PANEL_MENU_GROUP_ICON_SPACER_PATH);
+
+ setIcon(pageContext, parent, sourceParentElement, sourceElement, img1,
+ img2, expanded, disabled);
+
+ if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)) {
+ if (styleClass != null
+ && sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_TOP_GROUP_CLASS) != null) {
+ styleClass = "dr-pmenu-group-self-label dr-pmenu-top-group"
+ + " "
+ + sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_TOP_GROUP_CLASS);
+ } else {
+ styleClass = "dr-pmenu-group-self-label dr-pmenu-top-group";
+ }
+ if (style != null
+ && sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_TOP_GROUP_STYLE) != null) {
+ style = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_TOP_GROUP_STYLE);
+ } else {
+ style = "";
+ }
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-pmenu-top-group-div");
+ } else {
+ if (styleClass != null
+ && sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_GROUP_CLASS) != null) {
+ styleClass = "dr-pmenu-group-self-label rich-pmenu-group-self-label"
+ + " "
+ + sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_GROUP_CLASS);
+ } else {
+ styleClass = "dr-pmenu-group-self-label rich-pmenu-group-self-label";
+ }
+ if (style != null
+ && sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_GROUP_STYLE) != null) {
+ style = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_GROUP_STYLE);
+ } else {
+ style = "";
+ }
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "dr-pmenu-top-self-div");
+ }
+
+ if (disabled) {
+ styleClass = styleClass + " " + disableClass;
+
+ if (disabledStyle != null) {
+ style = style + " " + disabledStyle;
+ }
+ }
+
+ if (!"".equals(style.trim())) {
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ }
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ }
+
+ private static final Element getRichPanelParent(Element sourceElement) {
+ Element parent = (Element) sourceElement.getParentNode();
+
+ while (true) {
+ if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)
+ || parent.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)) {
+ break;
+ } else {
+ parent = (Element) parent.getParentNode();
+ }
+ }
+
+ return parent;
+ }
+
+ private static final void setIcon(VpePageContext pageContext, Node parent,
+ Element sourceParentElement, Element sourceElement,
+ nsIDOMElement img1, nsIDOMElement img2, boolean expanded,
+ boolean disabled) {
+ boolean needChangePosition = false;
+ String pathIconExpanded = sourceElement
+ .getAttribute(PANEL_MENU_GROUP_ATTR_ICON_EXPANDED);
+ String pathIconCollapsed = sourceElement
+ .getAttribute(PANEL_MENU_GROUP_ATTR_ICON_COLLAPSED);
+ String pathIconDisabled = sourceElement
+ .getAttribute(PANEL_MENU_GROUP_ATTR_ICON_DISABLED);
+
+ if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)) {
+ if (pathIconExpanded == null) {
+ pathIconExpanded = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_ICON_EXPANDED_TOP_GROUP);
+ }
+ if (pathIconCollapsed == null) {
+ pathIconCollapsed = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_ICON_COLLAPSED_TOP_GROUP);
+ }
+ if (pathIconDisabled == null) {
+ pathIconDisabled = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_ICON_TOP_DISABLE_GROUP);
+ }
+
+ if ("right".equals(sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_ICON_TOP_GROUP_POSITION))) {
+ needChangePosition = true;
+ }
+ } else {
+ if (pathIconExpanded == null) {
+ pathIconExpanded = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_ICON_EXPANDED_GROUP);
+ }
+ if (pathIconCollapsed == null) {
+ pathIconCollapsed = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_ICON_COLLAPSED_GROUP);
+ }
+ if (pathIconDisabled == null) {
+ pathIconDisabled = sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_ICON_DISABLE_GROUP);
+ }
+
+ if ("right".equals(sourceParentElement
+ .getAttribute(PANEL_MENU_ATTR_ICON_GROUP_POSITION))) {
+ needChangePosition = true;
+ }
+ }
+
+ if (needChangePosition) {
+ nsIDOMElement temp = img2;
+ img2 = img1;
+ img1 = temp;
+ }
+
+ if (disabled) {
+ if (pathIconDisabled != null
+ && DEFAULT_ICON_MAP.containsKey(pathIconDisabled)) {
+ pathIconDisabled = DEFAULT_ICON_MAP.get(pathIconDisabled);
+ ComponentUtil.setImg(img1, pathIconDisabled);
+ } else {
+ ComponentUtil.setImgFromResources(pageContext, img1,
+ pathIconDisabled, PANEL_MENU_GROUP_ICON_SPACER_PATH);
+ }
+ } else {
+ if (expanded) {
+ if (pathIconExpanded != null
+ && DEFAULT_ICON_MAP.containsKey(pathIconExpanded)) {
+ pathIconExpanded = DEFAULT_ICON_MAP.get(pathIconExpanded);
+ ComponentUtil.setImg(img1, pathIconExpanded);
+ } else {
+ ComponentUtil
+ .setImgFromResources(pageContext, img1,
+ pathIconExpanded,
+ PANEL_MENU_GROUP_ICON_SPACER_PATH);
+ }
+ } else {
+ if (pathIconCollapsed != null
+ && DEFAULT_ICON_MAP.containsKey(pathIconCollapsed)) {
+ pathIconCollapsed = DEFAULT_ICON_MAP.get(pathIconCollapsed);
+ ComponentUtil.setImg(img1, pathIconCollapsed);
+ } else {
+ ComponentUtil.setImgFromResources(pageContext, img1,
+ pathIconCollapsed,
+ PANEL_MENU_GROUP_ICON_SPACER_PATH);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-16 13:14:30 UTC (rev 4225)
@@ -0,0 +1,348 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import java.util.List;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class RichFacesPanelMenuItemTemplate extends VpeAbstractTemplate {
+
+ private static final String STYLE_PATH = "/panelMenuItem/style.css";
+
+ private static final String PANEL_MENU_ITEM_CLASS = "dr-pmenu-item";
+
+ private static final String NO_SIZE_VALUE = "0";
+
+ private static final String DEFAULT_SIZE_VALUE = "16";
+
+ private static final String PANEL_MENU_NOWARP_CLASS = "dr-pmenu-nowrap";
+
+ private static final String PANEL_MENU_LABLE_CLASS = "dr-pmenu-group-self-label";
+
+ private static final String PANEL_MENU_DIV = "dr-pmenu-top-self-div";
+
+ private static final String PANEL_MENU_ITEM = "panelMenuItem";
+
+ private static final String IMG_POINTS_SRC = "/panelMenuItem/points.gif";
+
+ private static final String IMG_SPACER_SRC = "/panelMenuItem/spacer.gif";
+
+ private static final String EMPTY_DIV_STYLE = "display: none;";
+
+ private static final String DISABLED_CLASS = "dr-pmenu-item-disabled";
+
+ private static final String DISABLED_ITEM_STYLE = "disabledItemStyle";
+
+ private static final String ITEM_CLASS = "itemClass";
+
+ private static final String ICON_ITEM_TOP_POSITION = "iconItemTopPosition";
+
+ private static final String TOP_ITEM_STYLE = "topItemStyle";
+
+ private static final String ICON_TOP_DISABLED_ITEM = "iconTopDisabledItem";
+
+ private static final String DISABLE_ITEM_CLASS = "disableItemClass";
+
+ private static final String ICON_DISABLED_ITEM = "iconDisabledItem";
+
+ private static final String ICON_ITEM_POSITION = "iconItemPosition";
+
+ private static final String ICON_ITEM = "iconItem";
+
+ private static final String ICON_TOP_ITEM = "iconTopItem";
+
+ private static final String TOP_ITEM_CLASS = "topItemClass";
+
+ private static final String ITEM_STYLE = "itemStyle";
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ nsIDOMElement div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, EMPTY_DIV_STYLE);
+
+ return new VpeCreationData(div);
+ }
+
+ public static VpeCreationData encode(VpePageContext pageContext,
+ VpeCreationData creationData, Element sourceParentElement,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement parentVisualElement, boolean active) {
+
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, PANEL_MENU_ITEM);
+
+ nsIDOMElement parentDiv = visualDocument.createElement("div");
+ parentDiv.setAttribute("CLASS", PANEL_MENU_DIV);
+ parentVisualElement.appendChild(parentDiv);
+ nsIDOMElement div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+
+ parentDiv.appendChild(div);
+
+ if (sourceElement.getParentNode().getNodeName().endsWith(
+ ":panelMenuGroup")
+ || (sourceElement.getParentNode().getNodeName()
+ .endsWith(":panelMenu"))) {
+ div.setAttribute("vpeSupport", PANEL_MENU_ITEM);
+ nsIDOMElement table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ div.appendChild(table);
+
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ PANEL_MENU_ITEM_CLASS);
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR,
+ NO_SIZE_VALUE);
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR,
+ NO_SIZE_VALUE);
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR,
+ NO_SIZE_VALUE);
+
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tr);
+
+ nsIDOMElement tdNowrap = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr.appendChild(tdNowrap);
+ tdNowrap.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ PANEL_MENU_NOWARP_CLASS);
+
+ nsIDOMElement tdLable = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr.appendChild(tdLable);
+ tdLable.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ PANEL_MENU_LABLE_CLASS);
+ tdLable.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ "element.style");
+ String value = sourceElement.getAttribute("label");
+ nsIDOMText text = visualDocument.createTextNode(value == null ? ""
+ : value);
+
+ tdLable.appendChild(text);
+
+ nsIDOMElement td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr.appendChild(td);
+
+ nsIDOMElement imgPoints = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+
+ nsIDOMElement imgSpacer1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+
+ tdNowrap.appendChild(imgSpacer1);
+ setDefaultImgAttributes(imgSpacer1);
+ ComponentUtil.setImg(imgSpacer1, IMG_SPACER_SRC);
+
+ nsIDOMElement imgSpacer2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+
+ if (sourceElement.getParentNode().getNodeName().endsWith(
+ ":panelMenu")) {
+ String icon = sourceElement.getAttribute("icon");
+ if (icon == null || icon.length() == 0) {
+ setItemImage(sourceElement, sourceParentElement, td,
+ tdNowrap, ICON_ITEM_TOP_POSITION, pageContext,
+ visualDocument, sourceParentElement
+ .getAttribute(ICON_TOP_ITEM), imgPoints,
+ imgSpacer2);
+ } else {
+ setItemImage(sourceElement, sourceParentElement, td,
+ tdNowrap, ICON_ITEM_TOP_POSITION, pageContext,
+ visualDocument, icon, imgPoints, imgSpacer2);
+ }
+
+ setItemClassAndStyle(sourceElement, sourceParentElement,
+ imgPoints, pageContext, table, sourceParentElement
+ .getAttribute(TOP_ITEM_CLASS),
+ sourceParentElement.getAttribute(TOP_ITEM_STYLE),
+ sourceParentElement
+ .getAttribute(ICON_TOP_DISABLED_ITEM));
+
+ } else {
+ if (sourceElement.getParentNode().getNodeName().endsWith(
+ ":panelMenuGroup")) {
+ String icon = sourceElement.getAttribute("icon");
+ if (icon == null || icon.length() == 0) {
+ setItemImage(sourceElement, sourceParentElement, td,
+ tdNowrap, ICON_ITEM_POSITION, pageContext,
+ visualDocument, sourceParentElement
+ .getAttribute(ICON_ITEM), imgPoints,
+ imgSpacer2);
+ } else {
+ setItemImage(sourceElement, sourceParentElement, td,
+ tdNowrap, ICON_ITEM_POSITION, pageContext,
+ visualDocument, icon, imgPoints, imgSpacer2);
+ }
+ }
+
+ setItemClassAndStyle(sourceElement, sourceParentElement,
+ imgPoints, pageContext, table, sourceParentElement
+ .getAttribute(ITEM_CLASS), sourceParentElement
+ .getAttribute(ITEM_STYLE), sourceParentElement
+ .getAttribute(ICON_DISABLED_ITEM));
+ }
+
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+
+ if (!children.isEmpty()) {
+ VpeChildrenInfo childInfo = new VpeChildrenInfo(tdLable);
+ creationData.addChildrenInfo(childInfo);
+ for (Node child : children) {
+ if (!(child.getNodeName().endsWith(":panelMenuGroup") || child
+ .getNodeName().endsWith(":panelMenu"))) {
+ childInfo.addSourceChild(child);
+ }
+ }
+ }
+ }
+ return creationData;
+ }
+
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, Document visualDocument, Node visualNode,
+ Object data, String name, String value) {
+ return true;
+ }
+
+ private static void setDefaultImgAttributes(nsIDOMElement element) {
+ element.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH,
+ DEFAULT_SIZE_VALUE);
+ element.setAttribute("vspace", NO_SIZE_VALUE);
+ element.setAttribute("hspace", NO_SIZE_VALUE);
+ element.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT,
+ DEFAULT_SIZE_VALUE);
+ }
+
+ private static void setImagePosition(nsIDOMElement place,
+ nsIDOMElement image, VpePageContext pageContext, String icon) {
+ place.appendChild(image);
+ setDefaultImgAttributes(image);
+ if (icon == null || icon.length() == 0) {
+ ComponentUtil.setImg(image, IMG_POINTS_SRC);
+ } else {
+ ComponentUtil.setImgFromResources(pageContext, image, icon,
+ IMG_SPACER_SRC);
+ }
+ }
+
+ private static void setItemImage(Element sourceElement,
+ Element sourceParentElement, nsIDOMElement td,
+ nsIDOMElement tdNowrap, String attribute,
+ VpePageContext pageContext, nsIDOMDocument visualDocument,
+ String image, nsIDOMElement imgPoints, nsIDOMElement imgSpacer2) {
+ String iconPosition = sourceParentElement.getAttribute(attribute);
+ if (!(iconPosition == null)) {
+ if (iconPosition.equals("right")) {
+
+ setImagePosition(td, imgPoints, pageContext, image);
+
+ } else {
+ td.appendChild(imgSpacer2);
+ setDefaultImgAttributes(imgSpacer2);
+ ComponentUtil.setImg(imgSpacer2, IMG_SPACER_SRC);
+ if (iconPosition.equals("left")) {
+ setImagePosition(tdNowrap, imgPoints, pageContext, image);
+ }
+ }
+ } else {
+ setImagePosition(tdNowrap, imgPoints, pageContext, image);
+ td.appendChild(imgSpacer2);
+ setDefaultImgAttributes(imgSpacer2);
+ ComponentUtil.setImg(imgSpacer2, IMG_SPACER_SRC);
+ }
+ }
+
+ private static void setItemClassAndStyle(Element sourceElement,
+ Element sourceParentElement, nsIDOMElement imgPoints,
+ VpePageContext pageContext, nsIDOMElement table,
+ String parentClass, String parentStyle, String icon) {
+
+ if ("true".equals(sourceElement.getAttribute("disabled"))) {
+
+ String iconDisabled = sourceElement.getAttribute("iconDisabled");
+ if (iconDisabled == null || iconDisabled.length() == 0) {
+ if (!(icon == null || icon.length() == 0)) {
+ ComponentUtil.setImgFromResources(pageContext, imgPoints,
+ icon, IMG_POINTS_SRC);
+ } else {
+ ComponentUtil.setImg(imgPoints, IMG_POINTS_SRC);
+ }
+ } else {
+ ComponentUtil.setImgFromResources(pageContext, imgPoints,
+ iconDisabled, IMG_SPACER_SRC);
+ }
+
+ String resultDisabledClass = "";
+ String disabledItemClass = sourceParentElement
+ .getAttribute(DISABLE_ITEM_CLASS);
+ if (!(disabledItemClass == null || disabledItemClass.length() == 0)) {
+ resultDisabledClass += disabledItemClass;
+ }
+ String disabledClass = sourceElement.getAttribute("disabledClass");
+ if (!(disabledClass == null || disabledClass.length() == 0)) {
+ resultDisabledClass += disabledClass;
+ }
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ DISABLED_CLASS + " " + resultDisabledClass);
+
+ String resultDisabledStyle = "";
+ String disabledItemStyle = sourceParentElement
+ .getAttribute(DISABLED_ITEM_STYLE);
+ if (!(disabledItemStyle == null || disabledItemStyle.length() == 0)) {
+ resultDisabledStyle += disabledItemStyle;
+ }
+ String disabledStyle = sourceElement.getAttribute("disabledStyle");
+ if (!(disabledStyle == null || disabledStyle.length() == 0)) {
+ resultDisabledStyle += disabledStyle;
+ }
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ resultDisabledStyle);
+
+ } else {
+ String resultClass = "";
+ String itemClass = parentClass;
+ if (!(itemClass == null || itemClass.length() == 0)) {
+ resultClass += itemClass;
+ }
+ String styleClass = sourceElement.getAttribute("styleClass");
+ if (!(styleClass == null || styleClass.length() == 0)) {
+ resultClass += styleClass;
+ }
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ PANEL_MENU_ITEM_CLASS + " " + resultClass);
+
+ String resultStyle = "";
+ String itemStyle = parentStyle;
+ if (!(itemStyle == null || itemStyle.length() == 0)) {
+ resultStyle += itemStyle;
+ }
+ String style = sourceElement.getAttribute("style");
+ if (!(style == null || style.length() == 0)) {
+ resultStyle += style;
+ }
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, resultStyle);
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java (rev 0)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-16 13:14:30 UTC (rev 4225)
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * @author ezheleznyakov(a)exadel.com
+ *
+ */
+public class RichFacesPanelMenuTemplate extends VpeAbstractTemplate implements
+ VpeToggableTemplate {
+
+ private static final String WIDTH_ATTR_PANELMENU = "width";
+ private static final String STYLE_ATTR_PANELMENU = "style";
+ private static final String STYLECLASS_ATTR_PANELMENU = "styleClass";
+
+ private static final String PANEL_MENU_GROUP_END = ":panelMenuGroup";
+ private static final String PANEL_MENU_ITEM_END = ":panelMenuItem";
+
+ private static Map toggleMap = new HashMap();
+
+ // private static final String DISABLED_STYLE_FOR_TABLE = "color:#B1ADA7";
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ Element sourceElement = (Element) sourceNode;
+
+ String width = sourceElement.getAttribute(WIDTH_ATTR_PANELMENU);
+ String style = sourceElement.getAttribute(STYLE_ATTR_PANELMENU);
+ String styleClass = sourceElement.getAttribute(STYLECLASS_ATTR_PANELMENU);
+
+ if(width != null) {
+ style += "" + "; width:" + width;
+ }
+
+ nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ VpeCreationData vpeCreationData = new VpeCreationData(div);
+
+ if (style != null) {
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ }
+
+ if (styleClass != null) {
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ }
+
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+ int activeId = getActiveId(sourceElement, children);
+ int i = 0;
+
+ for (Node child : children) {
+
+ boolean expanded = (i == activeId);
+
+ if (child.getNodeName().endsWith(PANEL_MENU_GROUP_END)) {
+ RichFacesPanelMenuGroupTemplate.encode(pageContext,
+ vpeCreationData, sourceElement, (Element) child,
+ visualDocument, div, expanded, i);
+ i++;
+ } else if (child.getNodeName().endsWith(PANEL_MENU_ITEM_END)) {
+ RichFacesPanelMenuItemTemplate.encode(pageContext,
+ vpeCreationData, sourceElement, (Element) child,
+ visualDocument, div, expanded);
+ } else {
+ nsIDOMElement childDiv = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(childDiv);
+ div.appendChild(childDiv);
+ childrenInfo.addSourceChild(child);
+ vpeCreationData.addChildrenInfo(childrenInfo);
+ }
+ }
+
+ return vpeCreationData;
+ }
+
+ /**
+ *
+ * @param sourceElement
+ * @param children
+ * @return
+ */
+ private int getActiveId(Element sourceElement, List<Node> children) {
+ int activeId = -1;
+ try {
+ activeId = Integer.valueOf((String) toggleMap.get(sourceElement));
+ } catch (NumberFormatException nfe) {
+ activeId = -1;
+ }
+
+ int count = getChildrenCount(children);
+ if (count - 1 < activeId) {
+ activeId = count - 1;
+ }
+
+ return activeId;
+ }
+
+ /**
+ *
+ * @param children
+ * @return
+ */
+ private int getChildrenCount(List<Node> children) {
+ int count = 0;
+ for (Node child : children) {
+ if (child.getNodeName().endsWith(PANEL_MENU_GROUP_END)) {
+ count++;
+ }
+ }
+ return count;
+ }
+
+ public void toggle(VpeVisualDomBuilder builder, Node sourceNode,
+ String toggleId) {
+ toggleMap.put(sourceNode, toggleId);
+ }
+
+ public void stopToggling(Node sourceNode) {
+ toggleMap.remove(sourceNode);
+ }
+
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, Document visualDocument, Node visualNode,
+ Object data, String name, String value) {
+ return true;
+ }
+}
\ No newline at end of file
Property changes on: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-16 13:12:38 UTC (rev 4224)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-16 13:14:30 UTC (rev 4225)
@@ -652,5 +652,29 @@
</span>
</vpe:template>
</vpe:tag>
+
+ <vpe:tag name="rich:panelMenuItem" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelMenuItemTemplate">
+ <vpe:drag start-enable="yes"/>
+ <vpe:drop container="yes"/>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="rich:panelMenuGroup" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelMenuGroupTemplate">
+ <vpe:drag start-enable="yes"/>
+ <vpe:drop container="yes"/>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="rich:panelMenu" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelMenuTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="width" />
+ </vpe:resize>
+ <vpe:drag start-enable="yes"/>
+ <vpe:drop container="yes"/>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r4224 - branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-16 09:12:38 -0400 (Tue, 16 Oct 2007)
New Revision: 4224
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Create templates for <a4j:push/> and <a4j:portlet/> components.
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2007-10-16 12:48:51 UTC (rev 4223)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2007-10-16 13:12:38 UTC (rev 4224)
@@ -317,11 +317,15 @@
<vpe:tag name="a4j:portlet" case-sensitive="yes">
<vpe:template children="yes" modify="no">
+ <span style="display:none">
+ </span>
</vpe:template>
</vpe:tag>
<vpe:tag name="a4j:push" case-sensitive="yes">
<vpe:template children="yes" modify="no">
+ <span style="display:none">
+ </span>
</vpe:template>
</vpe:tag>
17 years, 3 months