JBoss Tools SVN: r4163 - in trunk/seam/plugins: org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-12 10:16:33 -0400 (Fri, 12 Oct 2007)
New Revision: 4163
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
Log:
http://jira.jboss.com/jira/browse/EXIN-13
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-10-12 13:44:03 UTC (rev 4162)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-10-12 14:16:33 UTC (rev 4163)
@@ -24,10 +24,10 @@
DUPLICATE_DESTROY=Duplicate @Destroy method "{0}"
DUPLICATE_CREATE=Duplicate @Create method "{0}"
DUPLICATE_UNWRAP=Duplicate @Unwrap method "{0}"
-DESTROY_DOESNT_BELONG_TO_COMPONENT=@Destroy method "{0}" must be declared in component class
-CREATE_DOESNT_BELONG_TO_COMPONENT=@Create method "{0}" must be declared in component class
-UNWRAP_DOESNT_BELONG_TO_COMPONENT=@Unwrap method "{0}" must be declared in component class
-OBSERVER_DOESNT_BELONG_TO_COMPONENT=@Observer method "{0}" must be declared in component class
+DESTROY_DOESNT_BELONG_TO_COMPONENT=Only component class can have @Destroy method "{0}"
+CREATE_DOESNT_BELONG_TO_COMPONENT=Only component class can have @Create method "{0}"
+UNWRAP_DOESNT_BELONG_TO_COMPONENT=Only component class can have @Unwrap method "{0}"
+OBSERVER_DOESNT_BELONG_TO_COMPONENT=Only component class can have @Observer method "{0}"
#Factories
UNKNOWN_FACTORY_NAME=Factory method "{0}" with a void return type must have an associated @Out/Databinder
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2007-10-12 13:44:03 UTC (rev 4162)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2007-10-12 14:16:33 UTC (rev 4163)
@@ -35,10 +35,10 @@
SeamValidatorConfigurationBlock_pb_duplicateDestroy_label=Duplicate @Destroy method:
SeamValidatorConfigurationBlock_pb_duplicateCreate_label=Duplicate @Create method:
SeamValidatorConfigurationBlock_pb_duplicateUnwrap_label=Duplicate @Unwrap method:
-SeamValidatorConfigurationBlock_pb_destroyDoesNotBelongToComponent_label=@Destroy method must be declared in component class:
-SeamValidatorConfigurationBlock_pb_createDoesNotBelongToComponent_label=@Create method must be declared in component class:
-SeamValidatorConfigurationBlock_pb_unwrapDoesNotBelongToComponent_label=@Unwrap method must be declared in component class:
-SeamValidatorConfigurationBlock_pb_observerDoesNotBelongToComponent_label=@Observer method must be declared in component class:
+SeamValidatorConfigurationBlock_pb_destroyDoesNotBelongToComponent_label=Only component class can have @Destroy method
+SeamValidatorConfigurationBlock_pb_createDoesNotBelongToComponent_label=Only component class can have @Create method
+SeamValidatorConfigurationBlock_pb_unwrapDoesNotBelongToComponent_label=Only component class can have @Unwrap method
+SeamValidatorConfigurationBlock_pb_observerDoesNotBelongToComponent_label=Only component class can have @Observer method
##Section Factories
SeamValidatorConfigurationBlock_section_factory=Factories
17 years, 3 months
JBoss Tools SVN: r4162 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 09:44:03 -0400 (Fri, 12 Oct 2007)
New Revision: 4162
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/DialogCellEditorEx.java
Log:
JBIDE-525
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/DialogCellEditorEx.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/DialogCellEditorEx.java 2007-10-12 13:41:40 UTC (rev 4161)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/DialogCellEditorEx.java 2007-10-12 13:44:03 UTC (rev 4162)
@@ -88,7 +88,7 @@
}
});
result.setText("...");
- return result;
+ return button = result;
}
protected Control createControl(Composite parent) {
17 years, 3 months
JBoss Tools SVN: r4161 - trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 09:41:40 -0400 (Fri, 12 Oct 2007)
New Revision: 4161
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/MyFacesExt.xml
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/MyFacesTomahawk.xml
Log:
JBIDE-525
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/MyFacesExt.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/MyFacesExt.xml 2007-10-12 13:39:03 UTC (rev 4160)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/MyFacesExt.xml 2007-10-12 13:41:40 UTC (rev 4161)
@@ -3928,16 +3928,6 @@
</proposal>
</attribute-type>
<attribute type="visibleOnUserRole"/>
- <attribute-type name="onblur" required="false">
- <proposal type="jsfVariables"/>
- <proposal type="beanProperty"/>
- </attribute-type>
- <attribute type="onblur"/>
- <attribute-type name="onfocus" required="false">
- <proposal type="jsfVariables"/>
- <proposal type="beanProperty"/>
- </attribute-type>
- <attribute type="onfocus"/>
<description>Must be nested inside a panel_navigation action and renders a
clickable navigation item.
This action is derived from the standard command_link action and
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/MyFacesTomahawk.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/MyFacesTomahawk.xml 2007-10-12 13:39:03 UTC (rev 4160)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/MyFacesTomahawk.xml 2007-10-12 13:41:40 UTC (rev 4161)
@@ -6589,16 +6589,6 @@
</proposal>
</attribute-type>
<attribute type="visibleOnUserRole"/>
- <attribute-type name="onblur" required="false">
- <proposal type="beanProperty"/>
- <proposal type="jsfVariables"/>
- </attribute-type>
- <attribute type="onblur"/>
- <attribute-type name="onfocus" required="false">
- <proposal type="beanProperty"/>
- <proposal type="jsfVariables"/>
- </attribute-type>
- <attribute type="onfocus"/>
</element-type>
<element-type body-content="allowed" content="mixed" end-tag="required"
name="commandNavigation2" start-tag="required">
17 years, 3 months
JBoss Tools SVN: r4160 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 09:39:03 -0400 (Fri, 12 Oct 2007)
New Revision: 4160
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java
Log:
JBIDE-1072
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java 2007-10-12 13:31:08 UTC (rev 4159)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java 2007-10-12 13:39:03 UTC (rev 4160)
@@ -11,6 +11,7 @@
package org.jboss.tools.jst.web.context;
import java.io.File;
+import java.io.IOException;
import java.util.Properties;
import org.eclipse.core.resources.IProject;
@@ -54,7 +55,7 @@
protected void initRegistry() {}
- public void setWebXmlLocation(String location) throws Exception {
+ public void setWebXmlLocation(String location) {
location = location.replace('\\', '/');
if(isWebXMLUpToDate(location)) return;
webXmlLocation = location;
@@ -65,23 +66,28 @@
File f = new File(location);
if(!f.isFile()) {
webXMLErrorMessage = WebUIMessages.FILE_DOESNOT_EXIST;
- throw new Exception(webXMLErrorMessage);
+ return;
}
webXMLTimeStamp = f.lastModified();
String body = FileUtil.readFile(f);
String entity = getTarget().getModel().getEntityRecognizer().getEntityName("xml", body); //$NON-NLS-1$
if(entity == null || !entity.startsWith("FileWebApp")) { //$NON-NLS-1$
webXMLErrorMessage = WebUIMessages.FILE_ISNOT_RECOGNIZED_AS_WEBDESCRIPTOR_FILE;
- throw new Exception(webXMLErrorMessage);
+ return;
}
try {
loadWebXML(body, location);
} catch (Exception e) {
webXMLErrorMessage = e.getMessage();
- throw e;
+ return;
}
File webInfFile = f.getParentFile();
- webInfLocation = webInfFile.getCanonicalPath().replace('\\', '/');
+ try {
+ webInfLocation = webInfFile.getCanonicalPath().replace('\\', '/');
+ } catch (IOException e) {
+ webXMLErrorMessage = e.getMessage();
+ return;
+ }
boolean w_i = webInfFile.getName().equals("WEB-INF"); //$NON-NLS-1$
String lib = webInfLocation + "/lib"; //$NON-NLS-1$
if(new File(lib).isDirectory()) setLibLocation(lib);
@@ -153,10 +159,9 @@
public void setInitialLocation(String initialLocation) {
this.initialLocation = initialLocation;
- if(initialLocation != null) try {
- setWebXmlLocation(initialLocation);
- } catch (Exception e) {
- initialLocationErrorMessage = e.getMessage();
+ if(initialLocation != null) {
+ setWebXmlLocation(initialLocation);
+ initialLocationErrorMessage = webXMLErrorMessage;
}
}
17 years, 3 months
JBoss Tools SVN: r4159 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: templates and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-12 09:31:08 -0400 (Fri, 12 Oct 2007)
New Revision: 4159
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Create templates for <rich:panelMenu/>, <rich:panelMenuGroup/> and <rich:panelMenuItem> components.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-12 13:25:12 UTC (rev 4158)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-12 13:31:08 UTC (rev 4159)
@@ -68,8 +68,12 @@
return true;
}
- public static VpeCreationData encode(VpePageContext pageContext, VpeCreationData creationData, Element sourceElement, Document visualDocument, Element parentVisualElement, boolean expanded, int activeChildId) {
+ public static VpeCreationData encode(VpePageContext pageContext, VpeCreationData creationData, Element sourceParentElement, Element sourceElement, Document visualDocument, Element parentVisualElement, boolean expanded, int activeChildId) {
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, NAME_COMPONENT);
+
+ if(expanded == true) {
+ activeChildId = -1;
+ }
Element div = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
parentVisualElement.appendChild(div);
@@ -93,9 +97,9 @@
} else {
if (expanded) {
if (child.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)) {
- RichFacesPanelMenuGroupTemplate.encode(pageContext, creationData, (Element) child, visualDocument, div, true, -1);
+ RichFacesPanelMenuGroupTemplate.encode(pageContext, creationData, sourceParentElement, (Element) child, visualDocument, div, true, -1);
} else {
- RichFacesPanelMenuItemTemplate.encode(pageContext, creationData, (Element) child, visualDocument, div, false);
+ RichFacesPanelMenuItemTemplate.encode(pageContext, creationData, sourceParentElement, (Element) child, visualDocument, div, false);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-12 13:25:12 UTC (rev 4158)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-12 13:31:08 UTC (rev 4159)
@@ -60,7 +60,7 @@
}
public static VpeCreationData encode(VpePageContext pageContext,
- VpeCreationData creationData, Element sourceElement,
+ VpeCreationData creationData, Element sourceParentElement, Element sourceElement,
Document visualDocument, Element parentVisualElement, boolean active) {
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, PANEL_MENU_ITEM);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12 13:25:12 UTC (rev 4158)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12 13:31:08 UTC (rev 4159)
@@ -37,6 +37,7 @@
private static final String WIDTH_ATTR_PANELMENU = "width";
private static final String STYLE_ATTR_PANELMENU = "style";
+
// private static final String DISABLED_ATTR_PANELMENU = "disabled";
// private static final String EXPANDSINGLE_ATTR_PANELMENU = "expandSingle";
private static final String STYLECLASS_ATTR_PANELMENU = "styleClass";
@@ -88,17 +89,17 @@
for (Node child : children) {
- boolean expanded = true; // (i == activeId);
+ boolean expanded = (i == activeId);
if (child.getNodeName().endsWith(PANEL_MENU_GROUP_END)) {
RichFacesPanelMenuGroupTemplate.encode(pageContext,
- vpeCreationData, (Element) child, visualDocument, div,
- expanded, i);
+ vpeCreationData, sourceElement, (Element) child,
+ visualDocument, div, expanded, i);
i++;
} else if (child.getNodeName().endsWith(PANEL_MENU_ITEM_END)) {
RichFacesPanelMenuItemTemplate.encode(pageContext,
- vpeCreationData, (Element) child, visualDocument, div,
- expanded);
+ vpeCreationData, sourceElement, (Element) child,
+ visualDocument, div, expanded);
} else {
Element childDiv = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
@@ -126,9 +127,6 @@
activeId = -1;
}
- if (activeId == -1)
- activeId = 0;
-
int count = getChildrenCount(children);
if (count - 1 < activeId) {
activeId = count - 1;
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 2007-10-12 13:25:12 UTC (rev 4158)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-12 13:31:08 UTC (rev 4159)
@@ -644,20 +644,13 @@
<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="style.width" />
+ <vpe:height height-attr="stylwe.height" />
+ </vpe:resize>
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes"/>
</vpe:template>
- <vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="panelMenuGroup"/>
- <vpe:container-child tag-name="panelMenuItem"/>
- </vpe:drop>
- </vpe:dnd>
</vpe:tag>
</vpe:templates>
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r4158 - in branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces: META-INF and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-12 09:25:12 -0400 (Fri, 12 Oct 2007)
New Revision: 4158
Added:
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.classpath
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.project
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/META-INF/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/META-INF/MANIFEST.MF
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/build.properties
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/resources/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/resources/richFacesTest.jar
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/Activator.java
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/ImportRichFacesComponents.java
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesAllTest.java
branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesComponentTest.java
Log:
Add JUnit tests for RichFaces components
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.classpath
===================================================================
--- branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.classpath (rev 0)
+++ branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.classpath 2007-10-12 13:25:12 UTC (rev 4158)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.classpath
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.project
===================================================================
--- branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.project (rev 0)
+++ branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.project 2007-10-12 13:25:12 UTC (rev 4158)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.vpe.test.richfaces</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/.project
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/META-INF/MANIFEST.MF (rev 0)
+++ branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/META-INF/MANIFEST.MF 2007-10-12 13:25:12 UTC (rev 4158)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Richfaces Plug-in
+Bundle-SymbolicName: org.jboss.tools.vpe.test.richfaces
+Bundle-Version: 1.0.0
+Bundle-Activator: org.jboss.tools.vpe.test.richfaces.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.jboss.tools.vpe,
+ org.junit,
+ org.eclipse.core.resources,
+ org.eclipse.ui.ide
+Eclipse-LazyStart: true
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/build.properties
===================================================================
--- branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/build.properties (rev 0)
+++ branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/build.properties 2007-10-12 13:25:12 UTC (rev 4158)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/build.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/resources/richFacesTest.jar
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/resources/richFacesTest.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/Activator.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/Activator.java (rev 0)
+++ branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/Activator.java 2007-10-12 13:25:12 UTC (rev 4158)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test.richfaces;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.vpe.test.richfaces";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ public static String getPluginResourcePath() {
+ Bundle bundle = Platform.getBundle(PLUGIN_ID);
+ URL url = null;
+ try {
+ url = bundle == null ? null : FileLocator.resolve(bundle
+ .getEntry("/resources"));
+ } catch (Exception e) {
+ url = bundle.getEntry("/resources");
+ }
+ return (url == null) ? null : url.getPath();
+ }
+}
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/Activator.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/ImportRichFacesComponents.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/ImportRichFacesComponents.java (rev 0)
+++ branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/ImportRichFacesComponents.java 2007-10-12 13:25:12 UTC (rev 4158)
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test.richfaces;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.zip.ZipFile;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider;
+import org.eclipse.ui.wizards.datatransfer.ImportOperation;
+
+/**
+ * Class for importing project from jar file
+ *
+ * @author dsakharov@exadel.com,amakhtadui(a)exadel.com
+ *
+ */
+public class ImportRichFacesComponents {
+ private static final String PROJECT_NAME = "richFacesTest";
+ private static final String COMPONENTS_PATH = "WebContent/pages";
+
+ @SuppressWarnings("restriction")
+ public static boolean importRichFacesPages(String path) {
+ boolean result = false;
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProject project = workspace.getRoot().getProject(PROJECT_NAME);
+ ZipLeveledStructureProvider zipStructureProvider;
+ try {
+ zipStructureProvider = new ZipLeveledStructureProvider(new ZipFile(
+ path));
+
+ IOverwriteQuery overwrite = new IOverwriteQuery() {
+ public String queryOverwrite(String pathString) {
+ return ALL;
+ }
+ };
+
+ ImportOperation importOp = new ImportOperation(project
+ .getFullPath(), zipStructureProvider.getRoot(),
+ zipStructureProvider, overwrite);
+
+ importOp.setContext(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell());
+
+ importOp.run(new NullProgressMonitor());
+ result = true;
+
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return result;
+ }
+
+ /**
+ *
+ * @return
+ * @throws CoreException
+ */
+ public static Collection<IPath> getComponentsPaths() throws CoreException {
+ Collection<IPath> result = null;
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProject project = workspace.getRoot().getProject(PROJECT_NAME);
+ if (project != null) {
+ IFolder folder = project.getFolder(COMPONENTS_PATH);
+ IResource[] resources = folder.members();
+ if (resources != null && resources.length > 0) {
+ result = new ArrayList<IPath>(resources.length);
+ for (IResource res : resources) {
+ result.add(res.getFullPath());
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ *
+ * @throws CoreException
+ */
+ public static void removeProject() throws CoreException {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProject project = workspace.getRoot().getProject(PROJECT_NAME);
+ project.delete(IResource.ALWAYS_DELETE_PROJECT_CONTENT,
+ new NullProgressMonitor());
+ }
+}
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/ImportRichFacesComponents.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesAllTest.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesAllTest.java (rev 0)
+++ branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesAllTest.java 2007-10-12 13:25:12 UTC (rev 4158)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test.richfaces;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Class for testing all RichFaces components
+ *
+ * @author dsakovich(a)exadel.com
+ *
+ */
+
+public class RichFacesAllTest {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Tests for Vpe RichFaces components");
+ // $JUnit-BEGIN$
+ suite.addTestSuite(RichFacesComponentTest.class);
+ // $JUnit-END$
+ return suite;
+
+ }
+
+}
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesAllTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesComponentTest.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesComponentTest.java (rev 0)
+++ branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesComponentTest.java 2007-10-12 13:25:12 UTC (rev 4158)
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.test.richfaces;
+
+import java.util.Collection;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * Class for testing all RichFaces components
+ *
+ * @author dsakovich(a)exadel.com
+ *
+ */
+public class RichFacesComponentTest extends TestCase implements ILogListener {
+
+ private final static String EDITOR_ID = "org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor";
+ private final static String TEST_PROJECT_JAR_PATH = "/richFacesTest.jar";
+
+ // check warning log
+ private final static boolean checkWarning = false;
+ private boolean failureLog;
+ private Collection<IPath> components = null;
+
+ public RichFacesComponentTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ *
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ if (ImportRichFacesComponents.importRichFacesPages(Activator
+ .getPluginResourcePath()
+ + TEST_PROJECT_JAR_PATH)) {
+ components = ImportRichFacesComponents.getComponentsPaths();
+ }
+ failureLog = false;
+ waitForJobs();
+ Platform.addLogListener(this);
+ waitForJobs();
+ delay(5000);
+ }
+
+ /**
+ * Perform post-test cleanup.
+ *
+ * @throws Exception
+ *
+ * @see TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ ImportRichFacesComponents.removeProject();
+ waitForJobs();
+ Platform.removeLogListener(this);
+ }
+
+ /**
+ * Process UI input but do not return for the specified time interval.
+ *
+ * @param waitTimeMillis
+ * the number of milliseconds
+ */
+ private 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.
+ }
+ }
+ }
+
+ /**
+ * Wait until all background tasks are complete.
+ */
+ public void waitForJobs() {
+ while (Platform.getJobManager().currentJob() != null)
+ delay(5000);
+ }
+
+ public void testRichFacesComponent() throws PartInitException {
+ waitForJobs();
+
+ for (IPath componentPath : components) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(
+ componentPath);
+ IEditorInput input = new FileEditorInput(file);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage().openEditor(input, EDITOR_ID, true);
+
+ waitForJobs();
+ delay(3000);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage().closeAllEditors(true);
+ }
+ assertEquals(failureLog, false);
+ }
+
+ public void logging(IStatus status, String plugin) {
+ switch (status.getSeverity()) {
+ case IStatus.ERROR:
+ failureLog = true;
+ break;
+ case IStatus.WARNING:
+ if (checkWarning)
+ failureLog = true;
+ break;
+ default:
+ break;
+ }
+
+ }
+
+}
Property changes on: branches/jbosstools_xulrunner/vpe/tests/org.jboss.tools.vpe.test.richfaces/src/org/jboss/tools/vpe/test/richfaces/RichFacesComponentTest.java
___________________________________________________________________
Name: svn:executable
+ *
17 years, 3 months
JBoss Tools SVN: r4156 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: asakharov
Date: 2007-10-12 09:19:51 -0400 (Fri, 12 Oct 2007)
New Revision: 4156
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
Log:
vpe richFaces panelMenuItem
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css 2007-10-12 13:18:33 UTC (rev 4155)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css 2007-10-12 13:19:51 UTC (rev 4156)
@@ -45,10 +45,11 @@
width:100%;
}
+.dr-pmenu-item-disabled {
+ font-color:#B1ADA7;
+ color:#B1ADA7;
+}
-
-
-
.dr-pmenu-item {
border-top:1px solid;
cursor:pointer;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-12 13:18:33 UTC (rev 4155)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-12 13:19:51 UTC (rev 4156)
@@ -46,34 +46,46 @@
private static final String EMPTY_DIV_STYLE = "display: none;";
+ private static final String DISABLED_STYLE = "color:#B1ADA7;";
+
+ private static final String DISABLED_CLASS = "dr-pmenu-item-disabled";
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
Document visualDocument) {
Element div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ .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 sourceElement, Document visualDocument, Element parentVisualElement, boolean active){
-
+
+ public static VpeCreationData encode(VpePageContext pageContext,
+ VpeCreationData creationData, Element sourceElement,
+ Document visualDocument, Element parentVisualElement, boolean active) {
+
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, PANEL_MENU_ITEM);
-
+
Element div = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
parentVisualElement.appendChild(div);
- div.setAttribute("vpeSupport", PANEL_MENU_ITEM);
+
if (sourceElement.getParentNode().getNodeName().endsWith(
":panelMenuGroup")
|| (sourceElement.getParentNode().getNodeName()
.endsWith(":panelMenu"))) {
+ div.setAttribute("vpeSupport", PANEL_MENU_ITEM);
+
Element 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);
+ 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);
Element tr = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
@@ -82,31 +94,50 @@
Element tdNowrap = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
tr.appendChild(tdNowrap);
- tdNowrap.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, PANEL_MENU_NOWARP_CLASS);
+ tdNowrap.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ PANEL_MENU_NOWARP_CLASS);
Element imgSpacer1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
tdNowrap.appendChild(imgSpacer1);
- imgSpacer1.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, DEFAULT_SIZE_VALUE);
- imgSpacer1.setAttribute("vspace", NO_SIZE_VALUE);
- imgSpacer1.setAttribute("hspace", NO_SIZE_VALUE);
- imgSpacer1.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT, DEFAULT_SIZE_VALUE);
+ setDefaultImgAttributes(imgSpacer1);
ComponentUtil.setImg(imgSpacer1, IMG_SPACER_SRC);
Element imgPoints = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
tdNowrap.appendChild(imgPoints);
- imgPoints.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, DEFAULT_SIZE_VALUE);
- imgPoints.setAttribute("vspace", NO_SIZE_VALUE);
- imgPoints.setAttribute("hspace", NO_SIZE_VALUE);
- imgPoints.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT, DEFAULT_SIZE_VALUE);
- ComponentUtil.setImg(imgPoints, IMG_POINTS_SRC);
+
+ String icon = sourceElement.getAttribute("icon");
+ //String iconStyle = sourceElement.getAttribute("iconStyle");
+ //String iconClass = sourceElement.getAttribute("iconClass");
+ if (icon == null || icon.length() == 0) {
+ ComponentUtil.setImg(imgPoints, IMG_POINTS_SRC);
+ } else {
+ ComponentUtil.setImgFromResources(pageContext, imgPoints, icon,
+ IMG_POINTS_SRC);
+ }
+
+ /*if ((iconStyle == null) || (iconStyle.length() == 0)) {
+ setDefaultImgAttributes(imgPoints);
+ } else {
+ imgPoints.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ iconStyle);
+ }
+
+ if ((iconClass == null) || (iconClass.length() == 0)) {
+ setDefaultImgAttributes(imgPoints);
+ } else {
+ imgPoints.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ iconClass);
+ }*/
+
Element 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");
+ tdLable.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ "element.style");
String value = sourceElement.getAttribute("label");
Text text = visualDocument.createTextNode(value == null ? ""
: value);
@@ -119,10 +150,7 @@
Element imgSpacer2 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
td.appendChild(imgSpacer2);
- imgSpacer2.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, DEFAULT_SIZE_VALUE);
- imgSpacer2.setAttribute("vspace", NO_SIZE_VALUE);
- imgSpacer2.setAttribute("hspace", NO_SIZE_VALUE);
- imgSpacer2.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT, DEFAULT_SIZE_VALUE);
+ setDefaultImgAttributes(imgSpacer2);
ComponentUtil.setImg(imgSpacer2, IMG_SPACER_SRC);
List<Node> children = ComponentUtil.getChildren(sourceElement);
@@ -137,7 +165,57 @@
}
}
}
+
+ String styleClass = sourceElement.getAttribute("styleClass");
+ if (!(styleClass == null || styleClass.length() == 0)) {
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ }
+ else {
+ styleClass="";
+ }
+
+ if ("true".equals(sourceElement.getAttribute("disabled"))) {
+ String disabledStyle = sourceElement
+ .getAttribute("disabledStyle");
+ String disabledClass = sourceElement
+ .getAttribute("disabledClass");
+ String iconDisabled = sourceElement
+ .getAttribute("iconDisabled");
+ if (iconDisabled == null || iconDisabled.length() == 0) {
+ ComponentUtil.setImg(imgPoints, IMG_POINTS_SRC);
+ } else {
+ ComponentUtil.setImgFromResources(pageContext, imgPoints,
+ iconDisabled, IMG_SPACER_SRC);
+ }
+
+ if ((disabledStyle == null) || (disabledStyle.length() == 0)) {
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ DISABLED_STYLE);
+ } else {
+ table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ disabledStyle);
+ }
+ if ((disabledClass == null) || (disabledClass.length() == 0)) {
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,styleClass+" "+ DISABLED_CLASS);
+ } else {
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ styleClass + " " + disabledClass);
+ }
+ }
}
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(Element 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);
+ }
+}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r4155 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: amakhtadui
Date: 2007-10-12 09:18:33 -0400 (Fri, 12 Oct 2007)
New Revision: 4155
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-12 13:15:09 UTC (rev 4154)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-12 13:18:33 UTC (rev 4155)
@@ -14,23 +14,47 @@
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";
+
+ 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_STYLE = "iconStyle";
+
+ private static final String PANEL_MENU_GROUP_ATTR_ICON_CLASS = "iconClass";
+
+ private static final String PANEL_MENU_GROUP_ATTR_ICON_EXPANDED = "iconExpanded";
+
+ 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 PANEL_MENU_GROUP_ATTR_EXPANDED = "expanded";
+
+ 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 DEFAULT_PANEL_MENU_GROUP_SPACER = "/panelMenuGroup/spacer.gif";
private static final String DEFAULT_PANEL_MENU_GROUP_POINTER = "/panelMenuGroup/pointer.gif";
private static final String DEFAULT_PANEL_MENU_GROUP_POINT = "/panelMenuGroup/point.gif";
+
+ private static final String DEFAULT_PANEL_MENU_GROUP_COLLAPSED = "/panelMenuGroup/collapsed.gif";
private static final String STYLE_PATH = "/panelMenuGroup/style.css";
- private static final String ICON_WIDTH = "16";
-
- private static final String ICON_HEIGHT = "16";
-
- private static final String ICON_VSPACE = "0";
-
- private static final String ICON_HSPACE = "0";
-
private static final String EMPTY_DIV_STYLE = "display: none;";
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, Document visualDocument) {
@@ -39,33 +63,37 @@
return new VpeCreationData(div);
}
+
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNode, Object data, String name, String value) {
+ return true;
+}
public static VpeCreationData encode(VpePageContext pageContext, VpeCreationData creationData, Element sourceElement, Document visualDocument, Element parentVisualElement, boolean expanded, int activeChildId) {
- ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "panelMenuGroup");
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, NAME_COMPONENT);
Element div = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
parentVisualElement.appendChild(div);
div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-top-group-div");
- div.setAttribute("vpeSupport", "panelMenuGroup");
- div.setAttribute("vpe-user-toggle-id", String.valueOf(activeChildId));
- buildTable(sourceElement, visualDocument, div);
+ div.setAttribute(COMPONENT_ATTR_VPE_SUPPORT, NAME_COMPONENT);
+ div.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String.valueOf(activeChildId));
+ buildTable(sourceElement, visualDocument, div, expanded, expanded, activeChildId);
List<Node> children = ComponentUtil.getChildren(sourceElement);
if (!children.isEmpty()) {
- Element childDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(childDiv);
+ Element childSpan = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(childSpan);
for (Node child : children) {
- if (!child.getNodeName().endsWith(":panelMenuGroup") && !child.getNodeName().endsWith(":panelMenuItem")) {
+ 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(childDiv);
+ div.appendChild(childSpan);
}
childrenInfo.addSourceChild(child);
} else {
if (expanded) {
- if (child.getNodeName().endsWith(":panelMenuGroup")) {
- RichFacesPanelMenuGroupTemplate.encode(pageContext, creationData, (Element) child, visualDocument, div, false, -1);
+ if (child.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)) {
+ RichFacesPanelMenuGroupTemplate.encode(pageContext, creationData, (Element) child, visualDocument, div, true, -1);
} else {
RichFacesPanelMenuItemTemplate.encode(pageContext, creationData, (Element) child, visualDocument, div, false);
}
@@ -73,8 +101,8 @@
if (childrenInfo.getSourceChildren() != null && childrenInfo.getSourceChildren().size() > 0) {
creationData.addChildrenInfo(childrenInfo);
- childDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
- childrenInfo = new VpeChildrenInfo(childDiv);
+ childSpan = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
+ childrenInfo = new VpeChildrenInfo(childSpan);
}
}
}
@@ -87,7 +115,7 @@
return creationData;
}
- private static final void buildTable(Element sourceElement, Document visualDocument, Element div) {
+ private static final void buildTable(Element sourceElement, Document visualDocument, Element div, boolean active, boolean expanded, int activeChildId) {
Node parent = getRichPanelParent(sourceElement);
Element table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
@@ -100,14 +128,12 @@
table.appendChild(tableBody);
Element column1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ column1.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String.valueOf(activeChildId));
tableBody.appendChild(column1);
Element img1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
column1.appendChild(img1);
- img1.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, ICON_WIDTH);
- img1.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR, ICON_HEIGHT);
- img1.setAttribute("vspace", ICON_VSPACE);
- img1.setAttribute("hspace", ICON_HSPACE);
+ img1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-pmenu-group-icon");
Element column2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
tableBody.appendChild(column2);
@@ -115,23 +141,31 @@
Text name = visualDocument.createTextNode(sourceElement.getAttribute("label"));
column2.appendChild(name);
+ column2.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String.valueOf(activeChildId));
+ if(active) {
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-selected-item");
+ }
+
Element column3 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ column3.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String.valueOf(activeChildId));
tableBody.appendChild(column3);
Element img2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
column3.appendChild(img2);
- img2.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, ICON_WIDTH);
- img2.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR, ICON_WIDTH);
- img2.setAttribute("vspace", ICON_VSPACE);
- img2.setAttribute("hspace", ICON_HSPACE);
+ img2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-pmenu-group-icon");
- if (parent.getNodeName().endsWith(":panelMenu")) {
+ if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)) {
ComponentUtil.setImg(img1, DEFAULT_PANEL_MENU_GROUP_SPACER);
- ComponentUtil.setImg(img2, DEFAULT_PANEL_MENU_GROUP_POINTER);
+ if(expanded) {
+ ComponentUtil.setImg(img2, DEFAULT_PANEL_MENU_GROUP_COLLAPSED);
+ } else {
+ ComponentUtil.setImg(img2, DEFAULT_PANEL_MENU_GROUP_POINTER);
+ }
column2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-group-self-label dr-pmenu-selected-item");
table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-top-group");
} else {
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-pmenu-top-self-div");
ComponentUtil.setImg(img1, DEFAULT_PANEL_MENU_GROUP_POINT);
img1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "vertical-align: middle");
ComponentUtil.setImg(img2, DEFAULT_PANEL_MENU_GROUP_SPACER);
@@ -144,7 +178,7 @@
Node parent = sourceElement.getParentNode();
while (true) {
- if (parent.getNodeName().endsWith(":panelMenu") || parent.getNodeName().endsWith(":panelMenuGroup")) {
+ if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG) || parent.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)) {
break;
} else {
parent = parent.getParentNode();
17 years, 3 months
JBoss Tools SVN: r4154 - in trunk/seam/tests/org.jboss.tools.seam.core.test: projects/SeamWebWarTestProject/WebContent/WEB-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-12 09:15:09 -0400 (Fri, 12 Oct 2007)
New Revision: 4154
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.2
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.3
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.2
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.2
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.3
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.4
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.5
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java
Log:
http://jira.jboss.com/jira/browse/EXIN-13
Components validator tests
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2007-10-12 13:11:59 UTC (rev 4153)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2007-10-12 13:15:09 UTC (rev 4154)
@@ -17,5 +17,6 @@
org.jboss.tools.common.test,
org.jboss.tools.jsf,
org.eclipse.wst.common.project.facet.core,
- org.jboss.tools.tests
+ org.jboss.tools.tests,
+ org.eclipse.ui.workbench
Provide-Package: org.jboss.tools.seam.core.test
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.2
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.2 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.2 2007-10-12 13:15:09 UTC (rev 4154)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:drools="http://jboss.com/products/seam/drools"
+ xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:mail="http://jboss.com/products/seam/mail"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation=
+ "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd
+ http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.1.xsd
+ http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.1.xsd
+ http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.2.xsd
+ http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
+
+ <component class="org.domain.SeamWebWarTestProject.session.StateComponent" name="statefulComponent" scope="application">
+ <property name="abc">value1</property>
+ </component>
+
+ <core:init debug="true" jndi-pattern="@jndiPattern@"/>
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000"
+ conversation-id-parameter="cid"
+ conversation-is-long-running-parameter="clr"/>
+
+ <core:managed-persistence-context name="entityManager"
+ auto-create="true"
+ entity-manager-factory="#{SeamWebWarTestProjectEntityManagerFactory}"/>
+
+ <core:entity-manager-factory name="SeamWebWarTestProjectEntityManagerFactory"
+ persistence-unit-name="SeamWebWarTestProject"/>
+
+ <core:ejb installed="@embeddedEjb@"/>
+
+ <drools:rule-base name="securityRules">
+ <drools:rule-files><value>/security.drl</value></drools:rule-files>
+ </drools:rule-base>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"
+ security-rules="#{securityRules}"
+ remember-me="true"/>
+
+ <event type="org.jboss.seam.notLoggedIn">
+ <action expression="#{redirect.captureCurrentView}"/>
+ </event>
+ <event type="org.jboss.seam.postAuthenticate">
+ <action expression="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <mail:mail-session host="localhost" port="2525" username="test" password="test" />
+
+ <!-- For use with jBPM pageflow or process management -->
+ <!--
+ <core:jbpm>
+ <core:process-definitions></core:process-definitions>
+ <core:pageflow-definitions></core:pageflow-definitions>
+ </core:jbpm>
+ -->
+
+</components>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.3
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.3 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.3 2007-10-12 13:15:09 UTC (rev 4154)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:drools="http://jboss.com/products/seam/drools"
+ xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:mail="http://jboss.com/products/seam/mail"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation=
+ "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd
+ http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-1.1.xsd
+ http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.1.xsd
+ http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.2.xsd
+ http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
+
+ <component class="org.domain.SeamWebWarTestProject.session.StatefulComponent" name="statefulComponent" scope="application">
+ <property name="abc">value1</property>
+ </component>
+
+ <core:init debug="true" jndi-pattern="@jndiPattern@"/>
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000"
+ conversation-id-parameter="cid"
+ conversation-is-long-running-parameter="clr"/>
+
+ <core:managed-persistence-context name="entityManager"
+ auto-create="true"
+ entity-manager-factory="#{SeamWebWarTestProjectEntityManagerFactory}"/>
+
+ <core:entity-manager-factory name="SeamWebWarTestProjectEntityManagerFactory"
+ persistence-unit-name="SeamWebWarTestProject"/>
+
+ <core:ejb installed="@embeddedEjb@"/>
+
+ <drools:rule-base name="securityRules">
+ <drools:rule-files><value>/security.drl</value></drools:rule-files>
+ </drools:rule-base>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"
+ security-rules="#{securityRules}"
+ remember-me="true"/>
+
+ <event type="org.jboss.seam.notLoggedIn">
+ <action expression="#{redirect.captureCurrentView}"/>
+ </event>
+ <event type="org.jboss.seam.postAuthenticate">
+ <action expression="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <mail:mail-session host="localhost" port="2525" username="test" password="test" />
+
+ <!-- For use with jBPM pageflow or process management -->
+ <!--
+ <core:jbpm>
+ <core:process-definitions></core:process-definitions>
+ <core:pageflow-definitions></core:pageflow-definitions>
+ </core:jbpm>
+ -->
+
+</components>
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml 2007-10-12 13:11:59 UTC (rev 4153)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml 2007-10-12 13:15:09 UTC (rev 4154)
@@ -12,9 +12,6 @@
http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.2.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
- <component class="org.domain.SeamWebWarTestProject.session.StatefulComponent" name="statefulComponent" scope="application">
- <property name="abc">value1</property>
- </component>
<core:init debug="true" jndi-pattern="@jndiPattern@"/>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.2
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.2 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.2 2007-10-12 13:15:09 UTC (rev 4154)
@@ -0,0 +1,20 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+
+@Name("abcComponent")
+public class BbcComponent {
+
+ @Logger private Log log;
+
+ public void bbcComponent()
+ {
+ //implement your business logic here
+ log.info("bbcComponent.bbcComponent() action called");
+ }
+
+ //add additional action methods
+
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.2
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.2 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.2 2007-10-12 13:15:09 UTC (rev 4154)
@@ -0,0 +1,44 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("statefulComponent")
+(a)Scope(ScopeType.APPLICATION)
+@Stateful
+public class StatefulComponent {
+
+ private String abc;
+
+ @Logger private Log log;
+
+
+ //seam-gen method
+ public String statefulComponent()
+ {
+ //implement your business logic here
+ log.info("statefulComponent.statefulComponent() action called");
+ return "success";
+ }
+
+ //add additional action methods
+ @Destroy
+ public void destroyMethod(){
+
+ }
+
+ public String getAbc() {
+ return abc;
+ }
+
+ public void setAbc(String abc) {
+ this.abc = abc;
+ }
+
+}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.3
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.3 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.3 2007-10-12 13:15:09 UTC (rev 4154)
@@ -0,0 +1,45 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("statefulComponent")
+(a)Scope(ScopeType.APPLICATION)
+@Stateful
+public class StatefulComponent {
+
+ private String abc;
+
+ @Logger private Log log;
+
+
+ //seam-gen method
+ public String statefulComponent()
+ {
+ //implement your business logic here
+ log.info("statefulComponent.statefulComponent() action called");
+ return "success";
+ }
+
+ //add additional action methods
+
+ @Remove
+ public void removeMethod(){
+
+ }
+
+ public String getAbc() {
+ return abc;
+ }
+
+ public void setAbc(String abc) {
+ this.abc = abc;
+ }
+
+}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.4
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.4 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.4 2007-10-12 13:15:09 UTC (rev 4154)
@@ -0,0 +1,50 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("statefulComponent")
+(a)Scope(ScopeType.PAGE)
+@Stateful
+public class StatefulComponent {
+
+ private String abc;
+
+ @Logger private Log log;
+
+
+ //seam-gen method
+ public String statefulComponent()
+ {
+ //implement your business logic here
+ log.info("statefulComponent.statefulComponent() action called");
+ return "success";
+ }
+
+ //add additional action methods
+ @Destroy
+ public void destroyMethod(){
+
+ }
+
+ @Remove
+ public void removeMethod(){
+
+ }
+
+ public String getAbc() {
+ return abc;
+ }
+
+ public void setAbc(String abc) {
+ this.abc = abc;
+ }
+
+}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.5
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.5 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.5 2007-10-12 13:15:09 UTC (rev 4154)
@@ -0,0 +1,45 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.log.Log;
+
+@Name("statefulComponent")
+(a)Scope(ScopeType.APPLICATION)
+@Stateful
+public class StatefulComponent {
+
+ private String abc;
+
+ @Logger private Log log;
+
+
+ //seam-gen method
+ public String statefulComponent()
+ {
+ //implement your business logic here
+ log.info("statefulComponent.statefulComponent() action called");
+ return "success";
+ }
+
+ //add additional action methods
+ @Destroy
+ public void destroyMethod(){
+
+ }
+
+ @Remove
+ public void removeMethod(){
+
+ }
+
+ public String getAbc() {
+ return abc;
+ }
+}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java 2007-10-12 13:11:59 UTC (rev 4153)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java 2007-10-12 13:15:09 UTC (rev 4154)
@@ -42,9 +42,8 @@
public String getAbc() {
return abc;
}
-
+
public void setAbc(String abc) {
this.abc = abc;
}
-
}
\ No newline at end of file
17 years, 3 months