Author: dmaliarevich
Date: 2008-01-16 06:51:24 -0500 (Wed, 16 Jan 2008)
New Revision: 5735
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1613
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2008-01-16
11:51:18 UTC (rev 5734)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/HtmlComponentUtil.java 2008-01-16
11:51:24 UTC (rev 5735)
@@ -74,6 +74,9 @@
/** HTML_TAG_B */
public static final String HTML_TAG_B = "B";
+
+ /** HTML_TAG_LI */
+ public static final String HTML_TAG_LI = "LI";
/** HTML_TABLE_COLSPAN * */
public static final String HTML_TABLE_COLSPAN = "colspan";
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java 2008-01-16
11:51:18 UTC (rev 5734)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataListTemplate.java 2008-01-16
11:51:24 UTC (rev 5735)
@@ -28,6 +28,7 @@
public class RichFacesDataListTemplate extends VpeAbstractTemplate {
/** CSS_FILE_NAME */
final static private String CSS_FILE_NAME = "dataList/dataList.css";
+ final static private int NUMBER_OF_ROWS_TO_DISPLAY = 1;
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
@@ -48,15 +49,10 @@
VpeCreationData creatorInfo = new VpeCreationData(unorderedList);
- int rows = -1;
- try {
- rows = Integer.valueOf(sourceElement.getAttribute(HtmlComponentUtil.HTML_ROW_ATTR));
- } catch (Exception x) {
- rows = -1;
- }
+ int rows = NUMBER_OF_ROWS_TO_DISPLAY;
- for (int i = 0; i < (rows == -1 ? 3 : rows); i++) {
- nsIDOMElement listItem = visualDocument.createElement("li");
+ for (int i = 0; i < rows; i++) {
+ nsIDOMElement listItem = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_LI);
listItem.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-list-item
rich-list-item");
unorderedList.appendChild(listItem);