Author: yradtsevich
Date: 2008-11-25 14:27:13 -0500 (Tue, 25 Nov 2008)
New Revision: 12046
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/scrollableDataTable/scrollableDataTable.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
CODING IN PROGRESS - issue JBIDE-3204: rich:scrollableDataTable's bugs.
https://jira.jboss.org/jira/browse/JBIDE-3204
- Item #2 has been fixed: No one style or styleClass should be applyed for the footer and
header of scrollableDataTable as default.
- Item #4 has been fixed: columnClasses and rowClasses don't work at all (use
attachment file)
- some minor fixes of <rich:scrollableDataTable> template
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/scrollableDataTable/scrollableDataTable.css
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/scrollableDataTable/scrollableDataTable.css 2008-11-25
19:16:34 UTC (rev 12045)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/scrollableDataTable/scrollableDataTable.css 2008-11-25
19:27:13 UTC (rev 12046)
@@ -78,7 +78,7 @@
border-bottom: 1px solid;
border-color: #C4C0B9;
padding: 4px 4px 4px 4px;
- text-align: left;
+ text-align: center;
font-size: 11px;
color: #000000;
font-family: Arial, Verdana, sans-serif;
@@ -114,4 +114,8 @@
.dr-table-hidden {
overflow: hidden;
border: solid 1px #C4C0C9;
-}
\ No newline at end of file
+}
+
+.dr-sdt-hr {
+ background-color:#BED6F8;
+}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-11-25
19:16:34 UTC (rev 12045)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-11-25
19:27:13 UTC (rev 12046)
@@ -21,6 +21,7 @@
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.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -73,70 +74,38 @@
Element sourceElement = (Element) sourceNode;
- String width = sourceElement
- .getAttribute(HTML.ATTR_WIDTH);
- String height = sourceElement
- .getAttribute(HTML.ATTR_HEIGHT);
+ String width = sourceElement.getAttribute(HTML.ATTR_WIDTH);
+ if (width == null) {
+ width = DEFAULT_WIDTH;
+ } else {
+ width = VpeStyleUtil.addPxIfNecessary(width);
+ }
- // -----------CommonTable
- nsIDOMElement tableCommon = visualDocument
- .createElement(HTML.TAG_TABLE);
-
- VpeCreationData creationData = new VpeCreationData(tableCommon);
-
- nsIDOMElement tr1 = visualDocument
- .createElement(HTML.TAG_TR);
-
- nsIDOMElement tr2 = visualDocument
- .createElement(HTML.TAG_TR);
-
- tableCommon.appendChild(tr1);
- tableCommon.appendChild(tr2);
-
- // ---------tr2
- nsIDOMElement tr2_TD = visualDocument
- .createElement(HTML.TAG_TD);
- tr2.appendChild(tr2_TD);
-
- nsIDOMElement tr2_td_DIV = visualDocument
- .createElement(HTML.TAG_DIV);
- tr2_td_DIV.setAttribute(HTML.ATTR_STYLE,
- STYLE_FOR_LOW_SCROLL);
- tr2_TD.appendChild(tr2_td_DIV);
-
- // --------------------------------------------
-
- // ---------------------tr1------------------------
- nsIDOMElement tr1_TD1 = visualDocument
- .createElement(HTML.TAG_TD);
- tr1.appendChild(tr1_TD1);
-
- nsIDOMElement tr1_TD2 = visualDocument
- .createElement(HTML.TAG_TD);
- tr1.appendChild(tr1_TD2);
-
- nsIDOMElement tr1_td2_DIV = visualDocument
- .createElement(HTML.TAG_DIV);
- tr1_td2_DIV.setAttribute(HTML.ATTR_STYLE,
- STYLE_FOR_RIGHT_SCROLL);
- tr1_TD2.appendChild(tr1_td2_DIV);
-
- // -------------------------------------------------------
+ String height = sourceElement.getAttribute(HTML.ATTR_HEIGHT);
+ if (height == null) {
+ height = DEFAULT_HEIGHT;
+ } else {
+ height = VpeStyleUtil.addPxIfNecessary(height);
+ }
+
+
nsIDOMElement div = visualDocument
.createElement(HTML.TAG_DIV);
- tr1_TD1.appendChild(div);
+
div.setAttribute(HTML.ATTR_CLASS, "dr-table-hidden");
String divStyle = HTML.ATTR_WIDTH + " : "
- + (width == null ? DEFAULT_WIDTH : width) + ";"
+ + width + ";"
+ HTML.ATTR_HEIGHT + " : "
- + (height == null ? DEFAULT_HEIGHT : height) + ";";
+ + height +
+";overflow:auto;";
+VpeCreationData creationData = new VpeCreationData(div);
div.setAttribute(HTML.ATTR_STYLE, divStyle);
nsIDOMElement mainTable = visualDocument
.createElement(HTML.TAG_TABLE);
- ComponentUtil.copyAttributes(sourceNode, mainTable);
+
mainTable.removeAttribute(HTML.ATTR_HEIGHT);
nsIDOMElement mainTableWrapper = visualDocument.createElement(TAG_MAIN_TABLE_WRAPPER);
@@ -177,16 +146,14 @@
if (header != null) {
encodeTableHeaderOrFooterFacet(pageContext, creationData, thead,
columnsLength, visualDocument, header,
- "dr-table-header rich-table-header",
- "dr-table-header-continue rich-table-header-continue",
- "dr-table-headercell rich-table-headercell",
+ "", "", "",//JBIDE-3204 #2:No one style or styleClass
should be applyed for the footer and header of scrollableDataTable as default
headerClass, HTML.TAG_TD);
}
if (!columnsHeaders.isEmpty()) {
nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
thead.appendChild(tr);
String styleClass = encodeStyleClass(null,
- "dr-table-subheader rich-table-subheader", null,
+ "dr-table-subheader dr-sdt-hr", null,
headerClass);
if (styleClass != null) {
tr.setAttribute(HTML.ATTR_CLASS,
@@ -227,9 +194,7 @@
if (footer != null) {
encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot,
columnsLength, visualDocument, footer,
- "dr-table-footer rich-table-footer",
- "dr-table-footer-continue rich-table-footer-continue",
- "dr-table-footercell rich-table-footercell",
+ "", "", "",//JBIDE-3204 #2:No one style or styleClass
should be applyed for the footer and header of scrollableDataTable as default
footerClass, HTML.TAG_TD);
}
}
@@ -237,6 +202,7 @@
nsIDOMElement tbody = visualDocument
.createElement(HTML.TAG_TBODY);
mainTable.appendChild(tbody);
+ComponentUtil.copyAttributes(sourceNode, tbody);
for (int i = 0; i < NUM_ROW; i++) {
new RichFacesDataTableChildrenEncoder(creationData, visualDocument,
@@ -366,8 +332,8 @@
if (styleClass != null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
- String style = ComponentUtil.getHeaderBackgoundImgStyle();
- tr.setAttribute(HTML.ATTR_STYLE, style);
+// String style = ComponentUtil.getHeaderBackgoundImgStyle();
+// tr.setAttribute(HTML.ATTR_STYLE, style);
nsIDOMElement td = visualDocument.createElement(element);
tr.appendChild(td);
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml 2008-11-25
19:16:34 UTC (rev 12045)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml 2008-11-25
19:27:13 UTC (rev 12046)
@@ -12,7 +12,7 @@
<body>
<f:view>
<rich:scrollableDataTable id="scrollableDataTable" rowKeyVar="rkv"
frozenColCount="1"
- height="400px" width="700px" id="carList"
rows="40"
+ height="100" width="500" id="carList"
rows="40"
columnClasses="col" value="#{dataTableScrollerBean.allCars}"
var="category" sortMode="single"
binding="#{dataTableScrollerBean.table}"
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml 2008-11-25
19:16:34 UTC (rev 12045)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml 2008-11-25
19:27:13 UTC (rev 12046)
@@ -1,162 +1,218 @@
+
<tests>
<test id="scrollableDataTable">
- <TABLE>
- <TR>
- <TD>
- <DIV CLASS="dr-table-hidden" STYLE="width: 700px; height:
400px;">
- <TABLE WIDTH="700" ID="carList" ROWKEYVAR="rkv"
- FROZENCOLCOUNT="1" ROWS="40" COLUMNCLASSES="col"
- VALUE="#{dataTableScrollerBean.allCars}" VAR="category"
SORTMODE="single"
- BINDING="#{dataTableScrollerBean.table}"
SORTORDER="#{dataTableScrollerBean.order}"
- SELECTION="#{dataTableScrollerBean.selection}" CLASS="dr-table
rich-table">
- <COLGROUP SPAN="6">
- </COLGROUP>
- <THEAD>
- <TR CLASS="dr-table-subheader rich-table-subheader">
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN CLASS="headerText"> Make</SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN CLASS="headerText"> Model</SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN CLASS="headerText"> Price</SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN CLASS="headerText"> Mileage</SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN CLASS="headerText"> VIN</SPAN>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN CLASS="headerText"> Stock</SPAN>
- </TD>
- </TR>
- </THEAD>
- <TBODY>
- </TBODY>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD ID="make" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.make}</SPAN>
- </TD>
- <TD ID="model" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.model}</SPAN>
- </TD>
- <TD ID="price" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.price}</SPAN>
- </TD>
- <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.mileage}</SPAN>
- </TD>
- <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
- <SPAN> #{category.vin}</SPAN>
- </TD>
- <TD ID="stock" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.stock}</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD ID="make" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.make}</SPAN>
- </TD>
- <TD ID="model" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.model}</SPAN>
- </TD>
- <TD ID="price" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.price}</SPAN>
- </TD>
- <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.mileage}</SPAN>
- </TD>
- <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
- <SPAN> #{category.vin}</SPAN>
- </TD>
- <TD ID="stock" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.stock}</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD ID="make" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.make}</SPAN>
- </TD>
- <TD ID="model" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.model}</SPAN>
- </TD>
- <TD ID="price" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.price}</SPAN>
- </TD>
- <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.mileage}</SPAN>
- </TD>
- <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
- <SPAN> #{category.vin}</SPAN>
- </TD>
- <TD ID="stock" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.stock}</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD ID="make" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.make}</SPAN>
- </TD>
- <TD ID="model" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.model}</SPAN>
- </TD>
- <TD ID="price" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.price}</SPAN>
- </TD>
- <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.mileage}</SPAN>
- </TD>
- <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
- <SPAN> #{category.vin}</SPAN>
- </TD>
- <TD ID="stock" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.stock}</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD ID="make" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.make}</SPAN>
- </TD>
- <TD ID="model" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.model}</SPAN>
- </TD>
- <TD ID="price" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.price}</SPAN>
- </TD>
- <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.mileage}</SPAN>
- </TD>
- <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
- <SPAN> #{category.vin}</SPAN>
- </TD>
- <TD ID="stock" CLASS="dr-table-cell rich-table-cell
col">
- <SPAN> #{category.stock}</SPAN>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- </TD>
- <TD>
- <DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
- </DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
- </TD>
- </TR>
- <TR>
- <TD>
- <DIV STYLE="overflow: scroll; width: 100%; height: 17px;">
- </DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
- </TD>
- </TR>
- </TABLE>
+
+ <DIV CLASS="dr-table-hidden" STYLE="overflow: auto; width: 500px;
height: 100px;">
+ <TABLE CLASS="dr-table rich-table">
+ <COLGROUP SPAN="6">
+ </COLGROUP>
+ <THEAD>
+ <TR CLASS="dr-table-subheader dr-sdt-hr">
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText">
+ Make
+ </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText">
+ Model
+ </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText">
+ Price
+ </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText">
+ Mileage
+ </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText">
+ VIN
+ </SPAN>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN CLASS="headerText">
+ Stock
+ </SPAN>
+ </TD>
+ </TR>
+ </THEAD>
+ <TBODY HEIGHT="100" ID="carList" ROWKEYVAR="rkv"
+ FROZENCOLCOUNT="1" WIDTH="500" ROWS="40"
COLUMNCLASSES="col"
+ VALUE="#{dataTableScrollerBean.allCars}" VAR="category"
SORTMODE="single"
+ BINDING="#{dataTableScrollerBean.table}"
SORTORDER="#{dataTableScrollerBean.order}"
+ SELECTION="#{dataTableScrollerBean.selection}">
+ </TBODY>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.make}
+ </SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.model}
+ </SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.price}
+ </SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
+ <SPAN>
+ #{category.mileage}
+ </SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
+ <SPAN>
+ #{category.vin}
+ </SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.make}
+ </SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.model}
+ </SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.price}
+ </SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
+ <SPAN>
+ #{category.mileage}
+ </SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
+ <SPAN>
+ #{category.vin}
+ </SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.make}
+ </SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.model}
+ </SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.price}
+ </SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
+ <SPAN>
+ #{category.mileage}
+ </SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
+ <SPAN>
+ #{category.vin}
+ </SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.make}
+ </SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.model}
+ </SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.price}
+ </SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
+ <SPAN>
+ #{category.mileage}
+ </SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
+ <SPAN>
+ #{category.vin}
+ </SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.make}
+ </SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.model}
+ </SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.price}
+ </SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell
col">
+ <SPAN>
+ #{category.mileage}
+ </SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell
rich-table-cell col">
+ <SPAN>
+ #{category.vin}
+ </SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell col">
+ <SPAN>
+ #{category.stock}
+ </SPAN>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
</test>
</tests>
\ No newline at end of file
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-11-25
19:16:34 UTC (rev 12045)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-11-25
19:27:13 UTC (rev 12046)
@@ -725,4 +725,22 @@
}
}
+
+ /**
+ * If the {@code size} ends with a digit, adds {@code "px"} to it.
+ *
+ * @param size non-null value of a size attribute (e.g. {@code width}).
+ */
+ public static String addPxIfNecessary(final String size) {
+ final String trimmed = size.trim();
+ int length = trimmed.length();
+ if (length > 0) {
+ final char lastChar = trimmed.charAt(length - 1);
+ if (Character.isDigit(lastChar)) {
+ return trimmed + PX_STRING;
+ }
+ }
+
+ return size;
+ }
}
\ No newline at end of file