Author: dmaliarevich
Date: 2009-06-11 13:05:12 -0400 (Thu, 11 Jun 2009)
New Revision: 15888
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/page/page-basic.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/RichFacesLayoutPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4439, rich:layout was corrected, junits were
fixed.
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 2009-06-11
17:04:10 UTC (rev 15887)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfFacet.java 2009-06-11
17:05:12 UTC (rev 15888)
@@ -18,6 +18,7 @@
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;
@@ -30,12 +31,6 @@
*/
public class JsfFacet extends VpeAbstractTemplate {
- private static String JSF_CORE_URI = "http://java.sun.com/jsf/core";
//$NON-NLS-1$
- private static String JSF_HTML_URI = "http://java.sun.com/jsf/html";
//$NON-NLS-1$
- private static String RICH_FACES_URI = "http://richfaces.org/rich";
//$NON-NLS-1$
- private static String A4J_URI = "http://richfaces.org/a4j"; //$NON-NLS-1$
- private static String FACELETS_URI = "http://java.sun.com/jsf/facelets";
//$NON-NLS-1$
-
/*
* (non-Javadoc)
*
@@ -65,11 +60,11 @@
if (null != sourceNodeTaglib) {
String sourceNodeUri = sourceNodeTaglib.getUri();
if ((child.getNodeType() == Node.ELEMENT_NODE)
- && (JSF_CORE_URI.equalsIgnoreCase(sourceNodeUri)
- || JSF_HTML_URI.equalsIgnoreCase(sourceNodeUri)
- || RICH_FACES_URI.equalsIgnoreCase(sourceNodeUri)
- || A4J_URI.equalsIgnoreCase(sourceNodeUri)
- || FACELETS_URI.equalsIgnoreCase(sourceNodeUri))) {
+ && (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);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-basic.css
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-basic.css 2009-06-11
17:04:10 UTC (rev 15887)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-basic.css 2009-06-11
17:05:12 UTC (rev 15888)
@@ -34,7 +34,7 @@
.rich-page-body {
float: none;
width: auto;
- position: static;
+ /*position: static;*/
}
.rich-page-footer {
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 2009-06-11
17:04:10 UTC (rev 15887)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2009-06-11
17:05:12 UTC (rev 15888)
@@ -13,6 +13,7 @@
import java.io.File;
+import java.math.BigDecimal;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
@@ -938,4 +939,34 @@
}
return columnsWithFacet;
}
+
+ /**
+ * Parses string width value from 'px' into 'em'.
+ *
+ * @param widthAttribute width attribute value.
+ * @return width value in 'em' or -1 if the value wasn't parsed.
+ */
+ public static double parseWidth(String widthAttribute) {
+ double widthDouble = -1;
+ if (ComponentUtil.isNotBlank(widthAttribute)) {
+ try {
+ int widthInt = Integer.parseInt(widthAttribute);
+ /*
+ * Parse 'px' to 'em'.
+ */
+ widthDouble = widthInt / 13.33333;
+ /*
+ * Set Double fraction precision to 5 numbers.
+ */
+ BigDecimal b = new BigDecimal(widthDouble).setScale(5,
+ BigDecimal.ROUND_HALF_UP);
+ widthDouble = b.doubleValue();
+ } catch (NumberFormatException e) {
+ /*
+ * Do nothing, default width will be applied.
+ */
+ }
+ }
+ return widthDouble;
+ }
}
\ No newline at end of file
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java 2009-06-11
17:04:10 UTC (rev 15887)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java 2009-06-11
17:05:12 UTC (rev 15888)
@@ -13,9 +13,6 @@
public class RichFacesLayoutPanelTemplate extends VpeAbstractTemplate {
- private static final String FLOAT_LEFT_STYLE = ";float: left;"; //$NON-NLS-1$
- private static final String FLOAT_RIGHT_STYLE = ";float: right;";
//$NON-NLS-1$
-
/**
* Constructor
*/
@@ -29,23 +26,6 @@
Element sourceElement = (Element)sourceNode;
nsIDOMElement mainDiv = visualDocument.createElement(HTML.TAG_DIV);
String style = sourceElement.getAttribute(HTML.ATTR_STYLE);
- String width = sourceElement.getAttribute(HTML.ATTR_WIDTH);
- String position = sourceElement.getAttribute(RichFaces.ATTR_POSITION);
- if (ComponentUtil.isNotBlank(width)) {
- mainDiv.setAttribute(HTML.ATTR_WIDTH, width);
- style += ";width: " + width + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (RichFaces.VALUE_LEFT.equalsIgnoreCase(position)
- || RichFaces.VALUE_CENTER.equalsIgnoreCase(position)) {
- style += FLOAT_LEFT_STYLE;
- } else if (RichFaces.VALUE_RIGHT.equalsIgnoreCase(position)) {
- style += FLOAT_RIGHT_STYLE;
- } else if (RichFaces.VALUE_BOTTOM.equalsIgnoreCase(position)) {
- nsIDOMElement bottomDiv = visualDocument.createElement(HTML.TAG_DIV);
- bottomDiv.setAttribute(HTML.ATTR_STYLE, "display: block; height: 0; clear: both;
visibility: hidden;"); //$NON-NLS-1$
- bottomDiv.appendChild(visualDocument.createTextNode(".")); //$NON-NLS-1$
- mainDiv.appendChild(bottomDiv);
- }
if (ComponentUtil.isNotBlank(style)) {
mainDiv.setAttribute(HTML.ATTR_STYLE, style);
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java 2009-06-11
17:04:10 UTC (rev 15887)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java 2009-06-11
17:05:12 UTC (rev 15888)
@@ -1,17 +1,30 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.util.HashMap;
+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.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;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public class RichFacesLayoutTemplate extends VpeAbstractTemplate {
+ private static final String FLOAT_LEFT_STYLE = ";float: left;"; //$NON-NLS-1$
+ private static final String FLOAT_RIGHT_STYLE = ";float: right;";
//$NON-NLS-1$
+ private static final String BOTTOM_SECONDARY_DIV_STYLE = ";display: block; height:
0; clear: both; visibility: hidden;"; //$NON-NLS-1$
+ private static final String BOTTOM_SECONDARY_DIV_TEXT = "."; //$NON-NLS-1$
+ private static final String LAYOUT_PANEL_NAME = ":layoutPanel"; //$NON-NLS-1$
+
/**
* Constructor
*/
@@ -21,6 +34,7 @@
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
+
VpeCreationData creationData = null;
Element sourceElement = (Element)sourceNode;
nsIDOMElement mainDiv = visualDocument.createElement(HTML.TAG_DIV);
@@ -28,8 +42,116 @@
if (ComponentUtil.isNotBlank(style)) {
mainDiv.setAttribute(HTML.ATTR_STYLE, style);
}
+ nsIDOMElement topDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement centerDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement leftDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement rightDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement bottomDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement bottomSecondaryDiv = visualDocument.createElement(HTML.TAG_DIV);
creationData = new VpeCreationData(mainDiv);
+
+ bottomSecondaryDiv.setAttribute(HTML.ATTR_STYLE,
+ BOTTOM_SECONDARY_DIV_STYLE);
+ bottomSecondaryDiv.appendChild(visualDocument
+ .createTextNode(BOTTOM_SECONDARY_DIV_TEXT));
+ bottomDiv.appendChild(bottomSecondaryDiv);
+
+ NodeList children = sourceNode.getChildNodes();
+ Map<String, Element> panels = new HashMap<String, Element>();
+ for (int i = 0; i < children.getLength(); i++) {
+ Node node = children.item(i);
+ if (node instanceof Element && node.getNodeName() != null
+ && node.getNodeName().indexOf(LAYOUT_PANEL_NAME) > 0) {
+ Element element = (Element) node;
+ String position = element.getAttribute(RichFaces.ATTR_POSITION);
+ /*
+ * Adding several panel with the same position is forbidden.
+ * During adding to the map only the last panel
+ * with repeating position name will be displayed.
+ */
+ if (ComponentUtil.isNotBlank(position)) {
+ if (RichFaces.VALUE_TOP.equalsIgnoreCase(position)) {
+ panels.put(RichFaces.VALUE_TOP, element);
+ } else if (RichFaces.VALUE_LEFT.equalsIgnoreCase(position)) {
+ panels.put(RichFaces.VALUE_LEFT, element);
+ } else if (RichFaces.VALUE_CENTER.equalsIgnoreCase(position)) {
+ panels.put(RichFaces.VALUE_CENTER, element);
+ } else if (RichFaces.VALUE_RIGHT.equalsIgnoreCase(position)) {
+ panels.put(RichFaces.VALUE_RIGHT, element);
+ } else if (RichFaces.VALUE_BOTTOM.equalsIgnoreCase(position)) {
+ panels.put(RichFaces.VALUE_BOTTOM, element);
+ }
+ }
+ }
+ }
+
+ /*
+ * Adding panels' divs.
+ * Order is important!
+ */
+ int columsCount = 0;
+ if (null != panels.get(RichFaces.VALUE_LEFT)) {
+ columsCount++;
+ }
+ if (null != panels.get(RichFaces.VALUE_CENTER)) {
+ columsCount++;
+ }
+ if (null != panels.get(RichFaces.VALUE_RIGHT)) {
+ columsCount++;
+ }
+ addPanelFromMap(RichFaces.VALUE_TOP, panels, mainDiv, topDiv,
+ Constants.EMPTY, columsCount, creationData);
+ addPanelFromMap(RichFaces.VALUE_LEFT, panels, mainDiv, leftDiv,
+ FLOAT_LEFT_STYLE, columsCount, creationData);
+ addPanelFromMap(RichFaces.VALUE_CENTER, panels, mainDiv, centerDiv,
+ FLOAT_LEFT_STYLE, columsCount, creationData);
+ addPanelFromMap(RichFaces.VALUE_RIGHT, panels, mainDiv, rightDiv,
+ FLOAT_RIGHT_STYLE, columsCount, creationData);
+ addPanelFromMap(RichFaces.VALUE_BOTTOM, panels, mainDiv, bottomDiv,
+ Constants.EMPTY, columsCount, creationData);
return creationData;
}
+
+ private void addPanelFromMap(String panelPositionMapName, Map<String, Element>
panelsMap,
+ nsIDOMElement mainDiv, nsIDOMElement panelDiv, String style, int columsCount,
VpeCreationData creationData) {
+ Element panel = panelsMap.get(panelPositionMapName);
+ if (null != panel) {
+ String widthStr = panel.getAttribute(HTML.ATTR_WIDTH);
+ double width = 100;
+ switch (columsCount) {
+ case 0:
+ width = 100;
+ break;
+ case 1:
+ width = 100;
+ break;
+ case 2:
+ width = 50;
+ break;
+ case 3:
+ width = 32.34;
+ break;
+ default:
+ break;
+ }
+ /*
+ * Apply column width for left, center and right panels only.
+ * Top and bottom panels should always be 100% width.
+ */
+ if (!RichFaces.VALUE_TOP.equalsIgnoreCase(panelPositionMapName)
+ && !RichFaces.VALUE_BOTTOM.equalsIgnoreCase(panelPositionMapName)) {
+ style += "; width: " + width + "%;"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (ComponentUtil.isNotBlank(widthStr)) {
+ panelDiv.setAttribute(HTML.ATTR_WIDTH, widthStr);
+ }
+ panelDiv.setAttribute(HTML.ATTR_STYLE, style);
+ mainDiv.appendChild(panelDiv);
+ VpeChildrenInfo panelInfo = new VpeChildrenInfo(panelDiv);
+ panelInfo.addSourceChild(panel);
+ creationData.addChildrenInfo(panelInfo);
+ }
+ }
+
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java 2009-06-11
17:04:10 UTC (rev 15887)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java 2009-06-11
17:05:12 UTC (rev 15888)
@@ -1,7 +1,5 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
-import java.math.BigDecimal;
-
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -183,7 +181,7 @@
String sidebarStyle = Constants.EMPTY;
String pageMainDivStyle = Constants.EMPTY;
String pageBodyStyle = Constants.EMPTY;
- double widthDouble = parseWidth(attrs.getSidebarWidth());
+ double widthDouble = ComponentUtil.parseWidth(attrs.getSidebarWidth());
if (widthDouble != -1) {
sidebarStyle += Constants.WHITE_SPACE + "; width: " + widthDouble +
"em;"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -258,36 +256,6 @@
return creationData;
}
- /**
- * Parses string width value from 'px' into 'em'.
- *
- * @param widthAttribute width attribute value.
- * @return width value in 'em' or -1 if the value wasn't parsed.
- */
- private double parseWidth(String widthAttribute) {
- double widthDouble = -1;
- if (ComponentUtil.isNotBlank(widthAttribute)) {
- try {
- int widthInt = Integer.parseInt(widthAttribute);
- /*
- * Parse 'px' to 'em'.
- */
- widthDouble = widthInt / 13.33333;
- /*
- * Set Double fraction precision to 5 numbers.
- */
- BigDecimal b = new BigDecimal(widthDouble).setScale(5,
- BigDecimal.ROUND_HALF_UP);
- widthDouble = b.doubleValue();
- } catch (NumberFormatException e) {
- /*
- * Do nothing, default width will be applied.
- */
- }
- }
- return widthDouble;
- }
-
class Attributes {
/*
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml 2009-06-11
17:04:10 UTC (rev 15887)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithLayout.xhtml.xml 2009-06-11
17:05:12 UTC (rev 15888)
@@ -2,7 +2,7 @@
<test id="id1">
- <DIV CLASS="rich-page styleClass" STYLE="width: 800px;
background-color: white;">
+ <DIV CLASS="rich-page styleClass" STYLE="width: 1000px;
background-color: white;">
<DIV CLASS="rich-page-header headerClass">
<DIV CLASS="rich-page-header-content">
<SPAN STYLE="font-size: 2em;">
@@ -29,86 +29,193 @@
</SPAN>
</H1>
<DIV STYLE="border: 1px solid black;">
- <DIV WIDTH="100%" STYLE="width: 100%;">
- <SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+ </SPAN>
+ </DIV>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN CLASS="vpe-text">
- LEFT PANEL
- </SPAN>
+ <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+ </SPAN>
+ </DIV>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN STYLE="font-size: 2em;">
- CENTER PANEL
- </SPAN>
+ <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;" >
+ CENTER PANEL
+ </SPAN>
+ </DIV>
</DIV>
- <DIV>
+ <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
.
</DIV>
- <SPAN CLASS="vpe-text">
- BOTTOM PANEL
- </SPAN>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+ </SPAN>
+ </DIV>
</DIV>
</DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ SECOND PART
+ </SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="25%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="35%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
+ .
+ </DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
+ <SPAN CLASS="vpe-text">
+ THIRD PART
+ </SPAN>
+ </H1>
+ <DIV STYLE="border: 1px solid black;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="65%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="float: right; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
+ .
+ </DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
</DIV>
</DIV>
</DIV>
<DIV CLASS="rich-page-footer footerClass">
<DIV CLASS="rich-page-footer-content">
- <SPAN STYLE="font-size: 2em;">
+ <SPAN STYLE="font-size: 2em;" >
FOOTER
</SPAN>
</DIV>
</DIV>
</DIV>
+
</test>
-
+
<test id="id2">
<DIV STYLE="border: 1px solid black;" >
- <DIV WIDTH="100%" STYLE="width: 100%;">
- <SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL
+ </SPAN>
+ </DIV>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN CLASS="vpe-text">
- LEFT PANEL
- </SPAN>
+ <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL
+ </SPAN>
+ </DIV>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN STYLE="font-size: 2em;">
- CENTER PANEL
- </SPAN>
+ <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;" >
+ CENTER PANEL
+ </SPAN>
+ </DIV>
</DIV>
- <DIV>
+ <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV STYLE="">
<DIV STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
.
+ </DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL
+ </SPAN>
</DIV>
- <SPAN CLASS="vpe-text">
- BOTTOM PANEL
- </SPAN>
</DIV>
</DIV>
</test>
-
- <test id="id3">
- <DIV WIDTH="100%" STYLE="width: 100%;" >
- <SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
- </DIV>
- </test>
-
- <test id="id4">
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;" >
- <SPAN STYLE="font-size: 2em;">
- CENTER PANEL
- </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/page/pageWithNestedLayouts.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml.xml 2009-06-11
17:04:10 UTC (rev 15887)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/page/pageWithNestedLayouts.xhtml.xml 2009-06-11
17:05:12 UTC (rev 15888)
@@ -1,6 +1,7 @@
<tests>
<test id="id1">
- <DIV STYLE="width: 600px; background-color: white;" CLASS="rich-page
someClass">
+
+ <DIV CLASS="rich-page someClass" STYLE="width: 800px;
background-color: white;">
<DIV CLASS="rich-page-header">
<DIV CLASS="rich-page-header-content">
<SPAN STYLE="font-size: 2em;">
@@ -14,99 +15,143 @@
</SPAN>
</DIV>
<DIV CLASS="rich-page-content">
- <DIV CLASS="rich-page-sidebar">
+ <DIV CLASS="rich-page-sidebar" STYLE="width: 15em; float:
right;">
<SPAN STYLE="font-size: 2em;">
SIDEBAR
</SPAN>
</DIV>
- <DIV CLASS="rich-page-main">
- <DIV CLASS="rich-page-body">
+ <DIV CLASS="rich-page-main" STYLE="float: left; margin-right:
-30em;">
+ <DIV CLASS="rich-page-body" STYLE="margin-right: 15em;">
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
BODY START
</SPAN>
</H1>
- <DIV STYLE="border: 1px solid black; background-color: white;"
- >
- <DIV WIDTH="100%" STYLE="width: 100%;">
- <SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
+ <DIV STYLE="border: 1px solid black; background-color: lime;">
+ <DIV WIDTH="80em" STYLE="">
+ <DIV >
+ <SPAN CLASS="vpe-text">
+ TOP PANEL 11111
+ </SPAN>
+ </DIV>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN CLASS="vpe-text">
- LEFT PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <H1 STYLE="-moz-user-modify: read-write;">
+ <DIV WIDTH="40%" STYLE="float: left; width: 32.34%;">
+ <DIV>
<SPAN CLASS="vpe-text">
- CENTER PANEL 1
+ LEFT PANEL 11111
</SPAN>
- </H1>
- <DIV STYLE="border: 1px solid black;">
- <DIV WIDTH="100%" STYLE="width: 100%;">
+ </DIV>
+ </DIV>
+ <DIV WIDTH="30%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="25%" STYLE="width: 25%; float: left;">
- <SPAN CLASS="vpe-text">
- LEFT PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="75%" STYLE="width: 75%; float: left;">
- <H1 STYLE="-moz-user-modify: read-write;">
- <SPAN CLASS="vpe-text">
- CENTER PANEL 2
- </SPAN>
- </H1>
- <DIV STYLE="border: 1px solid black;">
- <DIV WIDTH="100%" STYLE="width: 100%;">
+ CENTER PANEL 11111
+ </SPAN>
+ </H1>
+ <!-- FIRST NESTED LAYOUT -->
+ <DIV STYLE="border: 1px solid black; background-color: green;"
>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
<SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
+ TOP PANEL 222222
+ </SPAN>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
+ </DIV>
+ <DIV WIDTH="15%" STYLE="float: left; width:
32.34%;">
+ <DIV >
<SPAN CLASS="vpe-text">
- LEFT PANEL
+ LEFT PANEL 222222
</SPAN>
+ <!-- SECOND NESTED LAYOUT -->
+ <DIV STYLE="border: 1px solid black; background-color:
aqua;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="15%" STYLE="float: left; width:
32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="75%" STYLE="float: left; width:
32.34%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="10%" STYLE="float: right; width:
32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
+ .
+ </DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN STYLE="font-size: 2em;">
- CENTER PANEL 3
+ </DIV>
+ <DIV WIDTH="75%" STYLE="float: left; width:
32.34%;">
+ <DIV >
+ <SPAN STYLE="font-size: 2em;" >
+ CENTER PANEL 222222
</SPAN>
</DIV>
+ </DIV>
+ <DIV WIDTH="10%" STYLE="float: right; width:
32.34%;">
<DIV>
- <DIV
- STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
- .
- </DIV>
<SPAN CLASS="vpe-text">
- BOTTOM PANEL
+ RIGHT PANEL 222222
</SPAN>
</DIV>
</DIV>
- </DIV>
- <DIV>
- <DIV
- STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
- .
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
+ .
+ </DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL 222222
+ </SPAN>
+ </DIV>
</DIV>
- <SPAN CLASS="vpe-text">
- BOTTOM PANEL
- </SPAN>
</DIV>
</DIV>
</DIV>
- <DIV>
+ <DIV WIDTH="40%" STYLE="float: right; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL 11111
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="300" STYLE="">
<DIV
STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
.
</DIV>
- <SPAN CLASS="vpe-text">
- BOTTOM PANEL
- </SPAN>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL 11111
+ </SPAN>
+ </DIV>
</DIV>
</DIV>
</DIV>
@@ -122,121 +167,98 @@
</DIV>
</test>
<test id="id2">
- <DIV STYLE="border: 1px solid black;">
- <DIV WIDTH="100%" STYLE="width: 100%;">
- <SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="25%" STYLE="width: 25%; float: left;">
- <SPAN CLASS="vpe-text">
- LEFT PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="75%" STYLE="width: 75%; float: left;">
+
+ <DIV >
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
- CENTER PANEL 2
- </SPAN>
+ CENTER PANEL 11111
+ </SPAN>
</H1>
- <DIV STYLE="border: 1px solid black;">
- <DIV WIDTH="100%" STYLE="width: 100%;">
- <SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN CLASS="vpe-text">
- LEFT PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN STYLE="font-size: 2em;">
- CENTER PANEL 3
- </SPAN>
- </DIV>
- <DIV>
- <DIV
- STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
- .
+ <!-- FIRST NESTED LAYOUT -->
+ <DIV STYLE="border: 1px solid black; background-color: green;" >
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL 222222
+ </SPAN>
</DIV>
- <SPAN CLASS="vpe-text">
- BOTTOM PANEL
- </SPAN>
</DIV>
- </DIV>
- </DIV>
- <DIV>
- <DIV STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
- .
- </DIV>
- <SPAN CLASS="vpe-text">
- BOTTOM PANEL
- </SPAN>
- </DIV>
- </DIV>
-</test>
- <test id="id3">
-
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;" >
- <H1 STYLE="-moz-user-modify: read-write;">
- <SPAN CLASS="vpe-text">
- CENTER PANEL 1
- </SPAN>
- </H1>
- <DIV STYLE="border: 1px solid black;" >
- <DIV WIDTH="100%" STYLE="width: 100%;">
- <SPAN CLASS="vpe-text">
- TOP PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="25%" STYLE="width: 25%; float: left;">
- <SPAN CLASS="vpe-text">
- LEFT PANEL
- </SPAN>
- </DIV>
- <DIV WIDTH="75%" STYLE="width: 75%; float: left;">
- <H1 STYLE="-moz-user-modify: read-write;">
- <SPAN CLASS="vpe-text">
- CENTER PANEL 2
- </SPAN>
- </H1>
- <DIV STYLE="border: 1px solid black;">
- <DIV WIDTH="100%" STYLE="width: 100%;">
+ <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
+ <DIV >
<SPAN CLASS="vpe-text">
- TOP PANEL
+ LEFT PANEL 222222
</SPAN>
+ <!-- SECOND NESTED LAYOUT -->
+ <DIV STYLE="border: 1px solid black; background-color: aqua;">
+ <DIV WIDTH="100%" STYLE="">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ TOP PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="15%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ LEFT PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
+ <DIV>
+ <SPAN STYLE="font-size: 2em;">
+ CENTER PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
+ .
+ </DIV>
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ BOTTOM PANEL 33333
+ </SPAN>
+ </DIV>
+ </DIV>
+ </DIV>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN CLASS="vpe-text">
- LEFT PANEL
+ </DIV>
+ <DIV WIDTH="75%" STYLE="float: left; width: 32.34%;">
+ <DIV >
+ <SPAN STYLE="font-size: 2em;" >
+ CENTER PANEL 222222
</SPAN>
</DIV>
- <DIV WIDTH="50%" STYLE="width: 50%; float: left;">
- <SPAN STYLE="font-size: 2em;">
- CENTER PANEL 3
+ </DIV>
+ <DIV WIDTH="10%" STYLE="float: right; width: 32.34%;">
+ <DIV>
+ <SPAN CLASS="vpe-text">
+ RIGHT PANEL 222222
</SPAN>
</DIV>
+ </DIV>
+ <DIV WIDTH="100%" STYLE="">
+ <DIV
+ STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
+ .
+ </DIV>
<DIV>
- <DIV
- STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
- .
- </DIV>
<SPAN CLASS="vpe-text">
- BOTTOM PANEL
+ BOTTOM PANEL 222222
</SPAN>
</DIV>
</DIV>
</DIV>
- <DIV>
- <DIV STYLE="display: block; height: 0pt; clear: both; visibility:
hidden;">
- .
- </DIV>
- <SPAN CLASS="vpe-text">
- BOTTOM PANEL
- </SPAN>
- </DIV>
</DIV>
- </DIV>
-</test>
+ </test>
+
</tests>
\ No newline at end of file