Author: yradtsevich
Date: 2008-11-24 02:49:04 -0500 (Mon, 24 Nov 2008)
New Revision: 11967
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/extendedDataTable/extendedDataTable.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
RESOLVED - issue JBIDE-2915: Bugs with <rich:extendedDataTable>.
https://jira.jboss.org/jira/browse/JBIDE-2915
- Item #2 has been fixed: "Columns, header and footer must have the same
widths"
- Item #3 has been fixed: "Default values of width and height attributes are too
large. These values must correspond to containing of cells."
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/extendedDataTable/extendedDataTable.css
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/extendedDataTable/extendedDataTable.css 2008-11-24
07:16:53 UTC (rev 11966)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/extendedDataTable/extendedDataTable.css 2008-11-24
07:49:04 UTC (rev 11967)
@@ -122,4 +122,8 @@
.dr-table-hidden {
overflow: hidden;
border: solid 1px #C4C0C9;
-}
\ No newline at end of file
+}
+
+.dr-body-table-tr td {
+ overflow:hidden;
+}
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 2008-11-24
07:16:53 UTC (rev 11966)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2008-11-24
07:49:04 UTC (rev 11967)
@@ -20,6 +20,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.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -34,430 +35,428 @@
*/
public class RichFacesExtendedDataTableTemplate extends VpeAbstractTemplate {
- private static final String PADDING_0PX = "padding: 0px;"; //$NON-NLS-1$
- private static final String RIGHT = "right"; //$NON-NLS-1$
- private static final String TOP = "top"; //$NON-NLS-1$
- private static final String VALUE = "100"; //$NON-NLS-1$
- private static final String _100 = "100%"; //$NON-NLS-1$
- private static final String _17PX = "17px"; //$NON-NLS-1$
- private static final String SCROLL_STYLE = "width: 17px; overflow : scroll;
height : 100%;"; //$NON-NLS-1$
- private static final String VERTICAL_ALIGN_MIDDLE =
"vertical-align:middle;"; //$NON-NLS-1$
- private static final String DISPLAY_NONE = "display : none"; //$NON-NLS-1$
- private static final String FILTER_BY = "filterBy"; //$NON-NLS-1$
- private static final String DIV_STYLE = "padding : 4px"; //$NON-NLS-1$
- private static final String EXTENDED_TABLE_INPUT = "extendedTable-input";
//$NON-NLS-1$
- private static final String INPUT_TYPE_ATTR = "text"; //$NON-NLS-1$
- private static final String FALSE = "false"; //$NON-NLS-1$
- private static final String SCOP = "scop"; //$NON-NLS-1$
- private static final String COL = "col"; //$NON-NLS-1$
- private static final String DR_TABLE_SUBFOOTERCELL_RICH_TABLE_SUBFOOTERCELL =
"dr-table-subfootercell rich-table-subfootercell"; //$NON-NLS-1$
- private static final String DR_TABLE_SUBFOOTER_RICH_TABLE_SUBFOOTER =
"dr-table-subfooter rich-table-subfooter"; //$NON-NLS-1$
- private static final String DR_TABLE_SUBHEADERCELL_RICH_TABLE_SUBHEADERCELL =
"dr-table-subheadercell rich-table-subheadercell"; //$NON-NLS-1$
- private static final String DR_TABLE_SUBHEADER_RICH_TABLE_SUBHEADER =
"dr-table-subheader rich-table-subheader"; //$NON-NLS-1$
- private static final String EMPTY = ""; //$NON-NLS-1$
- private static final String RICH_FACES_DATA_TABLE = "richFacesDataTable";
//$NON-NLS-1$
- private static final String EXTENDED_DATA_TABLE_CSS =
"extendedDataTable/extendedDataTable.css"; //$NON-NLS-1$
- private static final String SEMICOLON = ";"; //$NON-NLS-1$
- private static final String COLON = " : "; //$NON-NLS-1$
- private static final String COLUMN = "rich:column"; //$NON-NLS-1$
- final static String DEFAULT_HEIGHT = "500px"; //$NON-NLS-1$
- final static String HEADER = "header"; //$NON-NLS-1$
- final static String HEADER_CLASS = "headerClass"; //$NON-NLS-1$
- final static String FOOTER = "footer"; //$NON-NLS-1$
- final static String FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
- final static String CAPTION_CLASS = "captionClass"; //$NON-NLS-1$
- final static String CAPTION_STYLE = "captionStyle"; //$NON-NLS-1$
- final static String ATTR_SORTABLE = "sortable"; //$NON-NLS-1$
- final static String SPACE = " "; //$NON-NLS-1$
- final static String ZERRO = "0"; //$NON-NLS-1$
- final static String SORTABLE_PATH = "extendedDataTable/sortable.gif";
//$NON-NLS-1$
- final static String SORT_BY_ATTR = "sortBy"; //$NON-NLS-1$
- final static String COMMA = ","; //$NON-NLS-1$
+ private static final String PADDING_0PX = "padding: 0px;"; //$NON-NLS-1$
+ private static final String RIGHT = "right"; //$NON-NLS-1$
+ private static final String TOP = "top"; //$NON-NLS-1$
+ private static final String VALUE = "100"; //$NON-NLS-1$
+ private static final String _100 = "100%"; //$NON-NLS-1$
+ private static final String _17PX = "17px"; //$NON-NLS-1$
+ private static final String SCROLL_STYLE = "width: 17px; overflow : scroll; height
: 100%;"; //$NON-NLS-1$
+ private static final String VERTICAL_ALIGN_MIDDLE = "vertical-align:middle;";
//$NON-NLS-1$
+ private static final String DISPLAY_NONE = "display : none"; //$NON-NLS-1$
+ private static final String FILTER_BY = "filterBy"; //$NON-NLS-1$
+ private static final String DIV_STYLE = "padding : 4px"; //$NON-NLS-1$
+ private static final String EXTENDED_TABLE_INPUT = "extendedTable-input";
//$NON-NLS-1$
+ private static final String INPUT_TYPE_ATTR = "text"; //$NON-NLS-1$
+ private static final String FALSE = "false"; //$NON-NLS-1$
+ private static final String SCOP = "scop"; //$NON-NLS-1$
+ private static final String COL = "col"; //$NON-NLS-1$
+ private static final String DR_TABLE_SUBFOOTERCELL_RICH_TABLE_SUBFOOTERCELL =
"dr-table-subfootercell rich-table-subfootercell"; //$NON-NLS-1$
+ private static final String DR_TABLE_SUBFOOTER_RICH_TABLE_SUBFOOTER =
"dr-table-subfooter rich-table-subfooter"; //$NON-NLS-1$
+ private static final String DR_TABLE_SUBHEADERCELL_RICH_TABLE_SUBHEADERCELL =
"dr-table-subheadercell rich-table-subheadercell"; //$NON-NLS-1$
+ private static final String DR_TABLE_SUBHEADER_RICH_TABLE_SUBHEADER =
"dr-table-subheader rich-table-subheader"; //$NON-NLS-1$
+ private static final String DR_BODY_TABLE_TR = "dr-body-table-tr";
//$NON-NLS-1$
+ private static final String EMPTY = ""; //$NON-NLS-1$
+ private static final String RICH_FACES_DATA_TABLE = "richFacesDataTable";
//$NON-NLS-1$
+ private static final String EXTENDED_DATA_TABLE_CSS =
"extendedDataTable/extendedDataTable.css"; //$NON-NLS-1$
+ private static final String SEMICOLON = ";"; //$NON-NLS-1$
+ private static final String COLON = " : "; //$NON-NLS-1$
+ private static final String COLUMN = "rich:column"; //$NON-NLS-1$
+ final static String DEFAULT_HEIGHT = "500px"; //$NON-NLS-1$
+ final static String HEADER = "header"; //$NON-NLS-1$
+ final static String HEADER_CLASS = "headerClass"; //$NON-NLS-1$
+ final static String FOOTER = "footer"; //$NON-NLS-1$
+ final static String FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
+ final static String CAPTION_CLASS = "captionClass"; //$NON-NLS-1$
+ final static String CAPTION_STYLE = "captionStyle"; //$NON-NLS-1$
+ final static String ATTR_SORTABLE = "sortable"; //$NON-NLS-1$
+ final static String SPACE = " "; //$NON-NLS-1$
+ final static String ZERRO = "0"; //$NON-NLS-1$
+ final static String SORTABLE_PATH = "extendedDataTable/sortable.gif";
//$NON-NLS-1$
+ final static String SORT_BY_ATTR = "sortBy"; //$NON-NLS-1$
+ final static String COMMA = ","; //$NON-NLS-1$
- /**
- * Creates a node of the visual tree on the node of the source tree. This
- * visual node should not have the parent node This visual node can have
- * child nodes.
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceNode
- * The current node of the source tree.
- * @param visualDocument
- * 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) {
+ /**
+ * Creates a node of the visual tree on the node of the source tree. This
+ * visual node should not have the parent node This visual node can have
+ * child nodes.
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceNode
+ * The current node of the source tree.
+ * @param visualDocument
+ * 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) {
- Element sourceElement = (Element) sourceNode;
+ Element sourceElement = (Element) sourceNode;
- String width = ComponentUtil.getAttribute(sourceElement,
- HTML.ATTR_WIDTH);
- String height = ComponentUtil.getAttribute(sourceElement,
- HTML.ATTR_HEIGHT);
- String style = ComponentUtil.getAttribute(sourceElement,
- HTML.ATTR_STYLE);
- String styleCommonClass = ComponentUtil.getAttribute(sourceElement,
RichFaces.ATTR_STYLE_CLASS);
+ String width = ComponentUtil.getAttribute(sourceElement,
+ HTML.ATTR_WIDTH);
+ String height = ComponentUtil.getAttribute(sourceElement,
+ HTML.ATTR_HEIGHT);
+ String style = ComponentUtil.getAttribute(sourceElement,
+ HTML.ATTR_STYLE);
+ String styleCommonClass = ComponentUtil.getAttribute(sourceElement,
+ RichFaces.ATTR_STYLE_CLASS);
- ComponentUtil.setCSSLink(pageContext, EXTENDED_DATA_TABLE_CSS,
- RICH_FACES_DATA_TABLE);
+ ComponentUtil.setCSSLink(pageContext, EXTENDED_DATA_TABLE_CSS,
+ RICH_FACES_DATA_TABLE);
- nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- String divStyle = HTML.ATTR_WIDTH + COLON
- + (width.length() > 0 ? width: _100) + SEMICOLON
- + HTML.ATTR_HEIGHT + COLON
- + (height.length() > 0 ? height : DEFAULT_HEIGHT ) + SEMICOLON;
- div.setAttribute(HTML.ATTR_STYLE, divStyle);
-
- VpeCreationData vpeCreationData = new VpeCreationData(div);
+ final String commonTableHeight = height.length() > 0 ? height : DEFAULT_HEIGHT;
+ final String commonTableWidth = (width.length() > 0 ? width : _100);
- // -----------CommonTable
- nsIDOMElement tableCommon = visualDocument
- .createElement(HTML.TAG_TABLE);
- tableCommon.setAttribute(HTML.ATTR_BORDER, ZERRO);
- tableCommon.setAttribute(HTML.ATTR_CELLPADDING, ZERRO);
- tableCommon.setAttribute(HTML.ATTR_CELLSPACING, ZERRO);
- tableCommon.setAttribute(HTML.ATTR_WIDTH, _100);
- tableCommon.setAttribute(HTML.ATTR_HEIGHT, _100);
-
- div.appendChild(tableCommon);
+ // -----------CommonTable
+ nsIDOMElement tableCommon = visualDocument
+ .createElement(HTML.TAG_TABLE);
+ tableCommon.setAttribute(HTML.ATTR_BORDER, ZERRO);
+ tableCommon.setAttribute(HTML.ATTR_CELLPADDING, ZERRO);
+ tableCommon.setAttribute(HTML.ATTR_CELLSPACING, ZERRO);
+ tableCommon.setAttribute(HTML.ATTR_WIDTH, commonTableWidth);
+ tableCommon.setAttribute(HTML.ATTR_HEIGHT, commonTableHeight);
- ArrayList<Element> columns = getColumns(sourceNode);
- int columnsLength = columns.size();
+ VpeCreationData vpeCreationData = new VpeCreationData(tableCommon);
+ ArrayList<Element> columns = getColumns(sourceNode);
+ int columnsLength = columns.size();
- // Add colgroup
- nsIDOMElement colgroup = visualDocument
- .createElement(HTML.TAG_COLGROUP);
- tableCommon.appendChild(colgroup);
+ // Add colgroup
+ nsIDOMElement colgroup = visualDocument
+ .createElement(HTML.TAG_COLGROUP);
+ tableCommon.appendChild(colgroup);
- for (int i = 0; i < columnsLength; i++) {
- nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
- col.setAttribute(HTML.ATTR_WIDTH, VALUE);
- colgroup.appendChild(col);
- }
+ for (int i = 0; i < columnsLength; i++) {
+ nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
+ col.setAttribute(HTML.ATTR_WIDTH, VALUE);
+ colgroup.appendChild(col);
+ }
- // Add Head
- String headerClass = (String) sourceElement.getAttribute(HEADER_CLASS);
+ // Add Head
+ String headerClass = (String) sourceElement.getAttribute(HEADER_CLASS);
+ nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
+ tableCommon.appendChild(thead);
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement filterTR = visualDocument.createElement(HTML.TAG_TR);
+ thead.appendChild(tr);
+ thead.appendChild(filterTR);
+ String styleClass = RichFacesDataTableTemplate.encodeStyleClass(null,
+ DR_TABLE_SUBHEADER_RICH_TABLE_SUBHEADER, null, headerClass);
+ if (styleClass != null) {
+ tr.setAttribute(HTML.ATTR_CLASS, styleClass);
+ filterTR.setAttribute(HTML.ATTR_CLASS, styleClass);
+ }
+ encodeHeaderFacets(vpeCreationData, tr, filterTR, visualDocument,
+ columns,
+ DR_TABLE_SUBHEADERCELL_RICH_TABLE_SUBHEADERCELL, headerClass);
- nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
- ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, HEADER);
- tableCommon.appendChild(thead);
- nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
- nsIDOMElement filterTR = visualDocument.createElement(HTML.TAG_TR);
- thead.appendChild(tr);
- thead.appendChild(filterTR);
- String styleClass = RichFacesDataTableTemplate.encodeStyleClass(null,
- DR_TABLE_SUBHEADER_RICH_TABLE_SUBHEADER, null, headerClass);
- if (styleClass != null) {
- tr.setAttribute(HTML.ATTR_CLASS, styleClass);
- filterTR.setAttribute(HTML.ATTR_CLASS, styleClass);
- }
- encodeHeaderFacets(vpeCreationData, tr, filterTR, visualDocument,
- columnsHeaders,
- DR_TABLE_SUBHEADERCELL_RICH_TABLE_SUBHEADERCELL, headerClass);
- //
-
- // Add footer
- ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, FOOTER);
- nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
- tableCommon.appendChild(tfoot);
- String footerClass = (String) sourceElement.getAttribute(FOOTER_CLASS);
- nsIDOMElement tfootTR = visualDocument.createElement(HTML.TAG_TR);
- tfoot.appendChild(tfootTR);
- String styleFooterClass = RichFacesDataTableTemplate.encodeStyleClass(
- null, DR_TABLE_SUBFOOTER_RICH_TABLE_SUBFOOTER, null,
- footerClass);
- if (styleFooterClass != null) {
- tfootTR.setAttribute(HTML.ATTR_CLASS, styleFooterClass);
- }
- encodeFooterFacets(vpeCreationData, tfootTR, visualDocument,
- columnsFooters,
- DR_TABLE_SUBFOOTERCELL_RICH_TABLE_SUBFOOTERCELL,
- styleFooterClass);
+ // Add footer
+ nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
+ tableCommon.appendChild(tfoot);
+ String footerClass = (String) sourceElement.getAttribute(FOOTER_CLASS);
+ nsIDOMElement tfootTR = visualDocument.createElement(HTML.TAG_TR);
+ tfoot.appendChild(tfootTR);
+ String styleFooterClass = RichFacesDataTableTemplate.encodeStyleClass(
+ null, DR_TABLE_SUBFOOTER_RICH_TABLE_SUBFOOTER, null,
+ footerClass);
+ if (styleFooterClass != null) {
+ tfootTR.setAttribute(HTML.ATTR_CLASS, styleFooterClass);
+ }
+ encodeFooterFacets(vpeCreationData, tfootTR, visualDocument,
+ columns,
+ DR_TABLE_SUBFOOTERCELL_RICH_TABLE_SUBFOOTERCELL,
+ styleFooterClass);
- // Add tbody
- nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
- tableCommon.appendChild(tbody);
+ // Add tbody
+ nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
+ tableCommon.appendChild(tbody);
- nsIDOMElement bodyTR = visualDocument.createElement(HTML.TAG_TR);
- tbody.appendChild(bodyTR);
+ nsIDOMElement bodyTR = visualDocument.createElement(HTML.TAG_TR);
+ bodyTR.setAttribute(HTML.ATTR_HEIGHT, _100);
+ tbody.appendChild(bodyTR);
- nsIDOMElement bodyTD = visualDocument.createElement(HTML.TAG_TD);
- bodyTD.setAttribute(HTML.ATTR_COLSPAN, new Integer(columnsLength)
- .toString());
- bodyTD.setAttribute(HTML.ATTR_VALIGN, TOP);
- bodyTD.setAttribute(HTML.ATTR_STYLE, PADDING_0PX);
- bodyTR.appendChild(bodyTD);
+ nsIDOMElement bodyTD = visualDocument.createElement(HTML.TAG_TD);
+ bodyTD.setAttribute(HTML.ATTR_COLSPAN, Integer.toString(columnsLength)
+ .toString());
+ bodyTD.setAttribute(HTML.ATTR_VALIGN, TOP);
+ bodyTD.setAttribute(HTML.ATTR_STYLE, PADDING_0PX);
- // Add body Table
- String border = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_BORDER);
-
- nsIDOMElement bodyTable = visualDocument.createElement(HTML.TAG_TABLE);
- if (border.length() > 0)
- bodyTable.setAttribute(HTML.ATTR_BORDER, border);
- if (style.length() > 0) {
- bodyTable.setAttribute(HTML.ATTR_STYLE, style);
- }
- if (styleCommonClass.length()>0) {
- tableCommon.setAttribute(HTML.ATTR_CLASS, styleCommonClass);
- bodyTable.setAttribute(HTML.ATTR_CLASS, styleCommonClass);
- }
- bodyTable.setAttribute(HTML.ATTR_WIDTH, _100);
- bodyTable.setAttribute(HTML.ATTR_HEIGHT, _100);
- bodyTD.appendChild(bodyTable);
+ bodyTR.appendChild(bodyTD);
- nsIDOMElement bodyColgroup = visualDocument
- .createElement(HTML.TAG_COLGROUP);
- bodyTable.appendChild(bodyColgroup);
+ // Add body Table
+ String border = ComponentUtil.getAttribute(sourceElement,
+ HTML.ATTR_BORDER);
- for (int i = 0; i < columnsLength; i++) {
- nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
- col.setAttribute(HTML.ATTR_WIDTH, VALUE);
- bodyColgroup.appendChild(col);
- }
- nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
- bodyColgroup.appendChild(col);
+ nsIDOMElement bodyTable = visualDocument.createElement(HTML.TAG_TABLE);
+ if (border.length() > 0)
+ bodyTable.setAttribute(HTML.ATTR_BORDER, border);
+ if (style.length() > 0) {
+ bodyTable.setAttribute(HTML.ATTR_STYLE, style);
+ }
+ if (styleCommonClass.length() > 0) {
+ tableCommon.setAttribute(HTML.ATTR_CLASS, styleCommonClass);
+ bodyTable.setAttribute(HTML.ATTR_CLASS, styleCommonClass);
+ }
+ bodyTable.setAttribute(HTML.ATTR_WIDTH, _100);
+ bodyTD.appendChild(bodyTable);
- nsIDOMElement tableTbody = visualDocument.createElement(HTML.TAG_TBODY);
- bodyTable.appendChild(tableTbody);
+ nsIDOMElement bodyColgroup = visualDocument
+ .createElement(HTML.TAG_COLGROUP);
+ bodyTable.appendChild(bodyColgroup);
- nsIDOMElement tbodyTR = visualDocument.createElement(HTML.TAG_TR);
- // Add rowClasses attr
- String rowClasses = ComponentUtil.getAttribute(sourceElement,
RichFaces.ATTR_ROW_CLASSES);
- if (rowClasses.length() > 0) {
- String[] rowsClass = rowClasses.split(COMMA);
- if (rowsClass!=null && rowsClass.length > 0) {
- // Add first rowClass
- tbodyTR.setAttribute(HTML.ATTR_CLASS, rowsClass[0]);
- }
- }
-
- tableTbody.appendChild(tbodyTR);
- List<Node> children = ComponentUtil.getChildren(sourceElement);
- VpeChildrenInfo trInfo = new VpeChildrenInfo(tbodyTR);
- vpeCreationData.addChildrenInfo(trInfo);
+ for (int i = 0; i < columnsLength; i++) {
+ nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
+ col.setAttribute(HTML.ATTR_WIDTH, VALUE);
+ bodyColgroup.appendChild(col);
+ }
+ nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
+ bodyColgroup.appendChild(col);
- for (Node child : children) {
- if (child.getNodeName().equals(COLUMN)) {
- trInfo.addSourceChild(child);
- }
- }
+ nsIDOMElement tableTbody = visualDocument.createElement(HTML.TAG_TBODY);
+ bodyTable.appendChild(tableTbody);
- // Add scroll
- nsIDOMElement scrollTD = visualDocument.createElement(HTML.TAG_TD);
- scrollTD.setAttribute(HTML.ATTR_ALIGN, RIGHT);
- scrollTD.setAttribute(HTML.ATTR_WIDTH, _17PX);
- bodyTR.appendChild(scrollTD);
+ VisualDomUtil.setSubAttribute(tableCommon, HTML.TAG_STYLE,
HTML.STYLE_PARAMETER_TABLE_LAYOUT, HTML.STYLE_VALUE_FIXED);
+ VisualDomUtil.setSubAttribute(bodyTable, HTML.TAG_STYLE,
HTML.STYLE_PARAMETER_TABLE_LAYOUT, HTML.STYLE_VALUE_FIXED);
- nsIDOMElement scrollDiv = visualDocument.createElement(HTML.TAG_DIV);
- scrollDiv.setAttribute(HTML.ATTR_STYLE,
- SCROLL_STYLE);
- scrollTD.appendChild(scrollDiv);
+ nsIDOMElement tbodyTR = visualDocument.createElement(HTML.TAG_TR);
+ // Add rowClasses attr
+ String rowClasses = ComponentUtil.getAttribute(sourceElement,
+ RichFaces.ATTR_ROW_CLASSES);
+ String tbodyTRClass = DR_BODY_TABLE_TR;
+ if (rowClasses.length() > 0) {
+ String[] rowsClass = rowClasses.split(COMMA);
+ if (rowsClass != null && rowsClass.length > 0) {
+ // Add first rowClass
+ tbodyTRClass+= rowsClass[0];
+ }
+ }
+
+ tbodyTR.setAttribute(HTML.ATTR_CLASS, tbodyTRClass);
- return vpeCreationData;
- }
+ tableTbody.appendChild(tbodyTR);
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+ VpeChildrenInfo trInfo = new VpeChildrenInfo(tbodyTR);
+ vpeCreationData.addChildrenInfo(trInfo);
- /**
- *
- * @param sourceNode
- * @return
- */
- public ArrayList<Element> getColumns(Node sourceNode) {
- ArrayList<Element> columns = new ArrayList<Element>();
- NodeList list = sourceNode.getChildNodes();
- for (int i = 0; i < list.getLength(); i++) {
- Node node = list.item(i);
- if (node instanceof Element && node.getNodeName().equals(COLUMN)) {
- columns.add((Element) node);
- }
- }
- return columns;
- }
+ for (Node child : children) {
+ if (child.getNodeName().equals(COLUMN)) {
+ trInfo.addSourceChild(child);
+ }
+ }
- /**
- *
- * @param creationData
- * @param parentTr
- * @param visualDocument
- * @param footers
- * @param skinCellClass
- * @param footerClass
- */
- public static void encodeFooterFacets(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) {
+ // Add scroll
+ nsIDOMElement scrollTD = visualDocument.createElement(HTML.TAG_TD);
+ scrollTD.setAttribute(HTML.ATTR_ALIGN, RIGHT);
+ scrollTD.setAttribute(HTML.ATTR_WIDTH, _17PX);
+ bodyTR.appendChild(scrollTD);
- String columnHeaderClass = column.getAttribute(classAttribute);
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
- parentTr.appendChild(td);
- styleClass = RichFacesDataTableTemplate.encodeStyleClass(
- null, skinCellClass, footerClass, columnHeaderClass);
- td.setAttribute(HTML.ATTR_CLASS, styleClass);
- td.setAttribute(SCOP, COL);
- String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
- if (colspan != null && colspan.length() > 0) {
- td.setAttribute(HTML.ATTR_COLSPAN, colspan);
- }
- Element facetBody = ComponentUtil.getFacet(column, FOOTER);
+ nsIDOMElement scrollDiv = visualDocument.createElement(HTML.TAG_DIV);
+ scrollDiv.setAttribute(HTML.ATTR_STYLE, SCROLL_STYLE);
+ scrollTD.appendChild(scrollDiv);
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
+ return vpeCreationData;
}
-
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
- td.setAttribute(HTML.ATTR_CLASS, styleClass);
- td.appendChild(visualDocument.createTextNode(SPACE));
- parentTr.appendChild(td);
- }
- /**
- *
- * @param creationData
- * @param parentTr
- * @param filterTR
- * @param visualDocument
- * @param headers
- * @param skinCellClass
- * @param headerClass
- */
- public static void encodeHeaderFacets(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
- boolean existFilters = false;
- for (Element column : headers) {
- if (ComponentUtil.getAttribute(column, FILTER_BY).length() > 0) {
- existFilters = true;
- break;
- }
+ /**
+ *
+ * @param sourceNode
+ * @return
+ */
+ public ArrayList<Element> getColumns(Node sourceNode) {
+ ArrayList<Element> columns = new ArrayList<Element>();
+ NodeList list = sourceNode.getChildNodes();
+ for (int i = 0; i < list.getLength(); i++) {
+ Node node = list.item(i);
+ if (node instanceof Element && node.getNodeName().equals(COLUMN)) {
+ columns.add((Element) node);
+ }
+ }
+ return columns;
}
- // Not filters
- if (!existFilters) {
- filterTR.setAttribute(HTML.ATTR_STYLE, DISPLAY_NONE);
+ /**
+ *
+ * @param creationData
+ * @param parentTr
+ * @param visualDocument
+ * @param footers
+ * @param skinCellClass
+ * @param footerClass
+ */
+ public static void encodeFooterFacets(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) {
+
+ String columnHeaderClass = column.getAttribute(classAttribute);
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ parentTr.appendChild(td);
+ styleClass = RichFacesDataTableTemplate.encodeStyleClass(null,
+ skinCellClass, footerClass, columnHeaderClass);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.setAttribute(SCOP, COL);
+ String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
+ 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);
+ }
+
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.appendChild(visualDocument.createTextNode(SPACE));
+ parentTr.appendChild(td);
}
- for (Element column : headers) {
- String columnHeaderClass = column.getAttribute(classAttribute);
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TH);
+ /**
+ *
+ * @param creationData
+ * @param parentTr
+ * @param filterTR
+ * @param visualDocument
+ * @param headers
+ * @param skinCellClass
+ * @param headerClass
+ */
+ public static void encodeHeaderFacets(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
+ boolean existFilters = false;
+ for (Element column : headers) {
+ if (ComponentUtil.getAttribute(column, FILTER_BY).length() > 0) {
+ existFilters = true;
+ break;
+ }
+ }
- nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
- td.appendChild(span);
+ // Not filters
+ if (!existFilters) {
+ filterTR.setAttribute(HTML.ATTR_STYLE, DISPLAY_NONE);
+ }
- parentTr.appendChild(td);
- styleClass = RichFacesDataTableTemplate.encodeStyleClass(
- null, skinCellClass, headerClass, columnHeaderClass);
- td.setAttribute(HTML.ATTR_CLASS, styleClass);
- td.setAttribute(SCOP, COL);
- String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
- if (colspan != null && colspan.length() > 0) {
- td.setAttribute(HTML.ATTR_COLSPAN, colspan);
- }
- Element facetBody = ComponentUtil.getFacet(column, HEADER);
+ for (Element column : headers) {
+ String columnHeaderClass = column.getAttribute(classAttribute);
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TH);
- VpeChildrenInfo child = new VpeChildrenInfo(span);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
- // Add filter
- if (existFilters) {
- nsIDOMElement filterTD = visualDocument
- .createElement(HTML.TAG_TD);
+ nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ td.appendChild(span);
- filterTR.appendChild(filterTD);
- filterTD.setAttribute(HTML.ATTR_CLASS, styleClass);
- filterTD.setAttribute(SCOP, COL);
- if (colspan != null && colspan.length() > 0) {
- filterTD.setAttribute(HTML.ATTR_COLSPAN, colspan);
+ parentTr.appendChild(td);
+ styleClass = RichFacesDataTableTemplate.encodeStyleClass(null,
+ skinCellClass, headerClass, columnHeaderClass);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.setAttribute(SCOP, COL);
+ String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
+ 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);
+ // Add filter
+ if (existFilters) {
+ nsIDOMElement filterTD = visualDocument
+ .createElement(HTML.TAG_TD);
+
+ filterTR.appendChild(filterTD);
+ filterTD.setAttribute(HTML.ATTR_CLASS, styleClass);
+ filterTD.setAttribute(SCOP, COL);
+ if (colspan != null && colspan.length() > 0) {
+ filterTD.setAttribute(HTML.ATTR_COLSPAN, colspan);
+ }
+ // Check current filter
+ if (ComponentUtil.getAttribute(column, FILTER_BY).length() > 0) {
+ // Add input
+ nsIDOMElement div = visualDocument
+ .createElement(HTML.TAG_DIV);
+ div.setAttribute(HTML.ATTR_STYLE, DIV_STYLE);
+ filterTD.appendChild(div);
+ nsIDOMElement input = visualDocument
+ .createElement(HTML.TAG_INPUT);
+ div.appendChild(input);
+ input.setAttribute(HTML.ATTR_TYPE, INPUT_TYPE_ATTR);
+ input.setAttribute(HTML.ATTR_CLASS, EXTENDED_TABLE_INPUT);
+ }
+
+ }
+ // Add sortable attribute
+ String sortable = ComponentUtil.getAttribute(column, ATTR_SORTABLE);
+ String sortBy = ComponentUtil.getAttribute(column, SORT_BY_ATTR);
+ if (sortBy.length() != 0 || !sortable.equalsIgnoreCase(FALSE)) {
+ nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
+ img.setAttribute(HTML.ATTR_STYLE, VERTICAL_ALIGN_MIDDLE);
+ ComponentUtil.setImg(img, SORTABLE_PATH);
+ td.appendChild(img);
+ }
}
- // Check current filter
- if (ComponentUtil.getAttribute(column, FILTER_BY).length() > 0) {
- // Add input
- nsIDOMElement div = visualDocument
- .createElement(HTML.TAG_DIV);
- div.setAttribute(HTML.ATTR_STYLE, DIV_STYLE);
- filterTD.appendChild(div);
- nsIDOMElement input = visualDocument
- .createElement(HTML.TAG_INPUT);
- div.appendChild(input);
- input.setAttribute(HTML.ATTR_TYPE, INPUT_TYPE_ATTR);
- input.setAttribute(HTML.ATTR_CLASS, EXTENDED_TABLE_INPUT);
- }
- }
- // Add sortable attribute
- String sortable = ComponentUtil.getAttribute(column, ATTR_SORTABLE);
- String sortBy = ComponentUtil.getAttribute(column, SORT_BY_ATTR);
- if (sortBy.length() == 0 && sortable.equalsIgnoreCase(FALSE)) {
- continue;
- }
- nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
- img.setAttribute(HTML.ATTR_STYLE, VERTICAL_ALIGN_MIDDLE);
- ComponentUtil.setImg(img, SORTABLE_PATH);
- td.appendChild(img);
+ nsIDOMElement th = visualDocument.createElement(HTML.TAG_TH);
+ th.setAttribute(HTML.ATTR_CLASS, styleClass);
+ th.appendChild(visualDocument.createTextNode(SPACE));
+ parentTr.appendChild(th);
+
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.appendChild(visualDocument.createTextNode(SPACE));
+ filterTR.appendChild(td);
}
-
- nsIDOMElement th = visualDocument.createElement(HTML.TAG_TH);
- th.setAttribute(HTML.ATTR_CLASS, styleClass);
- th.appendChild(visualDocument.createTextNode(SPACE));
- parentTr.appendChild(th);
-
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
- td.setAttribute(HTML.ATTR_CLASS, styleClass);
- td.appendChild(visualDocument.createTextNode(SPACE));
- filterTR.appendChild(td);
- }
- /**
- *
- * @param columns
- * @param facetName
- * @return list of columns with facet
- */
- public static ArrayList<Element> getColumnsWithFacet(
- ArrayList<Element> columns, String facetName) {
- ArrayList<Element> columnsWithFacet = new ArrayList<Element>();
- for (Element column : columns) {
- Element body = ComponentUtil.getFacet(column, facetName);
- if (body != null) {
- columnsWithFacet.add(column);
- }
+ /**
+ *
+ * @param columns
+ * @param facetName
+ * @return list of columns with facet
+ */
+ public static ArrayList<Element> getColumnsWithFacet(
+ ArrayList<Element> columns, String facetName) {
+ ArrayList<Element> columnsWithFacet = new ArrayList<Element>();
+ for (Element column : columns) {
+ Element body = ComponentUtil.getFacet(column, facetName);
+ if (body != null) {
+ columnsWithFacet.add(column);
+ }
+ }
+ return columnsWithFacet;
}
- return columnsWithFacet;
- }
- /**
- * 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 isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
+ /**
+ * 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 isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml 2008-11-24
07:16:53 UTC (rev 11966)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml 2008-11-24
07:49:04 UTC (rev 11967)
@@ -1,118 +1,168 @@
<tests>
<test id="extendedDataTable">
- <DIV STYLE="width: 580px; height: 400px;">
- <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING="0"
CELLPADDING="0"
- BORDER="0">
- <COLGROUP>
- <COL WIDTH="100" />
- <COL WIDTH="100" />
- <COL WIDTH="100" />
- <COL WIDTH="100" />
- </COLGROUP>
- <THEAD>
- <TR CLASS="dr-table-subheader rich-table-subheader">
- <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN>
- <SPAN> Flag</SPAN>
- </SPAN>
- </TH>
- <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN>
- <SPAN> State Name</SPAN>
- </SPAN>
- <IMG STYLE="vertical-align: middle;"
- SRC="/.*resources/extendedDataTable/sortable.gif/"/>
- </TH>
- <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN>
- <SPAN> State Capital</SPAN>
- </SPAN>
- <IMG STYLE="vertical-align: middle;"
- SRC="/.*resources/extendedDataTable/sortable.gif/"/>
- </TH>
- <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <SPAN>
- <SPAN> Time Zone</SPAN>
- </SPAN>
- </TH>
- <TH CLASS="dr-table-subheadercell rich-table-subheadercell">
- </TH>
- </TR>
- <TR CLASS="dr-table-subheader rich-table-subheader">
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <DIV STYLE="padding: 4px;">
- <INPUT TYPE="text" CLASS="extendedTable-input" />
- </DIV>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <DIV STYLE="padding: 4px;">
- <INPUT TYPE="text" CLASS="extendedTable-input" />
- </DIV>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell">
- </TD>
- </TR>
- </THEAD>
- <TFOOT>
- <TR CLASS="dr-table-subfooter rich-table-subfooter">
- <TD>
- </TD>
- </TR>
- </TFOOT>
- <TBODY>
- <TR>
- <TD VALIGN="top" COLSPAN="4" STYLE="padding:
0px;">
- <TABLE WIDTH="100%" HEIGHT="100%">
- <COLGROUP>
- <COL WIDTH="100" />
- <COL WIDTH="100" />
- <COL WIDTH="100" />
- <COL WIDTH="100" />
- <COL />
- </COLGROUP>
- <TBODY>
- <TR>
- <TD SORTABLE="false" CLASS="dr-table-cell
rich-table-cell">
- <IMG
- SRC="/.*org.jboss.tools.vpe/ve/unresolved_image.gif/"
- STYLE="-moz-user-modify: read-write;" />
- </TD>
- <TD WIDTH="170" SORTABLE="true"
SORTBY="#{cap.state}"
- FILTERBY="#{cap.state}" FILTEREVENT="onkeyup"
- CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{cap.state}</SPAN>
- </TD>
- <TD WIDTH="170" SORTABLE="true"
SORTBY="#{cap.name}"
- FILTERBY="#{cap.state}" FILTEREVENT="onkeyup"
- CLASS="dr-table-cell rich-table-cell">
- <SPAN> #{cap.name}</SPAN>
- </TD>
- <TD SORTABLE="false" CLASS="dr-table-cell
rich-table-cell">
- <SPAN> #{cap.timeZone}</SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </TD>
- <TD WIDTH="17" ALIGN="right">
- <DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
- </DIV>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
+ <TABLE WIDTH="580" HEIGHT="400" CELLSPACING="0"
CELLPADDING="0"
+ BORDER="0" STYLE="table-layout: fixed;">
+ <COLGROUP>
+ <COL WIDTH="100" />
+
+ <COL WIDTH="100" />
+
+ <COL WIDTH="100" />
+
+ <COL WIDTH="100" />
+
+ </COLGROUP>
+ <THEAD>
+ <TR CLASS="dr-table-subheader rich-table-subheader">
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN>
+ <SPAN>Flag</SPAN>
+ </SPAN>
+ </TH>
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN>
+ <SPAN>State Name</SPAN>
+ </SPAN>
+ <IMG STYLE="vertical-align: middle;"
+ SRC="/.*resources/extendedDataTable/sortable.gif/" />
+
+ </TH>
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN>
+ <SPAN>State Capital</SPAN>
+ </SPAN>
+ <IMG STYLE="vertical-align: middle;"
+ SRC="/.*resources/extendedDataTable/sortable.gif/" />
+
+ </TH>
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN>
+ <SPAN>Time Zone</SPAN>
+ </SPAN>
+ </TH>
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TH>
+ </TR>
+ <TR CLASS="dr-table-subheader rich-table-subheader">
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <DIV STYLE="padding: 4px;">
+ <INPUT TYPE="text" CLASS="extendedTable-input" />
+
+ </DIV>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <DIV STYLE="padding: 4px;">
+ <INPUT TYPE="text" CLASS="extendedTable-input" />
+
+ </DIV>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ </TR>
+ </THEAD>
+ <TFOOT>
+ <TR CLASS="dr-table-subfooter rich-table-subfooter">
+ <TD
+ CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter"
+ SCOP="col">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ <TD
+ CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter"
+ SCOP="col">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ <TD
+ CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter"
+ SCOP="col">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ <TD
+ CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter"
+ SCOP="col">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ <TD
+ CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ </TR>
+ </TFOOT>
+ <TBODY>
+ <TR HEIGHT="100%">
+ <TD VALIGN="top" COLSPAN="4" STYLE="padding:
0px;">
+ <TABLE WIDTH="100%" STYLE="table-layout: fixed;">
+ <COLGROUP>
+ <COL WIDTH="100" />
+
+ <COL WIDTH="100" />
+
+ <COL WIDTH="100" />
+
+ <COL WIDTH="100" />
+
+ <COL />
+
+ </COLGROUP>
+ <TBODY>
+ <TR CLASS="dr-body-table-tr">
+ <TD SORTABLE="false" CLASS="dr-table-cell
rich-table-cell">
+ <IMG
+ SRC="/.*org.jboss.tools.vpe/ve/unresolved_image.gif/"
+ STYLE="-moz-user-modify: read-write;" />
+
+ </TD>
+ <TD WIDTH="170" SORTABLE="true"
SORTBY="#{cap.state}"
+ FILTERBY="#{cap.state}" FILTEREVENT="onkeyup"
+ CLASS="dr-table-cell rich-table-cell"
+ VPEFLASHERCOLORATTRIBUTE="red">
+ <SPAN>#{cap.state}</SPAN>
+ </TD>
+ <TD WIDTH="170" SORTABLE="true"
SORTBY="#{cap.name}"
+ FILTERBY="#{cap.state}" FILTEREVENT="onkeyup"
+ CLASS="dr-table-cell rich-table-cell">
+ <SPAN>#{cap.name}</SPAN>
+ </TD>
+ <TD SORTABLE="false" CLASS="dr-table-cell
rich-table-cell">
+ <SPAN>#{cap.timeZone}</SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ <TD WIDTH="17" ALIGN="right">
+ <DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </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/util/HTML.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-11-24
07:16:53 UTC (rev 11966)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-11-24
07:49:04 UTC (rev 11967)
@@ -122,5 +122,7 @@
public static final String STYLE_PARAMETER_BACKGROUND_IMAGE =
"background-image"; //$NON-NLS-1$
public static final String STYLE_PARAMETER_MAX_HEIGHT = "max-height";
//$NON-NLS-1$
public static final String STYLE_PARAMETER_ZINDEX = "z-index"; //$NON-NLS-1$
- public static final String STYLE_PARAMETER_CLEAR = "clear"; //$NON-NLS-1$
+ public static final String STYLE_PARAMETER_CLEAR = "clear"; //$NON-NLS-1$
+ public static final String STYLE_PARAMETER_TABLE_LAYOUT = "table-layout";
//$NON-NLS-1$
+ public static final String STYLE_VALUE_FIXED = "fixed"; //$NON-NLS-1$
}