JBoss Rich Faces SVN: r12994 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-03-17 14:18:11 -0400 (Tue, 17 Mar 2009)
New Revision: 12994
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-5737
org.richfaces.CONTROL_SKINNING_LEVEL option is documented
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-03-17 17:34:22 UTC (rev 12993)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-03-17 18:18:11 UTC (rev 12994)
@@ -2104,10 +2104,17 @@
elements' name and attribute type (where applicable). Also this feature
provides a set of CSS styles so that skinning can be applied assigning rich-*
classes to particular elements or to container of elements that nests controls. </para>
- <para> Standard controls skinning feature provides 2 levels of skinning - <property
- >Standard</property> and <property>Extended</property> while skinning is based
- on detecting browser user agent. If user agent is not detected, Advanced level is
- used. </para>
+ <para> Standard controls skinning feature provides 2 levels of skinning: <property
+ >Standard</property> and <property>Extended</property>. The level is based
+ on detecting the browser type. If browser type is not identified, Advanced level is
+ used. However, if you want to explicitly specify the level of skinning you want to be applied, you need to add a context parameter to your web.xml
+ with <code>org.richfaces.CONTROL_SKINNING_LEVEL</code> as the parameter name
+
+ and value set to either <code>basic</code> or <code>extended</code>.
+
+
+
+ </para>
<itemizedlist>
<listitem>
<para>
@@ -2204,20 +2211,19 @@
<para>Skinning for standard HTML controls can be initialized in two ways:</para>
<itemizedlist>
<listitem>
- <para> adding <code>org.richfaces.CONTROL_SKINNING</code> parmeter to web.xml.
+ <para>by adding <code>org.richfaces.CONTROL_SKINNING</code> parameter to web.xml.
Values: "enable" and "disable". This way implies that
skinning style properties are applied to elements by element name and
attribute type (where applicable). No additional steps required. Please find
- below the table that contains the list of elements to which skinning a
+ below the table that contains the list of elements to which skinning is
applicable. </para>
</listitem>
<listitem>
- <para> adding <code> org.richfaces.CONTROL_SKINNING_CLASSES </code> parameter to
+ <para>by adding <code> org.richfaces.CONTROL_SKINNING_CLASSES </code> parameter to
web.xml file. Possible values "enable" and "disable".
- Implementation of this method implies that the provision of several style
- classes for different types of elements. The style classes have predefined
- names. Application developer should manually assign classes to controls that
- needs skinning or assign class to an element that contains controls. </para>
+ When this option is enabled you are provided with a set of predefined CSS classes
+ that you can use for skinning your HTML components.
+ </para>
</listitem>
</itemizedlist>
<para> By setting <code>org.richfaces.CONTROL_SKINNING_CLASSES</code> to
@@ -2254,7 +2260,7 @@
...]]></programlisting>
<note>
<title>Note:</title>
- <para> a elements have classes based on "link" and pseudo class
+ <para>Elements have classes based on "link" and pseudo class
name, e.g.: rich-link, rich-link-hover, rich-link-visited </para>
</note>
</listitem>
15 years, 10 months
JBoss Rich Faces SVN: r12993 - in trunk/test-applications/seamApp/web/src/main: java/org/richfaces/helloworld/domain/colorPicker and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-03-17 13:34:22 -0400 (Tue, 17 Mar 2009)
New Revision: 12993
Added:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPicker.java
Modified:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java
trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml
Log:
Add colorPicker component to seamApp test application
Added: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPicker.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPicker.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPicker.java 2009-03-17 17:34:22 UTC (rev 12993)
@@ -0,0 +1,205 @@
+package org.richfaces.helloworld.domain.colorPicker;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.component.html.HtmlColorPicker;
+
+import org.richfaces.helloworld.domain.util.componentInfo.ComponentInfo;
+
+@Name("colorPicker")
+(a)Scope(ScopeType.SESSION)
+public class ColorPicker implements Validator, Converter {
+ private HtmlColorPicker htmlColorPicker;
+ private String colorMode;// hex, rgb
+ private String converterMessage;
+ private boolean disabled;
+ private boolean flat;
+ private boolean immediate;
+ private boolean localValueSet;
+ private boolean rendered;
+ private boolean required;
+ private String requiredMessage;
+ private boolean valid;
+ private String validatorMessage;
+ private String value;
+ private String bindLabel;
+
+ public ColorPicker() {
+ colorMode = "rgb";
+ converterMessage = "custom converter message";
+ disabled = false;
+ flat = false;
+ immediate = false;
+ localValueSet = true;
+ rendered = true;
+ required = false;
+ requiredMessage = "custom required message";
+ valid = true;
+ validatorMessage = "custom validator message";
+ value = "rgb(255, 250, 240)";
+ bindLabel = "Click Binding";
+ }
+
+ public void checkBinding(ActionEvent e){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = htmlColorPicker.getClientId(context);
+ }
+
+ public void changeValue(ValueChangeEvent e) {
+ System.out.println("old value:" + e.getOldValue() + " new value:"
+ + e.getNewValue());
+ }
+
+ public void addColorPicker() {
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(htmlColorPicker);
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void validate(FacesContext context, UIComponent component,
+ Object value) throws ValidatorException {
+ String str = value.toString();
+ if (str.startsWith("rgb")) {
+ if (str.indexOf("100") != -1)
+ throw new ValidatorException(new FacesMessage(
+ "Test validator: 100 is restricted!"));
+ }
+ }
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) throws ConverterException {
+ if (value.indexOf("100") != -1)
+ throw new ConverterException(new FacesMessage("Test converter(getAsObject): 100 is restricted!"));
+ return new String(value + " converted");
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) throws ConverterException {
+ if (value.toString().indexOf("100") != -1)
+ throw new ConverterException(new FacesMessage("Test converter(getAsString): 100 is restricted!"));
+ return value.toString();
+ }
+
+ public String getColorMode() {
+ return colorMode;
+ }
+
+ public void setColorMode(String colorMode) {
+ this.colorMode = colorMode;
+ }
+
+ public String getConverterMessage() {
+ return converterMessage;
+ }
+
+ public void setConverterMessage(String converterMessage) {
+ this.converterMessage = converterMessage;
+ }
+
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ public boolean isFlat() {
+ return flat;
+ }
+
+ public void setFlat(boolean flat) {
+ this.flat = flat;
+ }
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ public boolean isLocalValueSet() {
+ return localValueSet;
+ }
+
+ public void setLocalValueSet(boolean localValueSet) {
+ this.localValueSet = localValueSet;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ public String getRequiredMessage() {
+ return requiredMessage;
+ }
+
+ public void setRequiredMessage(String requiredMessage) {
+ this.requiredMessage = requiredMessage;
+ }
+
+ public boolean isValid() {
+ return valid;
+ }
+
+ public void setValid(boolean valid) {
+ this.valid = valid;
+ }
+
+ public String getValidatorMessage() {
+ return validatorMessage;
+ }
+
+ public void setValidatorMessage(String validatorMessage) {
+ this.validatorMessage = validatorMessage;
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public HtmlColorPicker getHtmlColorPicker() {
+ return htmlColorPicker;
+ }
+
+ public void setHtmlColorPicker(HtmlColorPicker htmlColorPicker) {
+ this.htmlColorPicker = htmlColorPicker;
+ }
+
+}
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java 2009-03-17 17:32:45 UTC (rev 12992)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/rich/RichBean.java 2009-03-17 17:34:22 UTC (rev 12993)
@@ -81,7 +81,7 @@
map.add("ExtendedDataTable", add("/ExtendedDataTable/ExtendedDataTable", new boolean [] {false, true, false}));
map.add("Editor", add("/Editor/Editor", new boolean [] {true, true, false}));
map.add("Queue", add("/Queue/Queue", new boolean [] {false, true, true}));
-
+ map.add("ColorPicker", add("/ColorPicker/ColorPicker", new boolean [] {false, true, false}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
list.add(new SelectItem(iterator.next()));
Modified: trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml 2009-03-17 17:32:45 UTC (rev 12992)
+++ trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml 2009-03-17 17:34:22 UTC (rev 12993)
@@ -20,6 +20,10 @@
org.richfaces.helloworld.domain.util.converter.InplaceInputConverter
</converter-class>
</converter>
+ <converter>
+ <converter-id>colorPickerConverter</converter-id>
+ <converter-class>org.richfaces.helloworld.domain.colorPicker.ColorPicker</converter-class>
+ </converter>
<validator>
<validator-id>CalendarValidator</validator-id>
<validator-class>
@@ -32,6 +36,20 @@
org.richfaces.helloworld.domain.message.MessageValidator
</validator-class>
</validator>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>
+ org.richfaces.helloworld.domain.util.skins.Skins
+ </managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>skinning</managed-bean-name>
+ <managed-bean-class>
+ org.richfaces.helloworld.domain.skinning.Skinning
+ </managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<locale-config>
@@ -44,6 +62,8 @@
</locale-config>
</application>
<lifecycle>
- <phase-listener>org.richfaces.helloworld.domain.util.phaseTracker.PhaseTracker</phase-listener>
+ <phase-listener>
+ org.richfaces.helloworld.domain.util.phaseTracker.PhaseTracker
+ </phase-listener>
</lifecycle>
</faces-config>
15 years, 10 months
JBoss Rich Faces SVN: r12992 - trunk/test-applications/jsp/src/main/webapp/ColorPicker.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-03-17 13:32:45 -0400 (Tue, 17 Mar 2009)
New Revision: 12992
Removed:
trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.jsp
trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerProperty.jsp
trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerStraightforward.jsp
Modified:
trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.xhtml
Log:
Add ColorPicker pages
Deleted: trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.jsp 2009-03-17 17:01:36 UTC (rev 12991)
+++ trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.jsp 2009-03-17 17:32:45 UTC (rev 12992)
@@ -1,26 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
-<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-
-<f:subview id="colorPickerSubviewID">
- <rich:colorPicker binding="#{colorPicker.component}"
- colorMode="hex" converter="colorPickerConverter"
- converterMessage="#{colorPicker.converterMessage}"
- disabled="#{colorPicker.disabled}" flat="#{colorPicker.flat}"
- id="colorPickerID" immediate="#{colorPicker.immediate}"
- localValueSet="#{colorPicker.localValueSet}"
- onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
- onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
- onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
- onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
- onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
- rendered="#{colorPicker.rendered}" required="#{colorPicker.required}"
- requiredMessage="#{colorPicker.requiredMessage}"
- showEvent="onmouseover" valid="#{colorPicker.valid}"
- validator="#{colorPicker.validate}"
- validatorMessage="#{colorPicker.validatorMessage}"
- value="#{colorPicker.value}"
- valueChangeListener="#{colorPicker.changeValue}">
- </rich:colorPicker>
-</f:subview>
Modified: trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.xhtml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.xhtml 2009-03-17 17:01:36 UTC (rev 12991)
+++ trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.xhtml 2009-03-17 17:32:45 UTC (rev 12992)
@@ -3,7 +3,7 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="calendarSubviewID">
- <rich:colorPicker binding="#{colorPicker.component}"
+ <rich:colorPicker binding="#{colorPicker.htmlColorPicker}"
colorMode="hex" converter="colorPickerConverter"
converterMessage="#{colorPicker.converterMessage}"
disabled="#{colorPicker.disabled}" flat="#{colorPicker.flat}"
Deleted: trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerProperty.jsp 2009-03-17 17:01:36 UTC (rev 12991)
+++ trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerProperty.jsp 2009-03-17 17:32:45 UTC (rev 12992)
@@ -1,64 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
-<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-
-<f:subview id="colorPickerPropertySubviewID">
- <h:commandButton value="add test"
- action="#{colorPicker.addColorPicker}"></h:commandButton>
- <h:panelGrid columns="2">
- <h:outputText value="colorMode" />
- <h:selectOneRadio value="#{colorPicker.colorMode}"
- onchange="submit">
- <f:selectItem itemLabel="rgb" itemValue="rgb" />
- <f:selectItem itemLabel="hex" itemValue="hex" />
- </h:selectOneRadio>
-
- <h:outputText value="converterMessage: "></h:outputText>
- <h:inputText value="#{colorPicker.converterMessage}"
- onchange="submit"></h:inputText>
-
- <h:outputText value="disabled" />
- <h:selectBooleanCheckbox value="#{colorPicker.disabled}"
- onclick="submit" />
-
- <h:outputText value="flat" />
- <h:selectBooleanCheckbox value="#{colorPicker.flat}"
- onclick="submit" />
-
- <h:outputText value="immediate" />
- <h:selectBooleanCheckbox value="#{colorPicker.immediate}"
- onclick="submit" />
-
- <h:outputText value="localValueSet" />
- <h:selectBooleanCheckbox value="#{colorPicker.localValueSet}"
- onclick="submit" />
-
- <h:outputText value="rendered" />
- <h:selectBooleanCheckbox value="#{colorPicker.rendered}"
- onclick="submit" />
-
- <h:outputText value="required" />
- <h:selectBooleanCheckbox value="#{colorPicker.required}"
- onclick="submit" />
-
- <h:outputText value="requiredMessage: "></h:outputText>
- <h:inputText value="#{colorPicker.requiredMessage}"
- onchange="submit"></h:inputText>
-
- <h:outputText value="valid" />
- <h:selectBooleanCheckbox value="#{colorPicker.valid}"
- onclick="submit" />
-
- <h:outputText value="validatorMessage: "></h:outputText>
- <h:inputText value="#{colorPicker.validatorMessage}"
- onchange="submit;"></h:inputText>
-
- <h:commandButton actionListener="#{colorPicker.checkBinding}"
- value="Binding">
- <a4j:support event="onclick" reRender="bindLabelID"></a4j:support>
- </h:commandButton>
- <h:outputText value="#{colorPicker.bindLabel}" id="bindLabelID" />
-
- </h:panelGrid>
-</f:subview>
\ No newline at end of file
Deleted: trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerStraightforward.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerStraightforward.jsp 2009-03-17 17:01:36 UTC (rev 12991)
+++ trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerStraightforward.jsp 2009-03-17 17:32:45 UTC (rev 12992)
@@ -1,8 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
-<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-
-<f:subview id="colorPickerStraightforwardSubviewID">
-<div>ColorPicker straightforward...</div>
-</f:subview>
\ No newline at end of file
15 years, 10 months
JBoss Rich Faces SVN: r12991 - in trunk/ui: listShuttle/src/main/config/component and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2009-03-17 13:01:36 -0400 (Tue, 17 Mar 2009)
New Revision: 12991
Modified:
trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
trunk/ui/orderingList/src/main/config/component/orderinglist.xml
trunk/ui/panelbar/src/main/config/component/panelbar.xml
trunk/ui/pickList/src/main/config/component/picklist.xml
trunk/ui/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml
trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
Log:
RF-5945 - updated description for inputNumberSlider, listShuttle, modalPanel, orderingList, panelBar, pickList, simpleTogglePanel, suggestionbox (partly).
Modified: trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2009-03-17 16:25:07 UTC (rev 12990)
+++ trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2009-03-17 17:01:36 UTC (rev 12991)
@@ -155,7 +155,7 @@
<property>
<name> onerror </name>
<classname>java.lang.String</classname>
- <description>This error is called when a non-number value or a number value that is out of the range is input
+ <description>HTML: script expression; a non-number value or a number value that is out of the range is input
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-03-17 16:25:07 UTC (rev 12990)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-03-17 17:01:36 UTC (rev 12991)
@@ -191,7 +191,7 @@
<property>
<name>onlistchanged</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called on a list change operation</description>
+ <description>HTML: script expression; a list is changed</description>
</property>
<property>
<name>onorderchanged</name>
@@ -201,7 +201,7 @@
<property>
<name>onlistchange</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called before list change operation</description>
+ <description>HTML: script expression; before a list is changed</description>
</property>
<property>
<name>onorderchange</name>
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2009-03-17 16:25:07 UTC (rev 12990)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2009-03-17 17:01:36 UTC (rev 12991)
@@ -124,41 +124,41 @@
<property>
<name>onshow</name>
<classname>java.lang.String</classname>
- <description> Event must occur after panel opened </description>
+ <description>HTML: script expression; after panel is opened </description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>onhide</name>
<classname>java.lang.String</classname>
- <description> Event must occur after panel closed </description>
+ <description>HTML: script expression; after panel is closed </description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>onmove</name>
<classname>java.lang.String</classname>
- <description> Event must occur before panel is moving </description>
+ <description>HTML: script expression; before panel is moved </description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>onbeforeshow</name>
<classname>java.lang.String</classname>
- <description> Event must occur before panel is opening </description>
+ <description>HTML: script expression; before panel is opened </description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>onbeforehide</name>
<classname>java.lang.String</classname>
- <description> Event must occur before panel is hiding </description>
+ <description>HTML: script expression; before panel is hidden </description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>onresize</name>
<classname>java.lang.String</classname>
- <description>Event must occur than panel is resizing </description>
+ <description>HTML: script expression; panel is resized </description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
Modified: trunk/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2009-03-17 16:25:07 UTC (rev 12990)
+++ trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2009-03-17 17:01:36 UTC (rev 12991)
@@ -221,7 +221,7 @@
<name>onorderchanged</name>
<classname>java.lang.String</classname>
<description>
- A JavaScript event handler called on an order operation
+ HTML: script expression; a order list is changed
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -229,7 +229,7 @@
<name>onorderchange</name>
<classname>java.lang.String</classname>
<description>
- A JavaScript event handler called before order operation
+ HTML: script expression; before a order list is changed
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -237,7 +237,7 @@
<name>ontopclick</name>
<classname>java.lang.String</classname>
<description>
- A JavaScript event handler; a button "Top" is clicked
+ HTML: script expression; a button "Top" is clicked
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -253,7 +253,7 @@
<name>ondownclick</name>
<classname>java.lang.String</classname>
<description>
- A JavaScript event handler; a button "Down" is clicked
+ HTML: script expression; a button "Down" is clicked
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -261,7 +261,7 @@
<name>onbottomclick</name>
<classname>java.lang.String</classname>
<description>
- A JavaScript event handler; a button "Bottom" is clicked
+ HTML: script expression; a button "Bottom" is clicked
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -269,7 +269,7 @@
<name>onheaderclick</name>
<classname>java.lang.String</classname>
<description>
- A JavaScript event handler; a header is clicked
+ HTML: script expression; a header is clicked
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
Modified: trunk/ui/panelbar/src/main/config/component/panelbar.xml
===================================================================
--- trunk/ui/panelbar/src/main/config/component/panelbar.xml 2009-03-17 16:25:07 UTC (rev 12990)
+++ trunk/ui/panelbar/src/main/config/component/panelbar.xml 2009-03-17 17:01:36 UTC (rev 12991)
@@ -88,7 +88,7 @@
<property>
<name>onclick</name>
<classname>java.lang.String</classname>
- <description>JavaScript code for call before header onclick</description>
+ <description>HTML: script expression; before on the header is clicked</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
@@ -100,7 +100,7 @@
<name>onitemchange</name>
<classname>java.lang.String</classname>
<description>
- Event must occur on than item has been changed
+ HTML: script expression; a item is changed
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -108,7 +108,7 @@
<name>onmouseover</name>
<classname>java.lang.String</classname>
<description>
- Event must occur on than item has been changed
+ HTML: script expression; a pointer was moved onto.
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -116,7 +116,7 @@
<name>onmouseout</name>
<classname>java.lang.String</classname>
<description>
- Event must occur on than item has been changed
+ HTML: a script expression; a pointer is moved away
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -124,7 +124,7 @@
<name>onmousemove</name>
<classname>java.lang.String</classname>
<description>
- Event must occur on than item has been changed
+ HTML: a script expression; a pointer is moved within
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -216,7 +216,7 @@
<name>onenter</name>
<classname>java.lang.String</classname>
<description>
- Event must occur on than item has been entered
+ HTML: a script expression; a item is entered
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
@@ -225,7 +225,7 @@
<name>onleave</name>
<classname>java.lang.String</classname>
<description>
- Event must occur on than item has been leaved
+ HTML: a script expression; a item is leaved
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
Modified: trunk/ui/pickList/src/main/config/component/picklist.xml
===================================================================
--- trunk/ui/pickList/src/main/config/component/picklist.xml 2009-03-17 16:25:07 UTC (rev 12990)
+++ trunk/ui/pickList/src/main/config/component/picklist.xml 2009-03-17 17:01:36 UTC (rev 12991)
@@ -220,12 +220,12 @@
<property>
<name>onlistchanged</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called on a list change operation</description>
+ <description>HTML: a script expression; a list is changed</description>
</property>
<property>
<name>onlistchange</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called before list change operation</description>
+ <description>HTML: a script expression; before a list is changed</description>
</property>
<property>
<name>disabled</name>
Modified: trunk/ui/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml 2009-03-17 16:25:07 UTC (rev 12990)
+++ trunk/ui/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml 2009-03-17 17:01:36 UTC (rev 12991)
@@ -112,14 +112,14 @@
<property>
<name>onexpand</name>
<classname>java.lang.String</classname>
- <description> Event must occur on befor panel expanded</description>
+ <description> HTML: script expression; before a panel is expanded</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>oncollapse</name>
<classname>java.lang.String</classname>
- <description> Event must occur on befor panel collapsed</description>
+ <description> HTML: script expression; before a panel is collapsed</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
</component>
Modified: trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2009-03-17 16:25:07 UTC (rev 12990)
+++ trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2009-03-17 17:01:36 UTC (rev 12991)
@@ -156,7 +156,7 @@
<property>
<name>onsubmit</name>
<classname>java.lang.String</classname>
- <description>JavaScript code for call before submission of ajax event</description>
+ <description>HTML: script expression; before ajax event is submited</description>
</property>
<property hidden="true">
@@ -204,15 +204,15 @@
<name>onselect</name>
<classname>java.lang.String</classname>
<description>
- JavaScript code for call on select suggestion, after
- update value of target element
+ HTML: script expression; after
+ value of target element is updated
</description>
</property>
<property>
<name>onobjectchange</name>
<classname>java.lang.String</classname>
<description>
- JavaScript code for call when selected objects are changed
+ HTML: script expression; selected objects are changed
</description>
</property>
15 years, 10 months
JBoss Rich Faces SVN: r12990 - in trunk/test-applications/facelets/src/main: java/colorPicker and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-03-17 12:25:07 -0400 (Tue, 17 Mar 2009)
New Revision: 12990
Added:
trunk/test-applications/facelets/src/main/java/colorPicker/
trunk/test-applications/facelets/src/main/java/colorPicker/ColorPicker.java
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-ColorPicker.xml
Modified:
trunk/test-applications/facelets/src/main/java/rich/RichBean.java
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Converter.xml
trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
Log:
Add colorPicker
Added: trunk/test-applications/facelets/src/main/java/colorPicker/ColorPicker.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/colorPicker/ColorPicker.java (rev 0)
+++ trunk/test-applications/facelets/src/main/java/colorPicker/ColorPicker.java 2009-03-17 16:25:07 UTC (rev 12990)
@@ -0,0 +1,200 @@
+package colorPicker;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import org.richfaces.component.html.HtmlColorPicker;
+
+import util.componentInfo.ComponentInfo;
+
+public class ColorPicker implements Validator, Converter {
+ private HtmlColorPicker component;
+ private String colorMode;// hex, rgb
+ private String converterMessage;
+ private boolean disabled;
+ private boolean flat;
+ private boolean immediate;
+ private boolean localValueSet;
+ private boolean rendered;
+ private boolean required;
+ private String requiredMessage;
+ private boolean valid;
+ private String validatorMessage;
+ private String value;
+ private String bindLabel;
+
+ public ColorPicker() {
+ colorMode = "rgb";
+ converterMessage = "custom converter message";
+ disabled = false;
+ flat = false;
+ immediate = false;
+ localValueSet = true;
+ rendered = true;
+ required = false;
+ requiredMessage = "custom required message";
+ valid = true;
+ validatorMessage = "custom validator message";
+ value = "rgb(255, 250, 240)";
+ bindLabel = "Click Binding";
+ }
+
+ public void checkBinding(ActionEvent e){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = component.getClientId(context);
+ }
+
+ public void changeValue(ValueChangeEvent e) {
+ System.out.println("old value:" + e.getOldValue() + " new value:"
+ + e.getNewValue());
+ }
+
+ public void addColorPicker() {
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(component);
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void validate(FacesContext context, UIComponent component,
+ Object value) throws ValidatorException {
+ String str = value.toString();
+ if (str.startsWith("rgb")) {
+ if (str.indexOf("100") != -1)
+ throw new ValidatorException(new FacesMessage(
+ "Test validator: 100 is restricted!"));
+ }
+ }
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) throws ConverterException {
+ if (value.indexOf("100") != -1)
+ throw new ConverterException(new FacesMessage("Test converter(getAsObject): 100 is restricted!"));
+ return new String(value + " converted");
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) throws ConverterException {
+ if (value.toString().indexOf("100") != -1)
+ throw new ConverterException(new FacesMessage("Test converter(getAsString): 100 is restricted!"));
+ return value.toString();
+ }
+
+ public HtmlColorPicker getComponent() {
+ return component;
+ }
+
+ public void setComponent(HtmlColorPicker component) {
+ this.component = component;
+ }
+
+ public String getColorMode() {
+ return colorMode;
+ }
+
+ public void setColorMode(String colorMode) {
+ this.colorMode = colorMode;
+ }
+
+ public String getConverterMessage() {
+ return converterMessage;
+ }
+
+ public void setConverterMessage(String converterMessage) {
+ this.converterMessage = converterMessage;
+ }
+
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ public boolean isFlat() {
+ return flat;
+ }
+
+ public void setFlat(boolean flat) {
+ this.flat = flat;
+ }
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
+
+ public boolean isLocalValueSet() {
+ return localValueSet;
+ }
+
+ public void setLocalValueSet(boolean localValueSet) {
+ this.localValueSet = localValueSet;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ public String getRequiredMessage() {
+ return requiredMessage;
+ }
+
+ public void setRequiredMessage(String requiredMessage) {
+ this.requiredMessage = requiredMessage;
+ }
+
+ public boolean isValid() {
+ return valid;
+ }
+
+ public void setValid(boolean valid) {
+ this.valid = valid;
+ }
+
+ public String getValidatorMessage() {
+ return validatorMessage;
+ }
+
+ public void setValidatorMessage(String validatorMessage) {
+ this.validatorMessage = validatorMessage;
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+}
Modified: trunk/test-applications/facelets/src/main/java/rich/RichBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2009-03-17 16:23:56 UTC (rev 12989)
+++ trunk/test-applications/facelets/src/main/java/rich/RichBean.java 2009-03-17 16:25:07 UTC (rev 12990)
@@ -77,6 +77,7 @@
map.add("Editor", add("/Editor/Editor", new boolean [] {true, true, false}));
map.add("Queue", add("/Queue/Queue", new boolean [] {false, true, true}));
map.add("tTree", add("/tTree/tTree", new boolean [] {true, true, true}));
+ map.add("ColorPicker", add("/ColorPicker/ColorPicker", new boolean [] {false, true, false}));
Iterator<String> iterator = map.getSet().iterator();
while(iterator.hasNext()){
list.add(new SelectItem(iterator.next()));
Added: trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-ColorPicker.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-ColorPicker.xml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-ColorPicker.xml 2009-03-17 16:25:07 UTC (rev 12990)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>colorPicker</managed-bean-name>
+ <managed-bean-class>colorPicker.ColorPicker</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Converter.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Converter.xml 2009-03-17 16:23:56 UTC (rev 12989)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config-Converter.xml 2009-03-17 16:25:07 UTC (rev 12990)
@@ -14,4 +14,8 @@
<converter-id>inplaceInputConverter</converter-id>
<converter-class>util.converter.InplaceInputConverter</converter-class>
</converter>
+ <converter>
+ <converter-id>colorPickerConverter</converter-id>
+ <converter-class>colorPicker.ColorPicker</converter-class>
+ </converter>
</faces-config>
Modified: trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2009-03-17 16:23:56 UTC (rev 12989)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2009-03-17 16:25:07 UTC (rev 12990)
@@ -1,90 +1,104 @@
<?xml version="1.0"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <description>RichFaces Test-Application</description>
- <display-name>test-application</display-name>
- <context-param>
- <param-name>org.ajax4jsf.SKIN</param-name>
- <param-value>#{skinBean.skin}</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
- <param-value>#{skinning.skinningClass}</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.CONTROL_SKINNING</param-name>
- <param-value>#{skinning.skinning}</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.REFRESH_PERIOD</param-name>
- <param-value>2</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>client</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.validateXml</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>com.sun.faces.verifyObjects</param-name>
- <param-value>true</param-value>
- </context-param>
- <context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config-tTree.xml,/WEB-INF/faces-config-Queue.xml,/WEB-INF/faces-config-Editor.xml,/WEB-INF/faces-config-ExtendedDataTable.xml,/WEB-INF/faces-config-DataGrid.xml,/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-config-DataFilterSlider.xml,/WE!
B-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml,/WEB-INF/faces-config-Opt!
ions.xml,/WEB-INF/faces-config-SortingAndFiltering.xml,/WEB-INF/faces-
config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml</param-value>
- </context-param>
- <context-param>
- <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
- <param-value>false</param-value>
- </context-param>
- <context-param>
- <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
- <param-value>NONE</param-value>
-</context-param>
-<context-param>
- <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
- <param-value>true</param-value>
-</context-param>
- <filter>
- <display-name>Ajax4jsf Filter</display-name>
- <filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- <init-param>
- <param-name>createTempFiles</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>maxRequestSize</param-name>
- <param-value>143482880</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- </filter-mapping>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
- <login-config>
- <auth-method>BASIC</auth-method>
- </login-config>
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <description>RichFaces Test-Application</description>
+ <display-name>test-application</display-name>
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
+ <param-value>#{skinning.skinningClass}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>#{skinning.skinning}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>
+ /WEB-INF/faces-config-ColorPicker.xml,/WEB-INF/faces-config-tTree.xml,/WEB-INF/faces-config-Queue.xml,/WEB-INF/faces-config-Editor.xml,/WEB-INF/faces-config-ExtendedDataTable.xml,/WEB-INF/faces-config-DataGrid.xml,/WEB-INF/faces-config-Validator.xml,/WEB-INF/faces-config-ComponentInfo.xml,/WEB-INF/faces-config-HotKey.xml,/WEB-INF/faces-config-DataTable.xml,/WEB-INF/faces-config-SimpleTogglePanel.xml,/WEB-INF/faces-config-Panel.xml,/WEB-INF/faces-config-PanelBar.xml,/WEB-INF/faces-config-TabPanel.xml,/WEB-INF/faces-config-TogglePanel.xml,/WEB-INF/faces-config-Paint2D.xml,/WEB-INF/faces-config-InputNumberSlider.xml,/WEB-INF/faces-config-InputNumberSpinner.xml,/WEB-INF/faces-config-DDMenu.xml,/WEB-INF/faces-config-Tree.xml,/WEB-INF/faces-config-PanelMenu.xml,/WEB-INF/faces-config-Icon.xml,/WEB-INF/faces-config-ModalPanel.xml,/WEB-INF/faces-config-tooltip.xml,/WEB-INF/faces-config-Skin.xml,/WEB-INF/faces-config-Calendar.xml,/WEB-INF/faces-config-Gmap.xml,/WEB-INF/faces-confi!
g-DataFilterSlider.xml,/WEB-INF/faces-config-Separator.xml,/WEB-INF/faces-config-Spacer.xml,/WEB-INF/faces-config-ToolBar.xml,/WEB-INF/faces-config-DataScroller.xml,/WEB-INF/faces-config-SuggestionBox.xml,/WEB-INF/faces-config-Message.xml,/WEB-INF/faces-config-VirtualEarth.xml,/WEB-INF/faces-config-Effect.xml,/WEB-INF/faces-config-Insert.xml,/WEB-INF/faces-config-RichBean.xml,/WEB-INF/faces-config-ScrollableDataTable.xml,/WEB-INF/faces-config-jQuery.xml,/WEB-INF/faces-config-DragAndDrop.xml,/WEB-INF/faces-config-OrderingList.xml,/WEB-INF/faces-config-DataOrderedList.xml,/WEB-INF/faces-config-DataDefinitionList.xml,/WEB-INF/faces-config-ContextMenu.xml,/WEB-INF/faces-config-ListShuttle.xml,/WEB-INF/faces-config-Converter.xml,/WEB-INF/faces-config-ComponentControl.xml,/WEB-INF/faces-config-Columns.xml,/WEB-INF/faces-config-PickList.xml,/WEB-INF/faces-config-Combobox.xml,/WEB-INF/faces-config-PTComponent.xml,/WEB-INF/faces-config-Event.xml,/WEB-INF/faces-config-ProgressBar.xml!
,/WEB-INF/faces-config-Options.xml,/WEB-INF/faces-config-SortingAndFil
tering.xml,/WEB-INF/faces-config-Style.xml,/WEB-INF/faces-config-FileUpload.xml,/WEB-INF/faces-config-InplaceSelect.xml,/WEB-INF/faces-config-InplaceInput.xml,/WEB-INF/faces-config-Skinning.xml,/WEB-INF/faces-config-Custom.xml
+ </param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
+ <param-value>NONE</param-value>
+ </context-param>
+ <context-param>
+ <param-name>
+ org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL
+ </param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>createTempFiles</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>maxRequestSize</param-name>
+ <param-value>143482880</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+
+ <session-config>
+ <session-timeout>500</session-timeout>
+ </session-config>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
</web-app>
15 years, 10 months
JBoss Rich Faces SVN: r12989 - trunk/test-applications/jsp/src/main/webapp/ColorPicker.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-03-17 12:23:56 -0400 (Tue, 17 Mar 2009)
New Revision: 12989
Added:
trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.xhtml
trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerProperty.xhtml
trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerStraightforward.xhtml
Log:
Added: trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.xhtml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.xhtml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.xhtml 2009-03-17 16:23:56 UTC (rev 12989)
@@ -0,0 +1,25 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="calendarSubviewID">
+ <rich:colorPicker binding="#{colorPicker.component}"
+ colorMode="hex" converter="colorPickerConverter"
+ converterMessage="#{colorPicker.converterMessage}"
+ disabled="#{colorPicker.disabled}" flat="#{colorPicker.flat}"
+ id="colorPickerID" immediate="#{colorPicker.immediate}"
+ localValueSet="#{colorPicker.localValueSet}"
+ onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
+ rendered="#{colorPicker.rendered}" required="#{colorPicker.required}"
+ requiredMessage="#{colorPicker.requiredMessage}"
+ showEvent="onmouseover" valid="#{colorPicker.valid}"
+ validator="#{colorPicker.validate}"
+ validatorMessage="#{colorPicker.validatorMessage}"
+ value="#{colorPicker.value}"
+ valueChangeListener="#{colorPicker.changeValue}">
+ </rich:colorPicker>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerProperty.xhtml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerProperty.xhtml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerProperty.xhtml 2009-03-17 16:23:56 UTC (rev 12989)
@@ -0,0 +1,63 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="calendarPropertySubviewID">
+ <h:commandButton value="add test"
+ action="#{colorPicker.addColorPicker}"></h:commandButton>
+ <h:panelGrid columns="2">
+ <h:outputText value="colorMode" />
+ <h:selectOneRadio value="#{colorPicker.colorMode}"
+ onchange="submit">
+ <f:selectItem itemLabel="rgb" itemValue="rgb" />
+ <f:selectItem itemLabel="hex" itemValue="hex" />
+ </h:selectOneRadio>
+
+ <h:outputText value="converterMessage: "></h:outputText>
+ <h:inputText value="#{colorPicker.converterMessage}"
+ onchange="submit"></h:inputText>
+
+ <h:outputText value="disabled" />
+ <h:selectBooleanCheckbox value="#{colorPicker.disabled}"
+ onclick="submit" />
+
+ <h:outputText value="flat" />
+ <h:selectBooleanCheckbox value="#{colorPicker.flat}"
+ onclick="submit" />
+
+ <h:outputText value="immediate" />
+ <h:selectBooleanCheckbox value="#{colorPicker.immediate}"
+ onclick="submit" />
+
+ <h:outputText value="localValueSet" />
+ <h:selectBooleanCheckbox value="#{colorPicker.localValueSet}"
+ onclick="submit" />
+
+ <h:outputText value="rendered" />
+ <h:selectBooleanCheckbox value="#{colorPicker.rendered}"
+ onclick="submit" />
+
+ <h:outputText value="required" />
+ <h:selectBooleanCheckbox value="#{colorPicker.required}"
+ onclick="submit" />
+
+ <h:outputText value="requiredMessage: "></h:outputText>
+ <h:inputText value="#{colorPicker.requiredMessage}"
+ onchange="submit"></h:inputText>
+
+ <h:outputText value="valid" />
+ <h:selectBooleanCheckbox value="#{colorPicker.valid}"
+ onclick="submit" />
+
+ <h:outputText value="validatorMessage: "></h:outputText>
+ <h:inputText value="#{colorPicker.validatorMessage}"
+ onchange="submit;"></h:inputText>
+
+ <h:commandButton actionListener="#{colorPicker.checkBinding}"
+ value="Binding">
+ <a4j:support event="onclick" reRender="bindLabelID"></a4j:support>
+ </h:commandButton>
+ <h:outputText value="#{colorPicker.bindLabel}" id="bindLabelID" />
+
+ </h:panelGrid>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerStraightforward.xhtml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerStraightforward.xhtml (rev 0)
+++ trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPickerStraightforward.xhtml 2009-03-17 16:23:56 UTC (rev 12989)
@@ -0,0 +1,8 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ id="calendarStraightforwardSubviewID">
+
+</f:subview>
\ No newline at end of file
15 years, 10 months
JBoss Rich Faces SVN: r12988 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-17 12:17:55 -0400 (Tue, 17 Mar 2009)
New Revision: 12988
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java
Log:
fix test according to new layout and listener impl
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java 2009-03-17 16:16:56 UTC (rev 12987)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPushTest.java 2009-03-17 16:17:55 UTC (rev 12988)
@@ -31,10 +31,8 @@
public class AjaxPushTest extends SeleniumTestBase {
- private final static String RESTART_RESET = "#{ajaxPushBean.restart}";
-
private final static String STOP_RESET = "#{ajaxPushBean.stop}";
-
+
private static Map<String, String> params = new HashMap<String, String>();
static {
@@ -52,34 +50,15 @@
String startBtnID = parentId + "startButton";
String stopBtnID = parentId + "stopButton";
- String startPanelID = parentId + "startPanel";
- String progressPanelID = parentId + "progressPanel";
-
- writeStatus("Check layout before start pushing");
-
- AssertRendered(startBtnID);
- AssertRendered(startPanelID);
-
- AssertNotRendered(stopBtnID);
- AssertNotRendered(progressPanelID);
-
writeStatus("Start push component. Test bean has to start sending events to registered PushEventListener");
clickAjaxCommandAndWait(startBtnID);
- writeStatus("Check layout after pushing started");
-
- AssertNotRendered(startBtnID);
- AssertNotRendered(startPanelID);
-
- AssertRendered(stopBtnID);
- AssertRendered(progressPanelID);
-
writeStatus("check whether push events are being fired");
int eventBefore = getEventsCount();
- delay(3000);
+ delay(1500);
int eventAfter = getEventsCount();
@@ -88,31 +67,43 @@
}
writeStatus("stop pushing");
-
clickAjaxCommandAndWait(stopBtnID);
-
- writeStatus("Check layout after pushing stopped");
-
- AssertRendered(startBtnID);
- AssertRendered(startPanelID);
-
- AssertNotRendered(stopBtnID);
- AssertNotRendered(progressPanelID);
-
}
@Test
public void testNestedParams(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, RESTART_RESET);
+ tester.renderPage(template, STOP_RESET);
writeStatus("Test component encodes nested f:param tags and their values are present as request parameters");
- tester.testRequestParameters(params);
+
+ tester.reset();
+ tester.clickLoad();
+
+ String parentId = getParentId() + "autoTestForm:";
+ String startBtn = parentId + "startButton";
+ String stopBtn = parentId + "stopButton";
+
+ clickAjaxCommandAndWait(startBtn);
+
+ delay(1500);
+
+ for (String name : params.keySet()) {
+ String value = runScript("requestParamsMap" + "." + name);
+ if (value == null) {
+ Assert.fail("Parameter [" + name + "] is not present in ajax request");
+ } else if (!value.equals(params.get(name))) {
+ Assert.fail("Parameter [" + name + "] value is invalid. Expected [" + params.get(name) + "]. But was ["
+ + value + "]");
+ }
+ }
+ clickAjaxCommandAndWait(stopBtn);
+
}
@Test
public void testRenderedAttribute(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
+ tester.renderPage(template, STOP_RESET);
writeStatus("Test component with rendered = false is not present on the page");
tester.testRendered();
}
@@ -120,7 +111,7 @@
@Test
public void testAjaxSingle(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, RESTART_RESET);
+ tester.renderPage(template, STOP_RESET);
writeStatus("Test ajaxSingle attribute");
tester.testAjaxSingle();
}
@@ -128,15 +119,15 @@
@Test
public void testAjaxSingleWithInternalValidationFailed(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, RESTART_RESET);
+ tester.renderPage(template, STOP_RESET);
writeStatus("Test ajaxSingle attribute in case of invalid children state");
tester.testAjaxSingleWithInternalValidationFailed();
}
-
+
@Test
public void testImmediate(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, RESTART_RESET);
+ tester.renderPage(template, STOP_RESET);
writeStatus("Test immediate attribute");
tester.testImmediate();
}
@@ -144,7 +135,7 @@
@Test
public void testImmediateWithExternalValidationFailed(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, RESTART_RESET);
+ tester.renderPage(template, STOP_RESET);
writeStatus("Test immediate attribute with external validation failed");
tester.testImmediateWithExternalValidationFailed();
}
@@ -152,14 +143,19 @@
@Test
public void testListenersAreNotInvokedInCaseOfExternalValidationFailure(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, RESTART_RESET);
+ tester.renderPage(template, STOP_RESET);
writeStatus("Test listeners aren't invoked in case of external validation failure");
tester.testExtrenalValidationFailure();
}
@Override
public void sendAjax() {
- delay(1500);
+ String parentId = getParentId() + "autoTestForm:";
+ String startBtn = parentId + "startButton";
+ String stopBtn = parentId + "stopButton";
+ clickAjaxCommandAndWait(startBtn);
+ delay(5000);
+ clickAjaxCommandAndWait(stopBtn);
}
@Override
15 years, 10 months
JBoss Rich Faces SVN: r12987 - trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-17 12:16:56 -0400 (Tue, 17 Mar 2009)
New Revision: 12987
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush/ajaxPushAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush/ajaxPushTest.xhtml
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush/ajaxPushAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPush/ajaxPushTest.xhtml
===================================================================
(Binary files differ)
15 years, 10 months
JBoss Rich Faces SVN: r12986 - trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-17 12:16:29 -0400 (Tue, 17 Mar 2009)
New Revision: 12986
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/ValidationBean.java
Log:
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/ValidationBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/ValidationBean.java 2009-03-17 16:15:49 UTC (rev 12985)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/ValidationBean.java 2009-03-17 16:16:29 UTC (rev 12986)
@@ -122,4 +122,10 @@
public Boolean getRendered() {
return rendered;
}
+
+ public void reset() {
+ this.input = INPUT_TEXT;
+ this.status = "";
+ this.user = new User();
+ }
}
15 years, 10 months