Author: dmaliarevich
Date: 2009-02-24 10:07:25 -0500 (Tue, 24 Feb 2009)
New Revision: 13765
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGrid.jsp.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
Log:
Superfluous table element was removed from VpePanelGrigCreator, junit was updated.
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGrid.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGrid.jsp.xml 2009-02-24
15:06:20 UTC (rev 13764)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/panelGrid.jsp.xml 2009-02-24
15:07:25 UTC (rev 13765)
@@ -1,40 +1,32 @@
<tests>
<test id="panelGrid">
- <TABLE>
- <TR>
- <TD>
- <DIV>
- <TABLE BORDER="0">
- <TBODY>
- <TR CLASS="oddRows">
- <TD>
- <SPAN> column 1 </SPAN>
- </TD>
- <TD>
- <SPAN> column 2 </SPAN>
- </TD>
- </TR>
- <TR CLASS="evenRows">
- <TD>
- <SPAN> 1 </SPAN>
- </TD>
- <TD>
- <SPAN> 2 </SPAN>
- </TD>
- </TR>
- <TR CLASS="oddRows">
- <TD>
- <SPAN> 3 </SPAN>
- </TD>
- <TD>
- <SPAN> 4 </SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </TD>
- </TR>
+ <TABLE BORDER="0">
+ <TBODY>
+ <TR CLASS="oddRows">
+ <TD>
+ <SPAN> column 1 </SPAN>
+ </TD>
+ <TD>
+ <SPAN> column 2 </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="evenRows">
+ <TD>
+ <SPAN> 1 </SPAN>
+ </TD>
+ <TD>
+ <SPAN> 2 </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="oddRows">
+ <TD>
+ <SPAN> 3 </SPAN>
+ </TD>
+ <TD>
+ <SPAN> 4 </SPAN>
+ </TD>
+ </TR>
+ </TBODY>
</TABLE>
</test>
</tests>
\ No newline at end of file
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 2009-02-24
15:06:20 UTC (rev 13764)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2009-02-24
15:07:25 UTC (rev 13765)
@@ -205,18 +205,8 @@
}
}
- nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- nsIDOMElement selectionTable = visualDocument.createElement(HTML.TAG_TABLE);
- nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
nsIDOMElement visualTable = visualDocument.createElement(HTML.TAG_TABLE);
-
- selectionTable.appendChild(tr);
- tr.appendChild(td);
- td.appendChild(div);
- div.appendChild(visualTable);
-
- VpeCreatorInfo creatorInfo = new VpeCreatorInfo(selectionTable);
+ VpeCreatorInfo creatorInfo = new VpeCreatorInfo(visualTable);
if (propertyCreators != null) {
for (int i = 0; i < propertyCreators.size(); i++) {
@@ -251,8 +241,10 @@
for (int i = 0; i < count; i++) {
Node node = children.item(i);
int type = node.getNodeType();
- if (type == Node.ELEMENT_NODE || type == Node.TEXT_NODE
- && node.getNodeValue().trim().length() > 0) {
+ if ((type == Node.ELEMENT_NODE)
+ || ((type == Node.TEXT_NODE) && (node != null)
+ && (node.getNodeValue() != null)
+ && (node.getNodeValue().trim().length() > 0))) {
switch (VpeCreatorUtil.getFacetType(node, pageContext)) {
case VpeCreatorUtil.FACET_TYPE_HEADER:
header = node;
Show replies by date