Author: yradtsevich
Date: 2008-10-28 12:01:10 -0400 (Tue, 28 Oct 2008)
New Revision: 11249
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnsTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
Log:
RESOLVED - issue JBIDE-2872: <f:facet>'s don't work in
<rich:columns>.
https://jira.jboss.org/jira/browse/JBIDE-2872
Templates <rich:columns>, <rich:dataTable>, <rich:extendedDataTable>,
<rich:listShuttle>, <rich:orderingList>, <rich:subTable>,
<rich:scrollableDataTable>,
<rich:subTable> changed in a way that behavior of the tags <rich:column> and
<rich:columns> is completely similar now.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnsTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnsTemplate.java 2008-10-28
15:49:39 UTC (rev 11248)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnsTemplate.java 2008-10-28
16:01:10 UTC (rev 11249)
@@ -12,99 +12,10 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
-
-import java.util.List;
-
-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.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;
-
-
/**
- * Template for the <rich:columns/>.
+ * Template for tag <rich:columns>
*
- * @author Eugene Stherbin
+ * @author Yahor Radtsevich
*/
-public class RichFacesColumnsTemplate extends AbstractRichFacesTemplate {
-
- /** The Constant DEFAULT_CLASSES. */
- private static final String DEFAULT_CLASSES = "dr-table-cell
rich-table-cell"; //$NON-NLS-1$
-
- /**
- * Create.
- *
- * @param visualDocument the visual document
- * @param sourceNode the source node
- * @param pageContext the page context
- *
- * @return the vpe creation data
- *
- * @see
- * org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools
- * .vpe.editor.context.VpePageContext, org.w3c.dom.Node,
- * org.mozilla.interfaces.nsIDOMDocument)
- */
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
- final Element sourceElement = (Element) sourceNode;
- final nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
- prepareData(sourceElement);
- final VpeCreationData data = new VpeCreationData(td);
- // Create mapping to Encode body
- final VpeChildrenInfo tdInfo = new VpeChildrenInfo(td);
-
- String clazz = DEFAULT_CLASSES;
- if(ComponentUtil.isNotBlank(this.sourceStyleClass)){
- clazz = clazz+Constants.WHITE_SPACE+this.sourceStyleClass;
- }
- if(ComponentUtil.isNotBlank(this.sourceWidth)){
- td.setAttribute(RichFaces.ATTR_WIDTH, this.sourceWidth);
- }
- td.setAttribute(HTML.ATTR_CLASS, clazz);
- td.setAttribute(HTML.ATTR_STYLE, this.sourceStyle);
-
- final List<Node> children = ComponentUtil.getChildren(sourceElement,
true);
- for (Node child : children) {
- tdInfo.addSourceChild(child);
- }
- data.addChildrenInfo(tdInfo);
- return data;
- }
-
- /**
- * @param sourceElement
- */
- private void prepareData(Element sourceElement) {
- this.sourceStyleClass = ComponentUtil.getAttribute(sourceElement,
RichFaces.ATTR_STYLE_CLASS);
- this.sourceStyle = ComponentUtil.getAttribute(sourceElement,
RichFaces.ATTR_STYLE);
- this.sourceWidth = ComponentUtil.getAttribute(sourceElement,
RichFaces.ATTR_WIDTH);
-
- }
-
- /**
- * Checks if is recreate at attr change.
- *
- * @param sourceElement the source element
- * @param value the value
- * @param visualDocument the visual document
- * @param visualNode the visual node
- * @param data the data
- * @param pageContext the page context
- * @param name the name
- *
- * @return true, if is recreate at attr change
- */
- @Override
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element
sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
- return true;
- }
-
+public class RichFacesColumnsTemplate extends RichFacesColumnTemplate {
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2008-10-28
15:49:39 UTC (rev 11248)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2008-10-28
16:01:10 UTC (rev 11249)
@@ -128,7 +128,9 @@
nsIDOMElement tr = null;
VpeChildrenInfo trInfo = null;
for (Node child : children) {
- if(child.getNodeName().endsWith(RichFaces.TAG_COLUMN)) {
+ String nodeName = child.getNodeName();
+ if(nodeName.endsWith(RichFaces.TAG_COLUMN) ||
+ nodeName.endsWith(RichFaces.TAG_COLUMNS)) {
String breakBefore = ((Element)child).getAttribute(ATTR_BREAK_BEFORE);
if(breakBefore!=null && breakBefore.equalsIgnoreCase(Constants.TRUE)) {
tr = null;
@@ -147,10 +149,10 @@
}
trInfo.addSourceChild(child);
- } else if(child.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP)) {
+ } else if(nodeName.endsWith(RichFaces.TAG_COLUMN_GROUP)) {
RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
(Element)child, visualDocument, tbody);
tr = null;
- } else if(child.getNodeName().endsWith(RichFaces.TAG_SUB_TABLE)) {
+ } else if(nodeName.endsWith(RichFaces.TAG_SUB_TABLE)) {
RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
(Element)child, visualDocument, tbody);
tr = null;
} else {
@@ -265,7 +267,11 @@
NodeList children = parentSourceElement.getChildNodes();
for(int i=0; i<children.getLength(); i++) {
Node child = children.item(i);
- if((child instanceof Element) &&
child.getNodeName().endsWith(RichFaces.TAG_COLUMN)) {
+ String nodeName = child.getNodeName();
+ if((child instanceof Element) && (
+ nodeName.endsWith(RichFaces.TAG_COLUMN) ||
+ nodeName.endsWith(RichFaces.TAG_COLUMNS)
+ )) {
columns.add((Element)child);
}
}
@@ -324,7 +330,8 @@
int currentLength = 0;
for (Element column : columns) {
if (ComponentUtil.isRendered(column)) {
- if (column.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP)) {
+ String nodeName = column.getNodeName();
+ if (nodeName.endsWith(RichFaces.TAG_COLUMN_GROUP)) {
// Store max calculated value of previous rows.
count = Math.max(currentLength,count);
// Calculate number of columns in row.
@@ -332,7 +339,8 @@
// Store max calculated value
count = Math.max(currentLength,count);
currentLength = 0;
- } else if (column.getNodeName().equals(sourceElement.getPrefix() + Constants.COLON +
RichFaces.TAG_COLUMN)) {
+ } else if (nodeName.equals(sourceElement.getPrefix() + Constants.COLON +
RichFaces.TAG_COLUMN) ||
+ nodeName.equals(sourceElement.getPrefix() + Constants.COLON +
RichFaces.TAG_COLUMNS)) {
// For new row, save length of previous.
if (Boolean.getBoolean(column.getAttribute(ATTR_BREAK_BEFORE))) {
count = Math.max(currentLength,count);
@@ -345,7 +353,7 @@
} catch (NumberFormatException e) {
currentLength++;
}
- } else if (column.getNodeName().endsWith(RichFaces.TAG_COLUMN)) {
+ } else if (nodeName.endsWith(RichFaces.TAG_COLUMN)) {
// UIColumn always have colspan == 1.
currentLength++;
}
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-10-28
15:49:39 UTC (rev 11248)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2008-10-28
16:01:10 UTC (rev 11249)
@@ -39,7 +39,6 @@
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 COLUMNS = "columns"; //$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$
@@ -68,7 +67,8 @@
private static final String SEMICOLON = ";"; //$NON-NLS-1$
private static final String COLON = " : "; //$NON-NLS-1$
private static final String DR_TABLE_HIDDEN = "dr-table-hidden";
//$NON-NLS-1$
- private static final String COLUMN = ":column"; //$NON-NLS-1$
+ private static final String COLUMN = ':' + RichFaces.TAG_COLUMN;
+ private static final String COLUMNS = ':' + RichFaces.TAG_COLUMNS;
final static String DEFAULT_HEIGHT = "500px"; //$NON-NLS-1$
final static String DEFAULT_WIDTH = "100%"; //$NON-NLS-1$
final static String HEADER = "header"; //$NON-NLS-1$
@@ -245,7 +245,8 @@
nsIDOMElement tr = null;
VpeChildrenInfo trInfo = null;
for (Node child : children) {
- if (child.getNodeName().endsWith(COLUMN)) {
+ String nodeName = child.getNodeName();
+ if (nodeName.endsWith(COLUMN) || nodeName.endsWith(COLUMNS)) {
String breakBefore = ((Element) child)
.getAttribute(BREAK_BEFORE);
if (breakBefore != null
@@ -525,8 +526,9 @@
NodeList children = parentSourceElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
+ String nodeName = child.getNodeName();
if ((child instanceof Element)
- && child.getNodeName().endsWith(COLUMN)) {
+ && (nodeName.endsWith(COLUMN) || nodeName.endsWith(COLUMNS)) ) {
columns.add((Element) child);
}
}
@@ -592,7 +594,7 @@
int count = 0;
// check for exact value in component
try {
- int span = Integer.parseInt(sourceElement.getAttribute(COLUMNS));
+ int span = Integer.parseInt(sourceElement.getAttribute(RichFaces.ATTR_COLUMNS));
count = count > 0 ? span : calculateRowColumns(sourceElement,
columns);
} catch (NumberFormatException e) {
@@ -611,7 +613,8 @@
int currentLength = 0;
for (Element column : columns) {
if (ComponentUtil.isRendered(column)) {
- if (column.getNodeName().endsWith(COLUMN_GROUP)) {
+ String nodeName = column.getNodeName();
+ if (nodeName.endsWith(COLUMN_GROUP)) {
// Store max calculated value of previsous rows.
if (currentLength > count) {
count = currentLength;
@@ -624,8 +627,8 @@
count = currentLength;
}
currentLength = 0;
- } else if (column.getNodeName().equals(
- sourceElement.getPrefix() + COLUMN)) {
+ } else if (nodeName.equals(sourceElement.getPrefix() + COLUMN) ||
+ nodeName.equals(sourceElement.getPrefix() + COLUMNS)) {
String breakBeforeStr = column.getAttribute(BREAK_BEFORE);
// For new row, save length of previsous.
if (Boolean.getBoolean(breakBeforeStr)) {
@@ -641,7 +644,7 @@
} catch (NumberFormatException e) {
currentLength++;
}
- } else if (column.getNodeName().endsWith(COLUMN)) {
+ } else if (nodeName.endsWith(COLUMN)) {
// UIColumn always have colspan == 1.
currentLength++;
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-10-28
15:49:39 UTC (rev 11248)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-10-28
16:01:10 UTC (rev 11249)
@@ -563,7 +563,9 @@
// add children to "tr" element
int columnCount = 0;
for (Node child : children) {
- if (RichFaces.TAG_COLUMN.equals(child.getLocalName())) {
+ String localName = child.getLocalName();
+ if (RichFaces.TAG_COLUMN.equals(localName) ||
+ RichFaces.TAG_COLUMNS.equals(localName)) {
nsIDOMElement column = visualDocument
.createElement(HTML.TAG_TD);
@@ -906,7 +908,9 @@
header.setAttribute(HTML.ATTR_CLASS, styleClasses.get(header));
for (Node child : children) {
- if ("column".equals(child.getLocalName())) { //$NON-NLS-1$
+ String localName = child.getLocalName();
+ if (RichFaces.TAG_COLUMN.equals(localName) ||
+ RichFaces.TAG_COLUMNS.equals(localName)) {
nsIDOMElement headerCell = visualDocument
.createElement(HTML.TAG_TH);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-10-28
15:49:39 UTC (rev 11248)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-10-28
16:01:10 UTC (rev 11249)
@@ -9,6 +9,7 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
@@ -26,6 +27,8 @@
*/
public class RichFacesOrderingList extends VpeAbstractTemplate {
+ private static final String COLUMN = ':' + RichFaces.TAG_COLUMN;
+ private static final String COLUMNS = ':' + RichFaces.TAG_COLUMNS;
private static final String DEFAULT_LIST_HEIGHT = "150px";
private static final String DEFAULT_LIST_WIDTH = "300px";
@@ -551,15 +554,16 @@
creationData.addChildrenInfo(trInfo);
for (Node child : children) {
- if (child.getNodeName().endsWith(":column")) {
+ String nodeName = child.getNodeName();
+ if (nodeName.endsWith(COLUMN) || nodeName.endsWith(COLUMNS)) {
trInfo.addSourceChild(child);
- } else if (child.getNodeName().endsWith(":columnGroup")) {
+ } else if (nodeName.endsWith(":columnGroup")) {
RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext,
creationData, (Element) child, visualDocument,
tbody);
tr = null;
trInfo = null;
- } else if (child.getNodeName().endsWith(":subTable")) {
+ } else if (nodeName.endsWith(":subTable")) {
RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext,
creationData, (Element) child, visualDocument,
tbody);
@@ -779,8 +783,9 @@
NodeList children = parentSourceElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
+ String nodeName = child.getNodeName();
if ((child instanceof Element)
- && child.getNodeName().endsWith(":column")) {
+ && (nodeName.endsWith(COLUMN) || nodeName.endsWith(COLUMNS))) {
columns.add((Element) child);
}
}
@@ -864,7 +869,8 @@
int currentLength = 0;
for (Element column : columns) {
if (ComponentUtil.isRendered(column)) {
- if (column.getNodeName().endsWith(":columnGroup")) {
+ String nodeName = column.getNodeName();
+ if (nodeName.endsWith(":columnGroup")) {
// Store max calculated value of previous rows.
count = Math.max(currentLength, count);
// Calculate number of columns in row.
@@ -876,8 +882,8 @@
String colspanStr = column
.getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
- } else if (column.getNodeName().equals(
- sourceElement.getPrefix() + ":column")) {
+ } else if (nodeName.equals(sourceElement.getPrefix() + COLUMN) ||
+ nodeName.equals(sourceElement.getPrefix() + COLUMNS)) {
String breakBeforeStr = column.getAttribute("breakBefore");
boolean breakBefore = Boolean.getBoolean(breakBeforeStr);
@@ -894,7 +900,7 @@
} catch (NumberFormatException e) {
currentLength++;
}
- } else if (column.getNodeName().endsWith(":column")) {
+ } else if (nodeName.endsWith(COLUMN)) {
// UIColumn always have colspan == 1.
currentLength++;
}
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-10-28
15:49:39 UTC (rev 11248)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-10-28
16:01:10 UTC (rev 11249)
@@ -15,6 +15,7 @@
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
@@ -33,6 +34,8 @@
*/
public class RichFacesScrollableDataTableTemplate extends VpeAbstractTemplate {
+ private static final String COLUMN = ':' + RichFaces.TAG_COLUMN;
+ private static final String COLUMNS = ':' + RichFaces.TAG_COLUMNS;
final static String DEFAULT_HEIGHT = "500px";
final static String DEFAULT_WIDTH = "700px";
final static String HEADER = "header";
@@ -235,7 +238,7 @@
nsIDOMElement tr = null;
VpeChildrenInfo trInfo = null;
for (Node child : children) {
- if (child.getNodeName().endsWith(":column")) {
+ if (child.getNodeName().endsWith(COLUMN) || child.getNodeName().endsWith(COLUMNS)) {
String breakBefore = ((Element) child)
.getAttribute("breakBefore");
if (breakBefore != null
@@ -429,8 +432,9 @@
NodeList children = parentSourceElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
+ String nodeName = child.getNodeName();
if ((child instanceof Element)
- && child.getNodeName().endsWith(":column")) {
+ && (nodeName.endsWith(COLUMN) || nodeName.endsWith(COLUMNS))) {
columns.add((Element) child);
}
}
@@ -514,7 +518,8 @@
int currentLength = 0;
for (Element column : columns) {
if (ComponentUtil.isRendered(column)) {
- if (column.getNodeName().endsWith(":columnGroup")) {
+ String nodeName = column.getNodeName();
+ if (nodeName.endsWith(":columnGroup")) {
// Store max calculated value of previsous rows.
if (currentLength > count) {
count = currentLength;
@@ -527,8 +532,8 @@
count = currentLength;
}
currentLength = 0;
- } else if (column.getNodeName().equals(
- sourceElement.getPrefix() + ":column")) {
+ } else if (nodeName.equals(sourceElement.getPrefix() + COLUMN) ||
+ nodeName.equals(sourceElement.getPrefix() + COLUMNS)) {
String breakBeforeStr = column.getAttribute("breakBefore");
// For new row, save length of previsous.
if (Boolean.getBoolean(breakBeforeStr)) {
@@ -545,7 +550,7 @@
} catch (NumberFormatException e) {
currentLength++;
}
- } else if (column.getNodeName().endsWith(":column")) {
+ } else if (nodeName.endsWith(COLUMN)) {
// UIColumn always have colspan == 1.
currentLength++;
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2008-10-28
15:49:39 UTC (rev 11248)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2008-10-28
16:01:10 UTC (rev 11249)
@@ -104,7 +104,9 @@
VpeChildrenInfo trChildrenInfo = new VpeChildrenInfo(curTr);
final List<Node> children = ComponentUtil.getChildren(sourceElement);
for (final Node child : children) {
- if (child.getNodeName().endsWith(':' + RichFaces.TAG_COLUMN)) {
+ String nodeName = child.getNodeName();
+ if (nodeName.endsWith(':' + RichFaces.TAG_COLUMN) ||
+ nodeName.endsWith(':' + RichFaces.TAG_COLUMNS)) {
final boolean breakBefore = RichFaces.VAL_TRUE.equals(
((Element)child).getAttribute(RichFaces.ATTR_BREAK_BEFORE) );
if (breakBefore) {
curRow++;