[richfaces-svn-commits] JBoss Rich Faces SVN: r18839 - in modules/tests/metamer/trunk/application/src/main: webapp/components and 5 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Aug 20 06:30:50 EDT 2010
Author: ppitonak at redhat.com
Date: 2010-08-20 06:30:49 -0400 (Fri, 20 Aug 2010)
New Revision: 18839
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/hDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml
Log:
https://jira.jboss.org/browse/RF-9035
* created page for rich:inputNumberSlider
* added slider to rich:dataTable, rich:extendedDataTable, rich:subTable and h:dataTable
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-20 09:20:08 UTC (rev 18838)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-20 10:30:49 UTC (rev 18839)
@@ -118,6 +118,7 @@
components.put("richExtendedDataTable", "Rich Extended Data Table");
components.put("richFunctions", "Rich Functions");
components.put("richInplaceInput", "Rich Inplace Input");
+ components.put("richInputNumberSlider", "Rich Input Number Slider");
components.put("richJQuery", "Rich jQuery");
components.put("richList", "Rich List");
components.put("richPanel", "Rich Panel");
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java 2010-08-20 10:30:49 UTC (rev 18839)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.tests.metamer.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.html.HtmlInputNumberSlider;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:inputNumberSlider.
+ *
+ * @author <a href="mailto:ppitonak at redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+ at ManagedBean(name = "richInputNumberSliderBean")
+ at ViewScoped
+public class RichInputNumberSliderBean implements Serializable {
+
+ private static final long serialVersionUID = 595154649809L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(HtmlInputNumberSlider.class, getClass());
+
+ attributes.setAttribute("enableManualInput", true);
+ attributes.setAttribute("inputSize", 3);
+ attributes.setAttribute("maxValue", 100);
+ attributes.setAttribute("minValue", 0);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("showBoundaryValues", true);
+ attributes.setAttribute("showInput", true);
+ attributes.setAttribute("step", 1);
+
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Property changes on: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/hDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/hDataTable/components2.xhtml 2010-08-20 09:20:08 UTC (rev 18838)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/hDataTable/components2.xhtml 2010-08-20 10:30:49 UTC (rev 18839)
@@ -175,7 +175,8 @@
<h:outputText id="columnHeaderNumberOfKidsComponent" value="rich:inputNumberSlider" />
</f:facet>
- <h:outputText value="#{record.numberOfKids}" />
+ <rich:inputNumberSlider id="numOfKidsSlider" value="#{record.numberOfKids}" maxValue="5"/>
+
<f:facet name="footer">
<h:outputText id="columnFooterNumberOfKids" value="Number of Kids" />
</f:facet>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml 2010-08-20 09:20:08 UTC (rev 18838)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/components2.xhtml 2010-08-20 10:30:49 UTC (rev 18839)
@@ -163,7 +163,8 @@
<h:outputText id="columnHeaderNumberOfKidsComponent" value="rich:inputNumberSlider" />
</f:facet>
- <h:outputText value="#{record.numberOfKids}" />
+ <rich:inputNumberSlider id="numOfKidsSlider" value="#{record.numberOfKids}" maxValue="5"/>
+
<f:facet name="footer">
<h:outputText id="columnFooterNumberOfKids" value="Number of Kids" />
</f:facet>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-08-20 09:20:08 UTC (rev 18838)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-08-20 10:30:49 UTC (rev 18839)
@@ -163,7 +163,8 @@
<h:outputText id="columnHeaderNumberOfKidsComponent" value="rich:inputNumberSlider" />
</f:facet>
- <h:outputText value="#{record.numberOfKids}" />
+ <rich:inputNumberSlider id="numOfKidsSlider" value="#{record.numberOfKids}" maxValue="5"/>
+
<f:facet name="footer">
<h:outputText id="columnFooterNumberOfKids" value="Number of Kids" />
</f:facet>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml 2010-08-20 10:30:49 UTC (rev 18839)
@@ -0,0 +1,41 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, 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.
+-->
+
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Input Number Slider</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Page containing <b>rich:inputNumberSlider</b> and input boxes for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/simple.xhtml 2010-08-20 10:30:49 UTC (rev 18839)
@@ -0,0 +1,100 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, 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.
+-->
+
+<!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:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <rich:inputNumberSlider id="slider"
+ accesskey="#{richInputNumberSliderBean.attributes['accesskey'].value}"
+ converter="#{richInputNumberSliderBean.attributes['converter'].value}"
+ converterMessage="#{richInputNumberSliderBean.attributes['converterMessage'].value}"
+ decreaseClass="#{richInputNumberSliderBean.attributes['decreaseClass'].value}"
+ decreaseSelectedClass="#{richInputNumberSliderBean.attributes['decreaseSelectedClass'].value}"
+ delay="#{richInputNumberSliderBean.attributes['delay'].value}"
+ disabled="#{richInputNumberSliderBean.attributes['disabled'].value}"
+ enableManualInput="#{richInputNumberSliderBean.attributes['enableManualInput'].value}"
+ handleClass="#{richInputNumberSliderBean.attributes['handleClass'].value}"
+ handleSelectedClass="#{richInputNumberSliderBean.attributes['handleSelectedClass'].value}"
+ immediate="#{richInputNumberSliderBean.attributes['immediate'].value}"
+ increaseClass="#{richInputNumberSliderBean.attributes['increaseClass'].value}"
+ increaseSelectedClass="#{richInputNumberSliderBean.attributes['increaseSelectedClass'].value}"
+ inputClass="#{richInputNumberSliderBean.attributes['inputClass'].value}"
+ inputPosition="#{richInputNumberSliderBean.attributes['inputPosition'].value}"
+ inputSize="#{richInputNumberSliderBean.attributes['inputSize'].value}"
+ localValue="#{richInputNumberSliderBean.attributes['localValue'].value}"
+ localValueSet="#{richInputNumberSliderBean.attributes['localValueSet'].value}"
+ maxValue="#{richInputNumberSliderBean.attributes['maxValue'].value}"
+ maxlength="#{richInputNumberSliderBean.attributes['maxlength'].value}"
+ minValue="#{richInputNumberSliderBean.attributes['minValue'].value}"
+ rendered="#{richInputNumberSliderBean.attributes['rendered'].value}"
+ required="#{richInputNumberSliderBean.attributes['required'].value}"
+ requiredMessage="#{richInputNumberSliderBean.attributes['requiredMessage'].value}"
+ showArrows="#{richInputNumberSliderBean.attributes['showArrows'].value}"
+ showBoundaryValues="#{richInputNumberSliderBean.attributes['showBoundaryValues'].value}"
+ showInput="#{richInputNumberSliderBean.attributes['showInput'].value}"
+ showToolTip="#{richInputNumberSliderBean.attributes['showToolTip'].value}"
+ step="#{richInputNumberSliderBean.attributes['step'].value}"
+ style="#{richInputNumberSliderBean.attributes['style'].value}"
+ styleClass="#{richInputNumberSliderBean.attributes['styleClass'].value}"
+ submittedValue="#{richInputNumberSliderBean.attributes['submittedValue'].value}"
+ tabindex="#{richInputNumberSliderBean.attributes['tabindex'].value}"
+ toolTipClass="#{richInputNumberSliderBean.attributes['toolTipClass'].value}"
+ trackClass="#{richInputNumberSliderBean.attributes['trackClass'].value}"
+ valid="#{richInputNumberSliderBean.attributes['valid'].value}"
+ validator="#{richInputNumberSliderBean.attributes['validator'].value}"
+ validatorMessage="#{richInputNumberSliderBean.attributes['validatorMessage'].value}"
+ validators="#{richInputNumberSliderBean.attributes['validators'].value}"
+ value="#{richInputNumberSliderBean.attributes['value'].value}"
+ valueChangeListener="#{richInputNumberSliderBean.attributes['valueChangeListener'].value}"
+ valueChangeListeners="#{richInputNumberSliderBean.attributes['valueChangeListeners'].value}">
+ <ui:remove>
+ <a4j:ajax id="sliderAjax" render="output"/>
+ </ui:remove>c
+ </rich:inputNumberSlider>
+
+ <br/><br/>
+
+ output: <h:outputText id="output" value="#{richInputNumberSliderBean.attributes['value'].value}"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richInputNumberSliderBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml 2010-08-20 09:20:08 UTC (rev 18838)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richSubTable/components2.xhtml 2010-08-20 10:30:49 UTC (rev 18839)
@@ -134,7 +134,7 @@
</ul>
</rich:column>
<rich:column>
- <h:outputText value="#{item.numberOfKids}" />
+ <rich:inputNumberSlider id="numOfKidsSlider" value="#{item.numberOfKids}" maxValue="5"/>
</rich:column>
<f:facet name="footer">
<h:outputText value="Total of #{list[0].sex == 'MALE' ? 'men' : 'women'}: #{list.size()}" />
More information about the richfaces-svn-commits
mailing list