[richfaces-svn-commits] JBoss Rich Faces SVN: r18643 - in trunk/examples/input-demo/src/main: webapp and 1 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Sun Aug 15 15:33:31 EDT 2010
Author: nbelaevski
Date: 2010-08-15 15:33:31 -0400 (Sun, 15 Aug 2010)
New Revision: 18643
Added:
trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java
trunk/examples/input-demo/src/main/webapp/inputNumberSlider.xhtml
Modified:
trunk/examples/input-demo/src/main/java/org/richfaces/demo/SkinBean.java
trunk/examples/input-demo/src/main/webapp/WEB-INF/web.xml
trunk/examples/input-demo/src/main/webapp/index.xhtml
Log:
InputNumberSlider: moving to main area
Copied: trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java (from rev 18636, sandbox/trunk/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java)
===================================================================
--- trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java (rev 0)
+++ trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputNumberSliderBean.java 2010-08-15 19:33:31 UTC (rev 18643)
@@ -0,0 +1,163 @@
+/*
+ * 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.
+ */
+package org.richfaces.demo;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.component.InputNumberSliderInputPosition;
+
+ at ManagedBean(name = "inputNumberSliderBean")
+ at SessionScoped
+public class InputNumberSliderBean {
+
+ private double value;
+ private String accesskey;
+ private int delay = 200;
+ private boolean disabled = false;
+ private boolean enableManualInput = true;
+ private InputNumberSliderInputPosition inputPosition = InputNumberSliderInputPosition.right;
+ private int inputSize = 3;
+ private double maxValue = 100;
+ private double minValue = 0;
+ private boolean showArrows = false;
+ private boolean showBoundaryValues = true;
+ private boolean showInput = true;
+ private boolean showToolTip = true;
+ private double step = 1;
+
+ public void setValue(double value) {
+ this.value = value;
+ }
+
+ public double getValue() {
+ return value;
+ }
+
+ public void setAccesskey(String accesskey) {
+ this.accesskey = accesskey;
+ }
+
+ public String getAccesskey() {
+ return accesskey;
+ }
+
+ public int getDelay() {
+ return delay;
+ }
+
+ public void setDelay(int delay) {
+ this.delay = delay;
+ }
+
+ public void setEnableManualInput(boolean enableManualInput) {
+ this.enableManualInput = enableManualInput;
+ }
+
+ public boolean getEnableManualInput() {
+ return enableManualInput;
+ }
+
+ public void setInputPosition(InputNumberSliderInputPosition inputPosition) {
+ this.inputPosition = inputPosition;
+ }
+
+ public InputNumberSliderInputPosition getInputPosition() {
+ return inputPosition;
+ }
+
+ public InputNumberSliderInputPosition[] getPositionTypes() {
+ return InputNumberSliderInputPosition.values();
+ }
+
+ public double getMaxValue() {
+ return maxValue;
+ }
+
+ public void setMaxValue(double maxValue) {
+ this.maxValue = maxValue;
+ }
+
+ public double getMinValue() {
+ return minValue;
+ }
+
+ public void setMinValue(double minValue) {
+ this.minValue = minValue;
+ }
+
+ public boolean isShowArrows() {
+ return showArrows;
+ }
+
+ public void setShowArrows(boolean showArrows) {
+ this.showArrows = showArrows;
+ }
+
+ public boolean isShowBoundaryValues() {
+ return showBoundaryValues;
+ }
+
+ public void setShowBoundaryValues(boolean showBoundaryValues) {
+ this.showBoundaryValues = showBoundaryValues;
+ }
+
+ public boolean isShowInput() {
+ return showInput;
+ }
+
+ public void setShowInput(boolean showInput) {
+ this.showInput = showInput;
+ }
+
+ public boolean isShowToolTip() {
+ return showToolTip;
+ }
+
+ public void setShowToolTip(boolean showToolTip) {
+ this.showToolTip = showToolTip;
+ }
+
+ public double getStep() {
+ return step;
+ }
+
+ public void setStep(double step) {
+ this.step = step;
+ }
+
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+ public void setInputSize(int inputSize) {
+ this.inputSize = inputSize;
+ }
+
+ public int getInputSize() {
+ return inputSize;
+ }
+}
Modified: trunk/examples/input-demo/src/main/java/org/richfaces/demo/SkinBean.java
===================================================================
--- trunk/examples/input-demo/src/main/java/org/richfaces/demo/SkinBean.java 2010-08-15 19:31:56 UTC (rev 18642)
+++ trunk/examples/input-demo/src/main/java/org/richfaces/demo/SkinBean.java 2010-08-15 19:33:31 UTC (rev 18643)
@@ -6,6 +6,10 @@
@ManagedBean(name = "skinBean")
@SessionScoped
public class SkinBean {
+
+ private static final String[] SKINS = {"blueSky", "deepMarine", "emeraldTown", "NULL", "ruby", "classic",
+ "DEFAULT", "japanCherry", "plain", "wine" };
+
private String skin = "blueSky";
public SkinBean() {
@@ -18,4 +22,8 @@
public void setSkin(String skin) {
this.skin = skin;
}
+
+ public String[] getSkins() {
+ return SKINS;
+ }
}
Modified: trunk/examples/input-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/WEB-INF/web.xml 2010-08-15 19:31:56 UTC (rev 18642)
+++ trunk/examples/input-demo/src/main/webapp/WEB-INF/web.xml 2010-08-15 19:33:31 UTC (rev 18643)
@@ -40,7 +40,7 @@
<description></description>
<context-param>
<param-name>org.richfaces.skin</param-name>
- <param-value>blueSky</param-value>
+ <param-value>#{skinBean.skin}</param-value>
</context-param>
<context-param>
Modified: trunk/examples/input-demo/src/main/webapp/index.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/index.xhtml 2010-08-15 19:31:56 UTC (rev 18642)
+++ trunk/examples/input-demo/src/main/webapp/index.xhtml 2010-08-15 19:33:31 UTC (rev 18643)
@@ -9,6 +9,7 @@
<h4>Input Components Sample</h4>
<ul>
<li><h:link outcome="inplaceInput">rich:inplaceInput</h:link></li>
+ <li><h:link outcome="inputNumberSlider">rich:inputNumberSlider</h:link></li>
</ul>
<h:form>
Copied: trunk/examples/input-demo/src/main/webapp/inputNumberSlider.xhtml (from rev 18636, sandbox/trunk/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml)
===================================================================
--- trunk/examples/input-demo/src/main/webapp/inputNumberSlider.xhtml (rev 0)
+++ trunk/examples/input-demo/src/main/webapp/inputNumberSlider.xhtml 2010-08-15 19:33:31 UTC (rev 18643)
@@ -0,0 +1,116 @@
+<?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/input">
+<!--
+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="#{skinBean.skin}" onchange="submit();">
+ <f:selectItems value="#{skinBean.skins}"/>
+ </h:selectOneMenu>
+ <br />
+ <ins:inputNumberSlider id="ins" value="#{inputNumberSliderBean.value}" accesskey="#{inputNumberSliderBean.accesskey}" delay="#{inputNumberSliderBean.delay}"
+ disabled="#{inputNumberSliderBean.disabled}" enableManualInput="#{inputNumberSliderBean.enableManualInput}"
+ inputPosition="#{inputNumberSliderBean.inputPosition}" inputSize="#{inputNumberSliderBean.inputSize}" showArrows="#{inputNumberSliderBean.showArrows}"
+ showBoundaryValues="#{inputNumberSliderBean.showBoundaryValues}" showInput="#{inputNumberSliderBean.showInput}"
+ showToolTip="#{inputNumberSliderBean.showToolTip}" maxValue="#{inputNumberSliderBean.maxValue}" minValue="#{inputNumberSliderBean.minValue}"
+ step="#{inputNumberSliderBean.step}" />
+ <br />
+ <h:outputText value="Accesskey: "/>
+ <h:inputText value="#{inputNumberSliderBean.accesskey}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="EnableManualInput: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.enableManualInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Disabled "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.disabled}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Delay: "/>
+ <h:inputText value="#{inputNumberSliderBean.delay}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="InputPosition: "/>
+ <h:selectOneMenu value="#{inputNumberSliderBean.inputPosition}">
+ <f:selectItems value="#{inputNumberSliderBean.positionTypes}"/>
+ <f:ajax render="ins"/>
+ </h:selectOneMenu>
+ <br />
+ <h:outputText value="InputSize: "/>
+ <h:inputText value="#{inputNumberSliderBean.inputSize}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MaxValue: "/>
+ <h:inputText value="#{inputNumberSliderBean.maxValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="MinValue: "/>
+ <h:inputText value="#{inputNumberSliderBean.minValue}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ <br />
+ <h:outputText value="ShowArrows: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showArrows}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowBoundaryValues: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showBoundaryValues}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowInput: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showInput}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="ShowToolTip: "/>
+ <h:selectBooleanCheckbox value="#{inputNumberSliderBean.showToolTip}">
+ <f:ajax render="ins"/>
+ </h:selectBooleanCheckbox>
+ <br />
+ <h:outputText value="Step: "/>
+ <h:inputText value="#{inputNumberSliderBean.step}">
+ <f:ajax render="ins"/>
+ </h:inputText>
+ </h:form>
+ </h:body>
+</html>
More information about the richfaces-svn-commits
mailing list