JBoss Tools SVN: r21533 - in trunk: vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-04-16 10:02:57 -0400 (Fri, 16 Apr 2010)
New Revision: 21533
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4509Test.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/OpenOnUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6189 - open on test fixed
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4509Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4509Test.java 2010-04-16 13:57:04 UTC (rev 21532)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4509Test.java 2010-04-16 14:02:57 UTC (rev 21533)
@@ -31,13 +31,13 @@
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.vpe.ui.test.OpenOnUtil;
import org.jboss.tools.vpe.ui.test.ProjectsLoader;
-import org.jboss.tools.vpe.ui.test.TestUtil;
import org.jboss.tools.vpe.ui.test.VpeTest;
/**
* @author mareshkau
*
*/
+@SuppressWarnings("restriction")
public class JBIDE4509Test extends VpeTest{
public JBIDE4509Test(String name) {
@@ -141,18 +141,16 @@
*
* @author mareshkau
*/
- @SuppressWarnings("restriction")
private static final void checkOpenOnFromJarFile(final String jarFilePath,final String jarEntryPath,
final int line, final int position,final String expectedResult) throws Throwable {
+
IProject project = ProjectsLoader.getInstance()
.getProject(JsfAllTests.IMPORT_JBIDE3247_PROJECT_NAME);
IJavaProject javaProject = JavaCore.create(project);
-
- IFile jarArchive = (IFile) project.findMember(jarFilePath);
-
- IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(jarArchive);
-
- JarPackageFragmentRoot jarRoot = (JarPackageFragmentRoot) root;
+
+ IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(project.getLocation().toString()+ "/" +jarFilePath); //$NON-NLS-1$
+
+ JarPackageFragmentRoot jarRoot = (JarPackageFragmentRoot) root;
JarEntryFile fileInJar = new JarEntryFile(jarEntryPath);
fileInJar.setParent(jarRoot);
JarEntryEditorInput jarEditorInput = new JarEntryEditorInput(fileInJar);
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/OpenOnUtil.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/OpenOnUtil.java 2010-04-16 13:57:04 UTC (rev 21532)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/OpenOnUtil.java 2010-04-16 14:02:57 UTC (rev 21533)
@@ -119,7 +119,6 @@
.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
assertEquals(
"Active page should be ", openedOnFileName, activeEditor.getEditorInput().getName()); //$NON-NLS-1$
-
}
private static StructuredTextEditor findStructEditor (MultiPageEditorPart part, IEditorInput input){
14 years, 9 months
JBoss Tools SVN: r21532 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/progressBar and 15 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-04-16 09:57:04 -0400 (Fri, 16 Apr 2010)
New Revision: 21532
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/css/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/css/main.css
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/progressBar/progressBar.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplateHelper.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTogglePanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/JBIDE/3416/jbide3416.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908/welcome.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3376/jbide3376.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5768/test.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/facet.jsp.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panel.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/subTable.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3373 , f:facet rendering was updated, JUnits were updated.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -10,13 +10,21 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.template;
+import java.util.List;
+
+import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
+import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.jboss.tools.vpe.editor.util.XmlUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -34,53 +42,64 @@
* .vpe.editor.context.VpePageContext, org.w3c.dom.Node,
* org.mozilla.interfaces.nsIDOMDocument)
*/
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
- nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- VpeCreationData creationData = new VpeCreationData(div);
- NodeList children = sourceNode.getChildNodes();
- boolean jsfComponentFound = false;
- /*
- * Only one JSF component may be present inside a facet tag, if more are
- * present only the first one is rendered and the other ones are
- * ignored.
- */
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
-// String sourcePrefix = child.getPrefix();
-// if (XmlUtil.hasTaglib(sourceNode, pageContext, sourcePrefix)) {
-// String sourceNodeUri = XmlUtil.getTaglibUri(sourceNode, pageContext, sourcePrefix);
- if( ((child.getNodeType()==Node.TEXT_NODE) &&
- (child.getNodeValue()!=null)
- && (child.getNodeValue().trim().length()>0)
- ) ||(child.getNodeType() == Node.ELEMENT_NODE)) {
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(div);
- childrenInfo.addSourceChild(child);
- creationData.addChildrenInfo(childrenInfo);
- jsfComponentFound = true;
- break;
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ Element sourceElement = (Element) sourceNode;
+ Node facetParent = null;
+ nsIDOMElement facetVisualTag = null;
+
+ NodeList children = sourceNode.getChildNodes();
+ boolean jsfComponentFound = false;
+
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3373
+ * By rendering facet to existed visual node
+ * we avoid unwarranted tag creation for facet element.
+ */
+ facetParent = sourceNode.getParentNode();
+ nsIDOMNode facetParentVisualTag = pageContext.getDomMapping().getVisualNode(facetParent);
+ facetVisualTag = VisualDomUtil.findVisualTagWithFacetAttribute(
+ facetParentVisualTag, sourceElement.getAttribute(JSF.ATTR_NAME));
+ /*
+ * When no tag found use 'SPAN' tag by default.
+ * So facet will be rendered in any case.
+ */
+ if (null == facetVisualTag) {
+ facetVisualTag = visualDocument.createElement(HTML.TAG_SPAN);
}
- //commented by Maksim Areshkau as fix for https://jira.jboss.org/jira/browse/JBIDE-5744
-// if ((child.getNodeType() == Node.ELEMENT_NODE)){
-//// && (VisualDomUtil.JSF_CORE_URI.equalsIgnoreCase(sourceNodeUri)
-//// || VisualDomUtil.JSF_HTML_URI.equalsIgnoreCase(sourceNodeUri)
-//// || VisualDomUtil.RICH_FACES_URI.equalsIgnoreCase(sourceNodeUri)
-//// || VisualDomUtil.A4J_URI.equalsIgnoreCase(sourceNodeUri)
-//// || VisualDomUtil.FACELETS_URI.equalsIgnoreCase(sourceNodeUri))) {
-// VpeChildrenInfo childrenInfo = new VpeChildrenInfo(div);
-// childrenInfo.addSourceChild(child);
-// creationData.addChildrenInfo(childrenInfo);
-// jsfComponentFound = true;
-// break;
-//// }
-// }
- }
-
- if (!jsfComponentFound) {
- div.setAttribute(HTML.ATTR_STYLE, "display: none; "); //$NON-NLS-1$
- creationData.addChildrenInfo(new VpeChildrenInfo(div));
- }
-
- return creationData;
+
+ VpeCreationData creationData = new VpeCreationData(facetVisualTag);
+ /*
+ * Only one JSF component may be present inside a facet tag, if more are
+ * present only the first one is rendered and the other ones are
+ * ignored.
+ */
+ for (int i = children.getLength() - 1; i >= 0 ; i--) {
+ Node child = children.item(i);
+ String sourcePrefix = child.getPrefix();
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(sourceNode,
+ pageContext);
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(
+ sourcePrefix, taglibs);
+ if (null != sourceNodeTaglib) {
+ String sourceNodeUri = sourceNodeTaglib.getUri();
+ if (VisualDomUtil.JSF_CORE_URI.equalsIgnoreCase(sourceNodeUri)
+ || VisualDomUtil.JSF_HTML_URI.equalsIgnoreCase(sourceNodeUri)
+ || VisualDomUtil.RICH_FACES_URI.equalsIgnoreCase(sourceNodeUri)
+ || VisualDomUtil.A4J_URI.equalsIgnoreCase(sourceNodeUri)
+ || VisualDomUtil.FACELETS_URI.equalsIgnoreCase(sourceNodeUri)) {
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(facetVisualTag);
+ childrenInfo.addSourceChild(child);
+ creationData.addChildrenInfo(childrenInfo);
+ jsfComponentFound = true;
+ break;
+ }
+ }
+ }
+ if (!jsfComponentFound) {
+ facetVisualTag.setAttribute(HTML.ATTR_STYLE, "display: none; "); //$NON-NLS-1$
+ creationData.addChildrenInfo(new VpeChildrenInfo(facetVisualTag));
+ }
+ return creationData;
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/progressBar/progressBar.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/progressBar/progressBar.css 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/progressBar/progressBar.css 2010-04-16 13:57:04 UTC (rev 21532)
@@ -11,7 +11,18 @@
margin-bottom: 2px;
}
-.rich-progress-bar-height {
+.rich-progress-bar-shell-dig {
+ border-color: #BED6F8;
+ border: 1px solid;
+ color: #000000;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+ margin-bottom: 2px;
+ overflow: hidden;
+ position: relative;
+}
+
+.rich-progress-bar-height,.rich-progress-bar-height-dig {
height: 13px;
}
@@ -21,12 +32,35 @@
background-image: url(upload_status.gif);
}
+.rich-progress-bar-uploaded-dig {
+ position: absolute;
+ top: 0;
+ left: 0;
+ overflow: hidden;
+ border-color: #BED6F8;
+}
+
.rich-progress-bar-remained {
font-weight: bold;
position: relative;
text-align: center;
+ background-color: #FFFFFF;
}
+.rich-progress-bar-completed {
+ background-repeat: repeat-x;
+ background-color: #E79A00;
+ background-image : url(upload_status.gif);
+ font-weight : bold;
+ text-align: center;
+ background-image: url(upload_status.gif);
+}
+
.rich-progress-bar-padding {
padding: 0pt;
+}
+
+.rich-progress-bar-vpe-text {
+ font-weight : bold;
+ text-align: center;
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -18,6 +18,7 @@
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
@@ -31,6 +32,8 @@
import org.jboss.tools.vpe.editor.util.ElService;
import org.jboss.tools.vpe.editor.util.FileUtil;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
@@ -185,30 +188,21 @@
String facetName, boolean last) {
NodeList children = parentElement.getChildNodes();
-
if (children != null) {
-
int index = last ? children.getLength()-1 : 0;
int step = last ? -1 : 1;
int stopIndex = last ? -1 : children.getLength();
-
while (index != stopIndex) {
-
Node child = children.item(index);
-
if ((child.getNodeType() == Node.ELEMENT_NODE)
&& RichFaces.TAG_FACET.equals(child.getLocalName())
&& facetName.equals(((Element) child)
.getAttribute(RichFaces.ATTR_NAME))) {
return (Element) child;
}
-
index += step;
-
}
-
}
-
return null;
}
@@ -375,7 +369,8 @@
NodeList nodeList = sourceElement.getChildNodes();
for (int i = 0; i < nodeList.getLength(); i++) {
Node child = nodeList.item(i);
- if ((child instanceof Element || returnTextNodes) && (!child.getNodeName().equals("f:facet"))) { //$NON-NLS-1$
+ if ((child instanceof Element && !child.getNodeName().equals("f:facet")) //$NON-NLS-1$
+ || (returnTextNodes && (null != child.getNodeValue()) && (child.getNodeValue().trim().length() > 0))) {
children.add(child);
}
}
@@ -971,4 +966,47 @@
}
return widthDouble;
}
-}
\ No newline at end of file
+
+ /**
+ * If there are several JSF tags inside RichFaces tag
+ * only the first one will be returned.
+ *
+ * @param pageContext the page context
+ * @param sourceElement the source element
+ * @param facetName the name of the facet
+ * @return the first JSF tag
+ */
+ public static Node getFacetBody(VpePageContext pageContext,
+ Element sourceElement, String facetName) {
+ Element facet = SourceDomUtil.getFacetByName(sourceElement, facetName);
+ Map<String, List<Node>> facetChildren = VisualDomUtil
+ .findFacetElements(facet, pageContext);
+ return getFacetBody(facetChildren);
+ }
+
+ /**
+ * Select the first JSF component among facet's children
+ *
+ * @param facetChildren the map returned from
+ * {@link VisualDomUtil#findFacetElements(Element, VpePageContext)}
+ * @return the first JSF tag
+ */
+ public static Node getFacetBody(Map<String, List<Node>> facetChildren) {
+ Node facetBody = null;
+ /*
+ * Display the first JSF Tag
+ */
+ if (facetChildren.get(VisualDomUtil.FACET_ODD_TAGS).size() > 0) {
+ List<Node> oddTags = new ArrayList<Node>(0);
+ oddTags.addAll(facetChildren.get(VisualDomUtil.FACET_ODD_TAGS));
+ facetBody = oddTags.get(0);
+ } else if (facetChildren.get(VisualDomUtil.FACET_JSF_TAG).size() > 0) {
+ /*
+ * Display the last JSF Tag
+ */
+ facetBody = facetChildren.get(VisualDomUtil.FACET_JSF_TAG).get(0);
+ }
+ return facetBody;
+ }
+
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -64,9 +64,6 @@
/** The Constant RICH_INPLACE_VIEW_DEFAULT_STYLE_CLASS. */
protected static final String RICH_INPLACE_VIEW_DEFAULT_STYLE_CLASS = "rich-inplace-view"; //$NON-NLS-1$
- /** The Constant VPE_USER_TOGGLE_ID_ATTR. */
- public static final String VPE_USER_TOGGLE_ID_ATTR = "vpe-user-toggle-id"; //$NON-NLS-1$
-
/** The button images. */
protected final Map<String, String> buttonImages = new HashMap<String, String>();
@@ -105,7 +102,7 @@
*/
protected nsIDOMElement createRootSpanTemplateMethod(Element source, nsIDOMDocument visualDocument, Attributes attrs) {
final nsIDOMElement rootSpan = visualDocument.createElement(HTML.TAG_SPAN);
- rootSpan.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(this.isToggle));
+ rootSpan.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, String.valueOf(this.isToggle));
String rootStyleClass = "rich-inplace" + getCssStylesSuffix(); //$NON-NLS-1$
for (String sc : getRootSpanClasses(attrs)) {
if (ComponentUtil.isNotBlank(sc)) {
@@ -346,10 +343,12 @@
/*
* Encoding controls facet
*/
- Element facetElement = ComponentUtil.getFacetElement((Element) sourceNode, "controls", true); //$NON-NLS-1$
- if (facetElement != null) {
+ Element controlFacet = ComponentUtil.getFacetElement(
+ (Element) sourceNode, RichFaces.NAME_FACET_CONTROLS, false);
+
+ if (controlFacet != null) {
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(divButtons);
- childrenInfo.addSourceChild(facetElement);
+ childrenInfo.addSourceChild(controlFacet);
creationData.addChildrenInfo(childrenInfo);
} else {
// Create "Apply" button
@@ -371,7 +370,7 @@
String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(saveControlIconImg, pageContext, true);
applyButtonImg.setAttribute(HTML.ATTR_SRC, imgFullPath);
}
- applyButtonImg.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+ applyButtonImg.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, String.valueOf(0));
// Create "Cancel" button
final nsIDOMElement cancelButtonImg = visualDocument.createElement(HTML.TAG_INPUT);
@@ -392,7 +391,7 @@
String imgFullPath = VpeStyleUtil.addFullPathToImgSrc(cancelControlIconImg, pageContext, true);
cancelButtonImg.setAttribute(HTML.ATTR_SRC, imgFullPath);
}
- cancelButtonImg.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+ cancelButtonImg.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, String.valueOf(0));
divButtons.appendChild(applyButtonImg);
divButtons.appendChild(cancelButtonImg);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
@@ -51,8 +52,33 @@
td.setAttribute(HTML.ATTR_CLASS, columnClass);
final VpeCreationData creationData = new VpeCreationData(td);
- // Create mapping to Encode body
+ Element headerFacet = SourceDomUtil.getFacetByName(sourceElement,
+ RichFaces.NAME_FACET_HEADER);
+ Element footerFacet = SourceDomUtil.getFacetByName(sourceElement,
+ RichFaces.NAME_FACET_FOOTER);
+ Map<String, List<Node>> headerFacetChildren = VisualDomUtil
+ .findFacetElements(headerFacet, pageContext);
+ Map<String, List<Node>> footerFacetChildren = VisualDomUtil
+ .findFacetElements(footerFacet, pageContext);
+ boolean headerHtmlElementPresents = headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0;
+ boolean footerHtmlElementPresents = footerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0;
+ /*
+ * Encode html elements from facets to the column body
+ */
VpeChildrenInfo tdInfo = new VpeChildrenInfo(td);
+ if (headerHtmlElementPresents) {
+ for (Node child : headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ tdInfo.addSourceChild(child);
+ }
+ }
+ if (footerHtmlElementPresents) {
+ for (Node child : footerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ tdInfo.addSourceChild(child);
+ }
+ }
+ /*
+ * Encode body
+ */
List<Node> children = ComponentUtil.getChildren(sourceElement,true);
for (Node child : children) {
if (!isFacet(child)) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplateHelper.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplateHelper.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplateHelper.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -240,7 +240,7 @@
buttonBackground.setAttribute(HTML.ATTR_CLASS, styleClasess.get(BUTTON_BACKGROUND));
buttonBackground.setAttribute(HTML.ATTR_READONLY, Constants.TRUE);
- buttonBackground.setAttribute(RichFacesAbstractInplaceTemplate.VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+ buttonBackground.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, String.valueOf(0));
if (sourceButtonStyle != null) {
buttonBackground.setAttribute(HTML.ATTR_STYLE, sourceButtonStyle);
}
@@ -250,7 +250,7 @@
;
buttonIcon.setAttribute(HTML.ATTR_CLASS, styleClasess.get(BUTTON_ICON));
buttonIcon.setAttribute(HTML.ATTR_READONLY, Constants.TRUE);
- buttonIcon.setAttribute(RichFacesAbstractInplaceTemplate.VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+ buttonIcon.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, String.valueOf(0));
if (sourceButtonStyle != null) {
buttonIcon.setAttribute(HTML.ATTR_STYLE, sourceButtonStyle);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataDefinitionListTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -10,8 +10,8 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
-import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
@@ -22,12 +22,13 @@
import org.jboss.tools.vpe.editor.template.expression.VpeExpression;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionException;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.jboss.tools.vpe.editor.util.VpeClassUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
* Creates rich:dataDefinitionList template.
@@ -38,12 +39,9 @@
public class RichFacesDataDefinitionListTemplate extends VpeAbstractTemplate {
/**
- *
+ * CSS settings
*/
private static final String DEFAULT_DD_CLASS = "columnClass"; //$NON-NLS-1$
- private static final String FACET_URI = "http://java.sun.com/jsf/core"; //$NON-NLS-1$
- private static final String FACET_NAME_ATTR = "name"; //$NON-NLS-1$
- private static final String FACET_NAME_ATTR_VALUE = "term"; //$NON-NLS-1$
private static final String STYLE_RESOURCES_PATH = "/dataDefinitionList/dataDefinitionList.css"; //$NON-NLS-1$
/**
@@ -59,7 +57,10 @@
* The document of the visual tree.
* @return The information on the created node of the visual tree.
*/
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ Element sourceElement = (Element) sourceNode;
nsIDOMElement listElement = visualDocument.createElement(HTML.TAG_DL);
ComponentUtil.setCSSLink(
pageContext,
@@ -68,37 +69,24 @@
VpeCreationData creationData = new VpeCreationData(listElement);
creationData.addChildrenInfo(new VpeChildrenInfo(null));
-
- Element child = null;
- NodeList list = sourceNode.getChildNodes();
-
// sets attributes for list
ComponentUtil.correctAttribute((Element)sourceNode, listElement,
RichFaces.ATTR_STYLE, HTML.ATTR_STYLE, null, null);
ComponentUtil.correctAttribute((Element)sourceNode, listElement,
RichFaces.ATTR_STYLE_CLASS, HTML.ATTR_CLASS, null, "listClass"); //$NON-NLS-1$
+ Element termFacet = SourceDomUtil.getFacetByName(sourceElement,
+ RichFaces.NAME_FACET_TERM);
+ Map<String, List<Node>> termFacetChildren = VisualDomUtil
+ .findFacetElements(termFacet, pageContext);
+ Node termNode= ComponentUtil.getFacetBody(termFacetChildren);
+
+ /*
+ * Encode body of the tag.
+ * Add text nodes to children list also.
+ */
+ List<Node> children = ComponentUtil.getChildren(sourceElement, true);
- Element facetElement = null;
- List<Element> dataDefinitionElements = new ArrayList<Element>();
- for (int i = 0; i < list.getLength(); i++) {
- Node nodeChild = list.item(i);
- if (!(nodeChild instanceof Element)) {
- continue;
- }
- child = (Element) nodeChild;
-
- if (!child.getLocalName().equals(RichFaces.TAG_FACET)) {
- dataDefinitionElements.add(child);
- } else if (facetElement == null
- && (FACET_URI.equals(pageContext.getSourceTaglibUri(child)))
- && child.getAttribute(FACET_NAME_ATTR) != null
- && child.getAttribute(FACET_NAME_ATTR).equals(
- FACET_NAME_ATTR_VALUE)) {
- facetElement = child;
- }
- }
-
final List<String> rowClasses;
try {
final VpeExpression exprRowClasses = RichFaces.getExprRowClasses();
@@ -116,55 +104,37 @@
// this is OK, rows still equals 1
}
+ VpeChildrenInfo childInfo = null;
for (int row = 0; row < rows; row++) {
- if (facetElement != null) {
+ if (termNode != null) {
insertDtElement(sourceNode, visualDocument,
- creationData, listElement, facetElement);
-
+ creationData, listElement, termNode);
}
- if (!dataDefinitionElements.isEmpty()) {
+ if ((termFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0)
+ || !children.isEmpty()) {
String ddClass = DEFAULT_DD_CLASS;
if (rowClassesSize > 0) {
ddClass+= " " + rowClasses.get(row % rowClassesSize); //$NON-NLS-1$
}
- insertDdElement(sourceNode, visualDocument,
- creationData, listElement, dataDefinitionElements,
- ddClass);
+ nsIDOMElement dd = visualDocument.createElement(HTML.TAG_DD);
+ dd.setAttribute(HTML.ATTR_CLASS, ddClass);
+ listElement.appendChild(dd);
+
+ childInfo = new VpeChildrenInfo(dd);
+ for (Node child : termFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childInfo.addSourceChild(child);
+ }
+ for (Node child : children) {
+ childInfo.addSourceChild(child);
+ }
+ creationData.addChildrenInfo(childInfo);
}
}
return creationData;
}
/**
- * Insert elements in list
- *
- * @param sourceNode
- * The current node of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @param creationData
- * @param parentList
- * @param childElement
- * @param styleClass class of this DD element
- */
- private void insertDdElement(Node sourceNode,
- nsIDOMDocument visualDocument, VpeCreationData creationData,
- nsIDOMElement parentList, List<Element> childElements, String styleClass) {
- nsIDOMElement dd = visualDocument.createElement(HTML.TAG_DD);
-
- dd.setAttribute(HTML.ATTR_CLASS, styleClass);
-
- parentList.appendChild(dd);
-
- VpeChildrenInfo vpeChildrenInfo = new VpeChildrenInfo(dd);
- for (Element childElement : childElements) {
- vpeChildrenInfo.addSourceChild(childElement);
- }
- creationData.addChildrenInfo(vpeChildrenInfo);
- }
-
- /**
* Insert listDataDefinition facet to HTML DT element
*
* @param sourceNode
@@ -177,7 +147,7 @@
*/
private void insertDtElement(Node sourceNode, nsIDOMDocument visualDocument,
VpeCreationData creationData, nsIDOMElement parentList,
- Element facetElement) {
+ Node facetElement) {
nsIDOMElement dt = visualDocument.createElement(HTML.TAG_DT);
ComponentUtil.correctAttribute(
(Element) sourceNode,
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataGridTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.StringTokenizer;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
@@ -21,6 +22,7 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -55,35 +57,50 @@
String tableClass = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
table.setAttribute(HTML.ATTR_CLASS, "dr-table rich-table " + (tableClass==null?Constants.EMPTY:tableClass)); //$NON-NLS-1$
- // Encode colgroup definition.
+ /*
+ * Encode colgroup definition.
+ */
int columnsLength = getColumnsCount(sourceElement);
nsIDOMElement colgroup = visualDocument.createElement(HTML.TAG_COLGROUP);
colgroup.setAttribute(HTML.ATTR_SPAN, String.valueOf(columnsLength));
table.appendChild(colgroup);
+
+ /*
+ * Encode Caption
+ */
+ Element caption = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_CAPTION);
+ Map<String, List<Node>> captionFacetChildren = VisualDomUtil.findFacetElements(caption, pageContext);
+ Node captionBody = ComponentUtil.getFacetBody(captionFacetChildren);
+ encodeCaption(pageContext, creationData, sourceElement, visualDocument, table, captionBody);
- //Encode Caption
- encodeCaption(creationData, sourceElement, visualDocument, table);
-
- // Encode Header
- Element header = ComponentUtil.getFacet(sourceElement, RichFaces.NAME_FACET_HEADER);
- if(header!=null) {
+ /*
+ * Encode Header
+ */
+ Element header = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_HEADER);
+ Map<String, List<Node>> headerFacetChildren = VisualDomUtil.findFacetElements(header, pageContext);
+ Node headerBody = ComponentUtil.getFacetBody(headerFacetChildren);
+ if (headerBody != null) {
nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
table.appendChild(thead);
String headerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS);
- encodeTableHeaderOrFooterFacet(pageContext, creationData, thead, columnsLength, visualDocument, header,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, thead, columnsLength, visualDocument, headerBody,
"dr-table-header rich-table-header", //$NON-NLS-1$
"dr-table-header-continue rich-table-header-continue", //$NON-NLS-1$
"dr-table-headercell rich-table-headercell", //$NON-NLS-1$
headerClass, HTML.TAG_TD);
}
- // Encode Footer
- Element footer = ComponentUtil.getFacet(sourceElement, RichFaces.NAME_FACET_FOOTER);
- if (footer != null) {
+ /*
+ * Encode Footer
+ */
+ Element footer = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_FOOTER);
+ Map<String, List<Node>> footerFacetChildren = VisualDomUtil.findFacetElements(footer, pageContext);
+ Node footerBody = ComponentUtil.getFacetBody(footerFacetChildren);
+ if (footerBody != null) {
nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
table.appendChild(tfoot);
String footerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_FOOTER_CLASS);
- encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot, columnsLength, visualDocument, footer,
+ encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot, columnsLength, visualDocument, footerBody,
"dr-table-footer rich-table-footer", //$NON-NLS-1$
"dr-table-footer-continue rich-table-footer-continue", //$NON-NLS-1$
"dr-table-footercell rich-table-footercell", //$NON-NLS-1$
@@ -95,9 +112,9 @@
/*
* https://jira.jboss.org/jira/browse/JBIDE-3491
+ * Encode body.
* Add text nodes to children list too.
*/
- //Create mapping to Encode body
List<Node> children = ComponentUtil.getChildren(sourceElement, true);
sourceElement.getAttribute(RichFaces.ATTR_ELEMENTS);
@@ -113,8 +130,33 @@
nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
tr.appendChild(td);
td.setAttribute(HTML.ATTR_CLASS, "dr-table-cell rich-table-cell " + getColumnClass(columnIndex)); //$NON-NLS-1$
+ /*
+ * Add HTML elements from caption, header and footer.
+ */
+ VpeChildrenInfo childInfo = null;
+ if (captionFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0) {
+ childInfo = new VpeChildrenInfo(td);
+ for (Node child : captionFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childInfo.addSourceChild(child);
+ }
+ creationData.addChildrenInfo(childInfo);
+ }
+ if (headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0) {
+ childInfo = new VpeChildrenInfo(td);
+ for (Node child : headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childInfo.addSourceChild(child);
+ }
+ creationData.addChildrenInfo(childInfo);
+ }
+ if (footerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0) {
+ childInfo = new VpeChildrenInfo(td);
+ for (Node child : footerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childInfo.addSourceChild(child);
+ }
+ creationData.addChildrenInfo(childInfo);
+ }
if(!children.isEmpty()) {
- VpeChildrenInfo childInfo = new VpeChildrenInfo(td);
+ childInfo = new VpeChildrenInfo(td);
for (Node child : children) {
childInfo.addSourceChild(child);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -11,7 +11,11 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
@@ -19,8 +23,8 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
-import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -29,11 +33,10 @@
import org.w3c.dom.NodeList;
public class RichFacesDataTableTemplate extends VpeAbstractTemplate {
-
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
Element sourceElement = (Element)sourceNode;
-
nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
VisualDomUtil.copyAttributes(sourceNode, table);
@@ -59,19 +62,33 @@
colgroup.appendChild(col);
}
}
+
+ /*
+ * Encode Caption
+ */
+ Element caption = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_CAPTION);
+ Map<String, List<Node>> captionFacetChildren = VisualDomUtil.findFacetElements(caption, pageContext);
+ Node captionNode= null;
+ if (captionFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).size() > 0) {
+ captionNode = captionFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).get(0);
+ }
+ encodeCaption(pageContext, creationData, sourceElement, visualDocument,table,captionNode);
- //Encode Caption
- encodeCaption(creationData, sourceElement, visualDocument, table);
-
- // Encode Header
- Node header = ComponentUtil.getFacet((Element)sourceElement, RichFaces.NAME_FACET_HEADER,true);
- final boolean hasColumnWithHeader = hasColumnWithFacet(columns, RichFaces.NAME_FACET_HEADER);
- if(header!=null || hasColumnWithHeader) {
+ /*
+ * Encode Header
+ */
+ Element header = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_HEADER);
+ Map<String, List<Node>> headerFacetChildren = VisualDomUtil.findFacetElements(header, pageContext);
+ boolean headerJsfElementPresents = headerFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).size() > 0;
+ boolean hasColumnWithHeader = hasColumnWithFacet(columns, RichFaces.NAME_FACET_HEADER);
+ if(headerJsfElementPresents || hasColumnWithHeader) {
nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
table.appendChild(thead);
String headerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS);
- if(header != null) {
- encodeTableHeaderOrFooterFacet(pageContext, creationData, thead, columnsLength, visualDocument, header,
+ if(headerJsfElementPresents) {
+ Node node = headerFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).get(0);
+ encodeTableHeaderOrFooterFacet(pageContext, creationData,
+ thead, columnsLength, visualDocument, node,
"dr-table-header rich-table-header", //$NON-NLS-1$
"dr-table-header-continue rich-table-header-continue", //$NON-NLS-1$
"dr-table-headercell rich-table-headercell", //$NON-NLS-1$
@@ -84,16 +101,21 @@
if(styleClass!=null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
- encodeHeaderOrFooterFacets(pageContext, creationData, tr, visualDocument, columns,
+ encodeHeaderOrFooterFacets(pageContext, creationData, tr,
+ visualDocument, columns,
"dr-table-subheadercell rich-table-subheadercell", //$NON-NLS-1$
headerClass, RichFaces.NAME_FACET_HEADER, HTML.TAG_TD);
}
}
- // Encode Footer
- Node footer = ComponentUtil.getFacet((Element)sourceElement, RichFaces.NAME_FACET_FOOTER,true);
- final boolean hasColumnWithFooter = hasColumnWithFacet(columns, RichFaces.NAME_FACET_FOOTER);
- if (footer != null || hasColumnWithFooter) {
+ /*
+ * Encode Footer
+ */
+ Element footer = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_FOOTER);
+ Map<String, List<Node>> footerFacetChildren = VisualDomUtil.findFacetElements(footer, pageContext);
+ boolean footerJsfElementPresents = footerFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).size() > 0;
+ boolean hasColumnWithFooter = hasColumnWithFacet(columns, RichFaces.NAME_FACET_FOOTER);
+ if (footerJsfElementPresents || hasColumnWithFooter) {
nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
table.appendChild(tfoot);
String footerClass = (String) sourceElement.getAttribute(RichFaces.ATTR_FOOTER_CLASS);
@@ -104,12 +126,15 @@
if(styleClass!=null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
- encodeHeaderOrFooterFacets(pageContext, creationData, tr, visualDocument, columns,
+ encodeHeaderOrFooterFacets(pageContext, creationData, tr,
+ visualDocument, columns,
"dr-table-subfootercell rich-table-subfootercell", //$NON-NLS-1$
footerClass, RichFaces.NAME_FACET_FOOTER, HTML.TAG_TD);
}
- if (footer != null) {
- encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot, columnsLength, visualDocument, footer,
+ if (footerJsfElementPresents) {
+ Node node = footerFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).get(0);
+ encodeTableHeaderOrFooterFacet(pageContext, creationData,
+ tfoot, columnsLength, visualDocument, node,
"dr-table-footer rich-table-footer", //$NON-NLS-1$
"dr-table-footer-continue rich-table-footer-continue", //$NON-NLS-1$
"dr-table-footercell rich-table-footercell", //$NON-NLS-1$
@@ -123,10 +148,15 @@
return creationData;
}
- protected void encodeCaption(VpeCreationData creationData, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMElement table) {
- //Encode caption
- Element captionFromFacet = ComponentUtil.getFacet(sourceElement, RichFaces.NAME_FACET_CAPTION);
- if (captionFromFacet != null) {
+ protected void encodeCaption(VpePageContext pageContext,
+ VpeCreationData creationData, Element sourceElement,
+ nsIDOMDocument visualDocument, nsIDOMElement table,
+ Node captionBody) {
+
+ /*
+ * Encode caption
+ */
+ if (null != captionBody) {
String captionClass = (String) table.getAttribute(RichFaces.ATTR_CAPTION_CLASS);
String captionStyle = (String) table.getAttribute(RichFaces.ATTR_CAPTION_STYLE);
@@ -143,53 +173,73 @@
}
VpeChildrenInfo cap = new VpeChildrenInfo(caption);
- cap.addSourceChild(captionFromFacet);
+ /*
+ * Display existing JSF component
+ */
+ cap.addSourceChild(captionBody);
creationData.addChildrenInfo(cap);
}
}
- public static void encodeHeaderOrFooterFacets(VpePageContext pageContext, VpeCreationData creationData,
- nsIDOMElement parentTr, nsIDOMDocument visualDocument, ArrayList<Element> headersOrFooters,
- String skinCellClass, String headerClass, String facetName, String element) {
+ public static void encodeHeaderOrFooterFacets(VpePageContext pageContext,
+ VpeCreationData creationData, nsIDOMElement parentTr,
+ nsIDOMDocument visualDocument, ArrayList<Element> headersOrFooters,
+ String skinCellClass, String headerClass, String facetName,
+ String element) {
+
for (Element column : headersOrFooters) {
- String classAttribute = facetName + "Class"; //$NON-NLS-1$
-
- String columnHeaderClass = column.getAttribute(classAttribute);
- nsIDOMElement td = visualDocument.createElement(element);
- parentTr.appendChild(td);
- String styleClass = ComponentUtil.encodeStyleClass(null, skinCellClass, headerClass, columnHeaderClass);
- if (!RichFacesColumnTemplate.isVisible(column)) {
- VisualDomUtil.setSubAttribute(td, HTML.ATTR_STYLE,
- HTML.STYLE_PARAMETER_DISPLAY, HTML.STYLE_VALUE_NONE);
+ Element facet = SourceDomUtil.getFacetByName(column, facetName);
+ /*
+ * If facet is null unwanted cells might be added.
+ * Thus do not add TD for such facets.
+ */
+ if (null != facet) {
+ String classAttribute = facetName + "Class"; //$NON-NLS-1$
+
+ String columnHeaderClass = column.getAttribute(classAttribute);
+ nsIDOMElement td = visualDocument.createElement(element);
+ parentTr.appendChild(td);
+ String styleClass = ComponentUtil.encodeStyleClass(null, skinCellClass, headerClass, columnHeaderClass);
+ if (!RichFacesColumnTemplate.isVisible(column)) {
+ VisualDomUtil.setSubAttribute(td, HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_DISPLAY, HTML.STYLE_VALUE_NONE);
+ }
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.setAttribute(HTML.ATTR_SCOPE, "col"); //$NON-NLS-1$
+ String colspan = column.getAttribute("colspan"); //$NON-NLS-1$
+ if(colspan!=null && colspan.length()>0) {
+ td.setAttribute(HTML.ATTR_COLSPAN, colspan);
+ }
+ if (RichFaces.NAME_FACET_HEADER.equals(facetName)) {
+ nsIDOMElement icon = RichFacesColumnTemplate.getHeaderIcon(pageContext, column, visualDocument);
+ if (icon != null) {
+ td.appendChild(icon);
+ }
+ }
+
+ /*
+ * Add facet source here
+ */
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td);
+ childrenInfo.addSourceChild(facet);
+ creationData.addChildrenInfo(childrenInfo);
+
}
- td.setAttribute(HTML.ATTR_CLASS, styleClass);
- td.setAttribute(HTML.ATTR_SCOPE, "col"); //$NON-NLS-1$
- String colspan = column.getAttribute("colspan"); //$NON-NLS-1$
- if(colspan!=null && colspan.length()>0) {
- td.setAttribute(HTML.ATTR_COLSPAN, colspan);
- }
- Node facetBody = ComponentUtil.getFacet(column, facetName,true);
-
- nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
- td.appendChild(span);
- if (RichFaces.NAME_FACET_HEADER.equals(facetName)) {
- nsIDOMElement icon = RichFacesColumnTemplate.getHeaderIcon(pageContext, column, visualDocument);
- if (icon != null) {
- td.appendChild(icon);
- }
- }
-
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(span);
- childrenInfo.addSourceChild(facetBody);
- creationData.addChildrenInfo(childrenInfo);
-
}
}
- protected void encodeTableHeaderOrFooterFacet(final VpePageContext pageContext, VpeCreationData creationData,
- nsIDOMElement parentTheadOrTfood, int columns, nsIDOMDocument visualDocument, Node facetBody,
- String skinFirstRowClass, String skinRowClass, String skinCellClass, String facetBodyClass, String element) {
+ protected void encodeTableHeaderOrFooterFacet(
+ final VpePageContext pageContext, VpeCreationData creationData,
+ nsIDOMElement parentTheadOrTfood, int columns,
+ nsIDOMDocument visualDocument, Node facetBody,
+ String skinFirstRowClass, String skinRowClass,
+ String skinCellClass, String facetBodyClass, String facetVisualNode) {
+
+ if (null == facetBody) {
+ RichFacesTemplatesActivator.getDefault().logError("Facet Body is null !"); //$NON-NLS-1$
+ }
+
boolean isColumnGroup = facetBody.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP);
boolean isSubTable = facetBody.getNodeName().endsWith(RichFaces.TAG_SUB_TABLE);
if(isColumnGroup) {
@@ -207,7 +257,7 @@
String style = ComponentUtil.getHeaderBackgoundImgStyle();
tr.setAttribute(HTML.ATTR_STYLE, style);
- nsIDOMElement td = visualDocument.createElement(element);
+ nsIDOMElement td = visualDocument.createElement(facetVisualNode);
tr.appendChild(td);
styleClass = ComponentUtil.encodeStyleClass(null, skinCellClass, facetBodyClass, null);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -147,8 +147,8 @@
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
filterTR.setAttribute(HTML.ATTR_CLASS, styleClass);
}
- encodeHeaderFacets(vpeCreationData, tr, filterTR, visualDocument,
- columns,
+ encodeHeaderFacets(pageContext, vpeCreationData, tr, filterTR,
+ visualDocument, columns,
DR_TABLE_SUBHEADERCELL_RICH_TABLE_SUBHEADERCELL, headerClass);
// Add footer
@@ -163,8 +163,8 @@
if (styleFooterClass != null) {
tfootTR.setAttribute(HTML.ATTR_CLASS, styleFooterClass);
}
- encodeFooterFacets(vpeCreationData, tfootTR, visualDocument,
- columns,
+ encodeFooterFacets(pageContext, vpeCreationData, tfootTR,
+ visualDocument, columns,
DR_TABLE_SUBFOOTERCELL_RICH_TABLE_SUBFOOTERCELL,
styleFooterClass);
@@ -284,9 +284,10 @@
* @param skinCellClass
* @param footerClass
*/
- public static void encodeFooterFacets(VpeCreationData creationData,
- nsIDOMElement parentTr, nsIDOMDocument visualDocument,
- ArrayList<Element> footers, String skinCellClass, String footerClass) {
+ public void encodeFooterFacets(VpePageContext pageContext,
+ VpeCreationData creationData, nsIDOMElement parentTr,
+ nsIDOMDocument visualDocument, ArrayList<Element> footers,
+ String skinCellClass, String footerClass) {
String classAttribute = "footerClass"; //$NON-NLS-1$
String styleClass = EMPTY;
for (Element column : footers) {
@@ -302,11 +303,19 @@
if (colspan != null && colspan.length() > 0) {
td.setAttribute(HTML.ATTR_COLSPAN, colspan);
}
- Element facetBody = ComponentUtil.getFacet(column, FOOTER);
-
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
+ /*
+ * Get all facet's children. And display only the first one JSF tag.
+ */
+ Node facetBody = ComponentUtil.getFacetBody(pageContext, column,
+ RichFaces.NAME_FACET_FOOTER);
+ /*
+ * Add suitable facet child if there is any.
+ */
+ if (null != facetBody) {
+ VpeChildrenInfo child = new VpeChildrenInfo(td);
+ child.addSourceChild(facetBody);
+ creationData.addChildrenInfo(child);
+ }
}
nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
@@ -325,10 +334,10 @@
* @param skinCellClass
* @param headerClass
*/
- public static void encodeHeaderFacets(VpeCreationData creationData,
- nsIDOMElement parentTr, nsIDOMElement filterTR,
- nsIDOMDocument visualDocument, ArrayList<Element> headers,
- String skinCellClass, String headerClass) {
+ public void encodeHeaderFacets(VpePageContext pageContext,
+ VpeCreationData creationData, nsIDOMElement parentTr,
+ nsIDOMElement filterTR, nsIDOMDocument visualDocument,
+ ArrayList<Element> headers, String skinCellClass, String headerClass) {
String classAttribute = "headerClass"; //$NON-NLS-1$
String styleClass = EMPTY;
// Check filter
@@ -361,11 +370,19 @@
if (colspan != null && colspan.length() > 0) {
td.setAttribute(HTML.ATTR_COLSPAN, colspan);
}
- Element facetBody = ComponentUtil.getFacet(column, HEADER);
-
- VpeChildrenInfo child = new VpeChildrenInfo(span);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
+ /*
+ * Get all facet's children. And display only the first one JSF tag.
+ */
+ Node facetBody = ComponentUtil.getFacetBody(pageContext, column,
+ RichFaces.NAME_FACET_HEADER);
+ /*
+ * Add suitable facet child if there is any.
+ */
+ if (null != facetBody) {
+ VpeChildrenInfo child = new VpeChildrenInfo(span);
+ child.addSourceChild(facetBody);
+ creationData.addChildrenInfo(child);
+ }
// Add filter
if (existFilters) {
nsIDOMElement filterTD = visualDocument
@@ -413,28 +430,7 @@
td.appendChild(visualDocument.createTextNode(SPACE));
filterTR.appendChild(td);
}
-
- /**
- * Checks, whether it is necessary to re-create an element at change of
- * attribute
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceElement
- * The current element of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @param visualNode
- * The current node of the visual tree.
- * @param data
- * The arbitrary data, built by a method <code>create</code>
- * @param name
- * Attribute name
- * @param value
- * Attribute value
- * @return <code>true</code> if it is required to re-create an element at a
- * modification of attribute, <code>false</code> otherwise.
- */
+
@Override
public boolean recreateAtAttrChange(VpePageContext pageContext,
Element sourceElement, nsIDOMDocument visualDocument,
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -13,8 +13,11 @@
import java.util.List;
+import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
@@ -57,50 +60,92 @@
* The document of the visual tree.
* @return The information on the created node of the visual tree.
*/
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
- ComponentUtil.setCSSLink(pageContext, getCssStyle(), getCssExtension());
- Element sourceElement = (Element) sourceNode;
- final Attributes attrs = new Attributes(sourceElement);
- /*
- * Prepare data
- */
- prepareData(pageContext, sourceElement);
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ ComponentUtil.setCSSLink(pageContext, getCssStyle(), getCssExtension());
+ Element sourceElement = (Element) sourceNode;
+ final Attributes attrs = new Attributes(sourceElement);
+ /*
+ * Prepare data
+ */
+ prepareData(pageContext, sourceElement);
+
+ final nsIDOMElement rootSpan = createRootSpanTemplateMethod(
+ sourceElement, visualDocument, attrs);
+ final nsIDOMElement innerInput1 = visualDocument
+ .createElement(HTML.TAG_INPUT);
+ nsIDOMElement topContainer = VisualDomUtil.createBorderlessContainer(visualDocument);
+ nsIDOMElement textContainer = VisualDomUtil.createBorderlessContainer(visualDocument);
+ topContainer.appendChild(textContainer);
+ topContainer.appendChild(rootSpan);
+ VpeCreationData creationData = new VpeCreationData(topContainer);
+
+ /*
+ * Encode body.
+ * Add text nodes to children list too.
+ */
+ List<Node> children = ComponentUtil.getChildren(sourceElement, true);
+ VpeChildrenInfo spanInfo = null;
+ if(!children.isEmpty()) {
+ spanInfo = new VpeChildrenInfo(textContainer);
+ for (Node child : children) {
+ spanInfo.addSourceChild(child);
+ }
+ creationData.addChildrenInfo(spanInfo);
+ }
+
+ if (isToggle) {
+ rootSpan.appendChild(innerInput1);
+ innerInput1.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID,
+ String.valueOf(0));
+ innerInput1.setAttribute(HTML.ATTR_CLASS, "rich-inplace-field"); //$NON-NLS-1$
+ innerInput1.setAttribute(HTML.ATTR_STYLE,
+ "top: 0px; width: " + this.inputWidth + Constants.SEMICOLON); //$NON-NLS-1$
+ innerInput1.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_TEXT);
+ innerInput1.setAttribute("autocomplete", "off"); //$NON-NLS-1$ //$NON-NLS-2$
- final nsIDOMElement rootSpan = createRootSpanTemplateMethod(sourceElement, visualDocument, attrs);
- final nsIDOMElement innerInput1 = visualDocument.createElement(HTML.TAG_INPUT);
- VpeCreationData creationData = VisualDomUtil.createTemplateWithTextContainer(
- sourceElement, rootSpan, HTML.TAG_SPAN, visualDocument);
- if (isToggle) {
- rootSpan.appendChild(innerInput1);
- innerInput1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
- innerInput1.setAttribute(HTML.ATTR_CLASS, "rich-inplace-field"); //$NON-NLS-1$
- innerInput1.setAttribute(HTML.ATTR_STYLE, "top: 0px; width: " + this.inputWidth + Constants.SEMICOLON); //$NON-NLS-1$
- innerInput1.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_TEXT);
- innerInput1.setAttribute("autocomplete", "off"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (attrs.isShowControls()) {
+ rootSpan.appendChild(createControlsDiv(pageContext, sourceNode,
+ visualDocument, creationData, attrs));
+ }
+ } else {
+ innerInput1
+ .setAttribute(HTML.ATTR_STYLE,
+ "width: " + this.inputWidth + "; position: absolute; left: -32767px;"); //$NON-NLS-1$ //$NON-NLS-2$
+ innerInput1.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_BUTTON);
- if (attrs.isShowControls()) {
- rootSpan.appendChild(createControlsDiv(pageContext, sourceNode,
- visualDocument, creationData, attrs));
- }
- } else {
- innerInput1.setAttribute(HTML.ATTR_STYLE,
- "width: " + this.inputWidth + "; position: absolute; left: -32767px;"); //$NON-NLS-1$ //$NON-NLS-2$
- innerInput1.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_BUTTON);
+ /*
+ * Add empty children info to avoid children processing. Only
+ * available child is "controls" facet
+ */
+ // creationData.addChildrenInfo(new VpeChildrenInfo(rootSpan));
+ }
+ /*
+ * Add HTML tags from controls facet
+ */
+ Element controlFacet = ComponentUtil.getFacetElement(
+ (Element) sourceNode, RichFaces.NAME_FACET_CONTROLS, false);
+ Map<String, List<Node>> controlFacetChildren = VisualDomUtil
+ .findFacetElements(controlFacet, pageContext);
+
+ spanInfo = new VpeChildrenInfo(textContainer);
+ for (Node child : controlFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ spanInfo.addSourceChild(child);
+ }
+ if ((null != spanInfo.getSourceChildren())
+ && (spanInfo.getSourceChildren().size() > 0)) {
+ creationData.addChildrenInfo(spanInfo);
+ }
+
+ if (!isToggle) {
+ rootSpan
+ .appendChild(visualDocument.createTextNode(getValue(attrs)));
+ } else {
+ innerInput1.setAttribute(HTML.ATTR_VALUE, getValue(attrs));
+ }
+ return creationData;
+ }
- /*
- * Add empty children info to avoid children processing.
- * Only available child is "controls" facet
- */
-// creationData.addChildrenInfo(new VpeChildrenInfo(rootSpan));
- }
- if (!isToggle) {
- rootSpan.appendChild(visualDocument.createTextNode(getValue(attrs)));
- } else {
- innerInput1.setAttribute(HTML.ATTR_VALUE, getValue(attrs));
- }
- return creationData;
- }
-
/**
* Gets the css extension.
*
@@ -119,12 +164,6 @@
return "inplaceInput/inplaceInput.css"; //$NON-NLS-1$
}
- /**
- * Gets the css styles suffix.
- *
- * @return the css styles suffix
- * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssStylesSuffix()
- */
@Override
protected String getCssStylesSuffix() {
return Constants.EMPTY;
@@ -175,9 +214,6 @@
super.prepareImages(source);
}
- /**
- * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssStylesControlSuffix()
- */
@Override
public String getCssStylesControlSuffix() {
return "-input"; //$NON-NLS-1$
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -14,6 +14,7 @@
import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.Constants;
@@ -77,7 +78,7 @@
final nsIDOMElement innerInput2 = visualDocument.createElement(HTML.TAG_INPUT);
preapareInputBase(innerInput1);
preapareInputBase(innerInput2);
- innerInput1.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+ innerInput1.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, String.valueOf(0));
innerInput1.setAttribute("autocomplete", "off"); //$NON-NLS-1$ //$NON-NLS-2$
innerInput1.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-field"); //$NON-NLS-1$
innerInput1.setAttribute(HTML.ATTR_VALUE,
@@ -118,7 +119,7 @@
final nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
div.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-width-list"); //$NON-NLS-1$
- div.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+ div.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, String.valueOf(0));
div.setAttribute(HTML.ATTR_STYLE, "position: absolute; height: 100px; left: 0px; top: 22px; visibility: visible;"); //$NON-NLS-1$
final nsIDOMElement shadowDiv = visualDocument.createElement(HTML.TAG_DIV);
@@ -152,7 +153,7 @@
final nsIDOMElement listPositionDiv = visualDocument.createElement(HTML.TAG_DIV);
listPositionDiv.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-list-position"); //$NON-NLS-1$
- listPositionDiv.setAttribute(VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
+ listPositionDiv.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, String.valueOf(0));
final nsIDOMElement listDecarationDiv = visualDocument.createElement(HTML.TAG_DIV);
listDecarationDiv.setAttribute(HTML.ATTR_CLASS, "rich-inplace-select-list-decoration"); //$NON-NLS-1$
@@ -219,44 +220,21 @@
return div;
}
- /**
- * Gets the css extension.
- *
- * @return the css extension
- * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssExtension()
- */
@Override
protected String getCssExtension() {
return INPLACE_SELECT_EXT;
}
- /**
- * Gets the css style.
- *
- * @return the css style
- * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssStyle()
- */
@Override
protected String getCssStyle() {
return INPLACE_SELECT_CSS;
}
- /**
- * Gets the css styles suffix.
- *
- * @return the css styles suffix
- */
@Override
protected String getCssStylesSuffix() {
return "-select"; //$NON-NLS-1$
}
- /**
- * Gets the root span classes.
- *
- * @return the root span classes
- * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getRootSpanClasses()
- */
@Override
protected String[] getRootSpanClasses(Attributes attrs) {
String[] result = new String[3];
@@ -315,26 +293,17 @@
this.controlsVerticalPositions.put(HTML.VALUE_ALIGN_CENTER, "100px"); //$NON-NLS-1$
}
- /**
- * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getCssStylesControlSuffix()
- */
@Override
protected String getCssStylesControlSuffix() {
return this.getCssStylesSuffix();
}
- /**
- * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getControlPositionsSubStyles()
- */
@Override
protected String getControlPositionsSubStyles(Attributes attrs) {
return "top:0px ; left: " + controlsVerticalPositions.get(attrs.getControlsVerticalPosition()) //$NON-NLS-1$
+ ";left: " + controlsHorizontalPositions.get(attrs.getControlsHorizontalPosition()) + Constants.SEMICOLON; //$NON-NLS-1$
}
- /**
- * @see org.jboss.tools.jsf.vpe.richfaces.template.RichFacesAbstractInplaceTemplate#getMainControlsDivCssClass()
- */
@Override
protected String getMainControlsDivCssClass() {
return "rich-inplace" + getCssStylesControlSuffix() + "-control-set"; //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -15,11 +15,11 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeSourceDomBuilder;
+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.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -40,14 +40,11 @@
protected static String FATAL_MESSAGE = "Fatal message"; //$NON-NLS-1$
protected static String INFO_MESSAGE = "Info message"; //$NON-NLS-1$
protected static String WARNING_MESSAGE = "Warning message"; //$NON-NLS-1$
+ protected static String FACET_TAG_NAME = ":facet"; //$NON-NLS-1$
protected static String[] markers = { "passedMarker", "errorMarker", //$NON-NLS-1$ //$NON-NLS-2$
"fatalMarker", "infoMarker", "warnMarker" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- protected static String FACET_TAG_NAME = "facet"; //$NON-NLS-1$
-
- protected static String NAME_ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
-
private final static String MESSAGE_STYLE = "padding-left: 1px;padding-right: 1px;padding-top: 1px;padding-bottom: 1px"; //$NON-NLS-1$
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -235,6 +232,7 @@
if (!(facets.get(markers[i]) instanceof Element))
continue;
else {
+ td.setAttribute(VpeVisualDomBuilder.VPE_FACET, markers[i]);
childrenInfo.addSourceChild(facets.get(markers[i]));
}
tr.appendChild(td);
@@ -271,20 +269,15 @@
NodeList nodeList = sourceElement.getChildNodes();
HashMap<String, Node> facets = new HashMap<String, Node>();
-
for (int i = 0; i < nodeList.getLength(); i++) {
-
- if (!(nodeList.item(i) instanceof Element))
- continue;
-
- String facetName = nodeList.item(i).getPrefix() + Constants.COLON
- + FACET_TAG_NAME;
-
- if (nodeList.item(i).getNodeName().equalsIgnoreCase(facetName)
+ if (!(nodeList.item(i) instanceof Element)){
+ continue;
+ }
+ if (nodeList.item(i).getNodeName().endsWith(FACET_TAG_NAME)
&& searchInMarker(((Element) nodeList.item(i))
- .getAttribute(NAME_ATTRIBUTE_NAME))) {
+ .getAttribute(RichFaces.ATTR_NAME))) {
facets.put(((Element) nodeList.item(i))
- .getAttribute(NAME_ATTRIBUTE_NAME), nodeList.item(i));
+ .getAttribute(RichFaces.ATTR_NAME), nodeList.item(i));
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessagesTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -13,6 +13,8 @@
import java.util.HashMap;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
@@ -26,14 +28,11 @@
public class RichFacesMessagesTemplate extends RichFacesMessageTemplate {
- private static final String LAYOUT = "layout"; //$NON-NLS-1$
- private static final String TABLE = "table"; //$NON-NLS-1$
- private static final String CSS_RICH_MESSAGES
- = "rich-messages"; //$NON-NLS-1$
- private static final String CSS_RICH_MESSAGES_MARKER
- = "rich-messages-marker"; //$NON-NLS-1$
- private static final String CSS_RICH_MESSAGES_LABEL
- = "rich-messages-label"; //$NON-NLS-1$
+ private static final String LAYOUT = "layout"; //$NON-NLS-1$
+ private static final String TABLE = "table"; //$NON-NLS-1$
+ private static final String CSS_RICH_MESSAGES = "rich-messages"; //$NON-NLS-1$
+ private static final String CSS_RICH_MESSAGES_MARKER = "rich-messages-marker"; //$NON-NLS-1$
+ private static final String CSS_RICH_MESSAGES_LABEL = "rich-messages-label"; //$NON-NLS-1$
@Override
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -127,6 +126,8 @@
if (facet != null) {
final VpeChildrenInfo childrenInfo = new VpeChildrenInfo(marker);
+ marker.setAttribute(VpeVisualDomBuilder.VPE_FACET, facet
+ .getAttribute(RichFaces.ATTR_NAME));
creationData.addChildrenInfo(childrenInfo);
childrenInfo.addSourceChild(facet);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -4,10 +4,8 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import java.util.ArrayList;
-import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.Messages;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
@@ -15,6 +13,7 @@
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
@@ -37,7 +36,6 @@
private static final String DEFAULT_HEIGHT = "200px"; //$NON-NLS-1$
private static final String DEFAULT_WIDTH = "300px"; //$NON-NLS-1$
- private static final String CAPTION_FACET = "caption"; //$NON-NLS-1$
private static final String TOP_CONTROL_FACET = "topControl"; //$NON-NLS-1$
private static final String UP_CONTROL_FACET = "upControl"; //$NON-NLS-1$
private static final String DOWN_CONTROL_FACET = "downControl"; //$NON-NLS-1$
@@ -45,17 +43,7 @@
private static final String HEADER = "header"; //$NON-NLS-1$
private static final String HEADER_CLASS = "headerClass"; //$NON-NLS-1$
- private static final String FOOTER = "footer"; //$NON-NLS-1$
- private static final String FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
- private static final String CAPTION_CLASS = "captionClass"; //$NON-NLS-1$
- private static final String CAPTION_STYLE = "captionStyle"; //$NON-NLS-1$
- private static final String SPACE = " "; //$NON-NLS-1$
- private static final String STYLE_FOR_LOW_SCROLL = "overflow: scroll; width: 100%; height: 17px;"; //$NON-NLS-1$
- private static final String STYLE_FOR_RIGHT_SCROLL = "overflow: scroll; width: 17px; height: 100%;"; //$NON-NLS-1$
-
- private static final int NUM_ROW = 1;
-
private static final String TOP_CONTROL_IMG = "orderingList/top.gif"; //$NON-NLS-1$
private static final String UP_CONTROL_IMG = "orderingList/up.gif"; //$NON-NLS-1$
private static final String DOWN_CONTROL_IMG = "orderingList/down.gif"; //$NON-NLS-1$
@@ -94,7 +82,6 @@
private static final String UP_CONTROL_CLASS = "upControlClass"; //$NON-NLS-1$
private static final String DOWN_CONTROL_CLASS = "downControlClass"; //$NON-NLS-1$
private static final String BOTTOM_CONTROL_CLASS = "bottomControlClass"; //$NON-NLS-1$
- private static final String ROW_CLASSES = "rowClasses"; //$NON-NLS-1$
private static final String CSS_CAPTION_CLASS = "rich-ordering-list-caption"; //$NON-NLS-1$
@@ -112,16 +99,12 @@
private static final String CSS_HEADER_CLASS = "rich-ordering-list-header"; //$NON-NLS-1$
private static final String CSS_TABLE_HEADER_CLASS = "rich-ordering-list-table-header"; //$NON-NLS-1$
private static final String CSS_TABLE_HEADER_CELL_CLASS = "rich-ordering-list-table-header-cell"; //$NON-NLS-1$
- private static final String CSS_FOOTER_CLASS = "rich-ordering-list-footer"; //$NON-NLS-1$
- private static final String CSS_TABLE_FOOTER_CLASS = "rich-ordering-list-table-footer"; //$NON-NLS-1$
- private static final String CSS_TABLE_FOOTER_CELL_CLASS = "rich-ordering-list-table-footer-cell"; //$NON-NLS-1$
private static final String CSS_LIST_BODY_CLASS = "rich-ordering-list-body"; //$NON-NLS-1$
private static final String CSS_LIST_OUTPUT_CLASS = "rich-ordering-list-output"; //$NON-NLS-1$
private static final String CSS_LIST_CONTENT_CLASS = "rich-ordering-list-content"; //$NON-NLS-1$
private static final String CSS_LIST_ITEMS_CLASS = "rich-ordering-list-items"; //$NON-NLS-1$
private static final String CSS_LIST_ROW_CLASS = "rich-ordering-list-row"; //$NON-NLS-1$
- private static final String CSS_LIST_CELL_CLASS = "rich-ordering-list-cell"; //$NON-NLS-1$
/*
* (non-Javadoc)
@@ -132,6 +115,15 @@
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
+ /*
+ * Setting up ordering list css file
+ */
+ ComponentUtil.setCSSLink(pageContext, "orderingList/orderingList.css", //$NON-NLS-1$
+ "richFacesOrderingList"); //$NON-NLS-1$
+
+ /*
+ * Getting source node attributes
+ */
Element sourceElement = (Element) sourceNode;
String width = sourceElement.getAttribute(WIDTH);
@@ -144,156 +136,97 @@
String controlsVerticalAlign = sourceElement.getAttribute(CONTROLS_VERTICAL_ALIGN);
String captionLabel = sourceElement.getAttribute(CAPTION_LABEL);
- // --------------------- COMMON TABLE ------------------------
+ /*
+ * Crating tags structure
+ */
+ nsIDOMElement tableCommon = visualDocument.createElement(HTML.TAG_TABLE);
+ nsIDOMElement tableBody = visualDocument.createElement(HTML.TAG_TBODY);
+ nsIDOMElement tableCaptionRow = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement tableCaptionCell = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement tableCaptionDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement tableListAndButtonsRow = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement leftCell = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement rightCell = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement tableListCell;
+ nsIDOMElement tableButtonsCell;
+ tableCaptionCell.appendChild(tableCaptionDiv);
+ tableCaptionRow.appendChild(tableCaptionCell);
+ tableBody.appendChild(tableCaptionRow);
+ tableListAndButtonsRow.appendChild(leftCell);
+ tableListAndButtonsRow.appendChild(rightCell);
+ tableBody.appendChild(tableListAndButtonsRow);
+ tableCommon.appendChild(tableBody);
- ComponentUtil.setCSSLink(pageContext, "orderingList/orderingList.css", //$NON-NLS-1$
- "richFacesOrderingList"); //$NON-NLS-1$
+ /*
+ * Set correct controls position
+ */
+ if ("left".equalsIgnoreCase(controlsHorizontalAlign)) { //$NON-NLS-1$
+ tableButtonsCell = leftCell;
+ tableListCell = rightCell;
+ tableButtonsCell.setAttribute(HTML.ATTR_STYLE, "width: 1%;"); //$NON-NLS-1$
+ } else {
+ tableButtonsCell = rightCell;
+ tableListCell = leftCell;
+ }
- nsIDOMElement tableCommon = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
-
+ /*
+ * Creating template's VpeCreationData.
+ */
VpeCreationData creationData = new VpeCreationData(tableCommon);
-
- nsIDOMElement dataRow = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- tableCommon.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, (width == null ? DEFAULT_WIDTH : width));
- tableCommon.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT, (height == null ? DEFAULT_HEIGHT : height));
+ /*
+ * Setting required attributes
+ */
+ tableCommon.setAttribute(HTML.ATTR_WIDTH, (width == null ? DEFAULT_WIDTH : width));
+ tableCommon.setAttribute(HTML.ATTR_HEIGHT, (height == null ? DEFAULT_HEIGHT : height));
+ tableCommon.setAttribute(HTML.ATTR_CLASS, CSS_LIST_BODY_CLASS);
+ tableCaptionCell.setAttribute(HTML.ATTR_CLASS, CSS_CAPTION_CLASS);
- tableCommon.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_LIST_BODY_CLASS);
- tableCommon.appendChild(dataRow);
-
- // ---------------------caption td------------------------
-
- nsIDOMElement captionRow_TD_DIV = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- captionRow_TD_DIV.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_CAPTION_CLASS);
- captionRow_TD_DIV.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- "width: " + (listWidth == null ? DEFAULT_LIST_WIDTH : listWidth) + "px;" //$NON-NLS-1$ //$NON-NLS-2$
- +"height: " + (listHeight == null ? DEFAULT_LIST_WIDTH : listHeight) + "px;"); //$NON-NLS-1$ //$NON-NLS-2$
-
- Element captionFacet = ComponentUtil.getFacet(sourceElement, CAPTION_FACET);
+ /*
+ * Encoding table caption
+ */
+ Element captionFacet = ComponentUtil.getFacet(sourceElement, RichFaces.NAME_FACET_CAPTION);
if (null != captionFacet) {
- // Creating table caption with facet content
- nsIDOMElement fecetDiv = encodeFacetsToDiv(pageContext, captionFacet, false, CSS_CAPTION_CLASS, "", creationData, visualDocument); //$NON-NLS-1$
- captionRow_TD_DIV.appendChild(fecetDiv);
+ /*
+ * Encode caption facet
+ */
+ VpeChildrenInfo captionInfo = new VpeChildrenInfo(tableCaptionDiv);
+ captionInfo.addSourceChild(captionFacet);
+ creationData.addChildrenInfo(captionInfo);
} else {
- captionRow_TD_DIV.appendChild(visualDocument.createTextNode(captionLabel));
+ /*
+ * Get value from caption label
+ */
+ tableCaptionCell.appendChild(visualDocument.createTextNode(captionLabel));
}
- // ---------------------row with list table and buttons------------------------
- nsIDOMElement dataRow_leftTD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- dataRow.appendChild(dataRow_leftTD);
-
- nsIDOMElement dataRow_rightTD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- dataRow.appendChild(dataRow_rightTD);
-
- nsIDOMElement tableListTD;
- nsIDOMElement buttonsTD;
-
- if ("left".equalsIgnoreCase(controlsHorizontalAlign)) { //$NON-NLS-1$
- buttonsTD = dataRow_leftTD;
- tableListTD = dataRow_rightTD;
- buttonsTD.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "width: 1%;"); //$NON-NLS-1$
- } else {
- tableListTD = dataRow_leftTD;
- buttonsTD = dataRow_rightTD;
- }
-
- // ---------------------buttons------------------------
+ /*
+ * Encode controls
+ */
if (!"none".equalsIgnoreCase(controlsType)) { //$NON-NLS-1$
nsIDOMElement controlsDiv = createControlsDiv(pageContext, creationData, visualDocument, sourceElement);
- buttonsTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ tableButtonsCell.setAttribute(HTML.ATTR_CLASS,
CSS_BUTTON_VALIGN_CLASS);
- buttonsTD.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR, "center"); //$NON-NLS-1$
+ tableButtonsCell.setAttribute(HTML.ATTR_ALIGN, "center"); //$NON-NLS-1$
if ((null != controlsVerticalAlign) && ("".equals(controlsVerticalAlign))){ //$NON-NLS-1$
- buttonsTD.setAttribute(HtmlComponentUtil.HTML_ATTR_VALIGN, ("center" //$NON-NLS-1$
+ tableButtonsCell.setAttribute(HTML.ATTR_VALIGN, ("center" //$NON-NLS-1$
.equalsIgnoreCase(controlsVerticalAlign) ? "middle" //$NON-NLS-1$
: controlsVerticalAlign));
}
- buttonsTD.appendChild(controlsDiv);
+ tableButtonsCell.appendChild(controlsDiv);
}
- // --------------------------------------------
-
- // ---------------------listTable------------------------
- nsIDOMElement listDiv = createListTableDiv(visualDocument, sourceElement, creationData, pageContext);
- tableListTD.appendChild(captionRow_TD_DIV);
- tableListTD.appendChild(listDiv);
- // --------------------------------------------
+ /*
+ * Encode ordering list itself
+ */
+ tableListCell.appendChild(createResultList(pageContext, creationData, visualDocument,
+ sourceElement));
return creationData;
}
/**
- * Creates the list table div.
- *
- * @param visualDocument the visual document
- * @param sourceElement the source element
- * @param creationData the creation data
- * @param pageContext the page context
- *
- * @return the element
- */
- private nsIDOMElement createListTableDiv(nsIDOMDocument visualDocument,
- Element sourceElement, VpeCreationData creationData, VpePageContext pageContext) {
-
- nsIDOMElement listOutputDiv = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
-
- nsIDOMElement listTable = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- nsIDOMElement tr1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- nsIDOMElement tr2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
-
- listOutputDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "overflow:hidden;width:100%;"); //$NON-NLS-1$
- listTable.appendChild(tr1);
- listTable.appendChild(tr2);
- listOutputDiv.appendChild(listTable);
-
- // ---------------------tr1------------------------
- nsIDOMElement tr1_TD1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- tr1.appendChild(tr1_TD1);
-
- nsIDOMElement tr1_TD2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- tr1.appendChild(tr1_TD2);
-
- nsIDOMElement tr1_TD2_DIV = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- tr1_TD2_DIV.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- STYLE_FOR_RIGHT_SCROLL);
- tr1_TD2.appendChild(tr1_TD2_DIV);
-
- // -------------------------------------------------------
-
- // ---------------------tr2------------------------
- nsIDOMElement tr2_TD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
- tr2.appendChild(tr2_TD);
-
- nsIDOMElement tr2_TD_DIV = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- tr2_TD_DIV.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- STYLE_FOR_LOW_SCROLL);
- tr2_TD.appendChild(tr2_TD_DIV);
-
- // --------------------------------------------
-
- nsIDOMElement contentDiv = createResultList(pageContext, creationData, visualDocument,
- sourceElement);
- tr1_TD1.appendChild(contentDiv);
-
- return listOutputDiv;
- }
-
- /**
* Creates the controls div.
*
* @param creationData the creation data
@@ -323,9 +256,9 @@
boolean orderControlsVisible = ComponentUtil.string2boolean(orderControlsVisibleStr);
String controlsClass = sourceElement.getAttribute(CONTROLS_CLASS);
- nsIDOMElement buttonsDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- buttonsDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- CSS_CONTROLS_CLASS + " " + controlsClass + " " //$NON-NLS-1$ //$NON-NLS-2$
+ nsIDOMElement buttonsDiv = visualDocument.createElement(HTML.TAG_DIV);
+ buttonsDiv.setAttribute(HTML.ATTR_CLASS,
+ CSS_CONTROLS_CLASS + " " + (null != controlsClass ? controlsClass + " " : "") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ CSS_BUTTON_LAYOUT_CLASS);
Element top_control_facet = ComponentUtil.getFacet(sourceElement, TOP_CONTROL_FACET);
@@ -378,43 +311,40 @@
* @param cssStyleName the css style name
* @param customStyleClass the custom style class
*
- * @return the ns idom element
+ * @return the element
*/
private nsIDOMElement createSingleButtonDiv(final VpePageContext pageContext, VpeCreationData creationData,
nsIDOMDocument visualDocument, String btnName, String imgName,
boolean showButtonLabels, Element buttonFacet, String cssStyleName,
String customStyleClass) {
- nsIDOMElement div1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- nsIDOMElement div2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- nsIDOMElement a = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_A);
- nsIDOMElement div3 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- nsIDOMElement img = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ nsIDOMElement div1 = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement div2 = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement a = visualDocument.createElement(HTML.TAG_A);
+ nsIDOMElement div3 = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
- div1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-buttons-border" + " " + cssStyleName + " " + customStyleClass); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- div2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_CLASS);
+ div1.setAttribute(HTML.ATTR_CLASS,
+ "dr-buttons-border" + " " + cssStyleName //$NON-NLS-1$ //$NON-NLS-2$
+ + (null != customStyleClass ? " " + customStyleClass : "")); //$NON-NLS-1$ //$NON-NLS-2$
+ div2.setAttribute(HTML.ATTR_CLASS, CSS_BUTTON_CLASS);
String resourceFolder = RichFacesTemplatesActivator.getPluginResourcePath();
String divStyle = "width: 100%;background-image: url(file://" + resourceFolder + BUTTON_BG + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- div2.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, divStyle);
+ div2.setAttribute(HTML.ATTR_STYLE, divStyle);
div1.appendChild(div2);
if (null != buttonFacet) {
// Creating button with facet content
- nsIDOMElement fecetDiv = encodeFacetsToDiv(pageContext, buttonFacet, true, cssStyleName, customStyleClass, creationData, visualDocument);
+ nsIDOMElement fecetDiv = encodeControlsFacets(pageContext,
+ buttonFacet, cssStyleName, customStyleClass,
+ creationData, visualDocument);
div2.appendChild(fecetDiv);
} else {
- a.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_SELECTION_CLASS);
- div3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_CONTENT_CLASS);
- div2.appendChild(a);
- a.appendChild(div3);
- // Creating button with image and label
+ /*
+ * Creating button with image and label
+ */
ComponentUtil.setImg(img, imgName);
img.setAttribute(HTML.ATTR_WIDTH, "15"); //$NON-NLS-1$
img.setAttribute(HTML.ATTR_HEIGHT, "15"); //$NON-NLS-1$
@@ -422,6 +352,11 @@
if (showButtonLabels) {
div3.appendChild(visualDocument.createTextNode(btnName));
}
+
+ a.setAttribute(HTML.ATTR_CLASS, CSS_BUTTON_SELECTION_CLASS);
+ div3.setAttribute(HTML.ATTR_CLASS, CSS_BUTTON_CONTENT_CLASS);
+ a.appendChild(div3);
+ div2.appendChild(a);
}
return div1;
}
@@ -438,152 +373,126 @@
*/
private nsIDOMElement createResultList(final VpePageContext pageContext, VpeCreationData creationData, nsIDOMDocument visualDocument,
Element sourceElement) {
- nsIDOMElement contentDiv = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- nsIDOMElement contentTable = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- nsIDOMElement thead = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_THEAD);
- nsIDOMElement tfoot = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TFOOT);
+ /*
+ * Create list elements
+ */
+ nsIDOMElement contentDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement contentTable = visualDocument.createElement(HTML.TAG_TABLE);
+ nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
+ /*
+ * Get list columns
+ */
ArrayList<Element> columns = getColumns(sourceElement);
- int columnsLength = getColumnsCount(sourceElement, columns);
- // ---------- HEADER -----------
- // Encode Header
- Element header = ComponentUtil.getFacet(sourceElement, HEADER);
+ /*
+ * Encode Header
+ */
ArrayList<Element> columnsHeaders = ComponentUtil.getColumnsWithFacet(columns, HEADER);
- if (header != null || !columnsHeaders.isEmpty()) {
- String headerClass = (String) sourceElement
- .getAttribute(HEADER_CLASS);
- /*
- if (header != null) {
- encodeTableHeaderOrFooterFacet(creationData, thead,
- columnsLength, visualDocument, header,
- CSS_HEADER_CLASS,
- CSS_HEADER_CLASS,
- headerClass, HtmlComponentUtil.HTML_TAG_TD);
+ if (!columnsHeaders.isEmpty()) {
+ String headerClass = (String) sourceElement.getAttribute(HEADER_CLASS);
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
+ thead.appendChild(tr);
+ String styleClass = ComponentUtil.encodeStyleClass(null,
+ CSS_HEADER_CLASS + " " + CSS_TABLE_HEADER_CLASS, Constants.EMPTY, //$NON-NLS-1$
+ headerClass);
+ if (styleClass != null) {
+ tr.setAttribute(HTML.ATTR_CLASS,styleClass);
}
- */
- if (!columnsHeaders.isEmpty()) {
- nsIDOMElement tr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
- thead.appendChild(tr);
- String styleClass = ComponentUtil.encodeStyleClass(null,
- CSS_HEADER_CLASS + " " + CSS_TABLE_HEADER_CLASS, null, //$NON-NLS-1$
- headerClass);
- if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- styleClass);
+
+ /*
+ * Encoding columns headers
+ */
+ for (Element column : columnsHeaders) {
+ String columnHeaderClass = column.getAttribute(RichFaces.ATTR_HEADER_CLASS);
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ tr.appendChild(td);
+ td.setAttribute(HTML.ATTR_BACKGROUND, "file:///" //$NON-NLS-1$
+ + ComponentUtil.getAbsoluteResourcePath(HEADER_CELL_BG).replace('\\', '/'));
+ styleClass = ComponentUtil.encodeStyleClass(null, CSS_TABLE_HEADER_CELL_CLASS,
+ headerClass, columnHeaderClass);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+
+ String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
+ if (colspan != null && colspan.length() > 0) {
+ td.setAttribute(HTML.ATTR_COLSPAN, colspan);
}
- encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
- columnsHeaders,
- CSS_TABLE_HEADER_CELL_CLASS,
- headerClass, HEADER, HtmlComponentUtil.HTML_TAG_TD);
+ Element facetBody = ComponentUtil.getFacet(column, RichFaces.NAME_FACET_HEADER);
+ VpeChildrenInfo child = new VpeChildrenInfo(td);
+ child.addSourceChild(facetBody);
+ creationData.addChildrenInfo(child);
}
}
-
- // ---------- FOOTER -----------
- // Encode Footer
- /*
- Element footer = ComponentUtil.getFacet(sourceElement, FOOTER);
- ArrayList<Element> columnsFooters = ComponentUtil.getColumnsWithFacet(columns, FOOTER);
- if (footer != null || !columnsFooters.isEmpty()) {
- String footerClass = (String) sourceElement
- .getAttribute(FOOTER_CLASS);
- if (!columnsFooters.isEmpty()) {
- nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- tfoot.appendChild(tr);
- String styleClass = ComponentUtil.encodeStyleClass(null,
- CSS_TABLE_HEADER_CLASS + " " + CSS_TABLE_HEADER_CELL_CLASS, null,
- footerClass);
- if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- styleClass);
- }
- encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
- columnsFooters,
- CSS_TABLE_FOOTER_CLASS + " " + CSS_TABLE_FOOTER_CELL_CLASS,
- footerClass, FOOTER, HtmlComponentUtil.HTML_TAG_TD);
- }
-
- if (footer != null) {
- encodeTableHeaderOrFooterFacet(creationData, tfoot,
- columnsLength, visualDocument, footer,
- CSS_FOOTER_CLASS,
- CSS_HEADER_CLASS,
- footerClass, HtmlComponentUtil.HTML_TAG_TD);
- }
-
- }
- */
- // ---------- CONTENT -----------
+ /*
+ * Encode content
+ */
String listWidth = sourceElement.getAttribute(LIST_WIDTH);
String listHeight = sourceElement.getAttribute(LIST_HEIGHT);
String listClass = sourceElement.getAttribute(LIST_CLASS);
- // TODO: implement support of rowClasses
- // following line commented by yradtsevich because the variable rowClasses was not used
- //String rowClasses = sourceElement.getAttribute(ROW_CLASSES);
+ /*
+ * TODO: implement support of rowClasses
+ * following line commented by yradtsevich
+ * because the variable rowClasses was not used
+ */
+// String rowClasses = sourceElement.getAttribute(ROW_CLASSES);
- String divStyle = HtmlComponentUtil.HTML_WIDTH_ATTR + " : " //$NON-NLS-1$
+ String divStyle = HTML.ATTR_WIDTH + " : " //$NON-NLS-1$
+ (listWidth == null ? DEFAULT_LIST_WIDTH : listWidth) + ";" //$NON-NLS-1$
- + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : " //$NON-NLS-1$
- + (listHeight == null ? DEFAULT_LIST_HEIGHT : listHeight) + ";"; //$NON-NLS-1$
+ + HTML.ATTR_HEIGHT + " : " //$NON-NLS-1$
+ + (listHeight == null ? DEFAULT_LIST_HEIGHT : listHeight) + ";" //$NON-NLS-1$
+ + "overflow: scroll;"; //$NON-NLS-1$
- contentDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, divStyle);
+ contentDiv.setAttribute(HTML.ATTR_STYLE, divStyle);
- contentDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ contentDiv.setAttribute(HTML.ATTR_CLASS,
CSS_LIST_OUTPUT_CLASS + " " + CSS_LIST_CONTENT_CLASS); //$NON-NLS-1$
- contentTable.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ contentTable.setAttribute(HTML.ATTR_CLASS,
CSS_LIST_ITEMS_CLASS + " " + (null == listClass ? "" : listClass)); //$NON-NLS-1$ //$NON-NLS-2$
- contentTable.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "1"); //$NON-NLS-1$
+ contentTable.setAttribute(HTML.ATTR_CELLSPACING, "1"); //$NON-NLS-1$
VisualDomUtil.copyAttributes(sourceElement, contentTable);
- contentTable.removeAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT);
- contentTable.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "width: 100%;"); //$NON-NLS-1$
+ contentTable.removeAttribute(HTML.ATTR_HEIGHT);
+ contentTable.setAttribute(HTML.ATTR_STYLE, "width: 100%;"); //$NON-NLS-1$
- // ---------- FINALIZING and children encoding -----------
+ /*
+ * Encode children
+ */
contentTable.appendChild(thead);
- RichFacesDataTableChildrenEncoder childrenEncoder = new RichFacesDataTableChildrenEncoder(creationData, visualDocument,
- sourceElement, contentTable);
+ RichFacesDataTableChildrenEncoder childrenEncoder = new RichFacesDataTableChildrenEncoder(
+ creationData, visualDocument, sourceElement, contentTable);
childrenEncoder.setRowClasses(CSS_LIST_ROW_CLASS, CSS_LIST_ROW_CLASS);
childrenEncoder.encodeChildren();
- //contentTable.appendChild(tfoot);
contentDiv.appendChild(contentTable);
- //outputDiv.appendChild(contentDiv);
return contentDiv;
- //return outputDiv;
}
-
+
/**
- * Encodes facets to div.
+ * Encodes controls facets to DIV element with TABLE.
*
+ * @param pageContext
* @param facetBody the facet body
- * @param isControlFacet the is control facet
* @param cssStyleName the css style name
* @param customStyleClass the custom style class
* @param creationData the creation data
* @param visualDocument the visual document
- *
- * @return the element
+ * @return the DIV element with facet
*/
- private nsIDOMElement encodeFacetsToDiv(final VpePageContext pageContext, Element facetBody,
- boolean isControlFacet, String cssStyleName,
- String customStyleClass, VpeCreationData creationData,
- nsIDOMDocument visualDocument) {
- nsIDOMElement fecetDiv = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- nsIDOMElement tbody = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ private nsIDOMElement encodeControlsFacets(final VpePageContext pageContext,
+ Element facetBody, String cssStyleName, String customStyleClass,
+ VpeCreationData creationData, nsIDOMDocument visualDocument) {
+ /*
+ * Create table for facet
+ */
+ nsIDOMElement fecetDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
+ nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
+
boolean isColumnGroup = facetBody.getNodeName()
.endsWith(":columnGroup"); //$NON-NLS-1$
boolean isSubTable = facetBody.getNodeName().endsWith(":subTable"); //$NON-NLS-1$
@@ -595,155 +504,40 @@
facetBody, visualDocument, tbody);
} else {
nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
tbody.appendChild(tr);
- nsIDOMElement td = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
tr.appendChild(td);
- td.setAttribute(HtmlComponentUtil.HTML_SCOPE_ATTR,
- HtmlComponentUtil.HTML_TAG_COLGROUP);
+ td.setAttribute(HTML.ATTR_SCOPE,
+ HTML.TAG_COLGROUP);
VpeChildrenInfo child = new VpeChildrenInfo(td);
child.addSourceChild(facetBody);
creationData.addChildrenInfo(child);
-
- if (isControlFacet) {
-
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- CSS_BUTTON_CLASS);
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- CSS_BUTTON_CONTENT_CLASS + " " + cssStyleName + " " //$NON-NLS-1$ //$NON-NLS-2$
- + customStyleClass);
-
- fecetDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- CSS_BUTTON_CLASS + " " + CSS_BUTTON_CONTENT_CLASS + " " //$NON-NLS-1$ //$NON-NLS-2$
- + cssStyleName + " " + customStyleClass); //$NON-NLS-1$
-
- }
+
+ /*
+ * It is always controls facet
+ */
+ tr.setAttribute(HTML.ATTR_CLASS,CSS_BUTTON_CLASS);
+ td.setAttribute(HTML.ATTR_CLASS,
+ CSS_BUTTON_CONTENT_CLASS + " " + cssStyleName + " " //$NON-NLS-1$ //$NON-NLS-2$
+ + customStyleClass);
+
+ fecetDiv.setAttribute(HTML.ATTR_CLASS,
+ CSS_BUTTON_CLASS + " " + CSS_BUTTON_CONTENT_CLASS + " " //$NON-NLS-1$ //$NON-NLS-2$
+ + cssStyleName + " " + customStyleClass); //$NON-NLS-1$
}
-
- if (isControlFacet) {
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- CSS_BUTTON_CONTENT_CLASS);
- } else {
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- CSS_CAPTION_CLASS);
- }
-
+
+ table.setAttribute(HTML.ATTR_CLASS,CSS_BUTTON_CONTENT_CLASS);
table.appendChild(tbody);
fecetDiv.appendChild(table);
return fecetDiv;
- //return table;
}
/**
*
- * @param creationData
- * @param parentTheadOrTfood
- * @param columns
- * @param visualDocument
- * @param facetBody
- * @param skinFirstRowClass
- * @param skinRowClass
- * @param skinCellClass
- * @param facetBodyClass
- * @param element
- */
- private void encodeTableHeaderOrFooterFacet(final VpePageContext pageContext, VpeCreationData creationData,
- nsIDOMElement parentTheadOrTfood, int columns,
- nsIDOMDocument visualDocument, Element facetBody,
- String skinFirstRowClass, String skinCellClass,
- String facetBodyClass, String element) {
- boolean isColumnGroup = facetBody.getNodeName()
- .endsWith(":columnGroup"); //$NON-NLS-1$
- boolean isSubTable = facetBody.getNodeName().endsWith(":subTable"); //$NON-NLS-1$
- if (isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
- facetBody, visualDocument, parentTheadOrTfood);
- } else if (isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
- facetBody, visualDocument, parentTheadOrTfood);
- } else {
- nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
- parentTheadOrTfood.appendChild(tr);
-
- String styleClass = ComponentUtil.encodeStyleClass(null, skinFirstRowClass,
- facetBodyClass, null);
- if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
- }
- String style = ComponentUtil.getHeaderBackgoundImgStyle();
- tr.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
-
- nsIDOMElement td = visualDocument.createElement(element);
- tr.appendChild(td);
-
- styleClass = ComponentUtil.encodeStyleClass(null, skinCellClass, facetBodyClass,
- null);
- if (styleClass != null) {
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
- }
-
- // the cell spans the entire row
- td.setAttribute(HTML.ATTR_COLSPAN, HTML.VALUE_COLSPAN_ALL);
- td.setAttribute(HtmlComponentUtil.HTML_SCOPE_ATTR,
- HtmlComponentUtil.HTML_TAG_COLGROUP);
-
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
- }
- }
-
- /**
- *
- * @param creationData
- /**
- *
- * @param creationData
- * @param parentTr
- * @param visualDocument
- * @param headersOrFooters
- * @param skinCellClass
- * @param headerClass
- * @param facetName
- * @param element
- */
- private static void encodeHeaderOrFooterFacets(VpeCreationData creationData,
- nsIDOMElement parentTr, nsIDOMDocument visualDocument,
- ArrayList<Element> headersOrFooters, String skinCellClass,
- String headerClass, String facetName, String element) {
- for (Element column : headersOrFooters) {
- String classAttribute = facetName + "Class"; //$NON-NLS-1$
- String columnHeaderClass = column.getAttribute(classAttribute);
- nsIDOMElement td = visualDocument.createElement(element);
- parentTr.appendChild(td);
-
- td.setAttribute(HtmlComponentUtil.HTML_ATTR_BACKGROUND, "file:///" //$NON-NLS-1$
- + ComponentUtil.getAbsoluteResourcePath(HEADER_CELL_BG).replace('\\', '/'));
-
- String styleClass = ComponentUtil.encodeStyleClass(null, skinCellClass,
- headerClass, columnHeaderClass);
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
- td.setAttribute("scop", "col"); //$NON-NLS-1$ //$NON-NLS-2$
-
- String colspan = column
- .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
- if (colspan != null && colspan.length() > 0) {
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, colspan);
- }
- Element facetBody = ComponentUtil.getFacet(column, facetName);
-
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
- }
- }
-
- /**
- *
* @param parentSourceElement
* @return list of columns
*/
@@ -761,106 +555,13 @@
return columns;
}
- /**
- *
- * @param sourceElement
- * @param columns
- * @return
- */
- private int getColumnsCount(Element sourceElement,
- ArrayList<Element> columns) {
- int count = 0;
- // check for exact value in component
- try {
- count = Integer.parseInt(sourceElement.getAttribute("columns")); //$NON-NLS-1$
- } catch (NumberFormatException e) {
- // calculate max html columns count for all columns/rows children.
- count = calculateRowColumns(sourceElement, columns);
- }
- return count;
- }
-
- /*
- * Calculate max number of columns per row. For rows, recursive calculate
- * max length.
- */
- private int calculateRowColumns(Element sourceElement,
- ArrayList<Element> columns) {
- int count = 0;
- int currentLength = 0;
- for (Element column : columns) {
- if (ComponentUtil.isRendered(column)) {
- String nodeName = column.getNodeName();
- if (nodeName.endsWith(":columnGroup")) { //$NON-NLS-1$
- // Store max calculated value of previous rows.
- count = Math.max(currentLength, count);
- // Calculate number of columns in row.
- currentLength = calculateRowColumns(sourceElement,
- getColumns(column));
- // Store max calculated value
- count = Math.max(currentLength, count);
- currentLength = 0;
- String colspanStr = column
- .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
-
- } else if (nodeName.equals(sourceElement.getPrefix() + COLUMN) ||
- nodeName.equals(sourceElement.getPrefix() + COLUMNS)) {
- String breakBeforeStr = column.getAttribute("breakBefore"); //$NON-NLS-1$
- boolean breakBefore = Boolean.getBoolean(breakBeforeStr);
-
- // For new row, save length of previous.
- if (breakBefore) {
- count = Math.max (currentLength, count);
- currentLength = 0;
- }
-
- try {
- String colspanStr = column
- .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
- currentLength += Integer.parseInt(colspanStr);
- } catch (NumberFormatException e) {
- currentLength++;
- }
- } else if (nodeName.endsWith(COLUMN)) {
- // UIColumn always have colspan == 1.
- currentLength++;
- }
-
- }
- }
- count = Math.max (currentLength, count);
- return count;
- }
-
- /**
- * Checks, whether it is necessary to re-create an element at change of
- * attribute
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceElement
- * The current element of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @param visualNode
- * The current node of the visual tree.
- * @param data
- * The arbitrary data, built by a method <code>create</code>
- * @param name
- * Attribute name
- * @param value
- * Attribute value
- * @return <code>true</code> if it is required to re-create an element at
- * a modification of attribute, <code>false</code> otherwise.
- */
+ @Override
public boolean recreateAtAttrChange(VpePageContext pageContext,
Element sourceElement, nsIDOMDocument visualDocument,
nsIDOMElement visualNode, Object data, String name, String value) {
return true;
}
- /* (non-Javadoc)
- * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#validate(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument, org.jboss.tools.vpe.editor.template.VpeCreationData) */
@Override
public void validate(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument, VpeCreationData data) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelItemTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -11,14 +11,18 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
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.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.ResourceUtil;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMText;
@@ -73,7 +77,7 @@
String barContentStyleClass, String barContentStyle, String toggleId) {
nsIDOMElement div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ .createElement(HTML.TAG_DIV);
if (creationData == null) {
creationData = new VpeCreationData(div);
@@ -81,9 +85,9 @@
parentVisualElement.appendChild(div);
}
- div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, barStyleClass
+ div.setAttribute(HTML.ATTR_CLASS, barStyleClass
+ DR_PNLBAR_RICH_PANELBAR_DR_PNLBAR_EXT);
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, barStyle);
+ div.setAttribute(HTML.ATTR_STYLE, barStyle);
div.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
// Encode Header
@@ -126,12 +130,12 @@
if (active) {
nsIDOMElement tr2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement td2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
tr2.appendChild(td2);
- tr2.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, PERCENT_100);
- tr2.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR, PERCENT_100);
+ tr2.setAttribute(HTML.ATTR_WIDTH, PERCENT_100);
+ tr2.setAttribute(HTML.ATTR_HEIGHT, PERCENT_100);
if (creationData == null) {
creationData = new VpeCreationData(tr2);
} else {
@@ -139,38 +143,54 @@
}
nsIDOMElement contentTable = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ .createElement(HTML.TAG_TABLE);
td2.appendChild(contentTable);
- contentTable.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR,
+ contentTable.setAttribute(HTML.ATTR_CELLPADDING,
ZERO);
- contentTable.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR,
+ contentTable.setAttribute(HTML.ATTR_WIDTH,
PERCENT_100);
- contentTable.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR,
+ contentTable.setAttribute(HTML.ATTR_HEIGHT,
PERCENT_100);
nsIDOMElement tbody = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ .createElement(HTML.TAG_TBODY);
contentTable.appendChild(tbody);
nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
tbody.appendChild(tr);
nsIDOMElement td = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
tr.appendChild(td);
String tdClass = DR_PNLBAR_C_RICH_PANELBAR_CONTENT
+ barContentStyleClass + SPACE + internContentClass;
String tdStyle = barContentStyle + SPACE + internContentStyle;
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, tdClass);
- td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, tdStyle);
+ td.setAttribute(HTML.ATTR_CLASS, tdClass);
+ td.setAttribute(HTML.ATTR_STYLE, tdStyle);
- List<Node> children = ComponentUtil
- .getChildren(sourceElement, true);
+ Element labelFacet = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_LABEL);
+ Map<String, List<Node>> labelFacetChildren = VisualDomUtil.findFacetElements(labelFacet, pageContext);
+ boolean labelFacetHtmlChildrenPresent = labelFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0;
+ List<Node> children = ComponentUtil.getChildren(sourceElement, true);
+
+ /*
+ * Add HTML elements from facet
+ */
VpeChildrenInfo bodyInfo = new VpeChildrenInfo(td);
+ if (labelFacetHtmlChildrenPresent) {
+ for (Node node : labelFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ bodyInfo.addSourceChild(node);
+ }
+ }
+
+ /*
+ * Add the rest item's content
+ */
for (Node child : children) {
bodyInfo.addSourceChild(child);
}
@@ -201,43 +221,46 @@
String styleClass, String style, String toggleId) {
nsIDOMElement div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ .createElement(HTML.TAG_DIV);
parentDiv.appendChild(div);
- div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ div.setAttribute(HTML.ATTR_CLASS, styleClass);
+ div.setAttribute(HTML.ATTR_STYLE, style);
div.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
- Element facet = ComponentUtil.getFacet(sourceElement, LABEL);
+ Element facetBody = ComponentUtil.getFacet(sourceElement, LABEL);
+
+ if (facetBody == null) {
+ /*
+ * Display label attribute or default label
+ */
+ Attr attr = null;
+ if (sourceElement.hasAttribute(LABEL)) {
+ attr = sourceElement.getAttributeNode(LABEL);
+ }
+ if (attr != null) {
+ String itemLabel = attr.getNodeValue();
+ String bundleValue = ResourceUtil.getBundleValue(pageContext,
+ attr.getValue());
+ nsIDOMText text;
+ // if bundleValue differ from value then will be represent
+ // bundleValue, but text will be not edit
+ if (!itemLabel.equals(bundleValue)) {
+ text = visualDocument.createTextNode(bundleValue);
- if (facet == null) {
- Attr attr = null;
- if (sourceElement.hasAttribute(LABEL)) {
- attr = sourceElement.getAttributeNode(LABEL);
- }
- if (attr != null) {
- String itemLabel = attr.getNodeValue();
- String bundleValue = ResourceUtil.getBundleValue(pageContext,
- attr.getValue());
- nsIDOMText text;
- // if bundleValue differ from value then will be represent
- // bundleValue, but text will be not edit
- if (!itemLabel.equals(bundleValue)) {
- text = visualDocument.createTextNode(bundleValue);
+ } else {
+ text = visualDocument.createTextNode(itemLabel);
+ }
+ div.appendChild(text);
+ } else {
+ div.appendChild(visualDocument.createTextNode(DEFAULT_LABEL));
+ }
} else {
- text = visualDocument.createTextNode(itemLabel);
+ VpeChildrenInfo facetInfo = new VpeChildrenInfo(div);
+ facetInfo.addSourceChild(facetBody);
+ vpeCreationData.addChildrenInfo(facetInfo);
}
- div.appendChild(text);
- } else {
- div.appendChild(visualDocument.createTextNode(DEFAULT_LABEL));
- }
- } else {
- VpeChildrenInfo facetInfo = new VpeChildrenInfo(div);
- facetInfo.addSourceChild(facet);
- vpeCreationData.addChildrenInfo(facetInfo);
- }
-
}
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -11,12 +11,18 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import java.util.List;
+import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+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.util.HTML;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -43,28 +49,57 @@
div.setAttribute("style", style); //$NON-NLS-1$
}
- // Encode Header
- Node header = ComponentUtil.getFacet(sourceElement, "header", true); //$NON-NLS-1$
- if(header!=null) {
- nsIDOMElement headerDiv = visualDocument.createElement("div"); //$NON-NLS-1$
+ /*
+ * Encode the Header Facet
+ * Find elements from the f:facet
+ */
+ Map<String, List<Node>> headerFacetChildren = null;
+ Element headerFacet = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_HEADER);
+ if (headerFacet != null) {
+ headerFacetChildren = VisualDomUtil.findFacetElements(headerFacet, pageContext);
+ nsIDOMElement headerDiv = visualDocument.createElement(HTML.TAG_DIV);
+ /*
+ * By adding attribute VPE-FACET to this visual node
+ * we force JsfFacet to be rendered inside it.
+ */
+ headerDiv.setAttribute(VpeVisualDomBuilder.VPE_FACET, RichFaces.NAME_FACET_HEADER);
div.appendChild(headerDiv);
- String headerClass = sourceElement.getAttribute("headerClass"); //$NON-NLS-1$
- headerDiv.setAttribute("class", "dr-pnl-h rich-panel-header " + (headerClass==null?"":headerClass)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- headerDiv.setAttribute("style", ComponentUtil.getHeaderBackgoundImgStyle()); //$NON-NLS-1$
+ String headerClass = sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS);
+ headerDiv.setAttribute(HTML.ATTR_CLASS,
+ "dr-pnl-h rich-panel-header " + (headerClass == null ? "" : headerClass)); //$NON-NLS-1$ //$NON-NLS-2$
+ headerDiv.setAttribute(HTML.ATTR_STYLE,
+ ComponentUtil.getHeaderBackgoundImgStyle());
VpeChildrenInfo headerInfo = new VpeChildrenInfo(headerDiv);
- headerInfo.addSourceChild(header);
+ headerInfo.addSourceChild(headerFacet);
creationData.addChildrenInfo(headerInfo);
}
- // Encode Body
- nsIDOMElement bodyDiv = visualDocument.createElement("div"); //$NON-NLS-1$
+ /*
+ * Encode rich:panel content
+ */
+ nsIDOMElement bodyDiv = visualDocument.createElement(HTML.TAG_DIV);
div.appendChild(bodyDiv);
- String bodyClass = sourceElement.getAttribute("bodyClass"); //$NON-NLS-1$
- bodyDiv.setAttribute("class", "dr-pnl-b rich-panel-body " + (bodyClass==null?"":bodyClass)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
+ String bodyClass = sourceElement.getAttribute(RichFaces.ATTR_BODY_CLASS);
+ bodyDiv.setAttribute(HTML.ATTR_CLASS,
+ "dr-pnl-b rich-panel-body " + (bodyClass == null ? "" : bodyClass)); //$NON-NLS-1$ //$NON-NLS-2$
+ /*
+ * If there are some odd HTML elements from facet
+ * add them to the panel body first.
+ */
+ boolean headerHtmlElementsPresents = ((headerFacetChildren != null) && (headerFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+ VpeChildrenInfo bodyInfo = new VpeChildrenInfo(bodyDiv);
+ if (headerHtmlElementsPresents) {
+ for (Node node : headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ bodyInfo.addSourceChild(node);
+ }
+ }
+
+ /*
+ * Add the rest panel's content
+ */
List<Node> children = ComponentUtil.getChildren(sourceElement, true);
- VpeChildrenInfo bodyInfo = new VpeChildrenInfo(bodyDiv);
for (Node child : children) {
bodyInfo.addSourceChild(child);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesProgressBarTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -13,196 +13,208 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
-import java.util.ArrayList;
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.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
* Template for <rich:progressBar/> tag.
*
- * @author Eugene Stherbin
+ * @author dmaliarevich
*/
-public class RichFacesProgressBarTemplate extends AbstractRichFacesTemplate {
+public class RichFacesProgressBarTemplate extends VpeAbstractTemplate /*AbstractRichFacesTemplate*/ {
- /** The Constant DEFAULT_HEIGHT. */
- private static final String DEFAULT_HEIGHT = " height:13px;"; //$NON-NLS-1$
-
- /** The Constant CSS_EXTENSION. */
private static final String CSS_EXTENSION = "progressBar"; //$NON-NLS-1$
+ private static final String CSS_PATH = "progressBar/progressBar.css"; //$NON-NLS-1$
+ private static final String NBSP = "\u00A0"; //$NON-NLS-1$
- /** The Constant CSS_STYLE. */
- private static final String CSS_STYLE = "/progressBar.css"; //$NON-NLS-1$
-
- /** The Constant FACET. */
- private static final String FACET = "facet"; //$NON-NLS-1$
-
- /** The Constant OUTPUT_TEXT. */
- private static final String OUTPUT_TEXT = "outputText"; //$NON-NLS-1$
-
- /** The Constant PROGRESS_DIV_STYLE_CLASSES. */
- private static final String PROGRESS_DIV_STYLE_CLASSES = "rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"; //$NON-NLS-1$
-
- /** The Constant TEXT_ALIGN_LEFT. */
- private static final String TEXT_ALIGN_LEFT = "; text-align:left;"; //$NON-NLS-1$
-
- /** The Constant UPLOADED_DIV. */
- private static final String UPLOADED_DIV = "rich-progress-bar-height rich-progress-bar-uploaded null"; //$NON-NLS-1$
-
- /** The percentage. */
- private String percentage = "60%"; //$NON-NLS-1$
-
- /** The style. */
- private String style;
-
- /** The style class. */
- private String styleClass;
+ private static final String DEFAULT_HEIGHT = "height: 13px;"; //$NON-NLS-1$
+ private static final String DEFAULT_UPLOADED_STATUS = "60%"; //$NON-NLS-1$
- private String sourceLabel;
-
- /**
- * Create.
- *
- * @param visualDocument the visual document
- * @param sourceNode the source node
- * @param pageContext the page context
- *
- * @return the vpe creation data
- *
- * @see
- * org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools
- * .vpe.editor.context.VpePageContext, org.w3c.dom.Node,
- * org.mozilla.interfaces.nsIDOMDocument)
- */
+ private static final String CSS_PB_BLOCK = "rich-progress-bar-block"; //$NON-NLS-1$
+ private static final String CSS_PB_SHELL = "rich-progress-bar-shell"; //$NON-NLS-1$
+ private static final String CSS_PB_UPLOADED = "rich-progress-bar-uploaded"; //$NON-NLS-1$
+ private static final String CSS_PB_HEIGHT = "rich-progress-bar-height"; //$NON-NLS-1$
+ private static final String CSS_PB_WIDTH = "rich-progress-bar-width"; //$NON-NLS-1$
+ private static final String CSS_PB_SHELL_DIG = "rich-progress-bar-shell-dig"; //$NON-NLS-1$
+ private static final String CSS_PB_UPLOADED_DIG = "rich-progress-bar-uploaded-dig"; //$NON-NLS-1$
+ private static final String CSS_PB_REMAINED = "rich-progress-bar-remained"; //$NON-NLS-1$
+ private static final String CSS_PB_PADDING = "rich-progress-bar-padding"; //$NON-NLS-1$
+ private static final String CSS_PB_COMPLETED = "rich-progress-bar-completed"; //$NON-NLS-1$
+ private static final String CSS_PB_HEIGHT_DIG = "rich-progress-bar-height-dig"; //$NON-NLS-1$
+ private static final String CSS_PB_VPE_TEXT = "rich-progress-bar-vpe-text"; //$NON-NLS-1$
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
+ /*
+ * Add CSS link to the current page
+ */
+ ComponentUtil.setCSSLink(pageContext, CSS_PATH, CSS_EXTENSION);
+ Element sourceElement = (Element) sourceNode;
+
+ /*
+ * Get source element attributes
+ */
+ String style = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_STYLE);
+ String styleClass = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE_CLASS);
+ String sourceLabel = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_LABEL);
+ if (ComponentUtil.isBlank(styleClass)) {
+ styleClass = Constants.EMPTY;
+ }
+ if (ComponentUtil.isBlank(style)) {
+ style = DEFAULT_HEIGHT;
+ }
+
+ /*
+ * Create tags
+ */
+ nsIDOMElement progressDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement remainDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement uploadDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement completeDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement vpeTextDiv = visualDocument.createElement(HTML.TAG_DIV);
- ComponentUtil.setCSSLink(pageContext, getCssStyle(), getCssExtension());
- final Element source = (Element) sourceNode;
- prepareData(source);
+ /*
+ * if there are any suitable facets or lable value
+ * or supplementary HTML tags from facets
+ * then progress bar has more divs than usual.
+ */
+ Element initialFacet = SourceDomUtil.getFacetByName(sourceElement, "initial");
+ Map<String, List<Node>> initialFacetChildren = VisualDomUtil.findFacetElements(initialFacet, pageContext);
+ boolean initialFacetHtmlChildrenPresent = initialFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0;
- final nsIDOMElement progressDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- final nsIDOMElement uploadDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
-
- String clazz = PROGRESS_DIV_STYLE_CLASSES;
- if (ComponentUtil.isNotBlank(this.styleClass)) {
- clazz = clazz + " " + this.styleClass; //$NON-NLS-1$
- }
- progressDiv.setAttribute(HTML.ATTR_CLASS, clazz);
- progressDiv.setAttribute(HTML.ATTR_STYLE, this.style + TEXT_ALIGN_LEFT);
- final List<Node> elements = new ArrayList<Node>();
- final NodeList list = sourceNode.getChildNodes();
-
- for(int i = 0 ; i < list.getLength() ; i ++ ){
- if(list.item(i).getNodeName().equalsIgnoreCase("h:outputText")){ //$NON-NLS-1$
- elements.add(list.item(i));
- }
- }
-
- if(ComponentUtil.isNotBlank(this.sourceLabel) || elements.size() > 0){
- final nsIDOMElement labelDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- // labelDiv.setAttribute(HTML.ATTR_CLASS, "rich-progress-bar-width rich-progress-bar-remained rich-progress-bar-padding");
- labelDiv.setAttribute(HTML.ATTR_STYLE,this.style+"; font-weight: bold; position: relative; text-align: center; "); //$NON-NLS-1$
- uploadDiv.appendChild(labelDiv);
- if (elements.size() > 0) {
- final StringBuffer sb = new StringBuffer();
-
- for (Node n : elements) {
- sb.append(ComponentUtil.getAttribute((Element)n, "value")); //$NON-NLS-1$
- }
- labelDiv.appendChild(visualDocument.createTextNode(sb.toString()));
- } else {
- labelDiv.appendChild(visualDocument.createTextNode(this.sourceLabel));
- }
- }
- uploadDiv.setAttribute(HTML.ATTR_CLASS, UPLOADED_DIV);
+ Element completeFacet = SourceDomUtil.getFacetByName(sourceElement, "complete");
+ Map<String, List<Node>> completeFacetChildren = VisualDomUtil.findFacetElements(completeFacet, pageContext);
+ boolean completeFacetHtmlChildrenPresent = completeFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0;
- uploadDiv.setAttribute(HTML.ATTR_STYLE, this.style + VpeStyleUtil.SEMICOLON_STRING + VpeStyleUtil.PARAMETER_WIDTH
- + VpeStyleUtil.COLON_STRING + this.percentage);
- // rootDiv.appendChild(progressDiv);
- progressDiv.appendChild(uploadDiv);
- List<Node> childrens = ComponentUtil.getChildren(source);
- final VpeCreationData data = new VpeCreationData(progressDiv);
- data.addChildrenInfo(new VpeChildrenInfo(null));
+ List<Node> children = ComponentUtil.getChildren(sourceElement, true);
+ boolean progressBarWithLabel = initialFacetHtmlChildrenPresent
+ || completeFacetHtmlChildrenPresent
+ || (children.size() > 0)
+ || ComponentUtil.isNotBlank(sourceLabel);
+
+ /*
+ * Create VpeCreationData
+ */
+ VpeCreationData creationData = new VpeCreationData(progressDiv);
+// VpeChildrenInfo vpeTextInfo = new VpeChildrenInfo(progressDiv);
+// for (Node child : children) {
+// System.out.println("--add child=[" + child.getNodeName() + ", "
+// + child.getNodeValue() + "]");
+// vpeTextInfo.addSourceChild(child);
+// }
+// creationData.addChildrenInfo(vpeTextInfo);
+
+ /*
+ * Filling in the divs
+ */
+ if (progressBarWithLabel) {
+ progressDiv.setAttribute(HTML.ATTR_CLASS, CSS_PB_BLOCK
+ + Constants.WHITE_SPACE + CSS_PB_WIDTH
+ + Constants.WHITE_SPACE + CSS_PB_SHELL_DIG
+ + Constants.WHITE_SPACE + styleClass);
+ remainDiv.setAttribute(HTML.ATTR_CLASS, CSS_PB_WIDTH
+ + Constants.WHITE_SPACE + CSS_PB_REMAINED
+ + Constants.WHITE_SPACE + CSS_PB_PADDING);
+ uploadDiv.setAttribute(HTML.ATTR_CLASS, CSS_PB_UPLOADED_DIG);
+ vpeTextDiv.setAttribute(HTML.ATTR_CLASS, CSS_PB_HEIGHT_DIG
+ + Constants.WHITE_SPACE + CSS_PB_UPLOADED_DIG
+ + Constants.WHITE_SPACE + CSS_PB_VPE_TEXT);
+ completeDiv.setAttribute(HTML.ATTR_CLASS, CSS_PB_HEIGHT_DIG
+ + Constants.WHITE_SPACE + CSS_PB_WIDTH
+ + Constants.WHITE_SPACE + CSS_PB_COMPLETED
+ + Constants.WHITE_SPACE + CSS_PB_PADDING);
+ /*
+ * Adding facets HTML elements
+ */
+ VpeChildrenInfo vpeTextInfo = new VpeChildrenInfo(vpeTextDiv);
+ if (initialFacetHtmlChildrenPresent) {
+ for (Node node : initialFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ vpeTextInfo.addSourceChild(node);
+ }
+ }
+ if (completeFacetHtmlChildrenPresent) {
+ for (Node node : completeFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ vpeTextInfo.addSourceChild(node);
+ }
+ }
+
+ /*
+ * Add the rest bar's content
+ */
+ for (Node child : children) {
+ vpeTextInfo.addSourceChild(child);
+ }
+
+ /*
+ * Adding ChildrenInfo to CreationData
+ */
+ creationData.addChildrenInfo(vpeTextInfo);
+
+ /*
+ * Adding label to the bar's content
+ */
+ if (ComponentUtil.isNotBlank(sourceLabel)) {
+ vpeTextDiv.appendChild(visualDocument.createTextNode(sourceLabel));
+ }
+
+ /*
+ * Creating tags structure
+ */
+ progressDiv.appendChild(remainDiv);
+ progressDiv.appendChild(uploadDiv);
+ progressDiv.appendChild(vpeTextDiv);
+ uploadDiv.appendChild(completeDiv);
+ /*
+ * Add nbsp; for correct div height
+ */
+ remainDiv.appendChild(visualDocument.createTextNode(NBSP));
+ completeDiv.appendChild(visualDocument.createTextNode(NBSP));
+ } else {
+ progressDiv.setAttribute(HTML.ATTR_CLASS, CSS_PB_BLOCK
+ + Constants.WHITE_SPACE + CSS_PB_WIDTH
+ + Constants.WHITE_SPACE + CSS_PB_SHELL
+ + Constants.WHITE_SPACE + styleClass);
+ uploadDiv.setAttribute(HTML.ATTR_CLASS, CSS_PB_HEIGHT
+ + Constants.WHITE_SPACE + CSS_PB_UPLOADED);
+ /*
+ * Creating tags structure
+ */
+ progressDiv.appendChild(uploadDiv);
+ }
+
+ /*
+ * Adding common styles
+ */
+ remainDiv.setAttribute(HTML.ATTR_STYLE, style);
+ uploadDiv.setAttribute(HTML.ATTR_STYLE, "width: "
+ + DEFAULT_UPLOADED_STATUS + "; " + style);
+ completeDiv.setAttribute(HTML.ATTR_STYLE, style);
+ vpeTextDiv.setAttribute(HTML.ATTR_STYLE, style);
- if (childrens.size() > 0) {
- final VpeChildrenInfo info = new VpeChildrenInfo(progressDiv);
- data.addChildrenInfo(info);
- for (Node n : childrens) {
- if (n.getNodeName().indexOf(FACET) > 1
- || n.getNodeName().indexOf(OUTPUT_TEXT) > 1) {
- info.addSourceChild(n);
- }
- }
- }
-//
-// DOMTreeDumper dump = new DOMTreeDumper();
-// dump.dumpToStream(System.err, progressDiv);
- return data;
+ return creationData;
}
- /**
- * Gets the css extension.
- *
- * @return the css extension
- */
- private String getCssExtension() {
- return CSS_EXTENSION;
- }
-
- /**
- * Gets the css style.
- *
- * @return the css style
- */
- private String getCssStyle() {
- return getCssExtension() + CSS_STYLE;
- }
-
- /**
- * Checks if is recreate at attr change.
- *
- * @param sourceElement the source element
- * @param visualDocument the visual document
- * @param value the value
- * @param visualNode the visual node
- * @param data the data
- * @param pageContext the page context
- * @param name the name
- *
- * @return true, if is recreate at attr change
- */
@Override
public boolean recreateAtAttrChange(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument,
nsIDOMElement visualNode, Object data, String name, String value) {
return true;
}
- /**
- * Prepare data.
- *
- * @param source the source
- */
- private void prepareData(Element source) {
- this.styleClass = ComponentUtil.getAttribute(source, RichFaces.ATTR_STYLE_CLASS);
- this.style = ComponentUtil.getAttribute(source, HTML.ATTR_STYLE);
- this.sourceLabel = ComponentUtil.getAttribute(source, "label"); //$NON-NLS-1$
- if (ComponentUtil.isBlank(this.style)) {
- this.style = DEFAULT_HEIGHT;
- }
-
- }
-
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -24,6 +24,8 @@
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -87,19 +89,36 @@
headerDiv.setAttribute(HTML.ATTR_STYLE, "position : relative; " //$NON-NLS-1$
+ ComponentUtil.getHeaderBackgoundImgStyle());
- // http://jira.jboss.com/jira/browse/JBIDE-791
- Element firstElementOfHeaderFacet = ComponentUtil.getFacet(
- sourceElement, RichFaces.NAME_FACET_HEADER);
- if (firstElementOfHeaderFacet != null) {
- VpeChildrenInfo headerInfo = new VpeChildrenInfo(headerDiv);
- headerInfo.addSourceChild(firstElementOfHeaderFacet);
+ /*
+ * http://jira.jboss.com/jira/browse/JBIDE-791
+ * https://jira.jboss.org/jira/browse/JBIDE-3373
+ *
+ * Encode the Header Facet
+ * Find elements from the f:facet
+ */
+ Map<String, List<Node>> headerFacetChildren = null;
+ Element headerFacet = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_HEADER);
+ if (headerFacet != null) {
+ headerFacetChildren = VisualDomUtil.findFacetElements(headerFacet, pageContext);
+ /*
+ * By adding attribute VPE-FACET to this visual node
+ * we force JsfFacet to be rendered inside it
+ * without creating an additional and superfluous visual tag.
+ */
+ headerDiv.setAttribute(VpeVisualDomBuilder.VPE_FACET, RichFaces.NAME_FACET_HEADER);
+ /*
+ * Add header facet to the ChildrenInfo
+ */
+ VpeChildrenInfo headerInfo = new VpeChildrenInfo(headerDiv);
+ headerInfo.addSourceChild(headerFacet);
creationData.addChildrenInfo(headerInfo);
} else {
- String label = ComponentUtil
- .getAttribute(sourceElement, ATTR_LABEL);
- headerDiv.appendChild(visualDocument.createTextNode(label));
+ /*
+ * Otherwise show label attribute value as panel header
+ */
+ headerDiv.appendChild(visualDocument.createTextNode(ComponentUtil
+ .getAttribute(sourceElement, ATTR_LABEL)));
}
- // ///
nsIDOMElement switchDiv = visualDocument.createElement(HTML.TAG_DIV);
headerDiv.appendChild(switchDiv);
@@ -147,9 +166,24 @@
+ Constants.WHITE_SPACE + CSS_RICH_STGLPANEL_BODY
+ Constants.WHITE_SPACE
+ ComponentUtil.getAttribute(sourceElement, ATTR_BODY_CLASS));
-
+
+ /*
+ * If there are some odd HTML elements from facet
+ * add them to the panel body first.
+ */
+ boolean headerHtmlElementsPresents = ((headerFacetChildren != null) && (headerFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+ VpeChildrenInfo bodyInfo = new VpeChildrenInfo(td);
+ if (headerHtmlElementsPresents) {
+ for (Node node : headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ bodyInfo.addSourceChild(node);
+ }
+ }
+
+ /*
+ * Add the rest panel's content
+ */
List<Node> children = ComponentUtil.getChildren(sourceElement, true);
- VpeChildrenInfo bodyInfo = new VpeChildrenInfo(td);
for (Node child : children) {
bodyInfo.addSourceChild(child);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -47,9 +47,10 @@
public VpeCreationData encode(final VpePageContext pageContext, VpeCreationData creationData, final Element sourceElement,
final nsIDOMDocument visualDocument, nsIDOMElement parentVisualNode) {
-
if(creationData!=null) {
- // Encode header
+ /*
+ * Encode header
+ */
encodeHeader(pageContext, creationData, sourceElement, visualDocument, parentVisualNode);
}
@@ -132,7 +133,8 @@
if(parentVisualNode!=null) {
// Encode footer
- encodeFooter(pageContext, creationData, sourceElement, visualDocument, parentVisualNode);
+ encodeFooter(pageContext, creationData, sourceElement,
+ visualDocument, parentVisualNode);
}
return creationData;
}
@@ -190,36 +192,58 @@
final Element sourceElement = (Element)sourceNode;
final nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
VpeCreationData creationData = new VpeCreationData(tbody);
- creationData = encode(pageContext, creationData, sourceElement, visualDocument, tbody);
+ creationData = encode(pageContext, creationData, sourceElement,
+ visualDocument, tbody);
return creationData;
}
protected void encodeHeader(final VpePageContext pageContext, final VpeCreationData creationData, final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode) {
- encodeHeaderOrFooter(pageContext, creationData, sourceElement, visualDocument, parentVisualNode, RichFaces.NAME_FACET_HEADER, "dr-subtable-header rich-subtable-header", "dr-subtable-headercell rich-subtable-headercell"); //$NON-NLS-1$ //$NON-NLS-2$
+ encodeHeaderOrFooter(
+ pageContext,
+ creationData,
+ sourceElement,
+ visualDocument,
+ parentVisualNode,
+ RichFaces.NAME_FACET_HEADER,
+ "dr-subtable-header rich-subtable-header", //$NON-NLS-1$
+ "dr-subtable-headercell rich-subtable-headercell"); //$NON-NLS-1$
}
protected void encodeFooter(final VpePageContext pageContext, final VpeCreationData creationData, final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode) {
- encodeHeaderOrFooter(pageContext, creationData, sourceElement, visualDocument, parentVisualNode, RichFaces.NAME_FACET_FOOTER, "dr-subtable-footer rich-subtable-footer", "dr-subtable-footercell rich-subtable-footercell"); //$NON-NLS-1$ //$NON-NLS-2$
+ encodeHeaderOrFooter(
+ pageContext,
+ creationData,
+ sourceElement,
+ visualDocument,
+ parentVisualNode,
+ RichFaces.NAME_FACET_FOOTER,
+ "dr-subtable-footer rich-subtable-footer", //$NON-NLS-1$
+ "dr-subtable-footercell rich-subtable-footercell"); //$NON-NLS-1$
}
- protected void encodeHeaderOrFooter(final VpePageContext pageContext, final VpeCreationData creationData,
- final Element sourceElement, final nsIDOMDocument visualDocument, final nsIDOMElement parentVisualNode,
- final String facetName, final String trClass, final String tdClass) {
- final ArrayList<Element> columns = RichFacesDataTableTemplate.getColumns(sourceElement);
- //final ArrayList<Element> columnsHeaders = ComponentUtil.getColumnsWithFacet(columns, facetName);
- final boolean hasColumnWithFacet = RichFacesDataTableTemplate.hasColumnWithFacet(columns, facetName);
- if(hasColumnWithFacet) {
+ protected void encodeHeaderOrFooter(final VpePageContext pageContext,
+ final VpeCreationData creationData, final Element sourceElement,
+ final nsIDOMDocument visualDocument,
+ final nsIDOMElement parentVisualNode, final String facetName,
+ final String trClass, final String tdClass) {
+
+ final ArrayList<Element> columns = RichFacesDataTableTemplate
+ .getColumns(sourceElement);
+ // final ArrayList<Element> columnsHeaders =
+ // ComponentUtil.getColumnsWithFacet(columns, facetName);
+ final boolean hasColumnWithFacet = RichFacesDataTableTemplate
+ .hasColumnWithFacet(columns, facetName);
+ if (hasColumnWithFacet) {
final nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
parentVisualNode.appendChild(tr);
final String styleClass = trClass;
- if(styleClass!=null) {
+ if (styleClass != null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
- RichFacesDataTableTemplate.encodeHeaderOrFooterFacets(pageContext, creationData, tr, visualDocument, columns,
- tdClass,
- null, facetName, HTML.TAG_TD);
+ RichFacesDataTableTemplate.encodeHeaderOrFooterFacets(pageContext,
+ creationData, tr, visualDocument, columns, tdClass, null,
+ facetName, HTML.TAG_TD);
}
-
}
private boolean isHeader(final Element sourceElement) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -77,7 +77,6 @@
private static Map toggleMap = new HashMap();
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
-
Element sourceElement = (Element)sourceNode;
nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
@@ -184,7 +183,7 @@
if(child.getNodeName().endsWith(TAB)) {
i++;
if (active) {
- RichFacesTabTemplate.encodeBody(creationData,
+ RichFacesTabTemplate.encodeBody(pageContext, creationData,
(Element) child, visualDocument, inerTr, true,
ComponentUtil.getAttribute(sourceElement,
CONTENT_CLASS)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -11,17 +11,21 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
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.jsf.vpe.richfaces.template.util.RichFaces;
+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.util.HTML;
import org.jboss.tools.vpe.editor.util.ResourceUtil;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMText;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -39,7 +43,6 @@
private final static String VPE_USER_TOGGLE_ID = "vpe-user-toggle-id"; //$NON-NLS-1$
private static final String DISABLED = "disabled"; //$NON-NLS-1$
- private static final String LABEL = "label"; //$NON-NLS-1$
private static final String LABEL_WIDTH = "labelWidth"; //$NON-NLS-1$
private static final String CSS_HEADER = "rich-tab-header"; //$NON-NLS-1$
@@ -76,16 +79,17 @@
* @param contentStyle
* @return the tab body
*/
- public static VpeCreationData encodeBody(VpeCreationData creationData,
+ public static VpeCreationData encodeBody(
+ VpePageContext pageContext,
+ VpeCreationData creationData,
Element sourceElement,
nsIDOMDocument visualDocument,
nsIDOMElement parentTr,
boolean active,
String contentClass,
String contentStyle) {
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
- nsIDOMElement td = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
-
if(creationData==null) {
creationData = new VpeCreationData(td);
} else {
@@ -94,61 +98,80 @@
if(!active) {
return creationData;
}
-// td.setAttribute("style", "position: relative;");
- td.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR, HUNDRED_PERCENTS);
+ td.setAttribute(HTML.ATTR_HEIGHT, HUNDRED_PERCENTS);
- nsIDOMElement table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
td.appendChild(table);
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, ZERO);
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, TEN);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, ZERO);
- table.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, HUNDRED_PERCENTS);
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,RichFacesTabPanelTemplate.CSS_CONTENT_POSITION);
- table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, BODY_TABLE_STYLE);
+ table.setAttribute(HTML.ATTR_BORDER, ZERO);
+ table.setAttribute(HTML.ATTR_CELLPADDING, TEN);
+ table.setAttribute(HTML.ATTR_CELLSPACING, ZERO);
+ table.setAttribute(HTML.ATTR_WIDTH, HUNDRED_PERCENTS);
+ table.setAttribute(HTML.ATTR_CLASS,RichFacesTabPanelTemplate.CSS_CONTENT_POSITION);
+ table.setAttribute(HTML.ATTR_STYLE, BODY_TABLE_STYLE);
- nsIDOMElement tr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
table.appendChild(tr);
- td = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ td = visualDocument.createElement(HTML.TAG_TD);
tr.appendChild(td);
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- ComponentUtil.getAttribute(sourceElement, HtmlComponentUtil.HTML_STYLECLASS_ATTR)
+ td.setAttribute(HTML.ATTR_CLASS,
+ ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE_CLASS)
+ SPACE + contentClass);
- td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- ComponentUtil.getAttribute(sourceElement, HtmlComponentUtil.HTML_STYLE_ATTR)
+ td.setAttribute(HTML.ATTR_STYLE,
+ ComponentUtil.getAttribute(sourceElement, HTML.ATTR_STYLE)
+ STYLE_SEMICOLUMN + contentStyle);
+ Map<String, List<Node>> labelFacetChildren = null;
+ Element labelFacet = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_LABEL);
+ if (null != labelFacet) {
+ labelFacetChildren = VisualDomUtil.findFacetElements(labelFacet, pageContext);
+ }
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3373
+ * If there are some odd HTML elements from facet
+ * add them to the panel body first.
+ */
+ boolean labelHtmlElementsPresents = ((labelFacetChildren != null) && (labelFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+ VpeChildrenInfo bodyInfo = new VpeChildrenInfo(td);
+ if (labelHtmlElementsPresents) {
+ for (Node node : labelFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ bodyInfo.addSourceChild(node);
+ }
+ }
+
+ /*
+ * Add the rest tab's content
+ */
List<Node> children = ComponentUtil.getChildren(sourceElement, true);
- VpeChildrenInfo bodyInfo = new VpeChildrenInfo(td);
for (Node child : children) {
bodyInfo.addSourceChild(child);
}
creationData.addChildrenInfo(bodyInfo);
-
return creationData;
}
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
- nsIDOMElement table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- //table.setAttribute("include-tab", "");
+ nsIDOMElement table = visualDocument.createElement(HTML.TAG_DIV);
VpeCreationData creationData = new VpeCreationData(table);
- nsIDOMElement headerTable = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- headerTable.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, ZERO);
- headerTable.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, ZERO);
- headerTable.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, ZERO);
+ nsIDOMElement headerTable = visualDocument.createElement(HTML.TAG_TABLE);
+ headerTable.setAttribute(HTML.ATTR_BORDER, ZERO);
+ headerTable.setAttribute(HTML.ATTR_CELLPADDING, ZERO);
+ headerTable.setAttribute(HTML.ATTR_CELLSPACING, ZERO);
headerTable.setAttribute(TAB_HEADER_ATTR, YES);
- headerTable.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- HtmlComponentUtil.CSS_DISPLAY
+ headerTable.setAttribute(HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_DISPLAY
+ ":" + DISABLED_ELEMENT_STYLE + STYLE_SEMICOLUMN); //$NON-NLS-1$
- headerTable.appendChild(encodeHeader(pageContext, creationData, (Element)sourceNode, visualDocument, table, false, EMPTY, EMPTY, EMPTY, EMPTY,EMPTY));
- nsIDOMElement bodyTable = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- bodyTable.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, ZERO);
- bodyTable.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, ZERO);
- bodyTable.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, ZERO);
+ headerTable.appendChild(encodeHeader(pageContext, creationData,
+ (Element) sourceNode, visualDocument, table, false, EMPTY,
+ EMPTY, EMPTY, EMPTY, EMPTY));
+ nsIDOMElement bodyTable = visualDocument.createElement(HTML.TAG_TABLE);
+ bodyTable.setAttribute(HTML.ATTR_BORDER, ZERO);
+ bodyTable.setAttribute(HTML.ATTR_CELLPADDING, ZERO);
+ bodyTable.setAttribute(HTML.ATTR_CELLSPACING, ZERO);
bodyTable.setAttribute(TAB_BODY_ATTR, YES);
- //bodyTable.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, HtmlComponentUtil.CSS_DISPLAY+" : "+DISABLED_ELEMENT_STYLE+";"); //$NON-NLS-1$ //$NON-NLS-2$
table.appendChild(headerTable);
table.appendChild(bodyTable);
- encodeBody(creationData, (Element)sourceNode, visualDocument, bodyTable, true, EMPTY, EMPTY);
+ encodeBody(pageContext, creationData, (Element)sourceNode, visualDocument, bodyTable, true, EMPTY, EMPTY);
return creationData;
}
@@ -175,10 +198,9 @@
String inactiveTabClass,
String disabledTabClass,
String toggleId) {
-
- nsIDOMElement headerTd = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ nsIDOMElement headerTd = visualDocument.createElement(HTML.TAG_TD);
parentTr.appendChild(headerTd);
- headerTd.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, HEADER_TD_STYLE);
+ headerTd.setAttribute(HTML.ATTR_STYLE, HEADER_TD_STYLE);
String styleClass = RichFacesTabPanelTemplate.CSS_CELL_DISABLED
+ SPACE + CSS_DISABLED;
if(!TRUE.equalsIgnoreCase(sourceElement.getAttribute(DISABLED))) {
@@ -188,26 +210,26 @@
styleClass = RichFacesTabPanelTemplate.CSS_CELL_INACTIVE;
}
}
- headerTd.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ headerTd.setAttribute(HTML.ATTR_CLASS, styleClass);
headerTd.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
- nsIDOMElement table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
headerTd.appendChild(table);
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, ZERO);
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, ZERO);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, ZERO);
- table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, HEADER_TABLE_STYLE);
+ table.setAttribute(HTML.ATTR_BORDER, ZERO);
+ table.setAttribute(HTML.ATTR_CELLPADDING, ZERO);
+ table.setAttribute(HTML.ATTR_CELLSPACING, ZERO);
+ table.setAttribute(HTML.ATTR_STYLE, HEADER_TABLE_STYLE);
table.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
- nsIDOMElement mainTr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ nsIDOMElement mainTr = visualDocument.createElement(HTML.TAG_TR);
table.appendChild(mainTr);
encodeSpacer(mainTr, visualDocument);
- nsIDOMElement mainTd = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ nsIDOMElement mainTd = visualDocument.createElement(HTML.TAG_TD);
mainTr.appendChild(mainTd);
mainTd.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
- table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ table = visualDocument.createElement(HTML.TAG_TABLE);
mainTd.appendChild(table);
String labelWidth = ComponentUtil.getAttribute(sourceElement, LABEL_WIDTH);
@@ -228,15 +250,15 @@
labelWidth = HUNDRED_PERCENTS;
}
tableStyle += WIDTH_STYLE_NAME + labelWidth + STYLE_SEMICOLUMN;
- table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, tableStyle);
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, ZERO);
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, ZERO);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, ZERO);
+ table.setAttribute(HTML.ATTR_STYLE, tableStyle);
+ table.setAttribute(HTML.ATTR_BORDER, ZERO);
+ table.setAttribute(HTML.ATTR_CELLPADDING, ZERO);
+ table.setAttribute(HTML.ATTR_CELLSPACING, ZERO);
table.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
- nsIDOMElement tr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
table.appendChild(tr);
- mainTd = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ mainTd = visualDocument.createElement(HTML.TAG_TD);
tr.appendChild(mainTd);
styleClass = CSS_HEADER
@@ -257,18 +279,30 @@
+ SPACE + inactiveTabClass;
}
}
- String tabStyleClass = ComponentUtil.getAttribute(sourceElement, HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+ String tabStyleClass = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE_CLASS);
styleClass += SPACE + headerClass + SPACE + tabStyleClass;
- mainTd.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ mainTd.setAttribute(HTML.ATTR_CLASS, styleClass);
mainTd.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
- Node labelFacet = ComponentUtil.getFacet(sourceElement, LABEL, true);
+
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3373
+ * Encode the Label Facet
+ * Find elements from the f:facet
+ */
+ Element labelFacet = SourceDomUtil.getFacetByName(sourceElement, RichFaces.NAME_FACET_LABEL);
if (null != labelFacet) {
- VpeChildrenInfo child = new VpeChildrenInfo(mainTd);
- child.addSourceChild(labelFacet);
- creationData.addChildrenInfo(child);
- } else if (sourceElement.hasAttribute(LABEL)) {
- Attr labelAttr = sourceElement.getAttributeNode(LABEL);
+ /*
+ * By adding attribute VPE-FACET to this visual node
+ * we force JsfFacet to be rendered inside it
+ * without creating an additional and superfluous visual tag.
+ */
+ mainTd.setAttribute(VpeVisualDomBuilder.VPE_FACET, RichFaces.NAME_FACET_LABEL);
+ VpeChildrenInfo labelInfo = new VpeChildrenInfo(mainTd);
+ labelInfo.addSourceChild(labelFacet);
+ creationData.addChildrenInfo(labelInfo);
+ } else if (sourceElement.hasAttribute(RichFaces.ATTR_LABEL)) {
+ Attr labelAttr = sourceElement.getAttributeNode(RichFaces.ATTR_LABEL);
if (null != labelAttr) {
String bundleValue = ResourceUtil.getBundleValue(pageContext, labelAttr.getValue());
mainTd.appendChild(visualDocument.createTextNode(bundleValue));
@@ -285,20 +319,20 @@
* Add <td class="dr-tbpnl-tbbrdr rich-tabhdr-side-border"><img src="#{spacer}" width="1" height="1" alt="" border="0" /></td>
*/
private static void encodeSpacer(nsIDOMElement parentTr, nsIDOMDocument visualDocument) {
- nsIDOMElement td = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
parentTr.appendChild(td);
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ td.setAttribute(HTML.ATTR_CLASS,
RichFacesTabPanelTemplate.CSS_SIDE_CELL
+ SPACE +
RichFacesTabPanelTemplate.CSS_SIDE_BORDER);
String style = ComponentUtil.getBackgoundImgStyle(BORDER_FILE_PATH);
- td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
- nsIDOMElement img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ td.setAttribute(HTML.ATTR_STYLE, style);
+ nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
td.appendChild(img);
ComponentUtil.setImg(img, SPACER_FILE_PATH);
- img.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, ONE);
- img.setAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR, ONE);
- img.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, ZERO);
+ img.setAttribute(HTML.ATTR_WIDTH, ONE);
+ img.setAttribute(HTML.ATTR_HEIGHT, ONE);
+ img.setAttribute(HTML.ATTR_BORDER, ZERO);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTogglePanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTogglePanelTemplate.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTogglePanelTemplate.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -20,15 +20,18 @@
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-// This template defines the toggling methods but doesn't implements VpeToggableTemplate
-// because of external toggle control.
-
+/**
+ * This template defines the toggling methods
+ * but doesn't implements VpeToggableTemplate
+ * because of external toggle control.
+ */
public class RichFacesTogglePanelTemplate extends VpeAbstractTemplate {
private static Map toggleMap = new HashMap();
@@ -39,7 +42,7 @@
Element sourceElement = (Element)sourceNode;
- nsIDOMElement div = visualDocument.createElement("div"); //$NON-NLS-1$
+ nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
VpeCreationData creationData = new VpeCreationData(div);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -42,12 +42,14 @@
public static final String ATTR_LOCALE = "locale"; //$NON-NLS-1$
public static final String ATTR_CONTROLS_TYPE = "controlsType"; //$NON-NLS-1$
public static final String ATTR_DEFAULT_LABEL = "defaultLabel"; //$NON-NLS-1$
+ public static final String ATTR_LABEL = "label"; //$NON-NLS-1$
public static final String ATTR_DIRECTION = "direction"; //$NON-NLS-1$
public static final String ATTR_JOINT_POINT = "jointPoint"; //$NON-NLS-1$
public static final String ATTR_DISABLED = "disabled";//$NON-NLS-1$
public static final String ATTR_ELEMENTS = "elements"; //$NON-NLS-1$
+ public static final String ATTR_HEADER_CLASS = "headerClass"; //$NON-NLS-1$
+ public static final String ATTR_BODY_CLASS = "bodyClass"; //$NON-NLS-1$
public static final String ATTR_FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
- public static final String ATTR_HEADER_CLASS = "headerClass"; //$NON-NLS-1$
public static final String ATTR_INPUT_CLASS = "inputClass"; //$NON-NLS-1$
public static final String ATTR_INPUT_SIZE = "inputSize"; //$NON-NLS-1$
public static final String ATTR_INPUT_STYLE = "inputStyle"; //$NON-NLS-1$
@@ -75,9 +77,12 @@
public static final String ATTR_POSITION = "position"; //$NON-NLS-1$
/** FACETS NAMES **/
+ public static final String NAME_FACET_LABEL = "label"; //$NON-NLS-1$
public static final String NAME_FACET_CAPTION = "caption"; //$NON-NLS-1$
public static final String NAME_FACET_FOOTER = "footer"; //$NON-NLS-1$
public static final String NAME_FACET_HEADER = "header"; //$NON-NLS-1$
+ public static final String NAME_FACET_TERM = "term"; //$NON-NLS-1$
+ public static final String NAME_FACET_CONTROLS = "controls"; //$NON-NLS-1$
/** jsf tags which are used with richFaces. */
public static final String TAG_COLUMN = "column"; //$NON-NLS-1$
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/JBIDE/3416/jbide3416.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/JBIDE/3416/jbide3416.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/JBIDE/3416/jbide3416.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,29 +1,45 @@
<tests>
<test id="jbide3416Test">
+
<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
<DIV STYLE="-moz-user-modify: read-only;">
<DIV STYLE="display: none; -moz-user-modify: read-only;">
+ <H1 STYLE="-moz-user-modify: read-only;">
+ JBoss Tools VPE Preview Bug
+ </H1>
</DIV>
<DIV STYLE="-moz-user-modify: read-only;">
- <TABLE STYLE="-moz-user-modify: read-only;">
- <THEAD>
- <TR>
- <TH>
- <DIV>
- <FORM>
- <SPAN CLASS="vpe-text">
- »
- </SPAN>
- <A STYLE="text-decoration: none;">Home</A>
- <SPAN CLASS="vpe-text">
- »
- </SPAN>
- <A STYLE="text-decoration: none;">CRM</A>
- </FORM>
- </DIV>
- </TH>
- </TR>
+ <TABLE BORDER="5" STYLE="-moz-user-modify: read-only;">
+ <THEAD>
+ <TR>
+ <TH COLSPAN="1" CLASS="" VPE-FACET="header">
+ <SPAN STYLE="-moz-user-modify: read-only;">
+ <FORM
+ STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; background-color: yellow; text-align: left;">
+ <SPAN CLASS="vpe-text">
+ »
+ </SPAN>
+ <A STYLE="text-decoration: none;">Home</A>
+ <SPAN CLASS="vpe-text">
+ »
+ </SPAN>
+ <A STYLE="text-decoration: none;">CRM</A>
+ </FORM>
+ </SPAN>
+ </TH>
+ </TR>
</THEAD>
+ <TBODY>
+ <TR>
+ <TD>
+ <DIV CLASS="pageBody" STYLE="-moz-user-modify: read-only;">
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+
+ </DIV>
+ </TD>
+ </TR>
+ </TBODY>
</TABLE>
<UL STYLE="color: red; font-weight: bold; -moz-user-modify: read-only;">
<LI>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908/welcome.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908/welcome.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908/welcome.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,158 +1,224 @@
<tests>
-<test id="jbide5908">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="display: none; -moz-user-modify: read-only;">
-</DIV>
-<DIV STYLE="-moz-user-modify: read-only;">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="display: none; -moz-user-modify: read-only;">
-<H1 STYLE="-moz-user-modify: read-only;">
-page
-</H1>
-</DIV>
-<DIV STYLE="-moz-user-modify: read-only;">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
-</SPAN>
-<DIV STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="display: none; -moz-user-modify: read-only;">
-<H1 STYLE="-moz-user-modify: read-only;">
-#{cc.attrs.pageTitle}
-</H1>
-<DIV STYLE="-moz-user-modify: read-only;">
-</DIV>
-</DIV>
-<DIV STYLE="-moz-user-modify: read-only;">
-<TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0" CLASS="rich-page #{cc.attrs.pageClass}" STYLE="-moz-user-modify: read-only;">
-<TBODY STYLE="-moz-user-modify: read-only;">
-<TR STYLE="-moz-user-modify: read-only;">
-<TD CLASS="header_bg" STYLE="-moz-user-modify: read-only;">
-<DIV CLASS="header_content rich-page-header #{cc.attrs.headerClass}" STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="-moz-user-modify: read-only;">
-<H1 STYLE="-moz-user-modify: read-only;">
-<SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
-Welcome to RichFaces demo!
-</SPAN>
-</H1>
-</DIV>
-</DIV>
-</TD>
-</TR>
-<TR STYLE="-moz-user-modify: read-only;">
-<TD HEIGHT="100%" WIDTH="100%" CLASS="bg_tabbody" STYLE="-moz-user-modify: read-only;">
-<TABLE HEIGHT="100%" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BORDER="0" CLASS="rich-page-content #{cc.attrs.contentClass}" STYLE="-moz-user-modify: read-only;">
-<TBODY STYLE="-moz-user-modify: read-only;">
-<TR STYLE="-moz-user-modify: read-only;">
-<TD CLASS="menu_col rich-page-sidebar #{cc.attrs.sidebarClass}" STYLE="-moz-user-modify: read-only;">
-<DIV CLASS="menu_width spacer" STYLE="-moz-user-modify: read-only;"><BR VPE:PSEUDO-ELEMENT="yes" STYLE="font-style: italic; color: green; -moz-user-modify: read-only;"/>
+ <test id="jbide5908">
-</DIV>
-<DIV STYLE="-moz-user-modify: read-only;">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="display: none; -moz-user-modify: read-only;">
-<H1 STYLE="-moz-user-modify: read-only;">
-panel
-</H1>
-</DIV>
-<DIV STYLE="-moz-user-modify: read-only;">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<DIV CLASS="rich-panel #{compositeComponent.attrs.styleClass}" STYLE="-moz-user-modify: read-only;">
-<SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
-<DIV CLASS="rich-panel-header #{compositeComponent.attrs.headerClass}" STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="-moz-user-modify: read-only;">
-<SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
-Navigation
-</SPAN>
-</DIV>
-</DIV>
-</SPAN>
-<DIV CLASS="rich-panel-body #{compositeComponent.attrs.bodyClass}" STYLE="-moz-user-modify: read-only;">
-<TABLE BORDER="0" STYLE="-moz-user-modify: read-only;">
-<TBODY>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:ajax</SPAN></A>
-</TD>
-</TR>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:jsFunction</SPAN></A>
-</TD>
-</TR>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:mediaOutput</SPAN></A>
-</TD>
-</TR>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:push</SPAN></A>
-</TD>
-</TR>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:status</SPAN></A>
-</TD>
-</TR>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:outputPanel</SPAN></A>
-</TD>
-</TR>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:commandButton</SPAN></A>
-</TD>
-</TR>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:commandLink</SPAN></A>
-</TD>
-</TR>
-<TR>
-<TD><A STYLE="-moz-user-modify: read-only;" CLASS=""><SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">a4j:log</SPAN></A>
-</TD>
-</TR>
-</TBODY>
-</TABLE>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</TD>
-<TD CLASS="content_col rich-page-body #{cc.attrs.bodyClass}" STYLE="-moz-user-modify: read-only;">
-<SPAN CLASS="vpe-text">
-Welcome To RichFaces 4.x Demo
-</SPAN>
-</TD>
-</TR>
-</TBODY>
-</TABLE>
-</TD>
-</TR>
-<TR STYLE="-moz-user-modify: read-only;">
-<TD CLASS="footer_bg" STYLE="-moz-user-modify: read-only;">
-<DIV CLASS="footer_bg_content rich-page-footer #{cc.attrs.footerClass}" STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="-moz-user-modify: read-only;">
-<SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
-footer
-</SPAN>
-</DIV>
-</DIV>
-</TD>
-</TR>
-</TBODY>
-</TABLE>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</DIV>
-</test>
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ <H1 STYLE="-moz-user-modify: read-only;">
+ page
+ </H1>
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
+ </SPAN>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ <H1 STYLE="-moz-user-modify: read-only;">
+ #{cc.attrs.pageTitle}
+ </H1>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ </DIV>
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"
+ CLASS="rich-page #{cc.attrs.pageClass}" STYLE="-moz-user-modify: read-only;">
+ <TBODY STYLE="-moz-user-modify: read-only;">
+ <TR STYLE="-moz-user-modify: read-only;">
+ <TD CLASS="header_bg" STYLE="-moz-user-modify: read-only;">
+ <DIV
+ CLASS="header_content rich-page-header #{cc.attrs.headerClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN STYLE="display: none; -moz-user-modify: read-only;">
+ </SPAN>
+ </DIV>
+ </TD>
+ </TR>
+ <TR STYLE="-moz-user-modify: read-only;">
+ <TD WIDTH="100%" HEIGHT="100%" CLASS="bg_tabbody"
+ STYLE="-moz-user-modify: read-only;">
+ <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING="0"
+ CELLPADDING="0" BORDER="0"
+ CLASS="rich-page-content #{cc.attrs.contentClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <TBODY STYLE="-moz-user-modify: read-only;">
+ <TR STYLE="-moz-user-modify: read-only;">
+ <TD
+ CLASS="menu_col rich-page-sidebar #{cc.attrs.sidebarClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV CLASS="menu_width spacer" STYLE="-moz-user-modify: read-only;">
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+
+ </DIV>
+ <SPAN STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV
+ STYLE="display: none; -moz-user-modify: read-only;">
+ <H1 STYLE="-moz-user-modify: read-only;">
+ panel
+ </H1>
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only;">
+ <DIV VPE:INCLUDE-ELEMENT="yes"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV
+ CLASS="rich-panel #{compositeComponent.attrs.styleClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">
+ <DIV
+ CLASS="rich-panel-header #{compositeComponent.attrs.headerClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN STYLE="-moz-user-modify: read-only;">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">
+ Navigation
+ </SPAN>
+ </SPAN>
+ </DIV>
+ </SPAN>
+ <DIV
+ CLASS="rich-panel-body #{compositeComponent.attrs.bodyClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <TABLE BORDER="0"
+ STYLE="-moz-user-modify: read-only;">
+ <TBODY>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:ajax</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:jsFunction</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:mediaOutput</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:push</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:status</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:outputPanel</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:commandButton</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:commandLink</SPAN>
+ </A>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <A STYLE="-moz-user-modify: read-only;"
+ CLASS="">
+ <SPAN CLASS="vpe-text"
+ STYLE="-moz-user-modify: read-only;">a4j:log</SPAN>
+ </A>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </SPAN>
+ </TD>
+ <TD
+ CLASS="content_col rich-page-body #{cc.attrs.bodyClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN CLASS="vpe-text">
+ Welcome To RichFaces 4.x Demo
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR STYLE="-moz-user-modify: read-only;">
+ <TD CLASS="footer_bg" STYLE="-moz-user-modify: read-only;">
+ <DIV
+ CLASS="footer_bg_content rich-page-footer #{cc.attrs.footerClass}"
+ STYLE="-moz-user-modify: read-only;">
+ <SPAN STYLE="display: none; -moz-user-modify: read-only;">
+ </SPAN>
+ </DIV>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3376/jbide3376.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3376/jbide3376.jsp.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3376/jbide3376.jsp.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,82 +1,84 @@
<tests>
<test id="jbide3376">
- <DIV ID="jbide3376">
-<TABLE STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%;">
-<TR>
-<TD>
-<DIV>
-<FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
-<TABLE STYLE="-moz-user-modify: read-only;">
-<TR>
-<TD>
-<DIV>
-<TABLE>
-<CAPTION>
-</CAPTION>
-<THEAD>
-<TR>
-<TH>
-<DIV>
-<SPAN>
-Header
+
+ <DIV ID="jbide3376">
+ <TABLE
+ STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%;">
+ <TR>
+ <TD>
+ <DIV>
+ <FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
+ <TABLE STYLE="-moz-user-modify: read-only;">
+ <TR>
+ <TD>
+ <DIV>
+ <TABLE>
+ <THEAD>
+ <TR>
+ <TH CLASS="">
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ Header
</SPAN>
-</DIV>
-</TH>
-</TR>
-</THEAD>
-<TFOOT>
-<TR>
-<TD>
-<DIV>
-<SPAN>
-Header
+ </SPAN>
+ </TH>
+ </TR>
+ </THEAD>
+ <TFOOT>
+ <TR>
+ <TD CLASS="">
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ Header
</SPAN>
-</DIV>
-</TD>
-</TR>
-</TFOOT>
-<TBODY>
-<TR>
-<TD STYLE="border: 0px hidden ; padding: 0px;">
-<TABLE WIDTH="100%" BORDER="0">
-<TBODY>
-<TR>
-<TD>
-<SPAN>
-#{book.name}
+ </SPAN>
+ </TD>
+ </TR>
+ </TFOOT>
+ <TBODY>
+ <TR>
+ <TD STYLE="border: 0px hidden ; padding: 0px;">
+ <TABLE WIDTH="100%" BORDER="0">
+ <TBODY>
+ <TR>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{book.name}
</SPAN>
-</TD>
-<TD>
-<SPAN>
-#{book.name}
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ #{book.name}
</SPAN>
-</TD>
-</TR>
-</TBODY>
-<COLGROUP>
-<COL STYLE="-moz-user-modify: read-write;"/>
+ </TD>
+ </TR>
+ </TBODY>
+ <COLGROUP>
+ <COL STYLE="-moz-user-modify: read-write;" />
-<COL STYLE="-moz-user-modify: read-write;"/>
+ <COL STYLE="-moz-user-modify: read-write;" />
-</COLGROUP>
-</TABLE>
-</TD>
-</TR>
-</TBODY>
-</TABLE>
-</DIV>
-</TD>
-</TR>
-</TABLE><A>Go next page:</A><BR STYLE="-moz-user-modify: read-write;"/>
+ </COLGROUP>
+ </TABLE>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ <A>Go next page:</A>
+ <BR STYLE="-moz-user-modify: read-write;" />
-<SPAN>
-Begin
+ <SPAN CLASS="vpe-text">
+ Begin
</SPAN>
-</FORM>
-</DIV>
-</TD>
-</TR>
-</TABLE>
-</DIV>
-</test>
+ </FORM>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5768/test.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5768/test.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5768/test.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,54 +1,31 @@
<tests>
-<test id="footerIsMissing">
-<TABLE BORDER="1" ID="footerIsMissing" CLASS="dr-table rich-table ">
-<COLGROUP SPAN="0">
-</COLGROUP>
-<THEAD>
-<TR CLASS="dr-table-header rich-table-header " STYLE="/background-image: url\(.*/resources/common/background.gif\);/">
-<TD CLASS="dr-table-headercell rich-table-headercell " COLSPAN="100" SCOPE="colgroup">
-<SPAN CLASS="vpe-text">
-HEADER
-</SPAN>
-</TD>
-</TR>
-</THEAD>
-<TFOOT>
-<TR CLASS="dr-table-footer rich-table-footer " STYLE="/background-image: url\(.*/resources/common/background.gif\);/">
-<TD CLASS="dr-table-footercell rich-table-footercell " COLSPAN="100" SCOPE="colgroup">
-<SPAN CLASS="vpe-text">
-FOOTER
-</SPAN>
-</TD>
-</TR>
-</TFOOT>
-</TABLE>
-</test>
-<test id="headermIsMissingAsWell">
-<TABLE BORDER="1" ID="headermIsMissingAsWell" CLASS="dr-table rich-table ">
-<COLGROUP SPAN="0">
-</COLGROUP>
-<TR>
-<TD COLSPAN="100">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="-moz-user-modify: read-only;">
-<SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
-HEADER
-</SPAN>
-</DIV>
-</DIV>
-</TD>
-</TR>
-<TR>
-<TD COLSPAN="100">
-<DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
-<DIV STYLE="-moz-user-modify: read-only;">
-<SPAN CLASS="vpe-text" STYLE="-moz-user-modify: read-only;">
-FOOTER
-</SPAN>
-</DIV>
-</DIV>
-</TD>
-</TR>
-</TABLE>
-</test>
+ <test id="footerIsMissing">
+ <TABLE BORDER="1" CLASS="dr-table rich-table ">
+ <COLGROUP SPAN="0">
+ </COLGROUP>
+ </TABLE>
+ </test>
+
+ <test id="headermIsMissingAsWell">
+ <TABLE BORDER="1" CLASS="dr-table rich-table ">
+ <COLGROUP SPAN="0">
+ </COLGROUP>
+ <TR>
+ <TD COLSPAN="100">
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <SPAN STYLE="display: none; -moz-user-modify: read-only;">
+ </SPAN>
+ </DIV>
+ </TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="100">
+ <DIV VPE:INCLUDE-ELEMENT="yes" STYLE="-moz-user-modify: read-only;">
+ <SPAN STYLE="display: none; -moz-user-modify: read-only;">
+ </SPAN>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </test>
</tests>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,12 +1,11 @@
<tests>
<test id="dataTable">
+
<TABLE STYLE="-moz-user-modify: read-only;">
<TR>
<TD>
<DIV>
<TABLE>
- <CAPTION>
- </CAPTION>
<TBODY>
<TR>
<TD STYLE="border: 0px hidden ; padding: 0px;">
@@ -14,44 +13,58 @@
<THEAD>
<TR>
<TH>
- <DIV>
- <SPAN>Last Name</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ Last Name
+ </SPAN>
+ </SPAN>
</TH>
<TH>
- <DIV>
- <SPAN>First Name</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ First Name
+ </SPAN>
+ </SPAN>
</TH>
</TR>
</THEAD>
<TFOOT>
<TR>
<TD>
- <DIV>
- <SPAN>footer</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ footer
+ </SPAN>
+ </SPAN>
</TD>
<TD>
- <DIV>
- <SPAN>footer</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ footer
+ </SPAN>
+ </SPAN>
</TD>
</TR>
</TFOOT>
<TBODY>
<TR>
<TD>
- <SPAN>Dupont</SPAN>
+ <SPAN CLASS="vpe-text">
+ Dupont
+ </SPAN>
</TD>
<TD>
- <SPAN>William</SPAN>
+ <SPAN CLASS="vpe-text">
+ William
+ </SPAN>
</TD>
</TR>
</TBODY>
<COLGROUP>
- <COL STYLE="-moz-user-modify: read-write;"/>
- <COL STYLE="-moz-user-modify: read-write;"/>
+ <COL STYLE="-moz-user-modify: read-write;" />
+
+ <COL STYLE="-moz-user-modify: read-write;" />
+
</COLGROUP>
</TABLE>
</TD>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/facet.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/facet.jsp.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/facet.jsp.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,7 +1,9 @@
<tests>
<test id="facet">
- <DIV>
- <SPAN> Last Name</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ Cut Text
+ </SPAN>
+ </SPAN>
</test>
</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/css/main.css
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/css/main.css (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/css/main.css 2010-04-16 13:57:04 UTC (rev 21532)
@@ -0,0 +1,12 @@
+h1 {
+background-color: blue;
+}
+.panel2 {
+background-color: red;
+border: 1px solid black;
+vertical-align: top;
+}
+.goldPanel2 {
+background-color: brown;
+border: 1px solid black;
+}
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -47,50 +47,42 @@
<TR CLASS="dr-table-subheader rich-table-subheader">
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
<SPAN>
<SPAN CLASS="vpe-text">
#{msg.priceColumnName}
</SPAN>
</SPAN>
- <IMG
- SRC="/.*resources/column/sortable.gif/"
- STYLE="vertical-align: middle;" />
</TD>
<TD STYLE="display: none;" CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
<SPAN>
<SPAN CLASS="vpe-text">
#{msg.titleColumnName}
</SPAN>
</SPAN>
- <IMG
- SRC="/.*resources/column/sortable.gif/"
- STYLE="vertical-align: middle;" />
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
<SPAN>
<SPAN CLASS="vpe-text">
#{msg.priceColumnName}
</SPAN>
</SPAN>
- <IMG
- SRC="/.*resources/column/sortable.gif/"
- STYLE="vertical-align: middle;" />
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
<SPAN>
<SPAN CLASS="vpe-text">
#{msg.titleColumnName}
</SPAN>
</SPAN>
- <IMG
- SRC="/.*resources/column/sortable.gif/"
- STYLE="vertical-align: middle;" />
</TD>
</TR>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -31,14 +31,12 @@
<TR CLASS="dr-table-subheader rich-table-subheader">
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOPE="col">
+ <IMG SRC="/.*resources/column/sortable.gif/" STYLE="vertical-align: middle;" />
<SPAN>
<SPAN CLASS="vpe-text">
#{columns.header}
</SPAN>
</SPAN>
- <IMG
- SRC="/.*resources/column/sortable.gif/"
- STYLE="vertical-align: middle;" />
</TD>
</TR>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataDefinitionList.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -3,169 +3,154 @@
<DL CLASS="yellow-background">
<DT CLASS="headerClass">
- <DIV>
- <SPAN CLASS="vpe-text">
- TERM-VISIBLE
- </SPAN>
- </DIV>
+ <SPAN CLASS="vpe-text">
+ TERM-INVISIBLE
+</SPAN>
</DT>
<DD CLASS="columnClass red-text">
<SPAN CLASS="vpe-text">
col1
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col2
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col3
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col4
- </SPAN>
+</SPAN>
</DD>
<DT CLASS="headerClass">
- <DIV>
- <SPAN CLASS="vpe-text">
- TERM-VISIBLE
- </SPAN>
- </DIV>
+ <SPAN CLASS="vpe-text">
+ TERM-INVISIBLE
+</SPAN>
</DT>
<DD CLASS="columnClass blue-text">
<SPAN CLASS="vpe-text">
col1
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col2
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col3
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col4
- </SPAN>
+</SPAN>
</DD>
<DT CLASS="headerClass">
- <DIV>
- <SPAN CLASS="vpe-text">
- TERM-VISIBLE
- </SPAN>
- </DIV>
+ <SPAN CLASS="vpe-text">
+ TERM-INVISIBLE
+</SPAN>
</DT>
<DD CLASS="columnClass red-text">
<SPAN CLASS="vpe-text">
col1
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col2
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col3
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col4
- </SPAN>
+</SPAN>
</DD>
<DT CLASS="headerClass">
- <DIV>
- <SPAN CLASS="vpe-text">
- TERM-VISIBLE
- </SPAN>
- </DIV>
+ <SPAN CLASS="vpe-text">
+ TERM-INVISIBLE
+</SPAN>
</DT>
<DD CLASS="columnClass blue-text">
<SPAN CLASS="vpe-text">
col1
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col2
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col3
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col4
- </SPAN>
+</SPAN>
</DD>
<DT CLASS="headerClass">
- <DIV>
- <SPAN CLASS="vpe-text">
- TERM-VISIBLE
- </SPAN>
- </DIV>
+ <SPAN CLASS="vpe-text">
+ TERM-INVISIBLE
+</SPAN>
</DT>
<DD CLASS="columnClass red-text">
<SPAN CLASS="vpe-text">
col1
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col2
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col3
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
col4
- </SPAN>
+</SPAN>
</DD>
</DL>
</test>
+
<test id="dataDefinitionList1">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
+ <DIV CLASS="dr-pnl rich-panel ">
+ <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header "
+ STYLE="background-image: url(file:///D:/Projects/jboss_trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/common/background.gif);">
<SPAN CLASS="vpe-text">
Data Defenition list
- </SPAN>
+</SPAN>
</DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
+ <DIV CLASS="dr-pnl-b rich-panel-body ">
<FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
<DL
STYLE="border: thick dotted Cornsilk; text-align: center; color: PaleVioletRed; font-style: oblique; font-size: x-large; background-color: Grey; text-decoration: overline; font-family: Arial TUR; font-weight: bolder;"
CLASS="listClass">
<DT CLASS="headerClass">
- <DIV>
- <SPAN CLASS="vpe-text">
- Facet Term
- </SPAN>
- </DIV>
+ <SPAN CLASS="vpe-text">
+ Facet Term
+</SPAN>
</DT>
<DD CLASS="columnClass">
<SPAN CLASS="vpe-text">
Price:
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
Number of copies:
- </SPAN>
+</SPAN>
</DD>
<DT CLASS="headerClass">
- <DIV>
- <SPAN CLASS="vpe-text">
- Facet Term
- </SPAN>
- </DIV>
+ <SPAN CLASS="vpe-text">
+ Facet Term
+</SPAN>
</DT>
<DD CLASS="columnClass">
<SPAN CLASS="vpe-text">
Price:
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
Number of copies:
- </SPAN>
+</SPAN>
</DD>
<DT CLASS="headerClass">
- <DIV>
- <SPAN CLASS="vpe-text">
- Facet Term
- </SPAN>
- </DIV>
+ <SPAN CLASS="vpe-text">
+ Facet Term
+</SPAN>
</DT>
<DD CLASS="columnClass">
<SPAN CLASS="vpe-text">
Price:
- </SPAN>
+</SPAN>
<SPAN CLASS="vpe-text">
Number of copies:
- </SPAN>
+</SPAN>
</DD>
</DL>
</FORM>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataFilterSlider.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -43,23 +43,24 @@
</DIV>
</test>
<test id="dataFilterSliderWithDataTable">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
+
+ <DIV CLASS="dr-pnl rich-panel ">
+ <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header "
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
<SPAN CLASS="vpe-text">
Data Filter Slider
- </SPAN>
+</SPAN>
</DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
+ <DIV CLASS="dr-pnl-b rich-panel-body ">
<DIV ID="form1" STYLE="-moz-user-modify: read-write;">
<DIV ID="stat1" STYLE="-moz-user-modify: read-write;">
<DIV ID="slider-body" STYLE="-moz-user-modify: read-write;">
<DIV CLASS="slider-container rich-dataFilterSlider-container evenRow">
- <DIV CLASS="range rich-dataFilterSlider-range" STYLE="width: 459px;">
+ <DIV CLASS="range rich-dataFilterSlider-range " STYLE="width: 459px;">
<DIV CLASS="range-decor rich-dataFilterSlider-range-decor">
- <DIV CLASS="trailer rich-dataFilterSlider-trailer" STYLE="left: -38px;">
- <DIV CLASS="track rich-dataFilterSlider-track" STYLE="width: 200px;">
- <DIV CLASS="handle rich-dataFilterSlider-handle" STYLE="left: 0px;">
+ <DIV CLASS="trailer rich-dataFilterSlider-trailer " STYLE="left: -38px;">
+ <DIV CLASS="track rich-dataFilterSlider-track " STYLE="width: 200px;">
+ <DIV CLASS="handle rich-dataFilterSlider-handle " STYLE="left: 0px;">
<IMG WIDTH="7px" HEIGHT="8px" BORDER="0px"
SRC="/.*resources/dataFilterSlider/pos.gif/" />
@@ -69,7 +70,7 @@
</DIV>
</DIV>
<INPUT TYPE="text"
- CLASS="slider-input-field rich-dataFilterSlider-input-field"
+ CLASS="slider-input-field rich-dataFilterSlider-input-field "
VALUE="10000" />
<BR STYLE="clear: both;" />
@@ -81,8 +82,6 @@
<TD>
<DIV>
<TABLE CLASS="list-table1" ROWCLASSES="list-row3">
- <CAPTION>
- </CAPTION>
<TBODY>
<TR>
<TD STYLE="border: 0px hidden ; padding: 0px;">
@@ -114,8 +113,6 @@
<TD>
<DIV>
<TABLE CLASS="list-table1" ROWCLASSES="list-row1, list-row2">
- <CAPTION>
- </CAPTION>
<TBODY>
<TR>
<TD STYLE="border: 0px hidden ; padding: 0px;">
@@ -123,32 +120,32 @@
<THEAD>
<TR>
<TH CLASS="list-header">
- <DIV>
+ <SPAN>
<SPAN CLASS="headerText">
Make
- </SPAN>
- </DIV>
+</SPAN>
+ </SPAN>
</TH>
<TH CLASS="list-header">
- <DIV>
+ <SPAN>
<SPAN CLASS="headerText">
Model
- </SPAN>
- </DIV>
+</SPAN>
+ </SPAN>
</TH>
<TH CLASS="list-header">
- <DIV>
+ <SPAN>
<SPAN CLASS="headerText">
#{inventoryList.priceColumnName}
- </SPAN>
- </DIV>
+</SPAN>
+ </SPAN>
</TH>
<TH CLASS="list-header">
- <DIV>
+ <SPAN>
<SPAN CLASS="headerText">
#{inventoryList.mileageColumnName}
- </SPAN>
- </DIV>
+</SPAN>
+ </SPAN>
</TH>
</TR>
</THEAD>
@@ -157,22 +154,22 @@
<TD CLASS="column">
<SPAN CLASS="vpe-text">
#{category.make}
- </SPAN>
+</SPAN>
</TD>
<TD CLASS="column">
<SPAN CLASS="vpe-text">
#{category.model}
- </SPAN>
+</SPAN>
</TD>
<TD CLASS="column">
<SPAN CLASS="vpe-text">
#{category.price}
- </SPAN>
+</SPAN>
</TD>
<TD CLASS="column">
<SPAN CLASS="vpe-text">
#{category.mileage}
- </SPAN>
+</SPAN>
</TD>
</TR>
</TBODY>
@@ -200,5 +197,6 @@
</DIV>
</DIV>
</DIV>
+
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable&Spacer&DataScroller.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -16,8 +16,7 @@
<TBODY>
<TR>
<TD ALIGN="center" CLASS="rich-datascr-button rich-datascr-button-dsbld">
- «
-</TD>
+ « </TD>
<TD ALIGN="center" CLASS="rich-datascr-button rich-datascr-button-dsbld">
</TD>
<TD ALIGN="center" CLASS="rich-datascr-act"
@@ -35,14 +34,12 @@
<TD ALIGN="center" CLASS="rich-datascr-button">
</TD>
<TD ALIGN="center" CLASS="rich-datascr-button">
- »
-</TD>
+ » </TD>
</TR>
</TBODY>
</TABLE>
</DIV>
- <IMG WIDTH="700" HEIGHT="30"
- SRC="/.*resources/spacer/spacer.gif/"
+ <IMG WIDTH="700" HEIGHT="30" SRC="/.*resources/spacer/spacer.gif/"
STYLE="background-color: red; width: 748px;" CLASS="rich-spacer btn" />
<TABLE WIDTH="100%" BORDER="10" BGCOLOR="green" ID="auction"
@@ -67,14 +64,12 @@
<TR CLASS="dr-table-subheader rich-table-subheader btn">
<TD CLASS="dr-table-subheadercell rich-table-subheadercell btn"
SCOPE="col">
+ <IMG SRC="/.*ve/unresolved_image.gif/" STYLE="vertical-align: middle;" />
<SPAN>
<SPAN CLASS="vpe-text">
Description
</SPAN>
</SPAN>
- <IMG
- SRC="/.*ve/unresolved_image.gif/"
- STYLE="vertical-align: middle;" />
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell btn"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml
===================================================================
(Binary files differ)
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,85 +1,61 @@
<tests>
<test id="inplaceInput">
- <SPAN VPE-USER-TOGGLE-ID="false" CLASS="rich-inplace rich-inplace-view"
- STYLE="display: inline;"> click to enter your name</SPAN>
+
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN VPE-USER-TOGGLE-ID="false" CLASS="rich-inplace rich-inplace-view"
+ STYLE="display: inline;">
+ click to enter your name
+</SPAN>
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+
+ </SPAN>
</test>
- <!--
- test id="inplaceInputWithoutFacet"> <SPAN VPE-USER-TOGGLE-ID="true"
- CLASS="rich-inplace rich-inplace-edit" STYLE="position: relative;
- display: inline;"> <INPUT TYPE="text" VPE-USER-TOGGLE-ID="0"
- CLASS="rich-inplace-field" STYLE="top: 0px; width: 66px;"
- AUTOCOMPLETE="off" VALUE="Mama mila ram"/> <DIV
- CLASS="rich-inplace-input-controls-set" STYLE="position: absolute;
- top: 0px; left: 66px;"> <DIV CLASS="rich-inplace-shadow"> <TABLE
- CELLSPACING="0" CELLPADDING="0" BORDER="0"> <TBODY> <TR> <TD
- CLASS="rich-inplace-shadow-tl"> <IMG WIDTH="10" HEIGHT="1" BORDER="0"
- SRC="/.*resources/inplaceInput/spacer.gif/"/> </TD> <TD
- CLASS="rich-inplace-shadow-tr"> <IMG WIDTH="1" HEIGHT="10" BORDER="0"
- SRC="/.*resources/resources/inplaceInput/spacer.gif/"/> </TD> </TR>
- <TR> <TD CLASS="rich-inplace-shadow-bl"> <IMG WIDTH="1" HEIGHT="10"
- BORDER="0" SRC="/.*resources/inplaceInput/spacer.gif/"/> </TD> <TD
- CLASS="rich-inplace-shadow-br"> <IMG WIDTH="10" HEIGHT="1" BORDER="0"
- SRC="/.*resources/inplaceInput/spacer.gif/"/> </TD> </TR> </TBODY>
- </TABLE> </DIV> <DIV STYLE="position: relative; height: 18px;"> <INPUT
- TYPE="image" CLASS="rich-inplace-control"
- SRC="/.*resources/inplaceInput/applyButton.gif/"
- VPE-USER-TOGGLE-ID="0"/> <INPUT TYPE="image"
- CLASS="rich-inplace-control"
- SRC="/.*resources/inplaceInput/cancelButton.gif/"
- VPE-USER-TOGGLE-ID="0"/> </DIV> </DIV> </SPAN> </test> <test
- id="inplaceInputWithFacet"> <SPAN VPE-USER-TOGGLE-ID="true"
- CLASS="rich-inplace rich-inplace-edit" STYLE="position: relative;
- display: inline;"> <INPUT TYPE="text" VPE-USER-TOGGLE-ID="0"
- CLASS="rich-inplace-field" STYLE="top: 0px; width: 66px;"
- AUTOCOMPLETE="off" VALUE="Mama mila ramu"/> <DIV
- CLASS="rich-inplace-input-controls-set" STYLE="position: absolute;
- top: 18px; left: 0px;"> <DIV STYLE="position: relative; height:
- 18px;"> <DIV> <SPAN TITLE="h:panelGroup" STYLE="-moz-user-modify:
- read-write;" CLASS=""> <INPUT TYPE="button" VALUE="Save"
- STYLE="-moz-user-modify: read-only;"/> <INPUT TYPE="button"
- VALUE="Cancel" STYLE="-moz-user-modify: read-only;"/> </SPAN> </DIV>
- </DIV> </DIV> </SPAN> </test
- -->
<test id="inplaceInput1">
- <DIV CLASS="dr-pnl rich-panel oddRow" STYLE="width: 240px;">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Person Info
- </SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
- <TBODY>
- <TR>
- <TD>
- <SPAN CLASS="vpe-text">
- Name:
- </SPAN>
- </TD>
- <TD>
- <SPAN VPE-USER-TOGGLE-ID="false"
- CLASS="rich-inplace rich-inplace-view btn" STYLE="display: inline;">
- click to enter your NamE
- </SPAN>
- </TD>
- </TR>
- <TR>
- <TD>
- <SPAN CLASS="vpe-text">
- Email:
- </SPAN>
- </TD>
- <TD>
- <SPAN VPE-USER-TOGGLE-ID="false"
- CLASS="rich-inplace rich-inplace-view evenRow" STYLE="display: inline;">
- click to enter your email
- </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </DIV>
+
+ <TABLE BORDER="0" STYLE="-moz-user-modify: read-write;">
+ <TBODY>
+ <TR>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ Name:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN VPE-USER-TOGGLE-ID="false"
+ CLASS="rich-inplace rich-inplace-view btn" STYLE="display: inline;">
+ click to enter your NamE
+ </SPAN>
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+ </SPAN>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ Email:
+ </SPAN>
+ </TD>
+ <TD>
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN VPE-USER-TOGGLE-ID="false"
+ CLASS="rich-inplace rich-inplace-view evenRow" STYLE="display: inline;">
+ click to enter your email
+ </SPAN>
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+ </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,9 +1,14 @@
<tests>
<test id="listShuttle">
+
<TABLE CLASS="rich-list-shuttle" STYLE="">
<TR>
- <TD COLSPAN="2" CLASS="rich-shuttle-source-caption"> source label</TD>
- <TD COLSPAN="2" CLASS="rich-shuttle-target-caption"> target label</TD>
+ <TD COLSPAN="2" CLASS="rich-shuttle-source-caption">
+ source label
+</TD>
+ <TD COLSPAN="2" CLASS="rich-shuttle-target-caption">
+ target label
+</TD>
</TR>
<TR>
<TD>
@@ -13,16 +18,20 @@
<TH
BACKGROUND="/.*resources/shuttle/header.gif/"
CLASS="rich-shuttle-header-tab-cell">
- <DIV>
- <SPAN> Song Name</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ Song Name
+</SPAN>
+ </SPAN>
</TH>
<TH
BACKGROUND="/.*resources/shuttle/header.gif/"
CLASS="rich-shuttle-header-tab-cell">
- <DIV>
- <SPAN> Artist Name</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ Artist Name
+</SPAN>
+ </SPAN>
</TH>
</TR>
<TR STYLE="vertical-align: top;" CLASS="rich-shuttle-source-row null">
@@ -30,7 +39,9 @@
<TABLE>
<TR>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> You must be evil</SPAN>
+ <SPAN CLASS="vpe-text">
+ You must be evil
+</SPAN>
</TD>
</TR>
</TABLE>
@@ -39,7 +50,9 @@
<TABLE>
<TR>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> Chris Rea</SPAN>
+ <SPAN CLASS="vpe-text">
+ Chris Rea
+</SPAN>
</TD>
</TR>
</TABLE>
@@ -51,49 +64,49 @@
<TD STYLE="vertical-align: middle;">
<DIV CLASS="rich-shuttle-controls">
<DIV CLASS="rich-shuttle-control">
- <DIV
- STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
+ <DIV STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
CLASS="rich-shuttle-meta-button">
<DIV CLASS="rich-shuttle-button rich-shuttle-copyAll">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_copy_all.gif/"/> Copy all
+ SRC="/.*resources/shuttle/arrow_copy_all.gif/" />
+ Copy all
</DIV>
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-shuttle-control">
- <DIV
- STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
+ <DIV STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
CLASS="rich-shuttle-meta-button">
<DIV CLASS="rich-shuttle-button rich-shuttle-copy">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_copy.gif/"/> Copy
+ SRC="/.*resources/shuttle/arrow_copy.gif/" />
+ Copy
</DIV>
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-shuttle-control">
- <DIV
- STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
+ <DIV STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
CLASS="rich-shuttle-meta-button">
<DIV CLASS="rich-shuttle-button rich-shuttle-remove">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_remove.gif/"/> Remove
+ SRC="/.*resources/shuttle/arrow_remove.gif/" />
+ Remove
</DIV>
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-shuttle-control">
- <DIV
- STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
+ <DIV STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
CLASS="rich-shuttle-meta-button">
<DIV CLASS="rich-shuttle-button rich-shuttle-removeAll">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_remove_all.gif/"/> Remove All
+ SRC="/.*resources/shuttle/arrow_remove_all.gif/" />
+ Remove All
</DIV>
</DIV>
</DIV>
@@ -107,16 +120,20 @@
<TH
BACKGROUND="/.*resources/shuttle/header.gif/"
CLASS="rich-shuttle-header-tab-cell">
- <DIV>
- <SPAN> Song Name</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ Song Name
+</SPAN>
+ </SPAN>
</TH>
<TH
BACKGROUND="/.*resources/shuttle/header.gif/"
CLASS="rich-shuttle-header-tab-cell">
- <DIV>
- <SPAN> Artist Name</SPAN>
- </DIV>
+ <SPAN>
+ <SPAN CLASS="vpe-text">
+ Artist Name
+</SPAN>
+ </SPAN>
</TH>
</TR>
<TR STYLE="vertical-align: top;" CLASS="rich-shuttle-target-row null">
@@ -124,7 +141,9 @@
<TABLE>
<TR>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> You must be evil</SPAN>
+ <SPAN CLASS="vpe-text">
+ You must be evil
+</SPAN>
</TD>
</TR>
</TABLE>
@@ -133,7 +152,9 @@
<TABLE>
<TR>
<TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> Chris Rea</SPAN>
+ <SPAN CLASS="vpe-text">
+ Chris Rea
+</SPAN>
</TD>
</TR>
</TABLE>
@@ -145,49 +166,52 @@
<TD STYLE="vertical-align: middle;">
<DIV CLASS="rich-shuttle-controls">
<DIV CLASS="rich-shuttle-control">
- <DIV
- STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
+ <DIV STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
CLASS="rich-shuttle-meta-button">
<DIV CLASS="rich-shuttle-button rich-shuttle-top">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_first.gif/"/> First
+ SRC="/.*resources/shuttle/arrow_first.gif/" />
+
+ First
</DIV>
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-shuttle-control">
- <DIV
- STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
+ <DIV STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
CLASS="rich-shuttle-meta-button">
<DIV CLASS="rich-shuttle-button rich-shuttle-up">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_up.gif/"/> Up
+ SRC="/.*resources/shuttle/arrow_up.gif/" />
+
+ Up
</DIV>
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-shuttle-control">
- <DIV
- STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
+ <DIV STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
CLASS="rich-shuttle-meta-button">
<DIV CLASS="rich-shuttle-button rich-shuttle-down">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_down.gif/"/> Down
+ SRC="/.*resources/shuttle/arrow_down.gif/" />
+
+ Down
</DIV>
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-shuttle-control">
- <DIV
- STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
+ <DIV STYLE="/background-image: url\(.*resources/shuttle/button.gif\);/"
CLASS="rich-shuttle-meta-button">
<DIV CLASS="rich-shuttle-button rich-shuttle-bottom">
<DIV CLASS="rich-shuttle-button-content">
<IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/shuttle/arrow_last.gif/"/> Last
+ SRC="/.*resources/shuttle/arrow_last.gif/" />
+ Last
</DIV>
</DIV>
</DIV>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -7,9 +7,29 @@
xmlns:rich="http://richfaces.org/rich">
<head>
+<link href="/css/main.css" rel="stylesheet" type="text/css"/>
+<style type="text/html">
+.panel {
+background-color: SteelBlue;
+border: 1px solid black;
+vertical-align: top;
+}
+.goldPanel {
+background-color: gold;
+border: 1px solid black;
+}
+</style>
</head>
<body>
<f:view>
+<h1> header </h1>
+<h:panelGrid columns="2" styleClass="">
+<h:outputText> some text</h:outputText>
+<h:outputText> some text2</h:outputText>
+<h:outputText> some text2</h:outputText>
+<h:outputText> some text2</h:outputText>
+</h:panelGrid>
+
<rich:messages id="messages" layout="table" tooltip="true"
showDetail="false" showSummary="true" passedLabel="No Error"
errorLabelClass="errorLabel" fatalLabelClass="fatalLabel"
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,56 +1,67 @@
<tests>
<test id="messages">
+
<TABLE CELLSPACING="0" CELLPADDING="0"
STYLE="border-style: dotted; color: Turquoise; text-align: center; font-size: small; font-style: italic; background-color: Orchid; font-family: Arial CE,Arial Narrow; text-decoration: line-through; font-weight: bolder;"
CLASS="rich-messages infoClass">
<TR>
<TD>
- <SPAN CLASS="rich-messages-marker">
- <DIV>
- <SPAN> Passed </SPAN>
- </DIV>
+ <SPAN VPE-FACET="passedMarker" CLASS="rich-messages-marker">
+ <SPAN CLASS="vpe-text">
+ Passed
+</SPAN>
</SPAN>
- <SPAN CLASS="rich-messages-label"> No Error </SPAN>
+ <SPAN CLASS="rich-messages-label">
+ No Error
+</SPAN>
</TD>
</TR>
<TR>
- <TD CLASS="errorClass">
- <SPAN CLASS="rich-messages-marker markerError">
- <DIV>
- <SPAN> Error </SPAN>
- </DIV>
+ <TD CLASS=" errorClass">
+ <SPAN VPE-FACET="errorMarker" CLASS="rich-messages-marker markerError">
+ <SPAN CLASS="vpe-text">
+ Error
+</SPAN>
</SPAN>
- <SPAN CLASS="rich-messages-label errorLabel"> Error message </SPAN>
+ <SPAN CLASS="rich-messages-label errorLabel">
+ Error message
+</SPAN>
</TD>
</TR>
<TR>
- <TD CLASS="fatalClass">
- <SPAN CLASS="rich-messages-marker markerFatal">
- <DIV>
- <SPAN> Fatal </SPAN>
- </DIV>
+ <TD CLASS=" fatalClass">
+ <SPAN VPE-FACET="fatalMarker" CLASS="rich-messages-marker markerFatal">
+ <SPAN CLASS="vpe-text">
+ Fatal
+</SPAN>
</SPAN>
- <SPAN CLASS="rich-messages-label fatalLabel"> Fatal message </SPAN>
+ <SPAN CLASS="rich-messages-label fatalLabel">
+ Fatal message
+</SPAN>
</TD>
</TR>
<TR>
- <TD CLASS="infoClass">
- <SPAN CLASS="rich-messages-marker markerInfo">
- <DIV>
- <SPAN> Info </SPAN>
- </DIV>
+ <TD CLASS=" infoClass">
+ <SPAN VPE-FACET="infoMarker" CLASS="rich-messages-marker markerInfo">
+ <SPAN CLASS="vpe-text">
+ Info
+</SPAN>
</SPAN>
- <SPAN CLASS="rich-messages-label infoLabel"> Info message </SPAN>
+ <SPAN CLASS="rich-messages-label infoLabel">
+ Info message
+</SPAN>
</TD>
</TR>
<TR>
- <TD CLASS="warnClass">
- <SPAN CLASS="rich-messages-marker markerWarn">
- <DIV>
- <SPAN> Warning </SPAN>
- </DIV>
+ <TD CLASS=" warnClass">
+ <SPAN VPE-FACET="warnMarker" CLASS="rich-messages-marker markerWarn">
+ <SPAN CLASS="vpe-text">
+ Warning
+</SPAN>
</SPAN>
- <SPAN CLASS="rich-messages-label warnLabel"> Warning message </SPAN>
+ <SPAN CLASS="rich-messages-label warnLabel">
+ Warning message
+</SPAN>
</TD>
</TR>
</TABLE>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,107 +1,106 @@
<tests>
<test id="orderingList">
+
<TABLE WIDTH="300px" HEIGHT="200px" CLASS="rich-ordering-list-body">
- <TR>
- <TD>
- <DIV CLASS="rich-ordering-list-caption" STYLE="width: 350px; height: 300px;">
- </DIV>
- <DIV STYLE="overflow: hidden; width: 100%;">
- <TABLE>
- <TR>
- <TD>
- <DIV STYLE=""
- CLASS="rich-ordering-list-output rich-ordering-list-content">
- <TABLE CELLSPACING="1" CLASS="rich-ordering-list-items"
- ID="orderingList" LISTHEIGHT="300" LISTWIDTH="350" STYLE="width: 100%;">
- <THEAD>
- <TR
- CLASS="rich-ordering-list-header rich-ordering-list-table-header">
- <TD
- BACKGROUND="/.*resources/orderingList/table_header_cell_bg.gif/"
- CLASS="rich-ordering-list-table-header-cell" SCOP="col">
- <SPAN> Song Name</SPAN>
- </TD>
- <TD
- BACKGROUND="/.*resources/orderingList/table_header_cell_bg.gif/"
- CLASS="rich-ordering-list-table-header-cell" SCOP="col">
- <SPAN> Artist Name</SPAN>
- </TD>
- </TR>
- </THEAD>
- <TR CLASS="rich-ordering-list-row">
- <TD WIDTH="180" CLASS="dr-table-cell rich-table-cell">
- <SPAN> You must be evil</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> Chris Rea</SPAN>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </TD>
- <TD>
- <DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
- </DIV>
- </TD>
- </TR>
- <TR>
- <TD>
- <DIV STYLE="overflow: scroll; width: 100%; height: 17px;">
- </DIV>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </TD>
- <TD ALIGN="center" CLASS="rich-ordering-list-button-valign">
- <DIV CLASS="rich-ordering-controls null rich-ordering-list-button-layout">
- <DIV CLASS="dr-buttons-border rich-ordering-control-top null">
- <DIV CLASS="rich-ordering-list-button"
- STYLE="/width: 100%; background-image: url\(.*resources/orderingList/button_bg.gif\);/">
- <A CLASS="rich-ordering-list-button-selection">
- <DIV CLASS="rich-ordering-list-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/top.gif/"/>First
- </DIV>
- </A>
- </DIV>
+ <TBODY>
+ <TR>
+ <TD CLASS="rich-ordering-list-caption">
+ <DIV>
</DIV>
- <DIV CLASS="dr-buttons-border rich-ordering-control-up null">
- <DIV CLASS="rich-ordering-list-button"
- STYLE="/width: 100%; background-image: url\(.*resources/orderingList/button_bg.gif\);/">
- <A CLASS="rich-ordering-list-button-selection">
- <DIV CLASS="rich-ordering-list-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/up.gif/"/>Up
- </DIV>
- </A>
- </DIV>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <DIV STYLE="overflow: scroll;"
+ CLASS="rich-ordering-list-output rich-ordering-list-content">
+ <TABLE CELLSPACING="1" CLASS="rich-ordering-list-items "
+ ID="orderingList" LISTHEIGHT="300" LISTWIDTH="350" STYLE="width: 100%;">
+ <THEAD>
+ <TR
+ CLASS="rich-ordering-list-header rich-ordering-list-table-header ">
+ <TD BACKGROUND="/.*resources/orderingList/table_header_cell_bg.gif/"
+ CLASS="rich-ordering-list-table-header-cell ">
+ <SPAN CLASS="vpe-text">
+ Song Name
+</SPAN>
+ </TD>
+ <TD BACKGROUND="/.*resources/orderingList/table_header_cell_bg.gif/"
+ CLASS="rich-ordering-list-table-header-cell ">
+ <SPAN CLASS="vpe-text">
+ Artist Name
+</SPAN>
+ </TD>
+ </TR>
+ </THEAD>
+ <TR CLASS="rich-ordering-list-row">
+ <TD WIDTH="180" CLASS="dr-table-cell rich-table-cell">
+ <SPAN CLASS="vpe-text">
+ You must be evil
+</SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN CLASS="vpe-text">
+ Chris Rea
+</SPAN>
+ </TD>
+ </TR>
+ </TABLE>
</DIV>
- <DIV CLASS="dr-buttons-border rich-ordering-control-down null">
- <DIV CLASS="rich-ordering-list-button"
- STYLE="/width: 100%; background-image: url\(.*resources/orderingList/button_bg.gif\);/">
- <A CLASS="rich-ordering-list-button-selection">
- <DIV CLASS="rich-ordering-list-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/down.gif/"/>Down
- </DIV>
- </A>
+ </TD>
+ <TD ALIGN="center" CLASS="rich-ordering-list-button-valign">
+ <DIV CLASS="rich-ordering-controls rich-ordering-list-button-layout">
+ <DIV CLASS="dr-buttons-border rich-ordering-control-top">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image: url\(.*resources/orderingList/button_bg.gif\);/">
+ <A CLASS="rich-ordering-list-button-selection">
+ <DIV CLASS="rich-ordering-list-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*resources/orderingList/top.gif/" />
+ First
+ </DIV>
+ </A>
+ </DIV>
</DIV>
- </DIV>
- <DIV CLASS="dr-buttons-border rich-ordering-control-bottom null">
- <DIV CLASS="rich-ordering-list-button"
- STYLE="/width: 100%; background-image: url\(.*resources/orderingList/button_bg.gif\);/">
- <A CLASS="rich-ordering-list-button-selection">
- <DIV CLASS="rich-ordering-list-button-content">
- <IMG WIDTH="15" HEIGHT="15"
- SRC="/.*resources/orderingList/bottom.gif/"/>Last
- </DIV>
- </A>
+ <DIV CLASS="dr-buttons-border rich-ordering-control-up">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image: url\(.*resources/orderingList/button_bg.gif\);/">
+ <A CLASS="rich-ordering-list-button-selection">
+ <DIV CLASS="rich-ordering-list-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*resources/orderingList/up.gif/" />
+ Up
+ </DIV>
+ </A>
+ </DIV>
</DIV>
+ <DIV CLASS="dr-buttons-border rich-ordering-control-down">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image: url\(.*resources/orderingList/button_bg.gif\);/">
+ <A CLASS="rich-ordering-list-button-selection">
+ <DIV CLASS="rich-ordering-list-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*resources/orderingList/down.gif/" />
+ Down
+ </DIV>
+ </A>
+ </DIV>
+ </DIV>
+ <DIV CLASS="dr-buttons-border rich-ordering-control-bottom">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image: url\(.*resources/orderingList/button_bg.gif\);/">
+ <A CLASS="rich-ordering-list-button-selection">
+ <DIV CLASS="rich-ordering-list-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*resources/orderingList/bottom.gif/" />
+ Last
+ </DIV>
+ </A>
+ </DIV>
+ </DIV>
</DIV>
- </DIV>
- </TD>
- </TR>
+ </TD>
+ </TR>
+ </TBODY>
</TABLE>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panel.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panel.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panel.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,12 +1,16 @@
<tests>
<test id="panel">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN> Panel Header </SPAN>
+ <DIV CLASS="dr-pnl rich-panel ">
+ <DIV VPE-FACET="header" CLASS="dr-pnl-h rich-panel-header "
+ STYLE="display: none;">
</DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <SPAN> Panel Content </SPAN>
+ <DIV CLASS="dr-pnl-b rich-panel-body ">
+ <SPAN CLASS="vpe-text">
+ Panel Header
+ </SPAN>
+ <SPAN CLASS="vpe-text">
+ Panel Content
+ </SPAN>
</DIV>
</DIV>
</test>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml
===================================================================
(Binary files differ)
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar.xhtml.xml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,39 +1,49 @@
<tests>
<test id="progressBar">
<DIV
- CLASS="rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"
- STYLE="height: 13px; text-align: left;">
- <DIV CLASS="rich-progress-bar-height rich-progress-bar-uploaded null"
- STYLE="height: 13px; width: 60%;">
+ CLASS="rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell-dig ">
+ <DIV
+ CLASS="rich-progress-bar-width rich-progress-bar-remained rich-progress-bar-padding"
+ STYLE="height: 13px;">
+ 
+ </DIV>
+ <DIV CLASS="rich-progress-bar-uploaded-dig" STYLE="width: 60%; height: 13px;">
<DIV
- STYLE="height: 13px; font-weight: bold; position: relative; text-align: center;">
- #{progressBarBean.currentValue} % </DIV>
+ CLASS="rich-progress-bar-height-dig rich-progress-bar-width rich-progress-bar-completed rich-progress-bar-padding"
+ STYLE="height: 13px;">
+ 
+ </DIV>
</DIV>
+ <DIV
+ CLASS="rich-progress-bar-height-dig rich-progress-bar-uploaded-dig rich-progress-bar-vpe-text"
+ STYLE="height: 13px;">
+ #{progressBarBean.currentValue} %
+ <BR STYLE="-moz-user-modify: read-write;" />
+ <BR STYLE="-moz-user-modify: read-write;" />
+
+ </DIV>
</DIV>
</test>
<test id="progressBar1">
- <DIV CLASS="dr-pnl rich-panel">
- <DIV CLASS="dr-pnl-h rich-panel-header"
- STYLE="/background-image: url\(.*resources/common/background.gif\);/">
- <SPAN CLASS="vpe-text">
- Progress Bar
+ <DIV
+ CLASS="rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell btn">
+ <DIV CLASS="rich-progress-bar-height rich-progress-bar-uploaded"
+ STYLE="width: 60%; color: red;">
+ </DIV>
+ <SPAN>
+ <SPAN STYLE="display: none; -moz-user-modify: read-only;">
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+
</SPAN>
- </DIV>
- <DIV CLASS="dr-pnl-b rich-panel-body">
- <DIV
- CLASS="rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell btn"
- STYLE="color: red; text-align: left;">
- <DIV CLASS="rich-progress-bar-height rich-progress-bar-uploaded null"
- STYLE="color: red; width: 60%;">
- </DIV>
- </DIV>
- <BUTTON STYLE="margin: 9px 0px 5px; -moz-user-modify: read-only;"
- ID="button">
- <SPAN CLASS="vpe-text">
- Start Progress
- </SPAN>
- </BUTTON>
- </DIV>
+ </SPAN>
+ <SPAN>
+ <SPAN STYLE="display: none; -moz-user-modify: read-only;">
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+
+ </SPAN>
+ </SPAN>
</DIV>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/subTable.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/subTable.xhtml 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/subTable.xhtml 2010-04-16 13:57:04 UTC (rev 21532)
@@ -11,8 +11,8 @@
<head>
<style type="text/css">
.redText {
- color:red;
- background: yellow
+ color:violet;
+ background: green
}
.blueText {
color:blue;
@@ -57,9 +57,11 @@
<h:outputText value="#{book.numOfCopies}" />
</rich:column>
</rich:subTable>
+
<rich:column colspan="3">
<h:outputText value="#{book.price}" />
</rich:column>
+
<rich:subTable value="#{bookList.bookList}" var="book" rowClasses="redText, blueText" columnClasses="redText, blueText">
<rich:column rowspan="2">
<h:outputText value="#{book.price}" />
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -51,9 +51,7 @@
suite.addTestSuite(JBIDE1713Test.class);
suite.addTestSuite(RichFacesJBIDE1169Test.class);
suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
- suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
- suite.addTestSuite(RichFacesProgressBarTemplateTestCase.class);
suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
suite.addTestSuite(RichFacesPickListTemplateTestCase.class);
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2008 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-
-package org.jboss.tools.jsf.vpe.richfaces.test;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.ui.test.VpeTest;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
-
-
-/**
- * Test case for testing <rich:inplaceInput/> template.
- *
- * @author Eugene Stherbin
- */
-public class RichFacesInplaceInputTemplateTestCase extends VpeTest {
-
- /** The Constant EL_VALUE. */
- private static final String EL_VALUE = "#{person.name}"; //$NON-NLS-1$
-
- /** The Constant MY_STYLE_CLASS. */
- private static final String MY_STYLE_CLASS = "myStyleClass"; //$NON-NLS-1$
-
- /** The Constant RICH_INPLACE_VIEW. */
- private static final String RICH_INPLACE_VIEW = "rich-inplace rich-inplace-view"; //$NON-NLS-1$
-
- /** The Constant TEMPLATE_WITH_EMPTY_TAG. */
- private static final String TEMPLATE_WITH_EMPTY_TAG = "components/inplaceInput/inplaceInput.xhtml"; //$NON-NLS-1$
-
- /** The Constant TEMPLATE_WITH_VALUE_AND_STYLE_CLASS. */
- private static final String TEMPLATE_WITH_VALUE_AND_STYLE_CLASS = "components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml"; //$NON-NLS-1$
-
- /** The Constant TEMPLATE_WITH_VALUE_ATTR. */
- private static final String TEMPLATE_WITH_VALUE_ATTR = "components/inplaceInput/inplaceInputWithValueAttribute.xhtml"; //$NON-NLS-1$
-
- private static final String EMPTY_INPUT_STRING = "\u00A0\u00A0\u00A0"; //$NON-NLS-1$
-
- /**
- * The Constructor.
- *
- * @param name the name
- */
- public RichFacesInplaceInputTemplateTestCase(String name) {
- super(name);
- }
-
- /**
- * Base check.
- *
- * @param styleClass the style class
- * @param value the value
- * @param page the page
- *
- * @throws CoreException the core exception
- * @throws Throwable the throwable
- */
- private void baseCheck(String page, String value, String styleClass) throws Throwable, CoreException {
- final nsIDOMElement rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page,
- RichFacesAllTests.IMPORT_PROJECT_NAME));
-
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
-
- TestUtil.findAllElementsByName(rst, elements, HTML.TAG_SPAN);
-
- assertEquals("Count of items should be 1", 1, elements.size()); //$NON-NLS-1$
-
- final nsIDOMElement element = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- String first = "null"; //$NON-NLS-1$
- String second = "null"; //$NON-NLS-1$
-
- if(value!=null){
- first = value;
- }
-
- if(element.getFirstChild().getNodeValue()!=null){
- second = element.getFirstChild().getNodeValue().trim();
- }
-
- assertEquals("Text value should be empty string", first, second); //$NON-NLS-1$
-
- assertTrue("Style class should be equals " + styleClass, element.getAttribute(HTML.ATTR_CLASS).contains(styleClass)); //$NON-NLS-1$
- }
-
- /**
- * Test inplace input without attributes.
- *
- * @throws CoreException the core exception
- * @throws Throwable the throwable
- */
- public void testInplaceInputWithoutAttributes() throws CoreException, Throwable {
- baseCheck(TEMPLATE_WITH_EMPTY_TAG, EMPTY_INPUT_STRING, RICH_INPLACE_VIEW);
-
- }
-
- /**
- * Test inplace input with value.
- *
- * @throws CoreException the core exception
- * @throws Throwable the throwable
- */
- public void testInplaceInputWithValue() throws CoreException, Throwable {
- baseCheck(TEMPLATE_WITH_VALUE_ATTR, EL_VALUE, RICH_INPLACE_VIEW);
-
- }
-
- /**
- * Test inplace input with value and style.
- *
- * @throws CoreException the core exception
- * @throws Throwable the throwable
- */
- public void testInplaceInputWithValueAndStyle() throws CoreException, Throwable {
- baseCheck(TEMPLATE_WITH_VALUE_AND_STYLE_CLASS, EL_VALUE, MY_STYLE_CLASS);
-
- }
-
-}
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2008 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-
-package org.jboss.tools.jsf.vpe.richfaces.test;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
-import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.ui.test.VpeTest;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
-
-
-/**
- * Test case for testing <rich:progressBar/> component.
- *
- * @author Eugene Stherbin
- */
-public class RichFacesProgressBarTemplateTestCase extends VpeTest {
-
- /** The Constant CHECK_BASE_STYLE. */
- private static final String CHECK_BASE_STYLE = "rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"; //$NON-NLS-1$
-
- /** The Constant MY_STYLE_CLASS. */
- private static final String MY_STYLE_CLASS = " myStyleClass"; //$NON-NLS-1$
-
- /** The Constant PERCENTAGES. */
- private static final String PERCENTAGES = " 60%;"; //$NON-NLS-1$
-
- /** The Constant SIMPLE_PAGE. */
- private static final String SIMPLE_PAGE = "/components/progressBar/progressBar.xhtml"; //$NON-NLS-1$
-
- /** The Constant SIMPLE_WITH_ATTRIBUTES. */
- private static final String SIMPLE_WITH_ATTRIBUTES = "/components/progressBar/progressBarWithAttributes.xhtml"; //$NON-NLS-1$
-
- /** The Constant STYLE_1_FOR_CHECK. */
- private static final String STYLE_1_FOR_CHECK = "width: 250px; text-align: left;"; //$NON-NLS-1$
-
- /** The Constant STYLE_CLASS_2. */
- private static final String STYLE_CLASS_2 = "rich-progress-bar-height rich-progress-bar-uploaded null"; //$NON-NLS-1$
-
- /**
- * The Constructor.
- *
- * @param name the name
- */
- public RichFacesProgressBarTemplateTestCase(String name) {
- super(name);
- }
-
- /**
- * Base test.
- *
- * @param styleClass the style class
- * @param page the page
- * @param style the style
- * @param twoStyleClass the two style class
- * @param style2 the style2
- */
- private void baseTest(String page, String styleClass, String style, String twoStyleClass, String style2) {
- nsIDOMElement rst = null;
-
- try {
- rst = TestUtil.performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(page, RichFacesAllTests.IMPORT_PROJECT_NAME));
- } catch (CoreException e) {
- fail(e.getMessage() + e);
- } catch (Throwable e) {
- fail(e.getMessage() + e);
- }
-
- final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
- TestUtil.findAllElementsByName(rst, elements, HTML.TAG_DIV);
-
- assertEquals("Size should be 2", 5, elements.size()); //$NON-NLS-1$
- final nsIDOMElement divOne = (nsIDOMElement) elements.get(3).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- assertEquals("Style class should be equals" + styleClass, styleClass, divOne.getAttribute(HTML.ATTR_CLASS)); //$NON-NLS-1$
- assertEquals("Style should be equals" + style, style, divOne.getAttribute(HTML.ATTR_STYLE)); //$NON-NLS-1$
-
- final nsIDOMElement divTwo = (nsIDOMElement) elements.get(4).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- assertEquals("Style class should be equals" + twoStyleClass, twoStyleClass, divTwo.getAttribute(HTML.ATTR_CLASS)); //$NON-NLS-1$
- assertEquals("Style should be equals" + style2, style2, divTwo.getAttribute(HTML.ATTR_STYLE)); //$NON-NLS-1$
-
- }
-
- /**
- * Test simple.
- */
- public void testSimple() {
- baseTest(SIMPLE_PAGE, CHECK_BASE_STYLE, "height: 13px; text-align: left;", STYLE_CLASS_2,"height: 13px; width: 60%;"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Test with attributes.
- */
- public void testWithAttributes() {
- baseTest(SIMPLE_WITH_ATTRIBUTES, CHECK_BASE_STYLE + MY_STYLE_CLASS, STYLE_1_FOR_CHECK,
- STYLE_CLASS_2,VpeStyleUtil.PARAMETER_WIDTH
- + VpeStyleUtil.COLON_STRING + PERCENTAGES);
- }
-
-}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -98,7 +98,12 @@
public static final String PARENT = "PARENT"; //$NON-NLS-1$
public static final String VPE_USER_TOGGLE_ID = "vpe-user-toggle-id"; //$NON-NLS-1$
public static final String VPE_USER_TOGGLE_LOOKUP_PARENT = "vpe-user-toggle-lookup-parent"; //$NON-NLS-1$
-
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3373
+ * Attribute that specifies the place where JSF facet should be rendered.
+ */
+ public static final String VPE_FACET = "VPE-FACET"; //$NON-NLS-1$
+
private static final String PSEUDO_ELEMENT = "br"; //$NON-NLS-1$
private static final String PSEUDO_ELEMENT_ATTR = "vpe:pseudo-element"; //$NON-NLS-1$
private static final String INIT_ELEMENT_ATTR = "vpe:init-element"; //$NON-NLS-1$
@@ -284,8 +289,13 @@
* @param visualContainer visual container, cannot be {@code null}
* @return {@code true} if and only if the visual representation is created and added successfully
*/
- private boolean addNode(Node sourceNode, nsIDOMNode visualNextNode,
- nsIDOMNode visualContainer) {
+ private boolean addNode(Node sourceNode, nsIDOMNode visualNextNode, nsIDOMNode visualContainer) {
+ if (sourceNode.toString().indexOf("h:outputText/@[1568, 1603] (<h:outputText value=\"first text\" />)") > -1) {
+ System.out.println("My Out 11");
+ }
+ if (sourceNode.toString().indexOf("h:outputText/@[1153, 1188] (<h:outputText value=\"panel text\" />)") > -1) {
+ System.out.println("My Out 22");
+ }
try {
nsIDOMNode visualNewNode = createNode(sourceNode, visualContainer);
// Commented as fix for JBIDE-3012.
@@ -299,11 +309,28 @@
// } catch (XPCOMException ex) {
// // just ignore this exception
// }
+
if (visualNewNode != null) {
- if (visualNextNode == null) {
- visualContainer.appendChild(visualNewNode);
- } else {
- visualContainer.insertBefore(visualNewNode, visualNextNode);
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3373
+ * Do not add additional visual node for f:facet
+ * when it is inserted into existing one.
+ */
+ nsIDOMElement element = null;
+ try {
+ element = (nsIDOMElement) visualNewNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ } catch (org.mozilla.xpcom.XPCOMException e) {
+ /*
+ * Cannot parse node to element,
+ * do nothing
+ */
+ }
+ if (!((null != element) && element.hasAttribute(VPE_FACET))) {
+ if (visualNextNode == null) {
+ visualContainer.appendChild(visualNewNode);
+ } else {
+ visualContainer.insertBefore(visualNewNode, visualNextNode);
+ }
}
return true;
}
@@ -688,9 +715,8 @@
if (sourceChildren != null) {
for (int j = 0; j < sourceChildren.size(); j++) {
Node child = (Node) sourceChildren.get(j);
- if ((!isInvisibleNode(child))
- && addNode((Node) sourceChildren.get(j), null,
- visualParent)) {
+ if ((!isInvisibleNode(child))
+ && addNode(child, null, visualParent)) {
childrenCount++;
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -10,18 +10,18 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.template;
+import java.util.List;
import java.util.Map;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeDataTableElements.SourceColumnElements;
-import org.jboss.tools.vpe.editor.template.VpeDataTableElements.SourceDataTableElements;
import org.jboss.tools.vpe.editor.template.VpeDataTableElements.VisualColumnElements;
import org.jboss.tools.vpe.editor.template.VpeDataTableElements.VisualDataTableElements;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
-import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -90,8 +90,45 @@
}
setCellClass(cell, styleClass);
visualColumnElements.setFooterCell(cell);
-
+
+ /*
+ * Find elements from the f:facet
+ */
+ Map<String, List<Node>> headerFacetChildren = null;
+ Map<String, List<Node>> footerFacetChildren = null;
+ headerFacetChildren = VisualDomUtil.findFacetElements(columnElements.getHeader(), pageContext);
+ footerFacetChildren = VisualDomUtil.findFacetElements(columnElements.getFooter(), pageContext);
+ boolean headerHtmlElementsPresents = ((null != headerFacetChildren) && (headerFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+ boolean footerHtmlElementsPresents = ((null != footerFacetChildren) && (footerFacetChildren
+ .get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+
+ /*
+ * Create column body cell. (TD)
+ */
cell = VpeDataTableElements.makeCell(visualDataTableElements.getBodyRow(), index, HTML.TAG_TD, visualDocument);
+
+ /*
+ * Add HTML elements to the body cell.
+ * Correct facet will be rendered while JsfFacet template creating.
+ */
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(cell);
+ if (headerHtmlElementsPresents) {
+ for (Node node : headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childrenInfo.addSourceChild(node);
+ }
+ }
+ if (footerHtmlElementsPresents) {
+ for (Node node : footerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childrenInfo.addSourceChild(node);
+ }
+ }
+ /*
+ * If any elements were added they will be shown
+ * otherwise empty childrenInfo will be added.
+ */
+ creatorInfo.addChildrenInfo(childrenInfo);
+
NodeList list = sourceNode.getChildNodes();
int cnt = list != null ? list.getLength() : 0;
if (cnt > 0) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableCreator.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableCreator.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -192,7 +192,7 @@
// div.appendChild(visualDocument.createTextNode(redundantText));
div.appendChild(outterTable);
- if (true || sourceElements.hasTableCaption()) {
+ if (sourceElements.hasTableCaption()) {
caption = visualDocument.createElement(HTML.TAG_CAPTION);
if (sourceElements.getTableCaption() != null) {
VpeChildrenInfo info = new VpeChildrenInfo(caption);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -30,7 +30,7 @@
@Override
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) {
VpeCreatorInfo creatorInfo = null;
-
+
boolean isHeader = false;
boolean isFooter = false;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -15,6 +15,7 @@
import java.util.Map;
import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.expression.VpeExpression;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilder;
@@ -23,6 +24,7 @@
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionInfo;
import org.jboss.tools.vpe.editor.template.expression.VpeValue;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.jboss.tools.vpe.editor.util.VpeClassUtil;
import org.mozilla.interfaces.nsIDOMAttr;
import org.mozilla.interfaces.nsIDOMDocument;
@@ -30,7 +32,6 @@
import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -265,6 +266,23 @@
if (tableSize == 0) {
tableSize = childrenCount;
}
+ Map<String, List<Node>> captionFacetChildren = null;
+ Map<String, List<Node>> headerFacetChildren = null;
+ Map<String, List<Node>> footerFacetChildren = null;
+ captionFacetChildren = VisualDomUtil.findFacetElements(caption, pageContext);
+ headerFacetChildren = VisualDomUtil.findFacetElements(header, pageContext);
+ footerFacetChildren = VisualDomUtil.findFacetElements(footer, pageContext);
+ /*
+ * Add additional table cell for odd facet's elements.
+ */
+ boolean captionHtmlElementsPresents = ((null != captionFacetChildren) && (captionFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+ boolean headerHtmlElementsPresents = ((null != headerFacetChildren) && (headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+ boolean footerHtmlElementsPresents = ((null != footerFacetChildren) && (footerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS).size() > 0));
+ boolean htmlFacetsElementsPresents = captionHtmlElementsPresents || headerHtmlElementsPresents || footerHtmlElementsPresents;
+ boolean htmlFacetsElementsRendered = false;
+ if (htmlFacetsElementsPresents) {
+ childrenCount++;
+ }
int rowCount = (childrenCount + tableSize - 1) / tableSize;
nsIDOMElement visualHead = null;
@@ -275,8 +293,7 @@
visualCaption = visualDocument
.createElement(HTML.TAG_CAPTION);
visualTable.appendChild(visualCaption);
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(
- visualCaption);
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(visualCaption);
childrenInfo.addSourceChild(caption);
creatorInfo.addChildrenInfo(childrenInfo);
if (captionClassExpr != null
@@ -317,8 +334,7 @@
for (int i = 0; i < rowCount; i++) {
int cci = 0; // index of column class. Reset on every new row.
- nsIDOMElement visualRow = visualDocument
- .createElement(HTML.TAG_TR);
+ nsIDOMElement visualRow = visualDocument.createElement(HTML.TAG_TR);
if (rowClasses.size() > 0) {
visualRow.setAttribute(HTML.ATTR_CLASS, rowClasses.get(rci)
.toString());
@@ -330,8 +346,7 @@
if (i*tableSize+j >= childrenCount) {
break;
}
- nsIDOMElement visualCell = visualDocument
- .createElement(HTML.TAG_TD);
+ nsIDOMElement visualCell = visualDocument.createElement(HTML.TAG_TD);
if (columnClasses.size() > 0) {
visualCell.setAttribute(HTML.ATTR_CLASS, columnClasses.get(
cci).toString());
@@ -340,27 +355,64 @@
cci = 0;
}
visualRow.appendChild(visualCell);
- int sourceIndex = tableSize * i + j;
- if (sourceIndex < childrenCount) {
- Node child = sourceChildren[sourceIndex];
- if (child != header && child != footer) {
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(
- visualCell);
- childrenInfo.addSourceChild(child);
- creatorInfo.addChildrenInfo(childrenInfo);
- }
- }
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3373
+ * Add odd facets elements to the first table cell
+ */
+ if (htmlFacetsElementsPresents && !htmlFacetsElementsRendered) {
+ VpeChildrenInfo childrenInfo = null;
+ if (captionHtmlElementsPresents) {
+ for (Node node : captionFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childrenInfo = new VpeChildrenInfo(visualCell);
+ childrenInfo.addSourceChild(node);
+ creatorInfo.addChildrenInfo(childrenInfo);
+ }
+ }
+ if (headerHtmlElementsPresents) {
+ for (Node node : headerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childrenInfo = new VpeChildrenInfo(visualCell);
+ childrenInfo.addSourceChild(node);
+ creatorInfo.addChildrenInfo(childrenInfo);
+ }
+ }
+ if (footerHtmlElementsPresents) {
+ for (Node node : footerFacetChildren.get(VisualDomUtil.FACET_HTML_TAGS)) {
+ childrenInfo = new VpeChildrenInfo(visualCell);
+ childrenInfo.addSourceChild(node);
+ creatorInfo.addChildrenInfo(childrenInfo);
+ }
+ }
+ htmlFacetsElementsRendered = true;
+ } else {
+
+ int sourceIndex = tableSize * i + j;
+ if (sourceIndex < childrenCount) {
+ /*
+ * https://jira.jboss.org/jira/browse/JBIDE-3373
+ * Correct index when odd facets elements presents
+ */
+ if (htmlFacetsElementsPresents) {
+ sourceIndex = sourceIndex-1;
+ }
+ Node child = sourceChildren[sourceIndex];
+ if (child != header && child != footer) {
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(visualCell);
+ childrenInfo.addSourceChild(child);
+ creatorInfo.addChildrenInfo(childrenInfo);
+ }
+ }
}
+ }
if (visualBody != null) {
visualBody.appendChild(visualRow);
} else {
visualTable.appendChild(visualRow);
}
}
- makeSpecial(header, visualHead, visualDocument, tableSize,
- creatorInfo, HTML.TAG_TH, headerClassExpr, pageContext);
- makeSpecial(footer, visualFoot, visualDocument, tableSize,
- creatorInfo, HTML.TAG_TD, footerClassExpr, pageContext);
+ makeSpecial(header, "header", visualHead, visualDocument, tableSize, //$NON-NLS-1$
+ creatorInfo, HTML.TAG_TH, headerClassExpr, pageContext);
+ makeSpecial(footer, "footer", visualFoot, visualDocument, tableSize, //$NON-NLS-1$
+ creatorInfo, HTML.TAG_TD, footerClassExpr, pageContext);
for (int i = 0; i < propertyCreators.size(); i++) {
VpeCreator creator = (VpeCreator) propertyCreators.get(i);
@@ -382,24 +434,25 @@
return creatorInfo;
}
- private void makeSpecial(Node header, nsIDOMElement visualHead,
+ private void makeSpecial(Node facet, String facetName, nsIDOMElement visualHead,
nsIDOMDocument visualDocument, int tableSize,
VpeCreatorInfo creatorInfo, String cellTag,
VpeExpression headerClassExpr, VpePageContext pageContext) throws VpeExpressionException {
- if (header != null && visualHead != null) {
+ if (facet != null && visualHead != null) {
nsIDOMElement visualRow = visualDocument.createElement(HTML.TAG_TR);
visualHead.appendChild(visualRow);
nsIDOMElement visualCell = visualDocument.createElement(cellTag);
visualCell.setAttribute(HTML.ATTR_COLSPAN, "" + tableSize); //$NON-NLS-1$
- if (headerClassExpr != null && header.getParentNode() != null) {
+ if (headerClassExpr != null && facet.getParentNode() != null) {
String headerClass = headerClassExpr.exec(pageContext,
- header.getParentNode()).stringValue();
+ facet.getParentNode()).stringValue();
visualCell.setAttribute(HTML.ATTR_CLASS, headerClass);
}
visualRow.appendChild(visualCell);
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(visualCell);
- childrenInfo.addSourceChild(header);
+ childrenInfo.addSourceChild(facet);
creatorInfo.addChildrenInfo(childrenInfo);
+ visualCell.setAttribute(VpeVisualDomBuilder.VPE_FACET, facetName);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SourceDomUtil.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -20,6 +20,7 @@
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public class SourceDomUtil {
private static final Set<String> templatesNamespacesWithRendered=new HashSet<String>();
@@ -91,4 +92,20 @@
}
return result;
}
+
+ public static Element getFacetByName(Element sourceElement, String facetName) {
+ Element facetElement = null;
+ NodeList children = sourceElement.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node node = children.item(i);
+ if ((facetName != null)
+ && (node instanceof Element)
+ && (node.getNodeName() != null)
+ && (node.getNodeName().indexOf(":facet") > 0) //$NON-NLS-1$
+ && (facetName.equalsIgnoreCase((((Element) node)).getAttribute("name")))) { //$NON-NLS-1$
+ facetElement = (Element) node;
+ }
+ }
+ return facetElement;
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java 2010-04-16 13:18:48 UTC (rev 21531)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VisualDomUtil.java 2010-04-16 13:57:04 UTC (rev 21532)
@@ -11,11 +11,16 @@
package org.jboss.tools.vpe.editor.util;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.eclipse.swt.graphics.Point;
+import org.jboss.tools.jst.web.tld.TaglibData;
+import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.mozilla.interfaces.nsIDOMDocument;
@@ -33,6 +38,7 @@
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
public class VisualDomUtil {
@@ -42,6 +48,10 @@
public static String RICH_FACES_URI = "http://richfaces.org/rich"; //$NON-NLS-1$
public static String A4J_URI = "http://richfaces.org/a4j"; //$NON-NLS-1$
public static String FACELETS_URI = "http://java.sun.com/jsf/facelets"; //$NON-NLS-1$
+
+ public static String FACET_JSF_TAG = "FACET-JSF-TAG"; //$NON-NLS-1$
+ public static String FACET_ODD_TAGS = "FACET-ODD-TAGS"; //$NON-NLS-1$
+ public static String FACET_HTML_TAGS = "FACET-HTML-TAGS"; //$NON-NLS-1$
private static final String ACCESSIBILITY_SERVICE_CONTRACT_ID = "@mozilla.org/accessibilityService;1"; //$NON-NLS-1$
// private static Reference<nsIAccessibilityService> accessibilityServiceCache = null;
@@ -381,4 +391,149 @@
}
return creationData;
}
+
+ /**
+ * Finds visual tag with 'VPE-FACET' attribute in it.
+ * Facet element should be rendered into this tag.
+ *
+ * @param facetsParentNode node for which its facet should be rendered.
+ * @param facetName facet's name to compare to 'VPE-FACET' attribute value.
+ * @return found visual tag or 'null' otherwise.
+ */
+ public static nsIDOMElement findVisualTagWithFacetAttribute(
+ nsIDOMNode facetsParentNode, String facetName) {
+
+ nsIDOMElement tagForFacet = null;
+ if (null != facetsParentNode) {
+ nsIDOMNodeList nodeList = facetsParentNode.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ nsIDOMElement element = null;
+ try {
+ element = (nsIDOMElement) nodeList.item(i).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ } catch (org.mozilla.xpcom.XPCOMException e) {
+ /*
+ * Cannot parse node to element, return null.
+ */
+ return null;
+ }
+ /*
+ * If current tag has 'VPE-FACET' attribute
+ * with the corresponding facet name.
+ * Then return this tag.
+ */
+ if (element.hasAttribute(VpeVisualDomBuilder.VPE_FACET)) {
+ String facetAttributeName = element.getAttribute(VpeVisualDomBuilder.VPE_FACET);
+ /*
+ * In some cases there could be several footer in one visual node.
+ * For instance, header and footer could be in single column cell.
+ * Thus VPE-FACET can contain several facet names
+ * separated by whitespace, i.e. "header footer".
+ */
+ if (facetAttributeName.indexOf(facetName) >= 0) {
+ return element;
+ }
+ }
+ /*
+ * Else search in children
+ */
+ tagForFacet = findVisualTagWithFacetAttribute(element, facetName);
+ /*
+ * When tag is found in children it will be returned
+ */
+ if (null != tagForFacet) {
+ return tagForFacet;
+ }
+ }
+ }
+ /*
+ * If nothing matched return null
+ */
+ return tagForFacet;
+ }
+
+ /**
+ * Clarifies JSF facet element's children: JSF tags, other tags, HTML, text.
+ * (For JSF Facet cannot display more than one JSF component).
+ * Results are put into the map with keys:
+ * <P> 'FACET-JSF-TAG' - for suitable JSF element
+ * <P> 'FACET-ODD-TAGS' - for superfluous elements
+ * <P> 'FACET-HTML-TAG' - for HTML elements and plain text
+ *
+ * @param facet the facet
+ * @param pageContext the page context
+ * @return map with arranged elements or empty map if nothing was found.
+ */
+ public static Map<String, List<Node>> findFacetElements(Node facet, VpePageContext pageContext) {
+ Map<String, List<Node>> facetChildren = new HashMap<String, List<Node>>();
+ List<Node> jsfTag = new ArrayList<Node>(0);
+ List<Node> oddTags = new ArrayList<Node>(0);
+ List<Node> htmlTags = new ArrayList<Node>(0);
+ facetChildren.put(FACET_JSF_TAG, jsfTag);
+ facetChildren.put(FACET_ODD_TAGS, oddTags);
+ facetChildren.put(FACET_HTML_TAGS, htmlTags);
+ if (null != facet) {
+ NodeList children = facet.getChildNodes();
+ Node lastJSFComponent = null;
+ for (int i = 0; i < children.getLength() ; i++) {
+ Node child = children.item(i);
+ String sourcePrefix = child.getPrefix();
+ List<TaglibData> taglibs = XmlUtil.getTaglibsForNode(child,
+ pageContext);
+ TaglibData sourceNodeTaglib = XmlUtil.getTaglibForPrefix(
+ sourcePrefix, taglibs);
+ /*
+ * Here will be nodes with taglibs
+ * Plain html tags and text - will not.
+ */
+ if (null != sourceNodeTaglib) {
+ String sourceNodeUri = sourceNodeTaglib.getUri();
+ if ((JSF_CORE_URI.equalsIgnoreCase(sourceNodeUri)
+ || JSF_HTML_URI.equalsIgnoreCase(sourceNodeUri)
+ || RICH_FACES_URI.equalsIgnoreCase(sourceNodeUri)
+ || A4J_URI.equalsIgnoreCase(sourceNodeUri)
+ || FACELETS_URI.equalsIgnoreCase(sourceNodeUri))) {
+ /*
+ * Mark the correct jsf component
+ * and add it to the odd list for further correction.
+ */
+ lastJSFComponent = child;
+ oddTags.add(child);
+ } else {
+ /*
+ * All other tags: JSF, RF, FACELETS, A4J.
+ */
+ oddTags.add(child);
+ }
+ } else {
+ /*
+ * Plain html and text
+ */
+ if (child instanceof Text) {
+ /*
+ * For text nodes we should omit empty strings
+ */
+ Text textNode = (Text) child;
+ if (textNode.getNodeValue().trim().length() > 0) {
+ htmlTags.add(child);
+ }
+ } else {
+ /*
+ * If it is not text then it is normal html tag
+ */
+ htmlTags.add(child);
+ }
+ }
+ }
+ /*
+ * Fill the correct JSF component:
+ * remove it from the odd list and add to the jsf list.
+ */
+ if (null != lastJSFComponent) {
+ oddTags.remove(lastJSFComponent);
+ jsfTag.add(lastJSFComponent);
+ }
+ }
+ return facetChildren;
+ }
+
}
14 years, 9 months
JBoss Tools SVN: r21531 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-04-16 09:18:48 -0400 (Fri, 16 Apr 2010)
New Revision: 21531
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added tests for disposing method validation.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2010-04-16 13:05:56 UTC (rev 21530)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIConstants.java 2010-04-16 13:18:48 UTC (rev 21531)
@@ -49,4 +49,6 @@
public String EJB_ANNOTATION_TYPE_NAME = "javax.ejb.EJB";
public String PERSISTENCE_CONTEXT_ANNOTATION_TYPE_NAME = "javax.persistence.PersistenceContext";
public String PERSISTENCE_UNIT_ANNOTATION_TYPE_NAME = "javax.persistence.PersistenceUnit";
+
+ public String DISPOSES_ANNOTATION_TYPE_NAME = "javax.enterprise.inject.Disposes";
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-04-16 13:05:56 UTC (rev 21530)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-04-16 13:18:48 UTC (rev 21531)
@@ -36,12 +36,15 @@
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IBeanMethod;
import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IDecorator;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointField;
import org.jboss.tools.cdi.core.IInterceptor;
import org.jboss.tools.cdi.core.IParametedType;
+import org.jboss.tools.cdi.core.IParameter;
import org.jboss.tools.cdi.core.IProducer;
import org.jboss.tools.cdi.core.IProducerField;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
@@ -288,9 +291,39 @@
validateDecorator((IDecorator)bean);
}
+ if(bean instanceof IClassBean) {
+ validateClassBean((IClassBean)bean);
+ }
+
// TODO
}
+ private void validateClassBean(IClassBean bean) {
+ Set<IBeanMethod> disposers = bean.getDisposers();
+ /*
+ * 3.3.6. Declaring a disposer method
+ * - method has more than one parameter annotated @Disposes
+ */
+ for (IBeanMethod dssposer : disposers) {
+ List<IParameter> params = dssposer.getParameters();
+ if(params.size()<2) {
+ continue;
+ }
+ Set<IAnnotationDeclaration> declarations = new HashSet<IAnnotationDeclaration>();
+ for (IParameter param : params) {
+ IAnnotationDeclaration declaration = param.getAnnotation(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
+ if(declaration!=null) {
+ declarations.add(declaration);
+ }
+ }
+ if(declarations.size()>1) {
+ for (IAnnotationDeclaration declaration : declarations) {
+ addError(CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, CDIPreferences.MULTIPLE_DISPOSING_PARAMETERS, declaration, bean.getResource());
+ }
+ }
+ }
+ }
+
private static final String[] RESOURCE_ANNOTATIONS = {CDIConstants.RESOURCE_ANNOTATION_TYPE_NAME, CDIConstants.WEB_SERVICE_REF_ANNOTATION_TYPE_NAME, CDIConstants.EJB_ANNOTATION_TYPE_NAME, CDIConstants.PERSISTENCE_CONTEXT_ANNOTATION_TYPE_NAME, CDIConstants.PERSISTENCE_UNIT_ANNOTATION_TYPE_NAME};
private void validateProducer(IProducer producer) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-04-16 13:05:56 UTC (rev 21530)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-04-16 13:18:48 UTC (rev 21531)
@@ -73,15 +73,15 @@
CDICorePlugin.PLUGIN_ID
);
-// private static SectionDescription SECTION_MEMBER = new SectionDescription(
-// CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_member,
-// new String[][]{
+ private static SectionDescription SECTION_MEMBER = new SectionDescription(
+ CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_member,
+ new String[][]{
// {CDIPreferences.PRODUCER_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerAnnotatedInject_label},
// {CDIPreferences.PRODUCER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerParameterIllegallyAnnotated_label},
// {CDIPreferences.OBSERVER_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerAnnotatedInject_label},
// {CDIPreferences.OBSERVER_PARAMETER_ILLEGALLY_ANNOTATED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerParameterIllegallyAnnotated_label},
// {CDIPreferences.ILLEGAL_PRODUCER_METHOD_IN_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalProducerMethodInSessionBean_label},
-// {CDIPreferences.MULTIPLE_DISPOSING_PARAMETERS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleDisposingParameters_label},
+ {CDIPreferences.MULTIPLE_DISPOSING_PARAMETERS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleDisposingParameters_label},
// {CDIPreferences.DISPOSER_ANNOTATED_INJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_disposerAnnotatedInject_label},
// {CDIPreferences.ILLEGAL_DISPOSER_IN_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalDisposerInSessionBean_label},
// {CDIPreferences.NO_PRODUCER_MATCHING_DISPOSER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_noProducerMatchingDisposer_label},
@@ -93,9 +93,9 @@
// {CDIPreferences.MULTIPLE_OBSERVING_PARAMETERS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleObservingParameters_label},
// {CDIPreferences.ILLEGAL_OBSERVER_IN_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalObserverInSessionBean_label},
// {CDIPreferences.ILLEGAL_CONDITIONAL_OBSERVER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalConditionalObserver_label},
-// },
-// CDICorePlugin.PLUGIN_ID
-// );
+ },
+ CDICorePlugin.PLUGIN_ID
+ );
// private static SectionDescription SECTION_INTERCEPTOR = new SectionDescription(
// CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_interceptor_and_decorator,
@@ -147,7 +147,7 @@
SECTION_NAME,
SECTION_TYPE,
SECTION_SCOPE,
-// SECTION_MEMBER,
+ SECTION_MEMBER,
// SECTION_INTERCEPTOR,
// SECTION_SPECIALIZATION,
SECTION_MISCELLANEOUS
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-04-16 13:05:56 UTC (rev 21530)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-04-16 13:18:48 UTC (rev 21531)
@@ -22,6 +22,8 @@
/**
* 2.7.1.3. Stereotype declares a non-empty @Named annotation (Non-Portable behavior)
+ *
+ * @throws Exception
*/
public void testNonEmptyNamedForStereotype() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java");
@@ -83,6 +85,8 @@
* - bean class or producer method or field specifies a @Typed annotation,
* and the value member specifies a class which does not correspond to a type
* in the unrestricted set of bean types of a bean
+ *
+ * @throws Exception
*/
public void testLegalTypesInTyped() throws Exception {
IFile petShopFile = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/PetShop.java");
@@ -93,6 +97,8 @@
/**
* 2.7.1.3. Stereotype declares any other qualifier annotation
+ *
+ * @throws Exception
*/
public void testAnnotatedStereotype() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java");
@@ -103,6 +109,8 @@
/**
* 2.7.1.3. Stereotype is annotated @Typed
+ *
+ * @throws Exception
*/
public void testTypedStereotype() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java");
@@ -114,6 +122,8 @@
/**
* 2.7.1.1. Declaring the default scope for a stereotype
* - stereotype declares more than one scope
+ *
+ * @throws Exception
*/
public void testStereotypeScope() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/tooManyScopes/StereotypeWithTooManyScopeTypes_Broken.java");
@@ -125,6 +135,8 @@
/**
* 2.4.3. Declaring the bean scope
* - bean class or producer method or field specifies multiple scope type annotations
+ *
+ * @throws Exception
*/
public void testMultipleBeanScope() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/scope/broken/tooManyScopes/BeanWithTooManyScopeTypes_Broken.java");
@@ -137,6 +149,8 @@
* 2.4.4. Default scope
* - bean does not explicitly declare a scope when there is no default scope
* (there are two different stereotypes declared by the bean that declare different default scopes)
+ *
+ * @throws Exception
*/
public void testBeanWithMultipleScopedStereotypes() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/scopeConflict/Scallop_Broken.java");
@@ -145,6 +159,17 @@
assertEquals("Scallop_Broken.java should has two error markers.", markerNumbers, 2);
}
+ /**
+ * 3.3.6. Declaring a disposer method
+ * - method has more than one parameter annotated @Disposes
+ *
+ * @throws Exception
+ */
+ public void testMultipleDisposeParameters() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/broken/multiParams/SpiderProducer_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, 30, 30);
+ }
+
public static int getMarkersNumber(IResource resource) {
return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
}
14 years, 9 months
JBoss Tools SVN: r21530 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-04-16 09:05:56 -0400 (Fri, 16 Apr 2010)
New Revision: 21530
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6188
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2010-04-16 13:01:56 UTC (rev 21529)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2010-04-16 13:05:56 UTC (rev 21530)
@@ -475,12 +475,7 @@
String entityFullyQualifiedName = ""; //$NON-NLS-1$
if (tb.getJavaElement() instanceof SourceType) {
SourceType sourceT = (SourceType)tb.getJavaElement();
- try {
- entityFullyQualifiedName = sourceT.getFullyQualifiedParameterizedName();
- }
- catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage("JavaModelException: ", e); //$NON-NLS-1$
- }
+ entityFullyQualifiedName = sourceT.getFullyQualifiedName();
entityInfo.addDependency(entityFullyQualifiedName);
Iterator<String> itVarNames = list.iterator();
while (itVarNames.hasNext()) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2010-04-16 13:01:56 UTC (rev 21529)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2010-04-16 13:05:56 UTC (rev 21530)
@@ -177,6 +177,7 @@
if (pc instanceof RootClass && pc.getDiscriminator() == null){
SimpleValue discr = new SimpleValue();
discr.setTypeName("string"); //$NON-NLS-1$
+ discr.addColumn(new Column("DISCR_COL")); //$NON-NLS-1$
((RootClass)pc).setDiscriminator(discr);
}
} else {
@@ -294,43 +295,48 @@
@Override
public boolean visit(CompilationUnit node) {
Assert.isNotNull(rootClass);
+ currentType = null;
return true;
}
@SuppressWarnings("unchecked")
public boolean visit(TypeDeclaration node) {
- currentType = node;
- if ("".equals(entityInfo.getPrimaryIdName())){ //$NON-NLS-1$
- //try to guess id
- FieldDeclaration[] fields = node.getFields();
- String firstFieldName = ""; //$NON-NLS-1$
- for (int i = 0; i < fields.length; i++) {
- Iterator<VariableDeclarationFragment> itFieldsNames = fields[i].fragments().iterator();
- while(itFieldsNames.hasNext()) {
- VariableDeclarationFragment variable = itFieldsNames.next();
- Type type = ((FieldDeclaration)variable.getParent()).getType();
- if ("id".equals(variable.getName().getIdentifier()) //$NON-NLS-1$
- && !type.isArrayType()
- && !Utils.isImplementInterface(new ITypeBinding[]{type.resolveBinding()}, Collection.class.getName())){
- entityInfo.setPrimaryIdName(variable.getName().getIdentifier());
- return true;
- } else if ("".equals(firstFieldName)//$NON-NLS-1$
- && !type.isArrayType()
- && !Utils.isImplementInterface(
- new ITypeBinding[]{type.resolveBinding()}, Collection.class.getName())){
- //set first field as id
- firstFieldName = variable.getName().getIdentifier();
+ if (currentType == null){
+ currentType = node;
+ if ("".equals(entityInfo.getPrimaryIdName())){ //$NON-NLS-1$
+ //try to guess id
+ FieldDeclaration[] fields = node.getFields();
+ String firstFieldName = ""; //$NON-NLS-1$
+ for (int i = 0; i < fields.length; i++) {
+ Iterator<VariableDeclarationFragment> itFieldsNames = fields[i].fragments().iterator();
+ while(itFieldsNames.hasNext()) {
+ VariableDeclarationFragment variable = itFieldsNames.next();
+ Type type = ((FieldDeclaration)variable.getParent()).getType();
+ if ("id".equals(variable.getName().getIdentifier()) //$NON-NLS-1$
+ && !type.isArrayType()
+ && !Utils.isImplementInterface(new ITypeBinding[]{type.resolveBinding()}, Collection.class.getName())){
+ entityInfo.setPrimaryIdName(variable.getName().getIdentifier());
+ return true;
+ } else if ("".equals(firstFieldName)//$NON-NLS-1$
+ && !type.isArrayType()
+ && !Utils.isImplementInterface(
+ new ITypeBinding[]{type.resolveBinding()}, Collection.class.getName())){
+ //set first field as id
+ firstFieldName = variable.getName().getIdentifier();
+ }
}
}
+ entityInfo.setPrimaryIdName(firstFieldName);
}
- entityInfo.setPrimaryIdName(firstFieldName);
+ return true;
}
- return true;
+ //do not visit inner type
+ return false;
}
@Override
public void endVisit(TypeDeclaration node) {
- if (rootClass.getIdentifierProperty() == null){
+ if (currentType == node && rootClass.getIdentifierProperty() == null){
//root class should always has id
SimpleValue sValue = new SimpleValue();
sValue.addColumn(new Column("id".toUpperCase()));//$NON-NLS-1$
@@ -382,7 +388,7 @@
getterName2 = "is" + Character.toUpperCase(name.charAt(0)) + name.substring(1); //$NON-NLS-1$
}
boolean setterFound = false, getterFound = false;
- MethodDeclaration[] mds = currentType.getMethods();
+ MethodDeclaration[] mds = ((TypeDeclaration)((FieldDeclaration)var.getParent()).getParent()).getMethods();
for (MethodDeclaration methodDeclaration : mds) {
String methodName = methodDeclaration.getName().getIdentifier();
if (methodName.equals(setterName)) setterFound = true;
@@ -601,7 +607,7 @@
typeParameters.put(org.hibernate.type.EnumType.TYPE, java.sql.Types.VARCHAR);
((SimpleValue)value).setTypeParameters(typeParameters);
buildProperty(value);
- } else if (ref != null){
+ } else if (ref != null /*&& ref.fullyQualifiedName.indexOf('$') < 0*/){
ToOne sValue = null;
if (ref.refType == RefType.MANY2ONE){
sValue = new ManyToOne(rootClass.getTable());
@@ -618,12 +624,7 @@
sValue.addColumn(column);
sValue.setTypeName(tb.getBinaryName());
sValue.setFetchMode(FetchMode.JOIN);
- RootClass associatedClass = rootClasses.get(ref.fullyQualifiedName);
- if (associatedClass != null){
- sValue.setReferencedEntityName(associatedClass.getEntityName());
- } else {
- sValue.setReferencedPropertyName(ref.fullyQualifiedName);
- }
+ sValue.setReferencedEntityName(ref.fullyQualifiedName);
buildProperty(sValue);
prop.setCascade("none");//$NON-NLS-1$
} else {
14 years, 9 months
JBoss Tools SVN: r21529 - trunk/maven/docs/maven_reference_guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-16 09:01:56 -0400 (Fri, 16 Apr 2010)
New Revision: 21529
Modified:
trunk/maven/docs/maven_reference_guide/en-US/master.xml
trunk/maven/docs/maven_reference_guide/en-US/tasks.xml
Log:
JBDS-1121 Maven Integration Guide - more info and screens are added
Modified: trunk/maven/docs/maven_reference_guide/en-US/master.xml
===================================================================
--- trunk/maven/docs/maven_reference_guide/en-US/master.xml 2010-04-16 13:00:26 UTC (rev 21528)
+++ trunk/maven/docs/maven_reference_guide/en-US/master.xml 2010-04-16 13:01:56 UTC (rev 21529)
@@ -5,9 +5,11 @@
[<!ENTITY introduction SYSTEM "introduction.xml">
<!ENTITY tasks SYSTEM "tasks.xml">
+<!ENTITY references SYSTEM "references.xml">
<!ENTITY links SYSTEM "links.xml">
+
<!ENTITY seamlink "../../seam/html_single/index.html">
<!ENTITY aslink "../../as/html_single/index.html">
<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
@@ -51,5 +53,6 @@
<toc/>
&introduction;
&tasks;
+ &references;
&links;
</book>
Modified: trunk/maven/docs/maven_reference_guide/en-US/tasks.xml
===================================================================
--- trunk/maven/docs/maven_reference_guide/en-US/tasks.xml 2010-04-16 13:00:26 UTC (rev 21528)
+++ trunk/maven/docs/maven_reference_guide/en-US/tasks.xml 2010-04-16 13:01:56 UTC (rev 21529)
@@ -229,8 +229,10 @@
</mediaobject>
</figure>
</section>
- <section id="import_maven_project">
+ <section>
<title>Existing Maven Projects Import</title>
+ <section id="import_maven_project">
+ <title>Seam Projects Import</title>
<para>Maven Integration includes the Seam Maven configurator which is called when importing
a project, changing <emphasis>
<property>pom.xml</property></emphasis> and/or calling <emphasis>
@@ -254,29 +256,19 @@
<para>other required facets (Web Module, Java, JSF, etc.)</para>
</listitem>
</itemizedlist>
- <para>If the Seam version from <emphasis>
- <property>pom.xml</property></emphasis> matches a version of a Seam runtime
- configured in the workspace, Seam configurator will set that runtime, otherwise no Seam
- runtime will be set and you'll have to set it manually under Seam Settings in the
- project preferences.</para>
+ <para>The Maven Integration Tool will try to define Seam Runtime for the project. If it find that the version from pom.xml matches a version of a Seam runtime, a default runtime for the Seam facet exists or there is a non-default runtime matching the Seam facet then runtime will be set. Otherwise no any Seam runtime will be set and you need manually set it up.
+ </para>
<para>Seam configurator recognizes the Seam artifacts in the following way: the view folder
is a web content folder from the WAR project, the source folder is the first Eclipse
source folder. If there is a folder containing "hot" in the name, it will be
chosen as the action source folder. Package is the first package that has children or
doesn't have any subpackage. </para>
<para>Configuring the Seam when importing a Maven project as well as a Seam Runtime, Seam
- artifacts and some facets could be suspended in the JBoss Maven Integration preferences
+ artifacts and some facets could be suspended in the <link linkend="preferencespage">JBoss Maven Integration preferences</link>
(<emphasis>
<property>Window > Preferences > JBoss Tools > JBoss Maven
Integration</property></emphasis>).</para>
- <figure>
- <title>JBoss Maven Integration Preferences</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/create_mavenized_seam/configure_maven_integration.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+
+ </section>
</section>
</chapter>
14 years, 9 months
JBoss Tools SVN: r21528 - in trunk/maven/docs/maven_reference_guide/en-US: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-16 09:00:26 -0400 (Fri, 16 Apr 2010)
New Revision: 21528
Added:
trunk/maven/docs/maven_reference_guide/en-US/images/references/
trunk/maven/docs/maven_reference_guide/en-US/images/references/JBossMavenIntegrationFacet.png
trunk/maven/docs/maven_reference_guide/en-US/images/references/JBossMavenIntegrationPreferencePage.png
trunk/maven/docs/maven_reference_guide/en-US/references.xml
Log:
JBDS-1121 Maven Integration Guide - more info and screens are added
Added: trunk/maven/docs/maven_reference_guide/en-US/images/references/JBossMavenIntegrationFacet.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/references/JBossMavenIntegrationFacet.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/images/references/JBossMavenIntegrationPreferencePage.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/docs/maven_reference_guide/en-US/images/references/JBossMavenIntegrationPreferencePage.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/maven/docs/maven_reference_guide/en-US/references.xml
===================================================================
--- trunk/maven/docs/maven_reference_guide/en-US/references.xml (rev 0)
+++ trunk/maven/docs/maven_reference_guide/en-US/references.xml 2010-04-16 13:00:26 UTC (rev 21528)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="referencies">
+ <title>References</title>
+ <section>
+ <title>Jboss Maven Integration facet</title>
+ <para><property>Jboss Maven Integration</property> facet is a <property>Project Facet</property> which add <property>Maven</property> capabilities to the target project. This facet adds a <property>Maven</property> nature, builder and classpath container. Also <property>Maven Integration</property> facet can detect <property>EJB</property>, <property>WAR</property> or <property>EAR</property> facet and add corresponding maven plugins for them. Also <property>Maven Integration</property> facet provides the library providers. More about <property>Maven Integration</property> library providers you can read here.
+ <figure>
+ <title>JBoss Maven Integration facet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/references/JBossMavenIntegrationFacet.png"/>
+ </imageobject>
+
+ </mediaobject>
+ </figure>
+
+ </para>
+ </section>
+
+ <section id="preferencespage">
+ <title>JBoss Maven Integration preference page</title>
+ <para>To adjust <property>Maven</property> project import setting for <property>Jboss Tools</property> projects you need open <property>Preferences</property> dialog by clicking <emphasis><property>Window > Preferences</property></emphasis> and select <emphasis><property>JBoss Tools >Jboss Maven Integration</property></emphasis>. This page provides configuration for <property>Seam</property>, <property>JSF</property> and <property>Portlet</property> projects import.
+ </para>
+ <figure>
+ <title>JBoss Maven Integration preference page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/references/JBossMavenIntegrationPreferencePage.png"/>
+ </imageobject>
+
+ </mediaobject>
+ </figure>
+ <para>On the Jboss Maven Integration preferences page the following preferences are available:
+ </para>
+ <table>
+ <title>JBoss Maven Integration Preferences</title>
+ <tgroup cols="3">
+ <colspec colnum="1" align="left" colwidth="3*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <colspec colnum="3" align="left" colwidth="2*"/>
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ <entry>Default</entry>
+ </row>
+ </thead>
+
+
+ <tbody>
+ <row>
+ <entry><para>Configure Seam when importing Maven projects </para></entry>
+ <entry><para>If on,the Maven Integration Tool starts to check Seam dependencies and switch on the Seam Configurator for existing Maven projects import.</para>
+ </entry>
+ <entry><para>On</para></entry>
+ </row>
+ <row>
+ <entry><para>Configure Seam Runtime</para></entry>
+ <entry><para>If on, the Maven Integration Tool will try to define Seam Runtime basing on information from pom.xml and workspace configuration.</para></entry>
+ <entry><para>On</para></entry>
+ </row>
+ <row>
+ <entry><para>Configure Seam Artifacts(view folder, model source folder and package...)</para>
+
+ </entry>
+ <entry><para>If the option is checked, the Seam configurator will start to recognize Seam Artifacts during importing Seam Maven project.
+ </para>
+ </entry>
+ <entry><para>On</para>
+ </entry>
+ </row>
+ <row>
+ <entry><para>Configure JSF facet when importing Maven projects
+ </para></entry>
+ <entry><para>This option is switch on picking up JSF facet from a pom.xml
+ </para> </entry>
+ <entry><para>On</para>
+ </entry>
+ </row>
+ <row><entry><para>Configure JBoss Portlet Core when importing Maven projects
+ </para></entry>
+ <entry></entry>
+ <entry><para>On</para></entry>
+ </row>
+ <row>
+ <entry><para>Configure JBoss JSF Portlet facet when importing Maven projects
+ </para></entry>
+ <entry></entry>
+ <entry><para>On</para></entry>
+
+ </row>
+ <row>
+ <entry><para>Configure JBoss Seam Portlet facet when importing Maven projects
+ </para></entry>
+ <entry></entry>
+ <entry><para>Off</para>
+ </entry>
+
+ </row>
+
+
+
+
+ </tbody>
+ </tgroup>
+
+
+
+ </table>
+
+ </section>
+
+</chapter>
+
\ No newline at end of file
14 years, 9 months
JBoss Tools SVN: r21527 - in trunk/bpel/docs/reference: en-US and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-16 08:09:26 -0400 (Fri, 16 Apr 2010)
New Revision: 21527
Added:
trunk/bpel/docs/reference/en-US/
trunk/bpel/docs/reference/en-US/images/
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_1.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_2.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_3.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_4.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_5.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_6.png
trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_7.png
trunk/bpel/docs/reference/en-US/images/detail_createprocess_1.png
trunk/bpel/docs/reference/en-US/images/detail_createprocess_2.png
trunk/bpel/docs/reference/en-US/images/detail_createprocess_3.png
trunk/bpel/docs/reference/en-US/images/detail_createproject_1.png
trunk/bpel/docs/reference/en-US/images/detail_createproject_2.png
trunk/bpel/docs/reference/en-US/images/detail_createproject_3.png
trunk/bpel/docs/reference/en-US/images/detail_editprocess_1.png
trunk/bpel/docs/reference/en-US/images/detail_editprocess_2.png
trunk/bpel/docs/reference/en-US/images/detail_editprocess_3.png
trunk/bpel/docs/reference/en-US/images/detail_editprocess_4.png
trunk/bpel/docs/reference/en-US/images/detail_editprocess_5.png
trunk/bpel/docs/reference/en-US/master.xml
trunk/bpel/docs/reference/en-US/master_output.xml
trunk/bpel/docs/reference/en-US/modules/
trunk/bpel/docs/reference/en-US/modules/deploy.xml
trunk/bpel/docs/reference/en-US/modules/detail.xml
trunk/bpel/docs/reference/en-US/modules/install.xml
trunk/bpel/docs/reference/en-US/modules/overview.xml
Log:
TOOLSDOC-50 - Building docs with maven 3.0 - commiting a new folder en-US
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_6.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_7.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/deploy_createdeploy_7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_createprocess_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_createprocess_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_createprocess_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_createprocess_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_createprocess_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_createprocess_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_createproject_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_createproject_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_createproject_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_createproject_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_createproject_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_createproject_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_editprocess_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_editprocess_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_editprocess_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_editprocess_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_editprocess_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_editprocess_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_editprocess_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_editprocess_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/images/detail_editprocess_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/bpel/docs/reference/en-US/images/detail_editprocess_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bpel/docs/reference/en-US/master.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/master.xml (rev 0)
+++ trunk/bpel/docs/reference/en-US/master.xml 2010-04-16 12:09:26 UTC (rev 21527)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY overview SYSTEM "modules/overview.xml">
+<!ENTITY install SYSTEM "modules/install.xml">
+<!ENTITY detail SYSTEM "modules/detail.xml">
+<!ENTITY deploy SYSTEM "modules/deploy.xml">
+
+
+]>
+
+<book>
+
+ <bookinfo>
+ <title>JBoss BPEL User Guide</title>
+
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata format="PNG" fileref="images/jbosstools_logo.png" />
+ </imageobject>
+ <imageobject role="html">
+ <imagedata/>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author><firstname>Denny</firstname><surname>Xu</surname><email>dxu(a)redhat.com</email></author>
+ <author><firstname>Grid</firstname><surname>Qian</surname><email>fqian(a)redhat.com</email></author>
+ <copyright>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 1.0.0.trunk
+ </releaseinfo>
+<abstract>
+ <title/>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/bpel_ref_guide/pdf/B...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc/>
+ &overview;
+ &install;
+ &detail;
+ &deploy;
+</book>
Added: trunk/bpel/docs/reference/en-US/master_output.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/master_output.xml (rev 0)
+++ trunk/bpel/docs/reference/en-US/master_output.xml 2010-04-16 12:09:26 UTC (rev 21527)
@@ -0,0 +1,514 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY overview SYSTEM "modules/overview.xml">
+<!ENTITY install SYSTEM "modules/install.xml">
+<!ENTITY detail SYSTEM "modules/detail.xml">
+<!ENTITY deploy SYSTEM "modules/deploy.xml">
+
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JBoss BPEL User Guide</title>
+
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/jbosstools_logo.png" format="PNG"></imagedata>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata></imagedata>
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+ <author><firstname>Denny</firstname><surname>Xu</surname><email>dxu(a)redhat.com</email></author>
+ <author><firstname>Grid</firstname><surname>Qian</surname><email>fqian(a)redhat.com</email></author>
+ <copyright>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 1.0.0.trunk
+ </diffmk:wrapper></releaseinfo>
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/bpel_ref_guide/pdf/B...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="overview" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/bpel/docs/reference/en/modules/overview.xml">
+ <title>JBoss BPEL project Overview</title>
+
+ <para>JBoss BPEL project is a WS-BPEL 2.0 project that gives a way to create, edit, validate and deploy BPEL files to JBoss BPEL runtime. It is based on Eclipse
+ <ulink url="http://www.eclipse.org/bpel/">BPEL
+ project </ulink>. </para>
+
+ <para>It improves the Eclipse BPEL project in the following way: </para>
+ <itemizedlist>
+ <listitem><para> Implements close integration with JBoss BPEL runtime. Adds a new project type for the deployment to JBoss BPEL runtime.</para></listitem>
+ <listitem><para> Supports two ways of deployment: one way is to deploy a bpel project directly to JBoss BPEL runtime. The other way is to deploy bpel files in JBoss ESB project to JBoss BPEL runtime. </para></listitem>
+ <listitem><para> Improves the BPEL validator and increases Eclipse BPEL editor's quality. </para></listitem>
+ </itemizedlist>
+
+ <para>
+ <ulink url="http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html">WS-BPEL 2.0</ulink>
+ stands for Web Service Business Process Execution Language. Like EAI, BPEL is an XML-based language,
+ but BPEL is more specific and targeted. A programmer uses BPEL to join sometimes
+ disparate functions into an integrated process, resulting in a seamless use of the Internet to
+ conduct business transactions ranging from simple money exchanges to complex calculations and
+ asset reallocation.
+ </para>
+
+<section>
+ <title>Key Features of JBoss BPEL project</title>
+ <para>Let's start with looking through the table of the main features of JBoss BPEL editor project: </para>
+
+ <table>
+
+ <title>Key Functionality for JBoss BPEL editor project</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><para>WS-BPEL 2.0 support</para></entry>
+ <entry><para>JBoss BPEL project supports the newest WS-BPEL 2.0 specifications. </para></entry>
+ </row>
+ <row>
+ <entry><para>Close integration with JBoss BPEL runtime</para></entry>
+ <entry><para>There are two ways to deploy BPEL files to JBoss BPEL runtime.
+ The user can deploy a BPEL project as a whole and can deploy BPEL files in
+ JBoss ESB project to JBoss BPEL runtime. </para></entry>
+ </row>
+ <row>
+ <entry><para>BPEL file editor</para></entry>
+ <entry><para>The user can use the editor separately to edit a BPEL file. </para></entry>
+ </row>
+ <row>
+ <entry><para>BPEL file validator</para></entry>
+ <entry><para>The validator can give the error messages about BPEL files to the user. </para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+</section>
+
+</chapter>
+
+<chapter id="install" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/bpel/docs/reference/en/modules/install.xml">
+ <title>Installation JBoss BPEL Tools</title>
+ <section id="installeclipse">
+ <title>Installation JBoss BPEL editor</title>
+ <para>At first, you need Eclipse 3.5. You can get it from <ulink url="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downlo...">Eclipse Web Site</ulink>.
+ </para>
+ <para>The JBoss BPEL editor is included into JBoss Tools.
+ You have some methods to install JBoss Tools.
+ See <ulink url="http://www.jboss.org/tools/download/installation.html">Installing JBoss Tools</ulink> for more information.</para>
+ <para>If you want to install only the JBoss BPEL editor, you can install it from <ulink url="http://jboss.org/tools/download/dev.html">JBoss Tools</ulink> page separately.
+ Please, note, that only JBoss Tools 3.1 or higher version includes JBoss BPEL editor.
+ </para>
+ </section>
+ <section id="installRuntime">
+ <title>Installation JBoss BPEL Runtime</title>
+ <para>If you want to deploy a BPEL project to JBoss server,
+ you should download JBoss BPEL Runtime by yourself. The JBoss BPEL Runtime
+ is named RiftSaw. You can get it from <ulink url="http://jboss.org/riftsaw">JBoss RiftSaw page </ulink>.
+ </para>
+ </section>
+</chapter>
+
+<chapter id="detail" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/bpel/docs/reference/en/modules/detail.xml">
+ <title>Creating and editing a BPEL project</title>
+ <para>In the chapter we describe the necessary steps to create a new BPEL project and edit the BPEL files.
+ First of all, you should create a BPEL project.
+ </para>
+ <section id="createproject">
+ <title>Creating a BPEL project</title>
+ <para>Create the project by selecting
+ <emphasis><property moreinfo="none">New > Project... > BPEL 2.0 > BPEL Project</property></emphasis> from the menu bar.
+ Then click the <property moreinfo="none">Next</property> button.
+ </para>
+ <figure float="0">
+ <title>New BPEL Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On this page of the <property moreinfo="none">New BPEL Project Wizard</property> enter a project name in the <property moreinfo="none">Project Name</property>
+ field,e.g enter <property moreinfo="none">HelloWorld</property>.</para>
+
+ <figure float="0">
+ <title>New BPEL Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property moreinfo="none">Finish</property> button. So you have created the BPEL project named <property moreinfo="none">HelloWorld</property>. Its structure is like this: </para>
+ <figure float="0">
+ <title>The BPEL Project structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="createprocess">
+ <title>Creating a BPEL process</title>
+ <para>Now you should create a BPEL process. You can create it by selecting
+ <emphasis><property moreinfo="none">New > Others... > BPEL 2.0 > New BPEL Process File</property></emphasis>.
+ </para>
+ <figure float="0">
+ <title>New BPEL Process File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property moreinfo="none">Next</property> button. Enter the following information:</para>
+ <table>
+
+ <title>Fields and values</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+ <thead>
+ <row>
+ <entry>Field</entry>
+ <entry>Value</entry>
+
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><para>BPEL Process Name</para></entry>
+ <entry><para>enter a process name. For example, <property moreinfo="none">HelloWorld</property>.</para></entry>
+ </row>
+ <row>
+ <entry><para>Namespace</para></entry>
+ <entry><para>enter or select a namespace for the BPEL process.</para></entry>
+ </row>
+ <row>
+ <entry><para>Template</para></entry>
+ <entry><para>select a template for the BPEL process. When you select the template, you will see the information about the template below on the page.</para></entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <figure float="0">
+ <title>New BPEL Process File Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property moreinfo="none">Next</property> button. On the second page make sure that the folder <property moreinfo="none">HelloWorld/bpelContent</property> is selected.
+ Click <property moreinfo="none">Finish</property>.
+ </para>
+ <note>
+ <para>All of your files that are used in your BPEL project must be under the <property moreinfo="none">bpelContent</property> folder. Only in this case
+ these files can be deployed to JBoss server.
+ </para>
+ </note>
+
+ <para>Up to now, you have got a simple BPEL process as on the screen below.</para>
+ <figure float="0">
+ <title>A simple BPEL Process File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The next step, you can do is to edit the BPEL process file and then deploy it to JBoss server. </para>
+ </section>
+ <section id="editprocess">
+ <title>Editing a BPEL process file</title>
+ <para>If the <emphasis><property moreinfo="none">Properties view</property></emphasis> and <emphasis><property moreinfo="none">Palette view</property></emphasis> are not opened, you can open the views by right-clicking the BPEL editor and selecting
+ <property moreinfo="none">Show in Properties</property>, <property moreinfo="none">Show Palette in Palette view</property>. Then you should have the view like this:
+ </para>
+ <figure float="0">
+ <title>The BPEL editor view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the <emphasis><property moreinfo="none">Palette view</property></emphasis>, you can drag a BPEL element to the BPEL editor and drop it in the place you want.</para>
+ <para>In the <emphasis><property moreinfo="none">Properties view</property></emphasis>, you can get the information about every element of the BPEL process.
+ In the BPEL editor select any element you want,and then
+ the element's properties will be shown in the Properties view.The table below describes the tabs of the Properties view:
+ </para>
+ <table>
+
+ <title>Tabs of the Property view</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+ <thead>
+ <row>
+ <entry>Tab</entry>
+ <entry>Description</entry>
+
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><para>Description</para></entry>
+ <entry><para>Shows the descriptive information about the element,e.g. <property moreinfo="none">Name</property> of the element.</para></entry>
+ </row>
+ <row>
+ <entry><para>Details</para></entry>
+ <entry><para>Shows the detailed and important information about the element.
+ It is the most important section of an element.
+ Most of the properties of an element are set in this section.</para></entry>
+ </row>
+ <row>
+ <entry><para>Join Behavior</para></entry>
+ <entry><para>Shows the <property moreinfo="none">Join Failure</property> property of the element.</para></entry>
+ </row>
+ <row>
+ <entry><para>Documentation</para></entry>
+ <entry><para>Shows the <property moreinfo="none">documentation</property> sub-element of an element.</para></entry>
+ </row>
+ <row>
+ <entry><para>Other</para></entry>
+ <entry><para>Every BPEL element has its own sections: Correlation section, Message Exchange section, and so on. We will
+ introduce them while using them.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>In order to see how a simple BPEL process works in action, you should do some steps as below: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Add an <property moreinfo="none">Assign</property> element between the <property moreinfo="none">receiveInput</property> element and <property moreinfo="none">replyOutput</property> element.</para>
+ </listitem>
+ <listitem>
+ <para>Click the <property moreinfo="none">Assign</property> element in the BPEL editor in order to get the properties information of it in the Properties view.
+ </para>
+ </listitem>
+ <listitem>
+ <para>In the <property moreinfo="none">Details</property> section of Properties view, you should click the <property moreinfo="none">New</property> button to add a <property moreinfo="none">copy</property> sub-element to the element.
+ Assign "input->payload->input" to "output->payload->result". At this time, an "<property moreinfo="none">initializer</property>" popup dialog appears. Click on the <property moreinfo="none">Yes</property> button in the dialog.
+ </para>
+ <figure float="0">
+ <title>Add <property moreinfo="none">Assign</property> to the process</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Open the file "<property moreinfo="none">HelloWorldArtifacts.wsdl</property>" in the "<property moreinfo="none">HelloWorld</property>" project by double-clicking the file. Right-click the WSDL editor and select
+ <property moreinfo="none">Add Service</property>. A new service should appear in the editor. Name it <property moreinfo="none">HelloWorldProcessService</property>. It has the Port
+ named <property moreinfo="none">NewPort</property>. Select it, right-click on it and rename it to <property moreinfo="none">HelloWorldProcessPort</property> in the Properties
+ view.
+ </para>
+ <figure float="0">
+ <title>Add <property moreinfo="none">Service</property> to the WSDL file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Right-click somewhere in the whitespace of the WSDL editor and select
+ <property moreinfo="none">Add Binding</property>. A new Binding component will appear in the editor. Name it <property moreinfo="none">HelloWorldSOAPBinding</property>. Select it, in the
+ General tab of the Properties view and select <property moreinfo="none">HelloWorld</property> as a port type in the <property moreinfo="none">PortType</property>. Then click on the
+ <property moreinfo="none">Generate Binding Content...</property> button to open the <property moreinfo="none">Binding Wizard</property>. In the wizard, select <property moreinfo="none">SOAP </property>
+ as the <property moreinfo="none">Protocol</property>. Finally, click the <property moreinfo="none">Finish</property> button to close the wizard.
+ </para>
+ <figure float="0">
+ <title>Add a <property moreinfo="none">Binding</property> to the WSDL file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Click the <property moreinfo="none">HelloWorldProcessPort</property> property in the General section of the Properties view, select <property moreinfo="none">HelloWorldSOAPBinding</property> in
+ the <property moreinfo="none">Binding</property> combobox. In the <property moreinfo="none">Address</property> field input <ulink url="http://localhost:8080/bpel/processes/HelloWorld?wsdl">http://localhost:8080/bpel/processes/HelloWorld?wsdl</ulink>.
+ </para>
+ <figure float="0">
+ <title>Add the <property moreinfo="none">HelloWorldSOAPBinding</property> to the <property moreinfo="none">HelloWorldProcessPort</property></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>Now you have finished creating a simple BPEL process.As a next step, you can deploy the BPEL project to JBoss BPEL Runtime.</para>
+
+ </section>
+</chapter>
+
+
+<chapter id="deploy" xml:base="file:///home/vchukhutsina/repos/ochik_jboss/bpel/docs/reference/en/modules/deploy.xml">
+ <title>Deploy a JBoss BPEL project to JBoss BPEL Runtime</title>
+ <section id="createdeploy">
+ <title>Creating a bpel-deploy.xml file</title>
+ <para>If you want to deploy a BPEL project to JBoss BPEL Runtime, you should create a bpel-deploy.xml file.
+ JBoss tools can help you to create it:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Create the bpel-deploy.xml by selecting
+ <emphasis><property moreinfo="none">New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor</property></emphasis>. Click the <property moreinfo="none">Next</property> button.
+ </para>
+ <figure float="0">
+ <title>New BPEL Deploy file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>On the next wizard page you should enter the following information:</para>
+ <para><emphasis><property moreinfo="none">BPEL Project</property></emphasis>: Click the <property moreinfo="none">Browse...</property> button to select the BPEL project in your workspace which you want to deploy to the runtime.
+ Please note, that you should select the <property moreinfo="none">bpelContent</property> folder in your new BPEL project as a value of <property moreinfo="none">BPEL Project</property> field because the bpel-deploy.xml should be created in this place.
+ </para>
+ <para><emphasis><property moreinfo="none">File name</property></emphasis>: The default value is bpel-deploy.xml. Please, don't change it.</para>
+ <para>Click on <property moreinfo="none">Finish</property> button to close the wizard and a new bpel-deploy.xml file will be created.</para>
+ <figure float="0">
+ <title>New BPEL Deploy file Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Double-click the bpel-deploy.xml file to open it in ODE Descriptor Deployment Editor.
+ In the <property moreinfo="none">Inbound Interfaces</property> section, click the
+ <property moreinfo="none">Associated Port</property> column and select <property moreinfo="none">HelloWorldProcessPort</property>
+ in the dropdown box.The <property moreinfo="none">Related Service</property> and <property moreinfo="none">Binding Used</property>
+ columns should be automatically filled in. Save the <emphasis><property moreinfo="none">bpel-deploy.xml</property></emphasis>.
+ </para>
+ <figure float="0">
+ <title>bpel-deploy.xml file editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="createruntime">
+ <title>Creating JBoss BPEL Server</title>
+ <para>Suppose you have installed the <property moreinfo="none">JBoss BPEL Runtime-RiftSaw</property>, now you can create a server for JBoss BPEL runtime.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the <property moreinfo="none">Servers</property> view by selecting
+ <emphasis><property moreinfo="none">Windows > Show View > Other... > Server > Servers</property></emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Right-click the Servers view and select
+ <emphasis><property moreinfo="none">New > Server</property></emphasis> to open the New Server Wizard:
+ </para>
+ <figure float="0">
+ <title>New Server Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Select <property moreinfo="none">JBoss AS 5.1 </property>as a server type. </para>
+ <note>
+ <para>Please note, that only JBoss As 5.1 or higher version supports BPEL.</para>
+ </note>
+ </listitem>
+ <listitem>
+
+ <para>Click the <property moreinfo="none">Next</property> button. On the next page, you should input your <emphasis><property moreinfo="none">JBoss As</property></emphasis> location. Then click the <property moreinfo="none">Next</property> button and
+ you will get the page like this:
+ </para>
+ <figure float="0">
+ <title>Add resource to the server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Select <property moreinfo="none">HelloWorld</property>, then click the <property moreinfo="none">Add </property> button to add the project to the server.
+ Then click on the <property moreinfo="none">Finish</property> button.
+ </para>
+ <para>Start the server by right-clicking on the server and selecting the <property moreinfo="none">Start</property> item. </para>
+
+ <figure float="0">
+ <title>The started server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If some aspects of server creation is not clear, please, read <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/as/html_single/index...">JBoss Server Manager Reference Guide</ulink> for more details.</para>
+ </listitem>
+ <listitem>
+ <para>You can enter the link <ulink url="http://localhost:8080/bpel/processes.html">http://localhost:8080/bpel/processes.html</ulink> to the browser to get the deployed processes.</para>
+ <figure float="0">
+ <title>The BPEL console</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>If there's anything we didn't cover or you can't figure out,
+ please feel free to visit our
+ <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201"
+ >JBoss Tools Users Forum</ulink> to ask questions.
+ There we are also waiting for your suggestions and comments.</para>
+ </section>
+</chapter>
+</book>
Added: trunk/bpel/docs/reference/en-US/modules/deploy.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/deploy.xml (rev 0)
+++ trunk/bpel/docs/reference/en-US/modules/deploy.xml 2010-04-16 12:09:26 UTC (rev 21527)
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="deploy">
+ <title>Deploy a JBoss BPEL project to JBoss BPEL Runtime</title>
+ <section id="createdeploy">
+ <title>Creating a bpel-deploy.xml file</title>
+ <para>If you want to deploy a BPEL project to JBoss BPEL Runtime, you should create a bpel-deploy.xml file.
+ JBoss tools can help you to create it:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Create the bpel-deploy.xml by selecting
+ <emphasis><property>New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor</property></emphasis>. Click the <property>Next</property> button.
+ </para>
+ <figure>
+ <title>New BPEL Deploy file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>On the next wizard page you should enter the following information:</para>
+ <para><emphasis><property>BPEL Project</property></emphasis>: Click the <property>Browse...</property> button to select the BPEL project in your workspace which you want to deploy to the runtime.
+ Please note, that you should select the <property>bpelContent</property> folder in your new BPEL project as a value of <property>BPEL Project</property> field because the bpel-deploy.xml should be created in this place.
+ </para>
+ <para><emphasis><property>File name</property></emphasis>: The default value is bpel-deploy.xml. Please, don't change it.</para>
+ <para>Click on <property>Finish</property> button to close the wizard and a new bpel-deploy.xml file will be created.</para>
+ <figure>
+ <title>New BPEL Deploy file Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Double-click the bpel-deploy.xml file to open it in ODE Descriptor Deployment Editor.
+ In the <property>Inbound Interfaces</property> section, click the
+ <property>Associated Port</property> column and select <property>HelloWorldProcessPort</property>
+ in the dropdown box.The <property>Related Service</property> and <property>Binding Used</property>
+ columns should be automatically filled in. Save the <emphasis><property>bpel-deploy.xml</property></emphasis>.
+ </para>
+ <figure>
+ <title>bpel-deploy.xml file editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="createruntime">
+ <title>Creating JBoss BPEL Server</title>
+ <para>Suppose you have installed the <property>JBoss BPEL Runtime-RiftSaw</property>, now you can create a server for JBoss BPEL runtime.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the <property>Servers</property> view by selecting
+ <emphasis><property>Windows > Show View > Other... > Server > Servers</property></emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Right-click the Servers view and select
+ <emphasis><property>New > Server</property></emphasis> to open the New Server Wizard:
+ </para>
+ <figure>
+ <title>New Server Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Select <property>JBoss AS 5.1 </property>as a server type. </para>
+ <note>
+ <para>Please note, that only JBoss As 5.1 or higher version supports BPEL.</para>
+ </note>
+ </listitem>
+ <listitem>
+
+ <para>Click the <property>Next</property> button. On the next page, you should input your <emphasis><property>JBoss As</property></emphasis> location. Then click the <property>Next</property> button and
+ you will get the page like this:
+ </para>
+ <figure>
+ <title>Add resource to the server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Select <property>HelloWorld</property>, then click the <property>Add </property> button to add the project to the server.
+ Then click on the <property>Finish</property> button.
+ </para>
+ <para>Start the server by right-clicking on the server and selecting the <property>Start</property> item. </para>
+
+ <figure>
+ <title>The started server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If some aspects of server creation is not clear, please, read <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/as/html_single/index...">JBoss Server Manager Reference Guide</ulink> for more details.</para>
+ </listitem>
+ <listitem>
+ <para>You can enter the link <ulink url="http://localhost:8080/bpel/processes.html">http://localhost:8080/bpel/processes.html</ulink> to the browser to get the deployed processes.</para>
+ <figure>
+ <title>The BPEL console</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/deploy_createdeploy_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>If there's anything we didn't cover or you can't figure out, please feel free to visit our <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201"
+ >JBoss Tools Users Forum</ulink> to ask questions.
+ There we are also waiting for your suggestions and comments.</para>
+ </section>
+</chapter>
\ No newline at end of file
Added: trunk/bpel/docs/reference/en-US/modules/detail.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/detail.xml (rev 0)
+++ trunk/bpel/docs/reference/en-US/modules/detail.xml 2010-04-16 12:09:26 UTC (rev 21527)
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="detail">
+ <title>Creating and editing a BPEL project</title>
+ <para>In the chapter we describe the necessary steps to create a new BPEL project and edit the BPEL files.
+ First of all, you should create a BPEL project.
+ </para>
+ <section id="createproject">
+ <title>Creating a BPEL project</title>
+ <para>Create the project by selecting
+ <emphasis><property>New > Project... > BPEL 2.0 > BPEL Project</property></emphasis> from the menu bar.
+ Then click the <property>Next</property> button.
+ </para>
+ <figure>
+ <title>New BPEL Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On this page of the <property>New BPEL Project Wizard</property> enter a project name in the <property>Project Name</property>
+ field,e.g enter <property>HelloWorld</property>.</para>
+
+ <figure>
+ <title>New BPEL Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property>Finish</property> button. So you have created the BPEL project named <property>HelloWorld</property>. Its structure is like this: </para>
+ <figure>
+ <title>The BPEL Project structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createproject_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="createprocess">
+ <title>Creating a BPEL process</title>
+ <para>Now you should create a BPEL process. You can create it by selecting
+ <emphasis><property>New > Others... > BPEL 2.0 > New BPEL Process File</property></emphasis>.
+ </para>
+ <figure>
+ <title>New BPEL Process File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property>Next</property> button. Enter the following information:</para>
+ <table>
+
+ <title>Fields and values</title>
+ <tgroup cols="2">
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <thead>
+ <row>
+ <entry>Field</entry>
+ <entry>Value</entry>
+
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><para>BPEL Process Name</para></entry>
+ <entry><para>enter a process name. For example, <property>HelloWorld</property>.</para></entry>
+ </row>
+ <row>
+ <entry><para>Namespace</para></entry>
+ <entry><para>enter or select a namespace for the BPEL process.</para></entry>
+ </row>
+ <row>
+ <entry><para>Template</para></entry>
+ <entry><para>select a template for the BPEL process. When you select the template, you will see the information about the template below on the page.</para></entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <figure>
+ <title>New BPEL Process File Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click the <property>Next</property> button. On the second page make sure that the folder <property>HelloWorld/bpelContent</property> is selected.
+ Click <property>Finish</property>.
+ </para>
+ <note>
+ <para>All of your files that are used in your BPEL project must be under the <property>bpelContent</property> folder. Only in this case
+ these files can be deployed to JBoss server.
+ </para>
+ </note>
+
+ <para>Up to now, you have got a simple BPEL process as on the screen below.</para>
+ <figure>
+ <title>A simple BPEL Process File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_createprocess_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The next step, you can do is to edit the BPEL process file and then deploy it to JBoss server. </para>
+ </section>
+ <section id="editprocess">
+ <title>Editing a BPEL process file</title>
+ <para>If the <emphasis><property>Properties view</property></emphasis> and <emphasis><property>Palette view</property></emphasis> are not opened, you can open the views by right-clicking the BPEL editor and selecting
+ <property>Show in Properties</property>, <property>Show Palette in Palette view</property>. Then you should have the view like this:
+ </para>
+ <figure>
+ <title>The BPEL editor view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the <emphasis><property>Palette view</property></emphasis>, you can drag a BPEL element to the BPEL editor and drop it in the place you want.</para>
+ <para>In the <emphasis><property>Properties view</property></emphasis>, you can get the information about every element of the BPEL process.
+ In the BPEL editor select any element you want,and then
+ the element's properties will be shown in the Properties view.The table below describes the tabs of the Properties view:
+ </para>
+ <table>
+
+ <title>Tabs of the Property view</title>
+ <tgroup cols="2">
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <thead>
+ <row>
+ <entry>Tab</entry>
+ <entry>Description</entry>
+
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><para>Description</para></entry>
+ <entry><para>Shows the descriptive information about the element,e.g. <property>Name</property> of the element.</para></entry>
+ </row>
+ <row>
+ <entry><para>Details</para></entry>
+ <entry><para>Shows the detailed and important information about the element.
+ It is the most important section of an element.
+ Most of the properties of an element are set in this section.</para></entry>
+ </row>
+ <row>
+ <entry><para>Join Behavior</para></entry>
+ <entry><para>Shows the <property>Join Failure</property> property of the element.</para></entry>
+ </row>
+ <row>
+ <entry><para>Documentation</para></entry>
+ <entry><para>Shows the <property>documentation</property> sub-element of an element.</para></entry>
+ </row>
+ <row>
+ <entry><para>Other</para></entry>
+ <entry><para>Every BPEL element has its own sections: Correlation section, Message Exchange section, and so on. We will
+ introduce them while using them.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>In order to see how a simple BPEL process works in action, you should do some steps as below: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Add an <property>Assign</property> element between the <property>receiveInput</property> element and <property>replyOutput</property> element.</para>
+ </listitem>
+ <listitem>
+ <para>Click the <property>Assign</property> element in the BPEL editor in order to get the properties information of it in the Properties view.
+ </para>
+ </listitem>
+ <listitem>
+ <para>In the <property>Details</property> section of Properties view, you should click the <property>New</property> button to add a <property>copy</property> sub-element to the element.
+ Assign "input->payload->input" to "output->payload->result". At this time, an "<property>initializer</property>" popup dialog appears. Click on the <property>Yes</property> button in the dialog.
+ </para>
+ <figure>
+ <title>Add <property>Assign</property> to the process</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Open the file "<property>HelloWorldArtifacts.wsdl</property>" in the "<property>HelloWorld</property>" project by double-clicking the file. Right-click the WSDL editor and select
+ <property>Add Service</property>. A new service should appear in the editor. Name it <property>HelloWorldProcessService</property>. It has the Port
+ named <property>NewPort</property>. Select it, right-click on it and rename it to <property>HelloWorldProcessPort</property> in the Properties
+ view.
+ </para>
+ <figure>
+ <title>Add <property>Service</property> to the WSDL file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Right-click somewhere in the whitespace of the WSDL editor and select
+ <property>Add Binding</property>. A new Binding component will appear in the editor. Name it <property>HelloWorldSOAPBinding</property>. Select it, in the
+ General tab of the Properties view and select <property>HelloWorld</property> as a port type in the <property>PortType</property>. Then click on the
+ <property>Generate Binding Content...</property> button to open the <property>Binding Wizard</property>. In the wizard, select <property>SOAP </property>
+ as the <property>Protocol</property>. Finally, click the <property>Finish</property> button to close the wizard.
+ </para>
+ <figure>
+ <title>Add a <property>Binding</property> to the WSDL file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Click the <property>HelloWorldProcessPort</property> property in the General section of the Properties view, select <property>HelloWorldSOAPBinding</property> in
+ the <property>Binding</property> combobox. In the <property>Address</property> field input <ulink url="http://localhost:8080/bpel/processes/HelloWorld?wsdl">http://localhost:8080/bpel/processes/HelloWorld?wsdl</ulink>.
+ </para>
+ <figure>
+ <title>Add the <property>HelloWorldSOAPBinding</property> to the <property>HelloWorldProcessPort</property></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/detail_editprocess_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>Now you have finished creating a simple BPEL process.As a next step, you can deploy the BPEL project to JBoss BPEL Runtime.</para>
+
+ </section>
+</chapter>
Property changes on: trunk/bpel/docs/reference/en-US/modules/detail.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/bpel/docs/reference/en-US/modules/install.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/install.xml (rev 0)
+++ trunk/bpel/docs/reference/en-US/modules/install.xml 2010-04-16 12:09:26 UTC (rev 21527)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="install">
+ <title>Installation JBoss BPEL Tools</title>
+ <section id="installeclipse">
+ <title>Installation JBoss BPEL editor</title>
+ <para>At first, you need Eclipse 3.5. You can get it from <ulink url="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downlo...">Eclipse Web Site</ulink>.
+ </para>
+ <para>The JBoss BPEL editor is included into JBoss Tools.
+ You have some methods to install JBoss Tools.
+ See <ulink url="http://www.jboss.org/tools/download/installation.html">Installing JBoss Tools</ulink> for more information.</para>
+ <para>If you want to install only the JBoss BPEL editor, you can install it from <ulink url="http://jboss.org/tools/download/dev.html">JBoss Tools</ulink> page separately.
+ Please, note, that only JBoss Tools 3.1 or higher version includes JBoss BPEL editor.
+ </para>
+ </section>
+ <section id="installRuntime">
+ <title>Installation JBoss BPEL Runtime</title>
+ <para>If you want to deploy a BPEL project to JBoss server,
+ you should download JBoss BPEL Runtime by yourself. The JBoss BPEL Runtime
+ is named RiftSaw. You can get it from <ulink url="http://jboss.org/riftsaw">JBoss RiftSaw page </ulink>.
+ </para>
+ </section>
+</chapter>
\ No newline at end of file
Added: trunk/bpel/docs/reference/en-US/modules/overview.xml
===================================================================
--- trunk/bpel/docs/reference/en-US/modules/overview.xml (rev 0)
+++ trunk/bpel/docs/reference/en-US/modules/overview.xml 2010-04-16 12:09:26 UTC (rev 21527)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="overview">
+ <title>JBoss BPEL project Overview</title>
+
+ <para>JBoss BPEL project is a WS-BPEL 2.0 project that gives a way to create, edit, validate and deploy BPEL files to JBoss BPEL runtime. It is based on Eclipse
+ <ulink url="http://www.eclipse.org/bpel/">BPEL
+ project </ulink>. </para>
+
+ <para>It improves the Eclipse BPEL project in the following way: </para>
+ <itemizedlist>
+ <listitem><para> Implements close integration with JBoss BPEL runtime. Adds a new project type for the deployment to JBoss BPEL runtime.</para></listitem>
+ <listitem><para> Supports two ways of deployment: one way is to deploy a bpel project directly to JBoss BPEL runtime. The other way is to deploy bpel files in JBoss ESB project to JBoss BPEL runtime. </para></listitem>
+ <listitem><para> Improves the BPEL validator and increases Eclipse BPEL editor's quality. </para></listitem>
+ </itemizedlist>
+
+ <para>
+ <ulink url="http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html">WS-BPEL 2.0</ulink>
+ stands for Web Service Business Process Execution Language. Like EAI, BPEL is an XML-based language,
+ but BPEL is more specific and targeted. A programmer uses BPEL to join sometimes
+ disparate functions into an integrated process, resulting in a seamless use of the Internet to
+ conduct business transactions ranging from simple money exchanges to complex calculations and
+ asset reallocation.
+ </para>
+
+<section>
+ <title>Key Features of JBoss BPEL project</title>
+ <para>Let's start with looking through the table of the main features of JBoss BPEL editor project: </para>
+
+ <table>
+
+ <title>Key Functionality for JBoss BPEL editor project</title>
+ <tgroup cols="2">
+ <colspec colnum="1" align="left" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><para>WS-BPEL 2.0 support</para></entry>
+ <entry><para>JBoss BPEL project supports the newest WS-BPEL 2.0 specifications. </para></entry>
+ </row>
+ <row>
+ <entry><para>Close integration with JBoss BPEL runtime</para></entry>
+ <entry><para>There are two ways to deploy BPEL files to JBoss BPEL runtime.
+ The user can deploy a BPEL project as a whole and can deploy BPEL files in
+ JBoss ESB project to JBoss BPEL runtime. </para></entry>
+ </row>
+ <row>
+ <entry><para>BPEL file editor</para></entry>
+ <entry><para>The user can use the editor separately to edit a BPEL file. </para></entry>
+ </row>
+ <row>
+ <entry><para>BPEL file validator</para></entry>
+ <entry><para>The validator can give the error messages about BPEL files to the user. </para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+</section>
+
+</chapter>
\ No newline at end of file
Property changes on: trunk/bpel/docs/reference/en-US/modules/overview.xml
___________________________________________________________________
Name: svn:executable
+ *
14 years, 9 months
JBoss Tools SVN: r21526 - trunk/bpel/docs/reference.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-16 08:01:50 -0400 (Fri, 16 Apr 2010)
New Revision: 21526
Removed:
trunk/bpel/docs/reference/en/
Log:
TOOLSDOC-50 - Building docs with maven 3.0 - need to change the folder name to en-US as in other guides
14 years, 9 months
JBoss Tools SVN: r21525 - trunk/documentation/jboss-tools-docs/index.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-16 08:00:30 -0400 (Fri, 16 Apr 2010)
New Revision: 21525
Removed:
trunk/documentation/jboss-tools-docs/index/en/
Log:
TOOLSDOC-50 - Building docs with maven 3.0 - need to change the folder name to en-US as in other guides
14 years, 9 months
JBoss Tools SVN: r21524 - in trunk/documentation/jboss-tools-docs/index: en-US and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2010-04-16 07:53:21 -0400 (Fri, 16 Apr 2010)
New Revision: 21524
Added:
trunk/documentation/jboss-tools-docs/index/en-US/
trunk/documentation/jboss-tools-docs/index/en-US/images/
trunk/documentation/jboss-tools-docs/index/en-US/images/favicon.ico
trunk/documentation/jboss-tools-docs/index/en-US/master.xml
Log:
TOOLSDOC-50 - Building docs with maven 3.0 - commiting a new folder en-US
Added: trunk/documentation/jboss-tools-docs/index/en-US/images/favicon.ico
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/jboss-tools-docs/index/en-US/images/favicon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/jboss-tools-docs/index/en-US/master.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/index/en-US/master.xml (rev 0)
+++ trunk/documentation/jboss-tools-docs/index/en-US/master.xml 2010-04-16 11:53:21 UTC (rev 21524)
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd">
+<book>
+ <bookinfo>
+ <title>JBoss Tools Guides - Latest Version</title>
+ <pubdate>Last published: <?dbtimestamp format="B d, Y"?></pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2010</year>
+ <holder>JBoss by Red Hat</holder>
+ </copyright>
+ </bookinfo>
+ <index>
+ <title/>
+ <indexentry>
+ <primaryie>Getting Started with JBoss Developer Studio Guide <ulink
+ url="en/GettingStartedGuide/html/index.html">(html)</ulink>
+ <ulink url="en/GettingStartedGuide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/GettingStartedGuide/pdf/Getting_Started_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+ <indexentry>
+ <primaryie>Beginners Guide <ulink
+ url="en/beginners_guide/html/index.html">(html)</ulink>
+ <ulink url="en/beginners_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/beginners_guide/pdf/Beginners_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+ <indexentry>
+ <primaryie>Seam Dev Tools Reference Guide <ulink url="en/seam/html/index.html"
+ >(html)</ulink>
+ <ulink url="en/seam/html_single/index.html">(html single)</ulink>
+ <ulink url="en/seam/pdf/Seam_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Visual Web Tools Reference Guide <ulink url="en/jsf/html/index.html"
+ >(html)</ulink>
+ <ulink url="en/jsf/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jsf/pdf/Visual_Web_Tools_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>JBoss Server Manager Reference Guide <ulink url="en/as/html/index.html"
+ >(html)</ulink>
+ <ulink url="en/as/html_single/index.html">(html single)</ulink>
+ <ulink url="en/as/pdf/AS_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>jBPM Tools Reference Guide <ulink url="en/jboss_jbpm_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/jboss_jbpm_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jboss_jbpm_ref_guide/pdf/JBPM_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Hibernate Tools Reference Guide
+ <ulink url="en/hibernatetools/html/index.html">(html)</ulink>
+ <ulink url="en/hibernatetools/html_single/index.html">(html single)</ulink>
+ <ulink url="en/hibernatetools/pdf/Hibernatetools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>ESB Editor Reference Guide <ulink
+ url="en/esb_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/esb_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/esb_ref_guide/pdf/ESB_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>WS Reference Guide<ulink
+ url="en/ws_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/ws_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/ws_ref_guide/pdf/WS_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>JSF Tools Reference Guide <ulink
+ url="en/jsf_tools_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/jsf_tools_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jsf_tools_ref_guide/pdf/JSF_Tools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>JSF Tools Tutorial <ulink url="en/jsf_tools_tutorial/html/index.html"
+ >(html)</ulink>
+ <ulink url="en/jsf_tools_tutorial/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jsf_tools_tutorial/pdf/JSF_Tools_Tutorial.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Struts Tools Reference Guide <ulink
+ url="en/struts_tools_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/struts_tools_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/struts_tools_ref_guide/pdf/Struts_Tools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Struts Tools Tutorial <ulink
+ url="en/struts_tools_tutorial/html/index.html">(html)</ulink>
+ <ulink url="en/struts_tools_tutorial/html_single/index.html">(html single)</ulink>
+ <ulink url="en/struts_tools_tutorial/pdf/Struts_Tools_Tutorial.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>JBoss Portal Tools Reference Guide <ulink
+ url="en/jboss_portal_tools_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/jboss_portal_tools_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jboss_portal_tools_ref_guide/pdf/JBoss_Portal_Tools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+
+ <indexentry>
+ <primaryie>Birt Plugin Integration Reference Guide<ulink
+ url="en/jboss_birt_plugin_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/jboss_birt_plugin_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jboss_birt_plugin_ref_guide/pdf/Birt_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Drools Tools Reference Guide<ulink
+ url="en/drools_tools_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/drools_tools_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/drools_tools_ref_guide/pdf/Drools_Tools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Eclipse Guvnor Tools Reference Guide<ulink
+ url="en/guvnor_tools_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/guvnor_tools_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/guvnor_tools_ref_guide/pdf/Guvnor_Tools_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Exadel Studio Migration Guide <ulink
+ url="en/Exadel-migration/html/index.html">(html)</ulink>
+ <ulink url="en/Exadel-migration/html_single/index.html">(html single)</ulink>
+ <ulink url="en/Exadel-migration/pdf/Exadel_Studio_Migration_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Smooks Reference Guide<ulink
+ url="en/jboss_smooks_plugin_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/jboss_smooks_plugin_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jboss_smooks_plugin_ref_guide/pdf/Smooks_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>BPMN Convert Reference Guide <ulink
+ url="en/jboss_bpmn_convert_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/jboss_bpmn_convert_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jboss_bpmn_convert_ref_guide/pdf/Converter_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>JMX Reference Guide <ulink
+ url="en/jmx_ref_guide/html/index.html">(html)</ulink>
+ <ulink url="en/jmx_ref_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jmx_ref_guide/pdf/JMX_Tools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+
+ <indexentry>
+ <primaryie>JBoss BPEL User Guide<ulink
+ url="en/bpel_user_guide/html/index.html">(html)</ulink>
+ <ulink url="en/bpel_user_guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/bpel_user_guide/pdf/JBoss BPEL User Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ </index>
+</book>
14 years, 9 months