Author: nbelaevski
Date: 2007-11-29 20:31:33 -0500 (Thu, 29 Nov 2007)
New Revision: 4372
Modified:
branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1430
Modified: branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml 2007-11-30
01:30:52 UTC (rev 4371)
+++ branches/3.1.x/ui/orderingList/src/main/config/component/orderinglist.xml 2007-11-30
01:31:33 UTC (rev 4372)
@@ -64,14 +64,14 @@
<property>
<name>listWidth</name>
- <classname>int</classname>
+ <classname>java.lang.String</classname>
<description>
listWidth
</description>
</property>
<property>
<name>listHeight</name>
- <classname>int</classname>
+ <classname>java.lang.String</classname>
<description>
listHeight
</description>
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2007-11-30
01:30:52 UTC (rev 4371)
+++
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingList.java 2007-11-30
01:31:33 UTC (rev 4372)
@@ -558,12 +558,4 @@
public abstract String getControlsType();
public abstract void setControlsType(String type);
- public abstract int getListWidth();
-
- public abstract void setListWidth(int listWidth);
-
- public abstract int getListHeight();
-
- public abstract void setListHeight(int listHeight);
-
}
Modified:
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-30
01:30:52 UTC (rev 4371)
+++
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-11-30
01:31:33 UTC (rev 4372)
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<f:root
xmlns:f="http://ajax4jsf.org/cdk/template"
xmlns:c="
http://java.sun.com/jsf/core"
@@ -9,6 +10,9 @@
class="org.richfaces.renderkit.html.OrderingListRenderer"
component="org.richfaces.component.UIOrderingList"
+
+ <jsp:directive.page import="org.richfaces.component.util.HtmlUtil" />
+
<h:styles>css/orderingList.xcss</h:styles>
<h:scripts>
@@ -41,8 +45,10 @@
<div id="#{clientId}headerBox"
class="rich-ordering-list-output">
<jsp:scriptlet><![CDATA[
String contentContainerStyle = "";
- if (component.getAttributes().get("listWidth") != null) {
- contentContainerStyle =
contentContainerStyle.concat("width:").concat(component.getAttributes().get("listWidth").toString()).concat("px;");
+
+ String listWidthValue = (String)
component.getAttributes().get("listWidth");
+ if (listWidthValue != null) {
+ contentContainerStyle =
contentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(listWidthValue)).concat(";");
variables.setVariable("contentContainerStyle",
contentContainerStyle);
}
]]></jsp:scriptlet>
@@ -52,8 +58,9 @@
</table>
</div>
<jsp:scriptlet><![CDATA[
- if (component.getAttributes().get("listHeight") != null) {
- contentContainerStyle =
contentContainerStyle.concat("height:").concat(component.getAttributes().get("listHeight").toString()).concat("px;");
+ String listHeightValue = (String)
component.getAttributes().get("listHeight");
+ if (listHeightValue != null) {
+ contentContainerStyle =
contentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
variables.setVariable("contentContainerStyle",
contentContainerStyle);
}
]]></jsp:scriptlet>