Author: konstantin.mishin
Date: 2010-07-22 15:39:26 -0400 (Thu, 22 Jul 2010)
New Revision: 18202
Added:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
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/pom.xml
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:
developing of inputnumberslider
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-22
19:04:38 UTC (rev 18201)
+++
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java 2010-07-22
19:39:26 UTC (rev 18202)
@@ -28,4 +28,13 @@
@SessionScoped
public class Bean {
+ private int value;
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
}
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-22
19:04:38 UTC (rev 18201)
+++
root/examples-sandbox/trunk/components/inputnumberslider-demo/src/main/webapp/index.xhtml 2010-07-22
19:39:26 UTC (rev 18202)
@@ -34,7 +34,8 @@
</h:head>
<h:body>
<h:form id="form">
- <ins:inputnumberslider />
+ <ins:inputnumberslider value="#{bean.value}" />
+ <h:outputText value="#{bean.value}" />
</h:form>
</h:body>
</html>
Modified: root/ui-sandbox/inputs/trunk/inputnumberslider/pom.xml
===================================================================
--- root/ui-sandbox/inputs/trunk/inputnumberslider/pom.xml 2010-07-22 19:04:38 UTC (rev
18201)
+++ root/ui-sandbox/inputs/trunk/inputnumberslider/pom.xml 2010-07-22 19:39:26 UTC (rev
18202)
@@ -53,6 +53,11 @@
<artifactId>richfaces-core-api</artifactId>
</dependency>
<dependency>
+ <!-- todo remove this dependency or move to test scope -->
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>annotations</artifactId>
<scope>provided</scope>
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-22
19:04:38 UTC (rev 18201)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/config/faces-config.xml 2010-07-22
19:39:26 UTC (rev 18202)
@@ -34,10 +34,10 @@
<cdk:generate>true</cdk:generate>
<cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
<cdk:component-family>javax.faces.Input</cdk:component-family>
- <cdk:renderer-id>org.richfaces.InputNumberSliderRenderer</cdk:renderer-id>
+ <cdk:renderer-type>org.richfaces.InputNumberSliderRenderer</cdk:renderer-type>
<cdk:tag>
- <cdk:name>inputnumberslider</cdk:name>
- <cdk:type>Facelets</cdk:type>
+ <cdk:tag-name>inputnumberslider</cdk:tag-name>
+ <cdk:tag-type>Facelets</cdk:tag-type>
</cdk:tag>
</component-extension>
</component>
Added:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
===================================================================
---
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
(rev 0)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js 2010-07-22
19:39:26 UTC (rev 18202)
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+(function(richfaces, jQuery) {
+ richfaces.ui = richfaces.ui || {};
+
+ richfaces.ui.InputNumberSlider = richfaces.BaseComponent.extendClass({
+
+ name: "InputNumberSlider",
+
+ init: function (id) {
+ this.id = id;
+ },
+
+ publicFunction: function () {
+ // ...
+ },
+
+ __privateFunction: function () {
+ // ...
+ }
+
+ // __overrideMethod: function () {
+ // // if you need to use method from parent class use link to parent prototype
+ // // like in previous solution with extend method
+ // this.$super.__overrideMethod.call(this, ...params...);
+ //
+ // //...
+ // }
+ });
+}(window.RichFaces, jQuery));
\ No newline at end of file
Property changes on:
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
___________________________________________________________________
Name: svn:executable
+ *
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-22
19:04:38 UTC (rev 18201)
+++
root/ui-sandbox/inputs/trunk/inputnumberslider/src/main/templates/inputnumberslider.template.xml 2010-07-22
19:39:26 UTC (rev 18202)
@@ -27,22 +27,29 @@
xmlns:cc="http://richfaces.org/cdk/jsf/composite">
<cc:interface>
<cdk:class>org.richfaces.renderkit.html.InputNumberSliderRenderer</cdk:class>
- <cdk:superclass>javax.faces.render.Renderer</cdk:superclass>
+ <cdk:superclass>org.richfaces.renderkit.InputRendererBase</cdk:superclass>
<cdk:component-family>javax.faces.Input</cdk:component-family>
<cdk:renderer-type>org.richfaces.InputNumberSliderRenderer</cdk:renderer-type>
<cdk:resource-dependency name="inputNumberSlider.ecss" />
+ <cdk:resource-dependency library="javax.faces" name="jsf.js"
/>
+ <cdk:resource-dependency name="jquery.js" />
+ <cdk:resource-dependency name="richfaces.js" />
+ <cdk:resource-dependency name="richfaces.js" />
+ <cdk:resource-dependency name="richfaces-base-component.js" />
+ <cdk:resource-dependency name="inputNumberSlider.js" />
</cc:interface>
<cc:implementation>
<span id="#{clientId}" class="rf-ins">
<span class="sldr_size">
- <span class="sldr_min">10</span>
+ <span class="sldr_min">0</span>
<span class="sldr_max">100</span>
<span class="sldr_track">
<img
src="#{facesContext.application.resourceHandler.createResource('handler.gif').requestPath}"
width="7" height="8" alt="" border="0"
class="sldr_handler" />
</span>
</span>
- <input class="sldr_field" size="3" value="10"
type="text" />
+ <input id="#{clientId}:i" name="#{clientId}"
class="sldr_field" size="3" value="10" type="text"
/>
+ <script
type="text/javascript">RichFaces.ui.InputNumberSlider('#{clientId}');</script>
</span>
</cc:implementation>
</cdk:root>