Author: konstantin.mishin
Date: 2010-07-29 14:42:27 -0400 (Thu, 29 Jul 2010)
New Revision: 18286
Modified:
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml
Log:
RF-8983
Modified:
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
===================================================================
---
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java 2010-07-29
18:33:08 UTC (rev 18285)
+++
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java 2010-07-29
18:42:27 UTC (rev 18286)
@@ -24,13 +24,14 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
-@ManagedBean(name="bean")
+@ManagedBean(name = "bean")
@SessionScoped
public class Bean {
private int value;
private String accesskey;
-
+ private boolean enableManualInput = true;
+
public void setValue(int value) {
this.value = value;
}
@@ -46,4 +47,12 @@
public String getAccesskey() {
return accesskey;
}
+
+ public void setEnableManualInput(boolean enableManualInput) {
+ this.enableManualInput = enableManualInput;
+ }
+
+ public boolean getEnableManualInput() {
+ return enableManualInput;
+ }
}
Modified:
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml
===================================================================
---
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-07-29
18:33:08 UTC (rev 18285)
+++
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-07-29
18:42:27 UTC (rev 18286)
@@ -34,12 +34,18 @@
</h:head>
<h:body>
<h:form id="form">
- <ins:inputnumberslider id="ins" value="#{bean.value}"
accesskey="#{bean.accesskey}"/>
+ <ins:inputnumberslider id="ins" value="#{bean.value}"
accesskey="#{bean.accesskey}"
+ enableManualInput="#{bean.enableManualInput}"/>
<br />
- <h:outputText value="Accesskey : "/>
+ <h:outputText value="Accesskey: "/>
<h:inputText value="#{bean.accesskey}">
<f:ajax render="ins"/>
</h:inputText>
+ <br />
+ <h:outputText value="EnableManualInput: "/>
+ <h:selectBooleanCheckbox value="#{bean.enableManualInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
</h:form>
</h:body>
</html>
Modified: root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml
===================================================================
---
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml 2010-07-29
18:33:08 UTC (rev 18285)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml 2010-07-29
18:42:27 UTC (rev 18286)
@@ -37,6 +37,14 @@
<cdk:generate>true</cdk:generate>
</property-extension>
</property>
+ <property>
+ <property-name>enableManualInput</property-name>
+ <property-class>boolean</property-class>
+ <default-value>true</default-value>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
<component-extension>
<cdk:generate>true</cdk:generate>
<cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
Modified:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml
===================================================================
---
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-29
18:33:08 UTC (rev 18285)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-29
18:42:27 UTC (rev 18286)
@@ -50,7 +50,8 @@
</span>
<a class="rf-ins-ib" href="javascript:void(0);" />
<input name="#{clientId}" type="text"
class="rf-ins-i" size="3"
- value="#{getInputValue(facesContext, component)}"
accesskey="#{component.attributes['accesskey']}"/>
+ value="#{getInputValue(facesContext, component)}"
accesskey="#{component.attributes['accesskey']}"
+ readonly="#{!component.attributes['enableManualInput']}"/>
<span class="rf-ins-tt">#{getInputValue(facesContext,
component)}</span>
<script type="text/javascript">new
RichFaces.ui.InputNumberSlider('#{clientId}');</script>
</span>