Author: konstantin.mishin
Date: 2010-08-02 14:40:51 -0400 (Mon, 02 Aug 2010)
New Revision: 18323
Added:
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
Removed:
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
Modified:
root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/WEB-INF/web.xml
root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml
root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss
root/sandbox/ui/inputs/inputnumberslider/src/main/templates/inputnumberslider.template.xml
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-02
16:52:45 UTC (rev 18322)
+++
root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java 2010-08-02
18:40:51 UTC (rev 18323)
@@ -30,6 +30,9 @@
@SessionScoped
public class Bean {
+ private String skin = "classic";
+ private final String[] SKINS = {"blueSky", "deepMarine",
"emeraldTown", "NULL", "ruby", "classic",
"DEFAULT", "japanCherry", "plain", "wine"};
+
private double value;
private String accesskey;
private int delay = 200;
@@ -142,4 +145,16 @@
public void setStep(double step) {
this.step = step;
}
+
+ public void setSkin(String skin) {
+ this.skin = skin;
+ }
+
+ public String getSkin() {
+ return skin;
+ }
+
+ public String[] getSkins() {
+ return SKINS;
+ }
}
Modified:
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
---
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/WEB-INF/web.xml 2010-08-02
16:52:45 UTC (rev 18322)
+++
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/WEB-INF/web.xml 2010-08-02
18:40:51 UTC (rev 18323)
@@ -27,6 +27,10 @@
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{bean.skin}</param-value>
+ </context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
Deleted:
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
===================================================================
---
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-08-02
16:52:45 UTC (rev 18322)
+++
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-08-02
18:40:51 UTC (rev 18323)
@@ -1,100 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:ins="http://richfaces.org/inputnumberslider">
-<!--
-JBoss, Home of Professional Open Source
-Copyright ${year}, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site:
http://www.fsf.org.
--->
- <h:head>
- <title>Richfaces InputNumberSlider Demo</title>
- </h:head>
- <h:body>
- <h:form id="form">
- <ins:inputnumberslider id="ins" value="#{bean.value}"
accesskey="#{bean.accesskey}"
- delay="#{bean.delay}"
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}"/>
- <br />
- <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>
- <br />
- <h:outputText value="Delay: "/>
- <h:inputText value="#{bean.delay}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="InputPosition: "/>
- <h:selectOneMenu value="#{bean.inputPosition}">
- <f:selectItems value="#{bean.positionTypes}"/>
- <f:ajax render="ins"/>
- </h:selectOneMenu>
- <br />
- <h:outputText value="MaxValue: "/>
- <h:inputText value="#{bean.maxValue}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="MinValue: "/>
- <h:inputText value="#{bean.minValue}">
- <f:ajax render="ins"/>
- </h:inputText>
- <br />
- <h:outputText value="ShowArrows: "/>
- <h:selectBooleanCheckbox value="#{bean.showArrows}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowBoundaryValues: "/>
- <h:selectBooleanCheckbox value="#{bean.showBoundaryValues}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowInput: "/>
- <h:selectBooleanCheckbox value="#{bean.showInput}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="ShowToolTip: "/>
- <h:selectBooleanCheckbox value="#{bean.showToolTip}">
- <f:ajax render="ins"/>
- </h:selectBooleanCheckbox>
- <br />
- <h:outputText value="Step: "/>
- <h:inputText value="#{bean.step}">
- <f:ajax render="ins"/>
- </h:inputText>
- </h:form>
- </h:body>
-</html>
Added:
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
===================================================================
--- root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
(rev 0)
+++
root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-08-02
18:40:51 UTC (rev 18323)
@@ -0,0 +1,105 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:ins="http://richfaces.org/inputnumberslider">
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+-->
+ <h:head>
+ <title>Richfaces InputNumberSlider Demo</title>
+ </h:head>
+ <h:body>
+ <h:form id="form">
+ <h:outputText value="Skin: "/>
+ <h:selectOneMenu value="#{bean.skin}" onchange="submit();">
+ <f:selectItems value="#{bean.skins}"/>
+ </h:selectOneMenu>
+ <br />
+ <ins:inputnumberslider id="ins" value="#{bean.value}"
accesskey="#{bean.accesskey}"
+ delay="#{bean.delay}"
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}"/>
+ <br />
+ <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>
+ <br />
+ <h:outputText value="Delay: "/>
+ <h:inputText value="#{bean.delay}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="InputPosition: "/>
+ <h:selectOneMenu value="#{bean.inputPosition}">
+ <f:selectItems value="#{bean.positionTypes}"/>
+ <f:ajax render="ins"/>
+ </h:selectOneMenu>
+ <br />
+ <h:outputText value="MaxValue: "/>
+ <h:inputText value="#{bean.maxValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MinValue: "/>
+ <h:inputText value="#{bean.minValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="ShowArrows: "/>
+ <h:selectBooleanCheckbox value="#{bean.showArrows}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowBoundaryValues: "/>
+ <h:selectBooleanCheckbox value="#{bean.showBoundaryValues}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowInput: "/>
+ <h:selectBooleanCheckbox value="#{bean.showInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowToolTip: "/>
+ <h:selectBooleanCheckbox value="#{bean.showToolTip}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Step: "/>
+ <h:inputText value="#{bean.step}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ </h:form>
+ </h:body>
+</html>
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-02
16:52:45 UTC (rev 18322)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml 2010-08-02
18:40:51 UTC (rev 18323)
@@ -168,6 +168,13 @@
</property-extension>
</property>
<property>
+ <property-name>toolTipClass</property-name>
+ <property-class>java.lang.String</property-class>
+ <property-extension>
+ <cdk:generate>true</cdk:generate>
+ </property-extension>
+ </property>
+ <property>
<property-name>trackClass</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
Modified:
root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss
===================================================================
---
root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss 2010-08-02
16:52:45 UTC (rev 18322)
+++
root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss 2010-08-02
18:40:51 UTC (rev 18323)
@@ -64,6 +64,9 @@
.rf-ins-tt {
position: absolute;
display: none;
+ padding: 2px;
+ /*border: 1px solid '#{richSkin.tipBorderColor}';
+ background-color: '#{richSkin.tipBackgroundColor}';*/
}
.rf-ins-t {
Modified:
root/sandbox/ui/inputs/inputnumberslider/src/main/templates/inputnumberslider.template.xml
===================================================================
---
root/sandbox/ui/inputs/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-08-02
16:52:45 UTC (rev 18322)
+++
root/sandbox/ui/inputs/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-08-02
18:40:51 UTC (rev 18323)
@@ -76,7 +76,7 @@
style="#{component.attributes['showInput'] ? null : 'display:
none;'}" />
</c:if>
<c:if test="#{component.attributes['showToolTip']}">
- <span class="rf-ins-tt">#{getInputValue(facesContext,
component)}</span>
+ <span class="rf-ins-tt
#{component.attributes['toolTipClass']}">#{getInputValue(facesContext,
component)}</span>
</c:if>
<script type="text/javascript">new
RichFaces.ui.InputNumberSlider('#{clientId}', {
delay: #{component.attributes['delay']},