[richfaces-svn-commits] JBoss Rich Faces SVN: r18398 - in root/sandbox: examples/components/inputnumberslider-demo/src/main/webapp and 2 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Aug 3 13:14:06 EDT 2010


Author: konstantin.mishin
Date: 2010-08-03 13:14:05 -0400 (Tue, 03 Aug 2010)
New Revision: 18398

Modified:
   root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
   root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
   root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml
   root/sandbox/ui/inputs/inputnumberslider/src/main/templates/input.template.inc
Log:
RF-8983

Modified: root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
===================================================================
--- root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java	2010-08-03 17:01:07 UTC (rev 18397)
+++ root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java	2010-08-03 17:14:05 UTC (rev 18398)
@@ -30,7 +30,7 @@
 @SessionScoped
 public class Bean {
 
-    private static final String[] SKINS = { "blueSky", "deepMarine", "emeraldTown", "NULL", "ruby", "classic",
+    private static final String[] SKINS = {"blueSky", "deepMarine", "emeraldTown", "NULL", "ruby", "classic",
         "DEFAULT", "japanCherry", "plain", "wine" };
     private String skin = "classic";
     
@@ -40,6 +40,7 @@
     private boolean disabled = false;
     private boolean enableManualInput = true;
     private PositionType inputPosition = PositionType.right;
+    private int inputSize = 3;
     private double maxValue = 100;
     private double minValue = 0;
     private boolean showArrows = false;
@@ -167,4 +168,12 @@
     public boolean isDisabled() {
         return disabled;
     }
+
+    public void setInputSize(int inputSize) {
+        this.inputSize = inputSize;
+    }
+
+    public int getInputSize() {
+        return inputSize;
+    }
 }

Modified: root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
===================================================================
--- root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml	2010-08-03 17:01:07 UTC (rev 18397)
+++ root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml	2010-08-03 17:14:05 UTC (rev 18398)
@@ -41,9 +41,10 @@
 			<br />
 			<ins:inputnumberslider id="ins" value="#{bean.value}" accesskey="#{bean.accesskey}" delay="#{bean.delay}"
 				disabled="#{bean.disabled}" enableManualInput="#{bean.enableManualInput}"
-				showArrows="#{bean.showArrows}" showBoundaryValues="#{bean.showBoundaryValues}"
-				showInput="#{bean.showInput}" showToolTip="#{bean.showToolTip}" maxValue="#{bean.maxValue}"
-				minValue="#{bean.minValue}" step="#{bean.step}" inputPosition="#{bean.inputPosition}"/>
+				inputPosition="#{bean.inputPosition}" inputSize="#{bean.inputSize}" showArrows="#{bean.showArrows}"
+				showBoundaryValues="#{bean.showBoundaryValues}" showInput="#{bean.showInput}"
+				showToolTip="#{bean.showToolTip}" maxValue="#{bean.maxValue}" minValue="#{bean.minValue}"
+				step="#{bean.step}" />
 			<br />
 			<h:outputText value="Accesskey: "/>
 			<h:inputText value="#{bean.accesskey}">
@@ -71,6 +72,11 @@
 				<f:ajax render="ins"/>
 			</h:selectOneMenu>				
 			<br />
+			<h:outputText value="InputSize: "/>
+			<h:inputText value="#{bean.inputSize}">
+				<f:ajax render="ins"/>
+			</h:inputText>
+			<br />
 			<h:outputText value="MaxValue: "/>
 			<h:inputText value="#{bean.maxValue}">
 				<f:ajax render="ins"/>

Modified: root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml	2010-08-03 17:01:07 UTC (rev 18397)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml	2010-08-03 17:14:05 UTC (rev 18398)
@@ -119,6 +119,14 @@
 			</property-extension>
 		</property>
 		<property>
+			<property-name>inputSize</property-name>
+			<property-class>int</property-class>
+			<default-value>3</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
 			<property-name>maxValue</property-name>
 			<property-class>double</property-class>
 			<default-value>100</default-value>

Modified: root/sandbox/ui/inputs/inputnumberslider/src/main/templates/input.template.inc
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/templates/input.template.inc	2010-08-03 17:01:07 UTC (rev 18397)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/templates/input.template.inc	2010-08-03 17:14:05 UTC (rev 18398)
@@ -22,7 +22,8 @@
 Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 -->
-<input name="#{clientId}" type="text" class="rf-ins-i #{component.attributes['inputClass']}" size="3" value="#{getInputValue(facesContext, component)}"
+<input name="#{clientId}" type="text" class="rf-ins-i #{component.attributes['inputClass']}"
+	size="#{component.attributes['inputSize']}" value="#{getInputValue(facesContext, component)}"
 	accesskey="#{component.attributes['accesskey']}" disabled="#{component.attributes['disabled']}"
 	readonly="#{!component.attributes['enableManualInput']}"
 	style="#{component.attributes['showInput'] ? null : 'display: none;'}" />



More information about the richfaces-svn-commits mailing list