JBoss Rich Faces SVN: r22119 - in modules/tests/metamer/trunk/application/src/main: java/org/richfaces/tests/metamer/validator and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-09 12:09:25 -0500 (Wed, 09 Mar 2011)
New Revision: 22119
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/LastYearValidator.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/csv.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/jsr303.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
Log:
added validation to the calendar
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2011-03-09 17:08:46 UTC (rev 22118)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2011-03-09 17:09:25 UTC (rev 22119)
@@ -30,6 +30,9 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ValueChangeEvent;
+import javax.validation.constraints.Future;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Past;
import org.richfaces.component.UICalendar;
import org.richfaces.tests.metamer.Attributes;
@@ -51,6 +54,9 @@
private Attributes attributes;
private Date date = new Date();
private TimeZone timeZone = TimeZone.getTimeZone("UTC");
+ private Date date1;
+ private Date date2;
+ private Date date3;
/**
* Initializes the managed bean.
@@ -106,6 +112,34 @@
this.timeZone = timeZone;
}
+ @Past
+ @NotNull
+ public Date getDate1() {
+ return date1;
+ }
+
+ public void setDate1(Date date1) {
+ this.date1 = date1;
+ }
+
+ @Future
+ @NotNull
+ public Date getDate2() {
+ return date2;
+ }
+
+ public void setDate2(Date date2) {
+ this.date2 = date2;
+ }
+
+ public Date getDate3() {
+ return date3;
+ }
+
+ public void setDate3(Date date3) {
+ this.date3 = date3;
+ }
+
/**
* A value change listener that logs to the page old and new value.
*
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/LastYearValidator.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/LastYearValidator.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/LastYearValidator.java 2011-03-09 17:09:25 UTC (rev 22119)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, 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.validator;
+
+import java.util.Calendar;
+import java.util.Date;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.FacesValidator;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * Custom date validator that accepts only last year's dates.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@FacesValidator("org.richfaces.LastYearValidator")
+public class LastYearValidator implements Validator {
+
+ @Override
+ public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "has to contain last year's date",
+ "has to contain last year's date");
+
+ if (value == null || !(value instanceof Date)) {
+ throw new ValidatorException(msg);
+ }
+
+ int todaysYear = Calendar.getInstance().get(Calendar.YEAR);
+ Calendar param = Calendar.getInstance();
+ param.setTime((Date) value);
+
+ if (todaysYear - 1 != param.get(Calendar.YEAR)) {
+ throw new ValidatorException(msg);
+ }
+ }
+}
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/csv.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/csv.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/csv.xhtml 2011-03-09 17:09:25 UTC (rev 22119)
@@ -0,0 +1,110 @@
+<?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: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">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, 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.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="head">
+ <script type="text/javascript">
+ testedComponentId = "#{rich:clientId('calendar')}";
+ </script>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <h:panelGrid columns="3">
+ past
+ <rich:calendar id="calendar1"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"
+ value="#{richCalendarBean.date1}"
+ >
+ <a4j:ajax event="change" render="output1" />
+ <rich:validator/>
+ </rich:calendar>
+ <rich:message id="calendarMsg1" for="calendar1"/>
+
+ future
+ <rich:calendar id="calendar2"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"
+ value="#{richCalendarBean.date2}"
+ >
+ <a4j:ajax event="change" render="output2" />
+ <rich:validator/>
+ </rich:calendar>
+ <rich:message id="calendarMsg2" for="calendar2"/>
+
+ last year
+ <rich:calendar id="calendar3"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"
+ value="#{richCalendarBean.date3}"
+ >
+ <a4j:ajax event="change" render="output3" />
+ <f:validator validatorId="org.richfaces.LastYearValidator"/>
+ <rich:validator/>
+ </rich:calendar>
+ <rich:message id="calendarMsg3" for="calendar3"/>
+ </h:panelGrid>
+ <br/><br/>
+
+ <h:panelGrid columns="2">
+ output1:
+ <h:outputText id="output1" value="#{richCalendarBean.date1}">
+ <f:convertDateTime pattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"/>
+ </h:outputText>
+
+ output2:
+ <h:outputText id="output2" value="#{richCalendarBean.date2}">
+ <f:convertDateTime pattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"/>
+ </h:outputText>
+
+ output3:
+ <h:outputText id="output3" value="#{richCalendarBean.date3}">
+ <f:convertDateTime pattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"/>
+ </h:outputText>
+ </h:panelGrid>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richCalendarBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/jsr303.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/jsr303.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/jsr303.xhtml 2011-03-09 17:09:25 UTC (rev 22119)
@@ -0,0 +1,111 @@
+<?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: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">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, 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.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="head">
+ <script type="text/javascript">
+ testedComponentId = "#{rich:clientId('calendar')}";
+ </script>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
+
+ <h:panelGrid columns="3">
+ past
+ <rich:calendar id="calendar1"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"
+ value="#{richCalendarBean.date1}"
+ >
+ <a4j:ajax event="change" render="output1" />
+ </rich:calendar>
+ <rich:message id="calendarMsg1" for="calendar1"/>
+
+ future
+ <rich:calendar id="calendar2"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"
+ value="#{richCalendarBean.date2}"
+ >
+ <a4j:ajax event="change" render="output2" />
+ </rich:calendar>
+ <rich:message id="calendarMsg2" for="calendar2"/>
+
+ last year
+ <rich:calendar id="calendar3"
+ datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"
+ value="#{richCalendarBean.date3}"
+ >
+ <a4j:ajax event="change" render="output3" />
+ <f:validator validatorId="org.richfaces.LastYearValidator"/>
+ </rich:calendar>
+ <rich:message id="calendarMsg3" for="calendar3"/>
+ </h:panelGrid>
+ <br/><br/>
+
+ <h:panelGrid columns="2">
+ output1:
+ <h:outputText id="output1" value="#{richCalendarBean.date1}">
+ <f:convertDateTime pattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"/>
+ </h:outputText>
+
+ output2:
+ <h:outputText id="output2" value="#{richCalendarBean.date2}">
+ <f:convertDateTime pattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"/>
+ </h:outputText>
+
+ output3:
+ <h:outputText id="output3" value="#{richCalendarBean.date3}">
+ <f:convertDateTime pattern="#{richCalendarBean.attributes['datePattern'].value}"
+ timeZone="#{richCalendarBean.timeZone}"/>
+ </h:outputText>
+ </h:panelGrid>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richCalendarBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
15 years, 1 month
JBoss Rich Faces SVN: r22118 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-09 12:08:46 -0500 (Wed, 09 Mar 2011)
New Revision: 22118
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/StringRichFacesValidator.java
Log:
message updated
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/StringRichFacesValidator.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/StringRichFacesValidator.java 2011-03-09 17:08:28 UTC (rev 22117)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/StringRichFacesValidator.java 2011-03-09 17:08:46 UTC (rev 22118)
@@ -40,7 +40,7 @@
@Override
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
if (value == null || !value.toString().equals("RichFaces")) {
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "string is not \"RichFaces\"", ""));
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "string is not \"RichFaces\"", "string is not \"RichFaces\""));
}
}
}
15 years, 1 month
JBoss Rich Faces SVN: r22117 - in branches/4.0.X/ui/input/ui/src: main/templates and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-03-09 12:08:28 -0500 (Wed, 09 Mar 2011)
New Revision: 22117
Modified:
branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss
branches/4.0.X/ui/input/ui/src/main/templates/autocomplete.template.xml
branches/4.0.X/ui/input/ui/src/test/resources/org/richfaces/renderkit/autocompleteDivLayoutClientMode.xmlunit.xml
branches/4.0.X/ui/input/ui/src/test/resources/org/richfaces/renderkit/autocompleteListLayoutClientMode.xmlunit.xml
Log:
https://jira.jboss.org/browse/RF-10700
Reviewed by Gleb Galkin
Modified: branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss 2011-03-09 17:08:11 UTC (rev 22116)
+++ branches/4.0.X/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss 2011-03-09 17:08:28 UTC (rev 22117)
@@ -16,7 +16,7 @@
width: 182px;
}
-.rf-au-fld{
+.rf-au{
border-width: 1px;
border-style: solid;
border-color: '#{richSkin.panelBorderColor}';
Modified: branches/4.0.X/ui/input/ui/src/main/templates/autocomplete.template.xml
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/templates/autocomplete.template.xml 2011-03-09 17:08:11 UTC (rev 22116)
+++ branches/4.0.X/ui/input/ui/src/main/templates/autocomplete.template.xml 2011-03-09 17:08:28 UTC (rev 22117)
@@ -17,7 +17,7 @@
<cc:implementation>
<cdk:object type="java.lang.Object" name="disabled" value="#{component.attributes['disabled']}" />
- <span id="#{clientId}" class="rf-au-fld">
+ <span id="#{clientId}" class="rf-au">
<input id="#{clientId}Value" name="#{clientId}Value" type="hidden"/>
<span class="#{component.attributes['showButton'] ? 'rf-au-fld-btn' : ''}">
<input onclick="#{component.attributes['onclick']}"
Modified: branches/4.0.X/ui/input/ui/src/test/resources/org/richfaces/renderkit/autocompleteDivLayoutClientMode.xmlunit.xml
===================================================================
--- branches/4.0.X/ui/input/ui/src/test/resources/org/richfaces/renderkit/autocompleteDivLayoutClientMode.xmlunit.xml 2011-03-09 17:08:11 UTC (rev 22116)
+++ branches/4.0.X/ui/input/ui/src/test/resources/org/richfaces/renderkit/autocompleteDivLayoutClientMode.xmlunit.xml 2011-03-09 17:08:28 UTC (rev 22117)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
- <span class="rf-au-fld" id="form:myAutocomplete">
+ <span class="rf-au" id="form:myAutocomplete">
<input id="form:myAutocompleteValue" name="form:myAutocompleteValue" type="hidden"/>
<span class="rf-au-fld-btn">
<input autocomplete="off" class="rf-au-fnt rf-au-inp" id="form:myAutocompleteInput" name="form:myAutocomplete" type="text"/>
Modified: branches/4.0.X/ui/input/ui/src/test/resources/org/richfaces/renderkit/autocompleteListLayoutClientMode.xmlunit.xml
===================================================================
--- branches/4.0.X/ui/input/ui/src/test/resources/org/richfaces/renderkit/autocompleteListLayoutClientMode.xmlunit.xml 2011-03-09 17:08:11 UTC (rev 22116)
+++ branches/4.0.X/ui/input/ui/src/test/resources/org/richfaces/renderkit/autocompleteListLayoutClientMode.xmlunit.xml 2011-03-09 17:08:28 UTC (rev 22117)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<span class="rf-au-fld" id="form:myAutocomplete">
+<span class="rf-au" id="form:myAutocomplete">
<input id="form:myAutocompleteValue" name="form:myAutocompleteValue" type="hidden"/>
<span class="rf-au-fld-btn">
<input autocomplete="off" class="rf-au-fnt rf-au-inp" id="form:myAutocompleteInput" name="form:myAutocomplete" type="text"/>
15 years, 1 month
JBoss Rich Faces SVN: r22116 - in modules/tests/metamer/trunk/application/src/main: java/org/richfaces/tests/metamer/bean and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-09 12:08:11 -0500 (Wed, 09 Mar 2011)
New Revision: 22116
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/StringRichFacesValidator.java
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml
Log:
added custom validator to validation samples
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java 2011-03-09 16:50:00 UTC (rev 22115)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java 2011-03-09 17:08:11 UTC (rev 22116)
@@ -45,6 +45,7 @@
private static final long serialVersionUID = -1L;
private static Logger logger;
private Attributes attributes;
+ private String stringValue = "RichFaces";
/**
* Initializes the managed bean.
@@ -65,4 +66,11 @@
this.attributes = attributes;
}
+ public String getStringValue() {
+ return stringValue;
+ }
+
+ public void setStringValue(String stringValue) {
+ this.stringValue = stringValue;
+ }
}
Copied: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/StringRichFacesValidator.java (from rev 22094, modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java)
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/StringRichFacesValidator.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validator/StringRichFacesValidator.java 2011-03-09 17:08:11 UTC (rev 22116)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, 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.validator;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.FacesValidator;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * Custom string validator that accepts only string "RichFaces".
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@FacesValidator("org.richfaces.StringRichFacesValidator")
+public class StringRichFacesValidator implements Validator {
+
+ @Override
+ public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ if (value == null || !value.toString().equals("RichFaces")) {
+ throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "string is not \"RichFaces\"", ""));
+ }
+ }
+}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml 2011-03-09 16:50:00 UTC (rev 22115)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml 2011-03-09 17:08:11 UTC (rev 22116)
@@ -57,6 +57,7 @@
$('input[id$=notEmpty]').val('RichFaces 4');
$('input[id$=notNull]').val('RichFaces 4');
$('input[id$=pattern]').val('richFaces 4');
+ $('input[id$=custom]').val('RichFaces');
$('input[id$=past]').val(inPast.format("d mmm yyyy"));
$('input[id$=future]').val(inFuture.format("d mmm yyyy"));
$('input[value=A]')[0].checked=true
@@ -82,6 +83,7 @@
$('input[id$=notEmpty]').val('');
$('input[id$=notNull]').val('');
$('input[id$=pattern]').val('@@@');
+ $('input[id$=custom]').val('@@@');
$('input[id$=past]').val(inFuture.format("d mmm yyyy"));
$('input[id$=future]').val(inPast.format("d mmm yyyy"));
$('input[value=A]')[0].checked=false
@@ -100,177 +102,194 @@
<h:outputLabel for="assertTrue" value="#{assertTrueBean.description}" />
<h:selectBooleanCheckbox id="assertTrue" value="#{assertTrueBean.value}" label="#{assertTrueBean.label}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:selectBooleanCheckbox>
<rich:message id="assertTrueMsg" for="assertTrue" />
<h:outputLabel for="assertFalse" value="#{assertFalseBean.description}" />
<h:selectBooleanCheckbox id="assertFalse" value="#{assertFalseBean.value}" label="#{assertFalseBean.label}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:selectBooleanCheckbox>
<rich:message id="assertFalseMsg" for="assertFalse" />
<h:outputLabel for="decimalMinMax" value="#{decimalMinMaxBean.description}" />
<h:inputText id="decimalMinMax" value="#{decimalMinMaxBean.value}" label="#{decimalMinMaxBean.label}" converter="#{decimalMinMaxBean.converter}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="decimalMinMaxMsg" for="decimalMinMax" />
<h:outputLabel for="digits" value="#{digitsBean.description}" />
<h:inputText id="digits" value="#{digitsBean.value}" label="#{digitsBean.label}" converter="#{digitsBean.converter}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="digitsMsg" for="digits" />
<h:outputLabel for="max" value="#{maxBean.description}" />
<h:inputText id="max" value="#{maxBean.value}" label="#{maxBean.label}" converter="#{maxBean.converter}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="maxMsg" for="max" />
<h:outputLabel for="min" value="#{minBean.description}" />
<h:inputText id="min" value="#{minBean.value}" label="#{minBean.label}" converter="#{minBean.converter}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="minMsg" for="min" />
<h:outputLabel for="minMax" value="#{minMaxBean.description}" />
<h:inputText id="minMax" value="#{minMaxBean.value}" label="#{minMaxBean.label}" converter="#{minMaxBean.converter}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="minMaxMsg" for="minMax" />
<h:outputLabel for="notEmpty" value="#{notEmptyBean.description}" />
<h:inputText id="notEmpty" value="#{notEmptyBean.value}" label="#{notEmptyBean.label}" converter="#{notEmptyBean.converter}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="notEmptyMsg" for="notEmpty" />
<h:outputLabel for="notNull" value="#{notNullBean.description}" />
<h:inputText id="notNull" value="#{notNullBean.value}" label="#{notNullBean.label}" converter="emptyStringToNullConverter">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="notNullMsg" for="notNull" />
<h:outputLabel for="pattern" value="#{patternBean.description}" />
<h:inputText id="pattern" value="#{patternBean.value}" label="#{patternBean.label}" converter="#{patternBean.converter}">
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="patternMsg" for="pattern" />
+ <h:outputLabel for="custom" value="custom validator, RichFaces" />
+ <h:inputText id="custom" value="#{richValidatorBean.stringValue}" label="custom">
+ <f:validator validatorId="org.richfaces.StringRichFacesValidator"/>
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
+ />
+ </h:inputText>
+ <rich:message id="customMsg" for="custom" />
+
<h:outputLabel for="past" value="#{pastBean.description}" />
<h:inputText id="past" value="#{pastBean.value}" label="#{pastBean.label}" >
<f:convertDateTime pattern="d MMM yyyy"/>
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="pastMsg" for="past" />
@@ -278,16 +297,16 @@
<h:outputLabel for="future" value="#{futureBean.description}" />
<h:inputText id="future" value="#{futureBean.value}" label="#{futureBean.label}" >
<f:convertDateTime pattern="d MMM yyyy"/>
- <rich:validator data="#{richValidator.attributes['data'].value}"
- disabled="#{richValidator.attributes['disabled'].value}"
- immediate="#{richValidator.attributes['immediate'].value}"
- onbeforedomupdate="#{richValidator.attributes['onbeforedomupdate'].value}"
- onbeforesubmit="#{richValidator.attributes['onbeforesubmit'].value}"
- onbegin="#{richValidator.attributes['onbegin'].value}"
- oncomplete="#{richValidator.attributes['oncomplete'].value}"
- onerror="#{richValidator.attributes['onerror'].value}"
- queueId="#{richValidator.attributes['queueId'].value}"
- status="#{richValidator.attributes['status'].value}"
+ <rich:validator data="#{richValidatorBean.attributes['data'].value}"
+ disabled="#{richValidatorBean.attributes['disabled'].value}"
+ immediate="#{richValidatorBean.attributes['immediate'].value}"
+ onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
+ onbeforesubmit="#{richValidatorBean.attributes['onbeforesubmit'].value}"
+ onbegin="#{richValidatorBean.attributes['onbegin'].value}"
+ oncomplete="#{richValidatorBean.attributes['oncomplete'].value}"
+ onerror="#{richValidatorBean.attributes['onerror'].value}"
+ queueId="#{richValidatorBean.attributes['queueId'].value}"
+ status="#{richValidatorBean.attributes['status'].value}"
/>
</h:inputText>
<rich:message id="futureMsg" for="future" />
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml 2011-03-09 16:50:00 UTC (rev 22115)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml 2011-03-09 17:08:11 UTC (rev 22116)
@@ -56,6 +56,7 @@
$('input[id$=minMax]').val('4');
$('input[id$=notEmpty]').val('RichFaces 4');
$('input[id$=notNull]').val('RichFaces 4');
+ $('input[id$=custom]').val('RichFaces');
$('input[id$=pattern]').val('richFaces 4');
$('input[id$=past]').val(inPast.format("d mmm yyyy"));
$('input[id$=future]').val(inFuture.format("d mmm yyyy"));
@@ -82,6 +83,7 @@
$('input[id$=notEmpty]').val('');
$('input[id$=notNull]').val('');
$('input[id$=pattern]').val('@@@');
+ $('input[id$=custom]').val('@@@');
$('input[id$=past]').val(inFuture.format("d mmm yyyy"));
$('input[id$=future]').val(inPast.format("d mmm yyyy"));
$('input[value=A]')[0].checked=false
@@ -138,6 +140,12 @@
<h:inputText id="pattern" value="#{patternBean.value}" label="#{patternBean.label}" converter="#{patternBean.converter}"/>
<rich:message id="patternMsg" for="pattern" />
+ <h:outputLabel for="custom" value="custom validator, RichFaces" />
+ <h:inputText id="custom" value="#{richValidatorBean.stringValue}" label="custom">
+ <f:validator validatorId="org.richfaces.StringRichFacesValidator"/>
+ </h:inputText>
+ <rich:message id="customMsg" for="custom" />
+
<h:outputLabel for="past" value="#{pastBean.description}" />
<h:inputText id="past" value="#{pastBean.value}" label="#{pastBean.label}" >
<f:convertDateTime pattern="d MMM yyyy"/>
15 years, 1 month
JBoss Rich Faces SVN: r22115 - in branches/4.0.X: ui/input/ui/src/main/java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-03-09 11:50:00 -0500 (Wed, 09 Mar 2011)
New Revision: 22115
Modified:
branches/4.0.X/examples/input-demo/src/main/webapp/examples/select.xhtml
branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java
branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java
branches/4.0.X/ui/input/ui/src/main/templates/select.template.xml
Log:
RF-10667: rich:select: missing attributes style, styleClass and title are fixed. Reviewed by Alex Kolonitsky.
Modified: branches/4.0.X/examples/input-demo/src/main/webapp/examples/select.xhtml
===================================================================
--- branches/4.0.X/examples/input-demo/src/main/webapp/examples/select.xhtml 2011-03-09 15:37:32 UTC (rev 22114)
+++ branches/4.0.X/examples/input-demo/src/main/webapp/examples/select.xhtml 2011-03-09 16:50:00 UTC (rev 22115)
@@ -1,4 +1,5 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!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"
@@ -9,6 +10,11 @@
<h:head>
<title>Select</title>
+ <style type="text/css">
+ .my-select-class {
+ font-weight: bold;
+ }
+ </style>
</h:head>
@@ -18,7 +24,8 @@
<fieldset>
<legend>Select Test App</legend>
<in:select id="select" openOnEdit="true" enableManualInput="true" defaultLabel="Select Value ..."
- value="#{inputBean.value}">
+ value="#{inputBean.value}" style="font-size: 2em;" styleClass="my-select-class"
+ title="Title">
<f:selectItem itemLabel="Label#1" itemValue="Value#1"/>
<f:selectItem itemLabel="Label#2" itemValue="Value#2"/>
<f:selectItem itemLabel="Label#3" itemValue="Value#3"/>
@@ -41,18 +48,16 @@
</h:commandButton>
</div>
- <ul>
- <li>
- <h:commandButton value="ShowPopup"
- onclick="#{misc:component('select')}.showPopup(); return false;"/>
- </li>
- <li>
- <h:commandButton value="HidePopup"
- onclick="#{misc:component('select')}.hidePopup(); return false;"/>
- </li>
-
-
- </ul>
+ <ul>
+ <li>
+ <h:commandButton value="ShowPopup"
+ onclick="#{misc:component('select')}.showPopup(); return false;"/>
+ </li>
+ <li>
+ <h:commandButton value="HidePopup"
+ onclick="#{misc:component('select')}.hidePopup(); return false;"/>
+ </li>
+ </ul>
<h:panelGroup id="out">
<h:outputText value="Selected Value: #{inputBean.value}"/>
</h:panelGroup>
Modified: branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java 2011-03-09 15:37:32 UTC (rev 22114)
+++ branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/component/AbstractSelect.java 2011-03-09 16:50:00 UTC (rev 22115)
@@ -53,4 +53,12 @@
@Attribute(hidden = true)
public abstract String getDisabledStateClass();
+ @Attribute
+ public abstract String getStyle();
+
+ @Attribute
+ public abstract String getStyleClass();
+
+ @Attribute
+ public abstract String getTitle();
}
Modified: branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java 2011-03-09 15:37:32 UTC (rev 22114)
+++ branches/4.0.X/ui/input/ui/src/main/java/org/richfaces/renderkit/SelectRendererBase.java 2011-03-09 16:50:00 UTC (rev 22115)
@@ -22,18 +22,17 @@
package org.richfaces.renderkit;
-import java.io.IOException;
-import java.util.List;
+import org.richfaces.component.AbstractSelect;
+import org.richfaces.component.AbstractSelectComponent;
+import org.richfaces.renderkit.util.HtmlDimensions;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import java.io.IOException;
+import java.util.List;
-import org.richfaces.component.AbstractSelect;
-import org.richfaces.component.AbstractSelectComponent;
-import org.richfaces.renderkit.util.HtmlDimensions;
-
/**
* @author abelevich
*
@@ -64,13 +63,7 @@
public String getSelectInputLabel(FacesContext facesContext, UIComponent component) {
return SelectHelper.getSelectInputLabel(facesContext, component);
}
-
- public String getListWidth(UIComponent component) {
- AbstractSelect select = (AbstractSelect)component;
- String width = getListWidth(select);
- return (width != null && width.trim().length() != 0) ? ("width: " + width) : "";
- }
-
+
protected String getMinListHeight(AbstractSelect select) {
String height = HtmlDimensions.formatSize(select.getMinListHeight());
if (height == null || height.length() == 0) {
Modified: branches/4.0.X/ui/input/ui/src/main/templates/select.template.xml
===================================================================
--- branches/4.0.X/ui/input/ui/src/main/templates/select.template.xml 2011-03-09 15:37:32 UTC (rev 22114)
+++ branches/4.0.X/ui/input/ui/src/main/templates/select.template.xml 2011-03-09 16:50:00 UTC (rev 22115)
@@ -19,7 +19,7 @@
<cdk:object type="java.lang.Object" name="disabled" value="#{component.attributes['disabled']}" />
- <div id="#{clientId}" class="rf-sel">
+ <div id="#{clientId}" class="#{concatClasses('rf-sel', component.attributes['styleClass'])}" style="#{component.attributes['style']}">
<span class="rf-sel-cntr">
<input id="#{clientId}selValue" name="#{clientId}" type="hidden" value="#{getInputValue(facesContext, component)}"/>
<cdk:object type="java.lang.String" name="label" value="#{getSelectLabel(facesContext, component)}" />
15 years, 1 month
JBoss Rich Faces SVN: r22114 - modules/tests/metamer/trunk/ftest/src/test/resources.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-03-09 10:37:32 -0500 (Wed, 09 Mar 2011)
New Revision: 22114
Added:
modules/tests/metamer/trunk/ftest/src/test/resources/testng-switchable.xml
modules/tests/metamer/trunk/ftest/src/test/resources/testng-tables.xml
modules/tests/metamer/trunk/ftest/src/test/resources/testng-trees.xml
Removed:
modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml
Modified:
modules/tests/metamer/trunk/ftest/src/test/resources/testng-output.xml
Log:
output and iteration splitted to decrease suites' run times RFPL-1242
Deleted: modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml 2011-03-09 15:28:39 UTC (rev 22113)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml 2011-03-09 15:37:32 UTC (rev 22114)
@@ -1,27 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="seleniumTest">
-
- <test name="Iteration Components">
- <groups>
- <run>
- <exclude name="4.Future" />
- </run>
- </groups>
-
- <packages>
- <package name="org.richfaces.tests.metamer.ftest.richCollapsibleSubTable" />
- <package name="org.richfaces.tests.metamer.ftest.richCollapsibleSubTableToggler" />
- <package name="org.richfaces.tests.metamer.ftest.richColumn" />
- <package name="org.richfaces.tests.metamer.ftest.richColumnGroup" />
- <package name="org.richfaces.tests.metamer.ftest.richDataGrid" />
- <package name="org.richfaces.tests.metamer.ftest.richDataTable" />
- <package name="org.richfaces.tests.metamer.ftest.richDataScroller" />
- <package name="org.richfaces.tests.metamer.ftest.richExtendedDataTable" />
- <package name="org.richfaces.tests.metamer.ftest.richTree" />
- <package name="org.richfaces.tests.metamer.ftest.richTreeNode" />
- <package name="org.richfaces.tests.metamer.ftest.richTreeModelAdaptor" />
- </packages>
- </test>
-
-</suite>
-
Modified: modules/tests/metamer/trunk/ftest/src/test/resources/testng-output.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-output.xml 2011-03-09 15:28:39 UTC (rev 22113)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-output.xml 2011-03-09 15:37:32 UTC (rev 22114)
@@ -9,22 +9,12 @@
</groups>
<packages>
- <package name="org.richfaces.tests.metamer.ftest.richAccordion" />
- <package name="org.richfaces.tests.metamer.ftest.richAccordionItem" />
- <package name="org.richfaces.tests.metamer.ftest.richCollapsiblePanel" />
<package name="org.richfaces.tests.metamer.ftest.richPanel" />
<package name="org.richfaces.tests.metamer.ftest.richPopupPanel" />
<package name="org.richfaces.tests.metamer.ftest.richProgressBar" />
- <package name="org.richfaces.tests.metamer.ftest.richTab" />
- <package name="org.richfaces.tests.metamer.ftest.richTabPanel" />
- <package name="org.richfaces.tests.metamer.ftest.richTogglePanel" />
- <package name="org.richfaces.tests.metamer.ftest.richTogglePanelItem" />
<package name="org.richfaces.tests.metamer.ftest.richToolbar" />
<package name="org.richfaces.tests.metamer.ftest.richToolbarGroup" />
<package name="org.richfaces.tests.metamer.ftest.richTooltip" />
- <package name="org.richfaces.tests.metamer.ftest.richPanelMenu" />
- <package name="org.richfaces.tests.metamer.ftest.richPanelMenuGroup" />
- <package name="org.richfaces.tests.metamer.ftest.richPanelMenuItem" />
</packages>
</test>
Copied: modules/tests/metamer/trunk/ftest/src/test/resources/testng-switchable.xml (from rev 22112, modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml)
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-switchable.xml (rev 0)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-switchable.xml 2011-03-09 15:37:32 UTC (rev 22114)
@@ -0,0 +1,26 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTest">
+
+ <test name="Switchable Components">
+ <groups>
+ <run>
+ <exclude name="4.Future" />
+ </run>
+ </groups>
+
+ <packages>
+ <package name="org.richfaces.tests.metamer.ftest.richAccordion" />
+ <package name="org.richfaces.tests.metamer.ftest.richAccordionItem" />
+ <package name="org.richfaces.tests.metamer.ftest.richCollapsiblePanel" />
+ <package name="org.richfaces.tests.metamer.ftest.richTab" />
+ <package name="org.richfaces.tests.metamer.ftest.richTabPanel" />
+ <package name="org.richfaces.tests.metamer.ftest.richTogglePanel" />
+ <package name="org.richfaces.tests.metamer.ftest.richTogglePanelItem" />
+ <package name="org.richfaces.tests.metamer.ftest.richPanelMenu" />
+ <package name="org.richfaces.tests.metamer.ftest.richPanelMenuGroup" />
+ <package name="org.richfaces.tests.metamer.ftest.richPanelMenuItem" />
+ </packages>
+ </test>
+
+</suite>
+
Copied: modules/tests/metamer/trunk/ftest/src/test/resources/testng-tables.xml (from rev 22112, modules/tests/metamer/trunk/ftest/src/test/resources/testng-iteration.xml)
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-tables.xml (rev 0)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-tables.xml 2011-03-09 15:37:32 UTC (rev 22114)
@@ -0,0 +1,24 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTest">
+
+ <test name="Table Components">
+ <groups>
+ <run>
+ <exclude name="4.Future" />
+ </run>
+ </groups>
+
+ <packages>
+ <package name="org.richfaces.tests.metamer.ftest.richCollapsibleSubTable" />
+ <package name="org.richfaces.tests.metamer.ftest.richCollapsibleSubTableToggler" />
+ <package name="org.richfaces.tests.metamer.ftest.richColumn" />
+ <package name="org.richfaces.tests.metamer.ftest.richColumnGroup" />
+ <package name="org.richfaces.tests.metamer.ftest.richDataGrid" />
+ <package name="org.richfaces.tests.metamer.ftest.richDataTable" />
+ <package name="org.richfaces.tests.metamer.ftest.richDataScroller" />
+ <package name="org.richfaces.tests.metamer.ftest.richExtendedDataTable" />
+ </packages>
+ </test>
+
+</suite>
+
Added: modules/tests/metamer/trunk/ftest/src/test/resources/testng-trees.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/src/test/resources/testng-trees.xml (rev 0)
+++ modules/tests/metamer/trunk/ftest/src/test/resources/testng-trees.xml 2011-03-09 15:37:32 UTC (rev 22114)
@@ -0,0 +1,19 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTest">
+
+ <test name="Tree Components">
+ <groups>
+ <run>
+ <exclude name="4.Future" />
+ </run>
+ </groups>
+
+ <packages>
+ <package name="org.richfaces.tests.metamer.ftest.richTree" />
+ <package name="org.richfaces.tests.metamer.ftest.richTreeNode" />
+ <package name="org.richfaces.tests.metamer.ftest.richTreeModelAdaptor" />
+ </packages>
+ </test>
+
+</suite>
+
15 years, 1 month
JBoss Rich Faces SVN: r22113 - branches/4.0.X/examples/input-demo/src/main/webapp/examples.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-03-09 10:28:39 -0500 (Wed, 09 Mar 2011)
New Revision: 22113
Modified:
branches/4.0.X/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml
Log:
RF-10689: sample is fixed. Reviewed by Anton Belevich.
Modified: branches/4.0.X/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml
===================================================================
--- branches/4.0.X/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml 2011-03-09 15:26:10 UTC (rev 22112)
+++ branches/4.0.X/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml 2011-03-09 15:28:39 UTC (rev 22113)
@@ -13,8 +13,12 @@
<h:body>
<h:form id="form">
- <in:inplaceInput defaultLabel="#{null}">
+ <in:inplaceInput showControls="true" value="New York" defaultLabel="#{null}">
</in:inplaceInput>
+ <h:commandButton value="submit"/>
+ <in:inplaceInput showControls="true" defaultLabel="click to enter your name" saveOnBlur="true"
+ onblur="RichFaces.$('form:ii').cancel()" id="ii">
+ </in:inplaceInput>
</h:form>
</h:body>
</html>
15 years, 1 month
JBoss Rich Faces SVN: r22112 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-03-09 10:26:10 -0500 (Wed, 09 Mar 2011)
New Revision: 22112
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java
Log:
reenabled previously commented tests
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java 2011-03-09 15:11:51 UTC (rev 22111)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java 2011-03-09 15:26:10 UTC (rev 22112)
@@ -56,52 +56,52 @@
super.testNoDataEmpty();
}
- //@Test
+ @Test
public void testHeaderInstantChange() {
super.testHeaderInstantChange();
}
- //@Test
+ @Test
public void testHeaderEmpty() {
super.testHeaderEmpty();
}
- //@Test
+ @Test
public void testStateHeaderInstantChange() {
super.testStateHeaderInstantChange();
}
- //@Test
+ @Test
public void testStateHeaderEmpty() {
super.testStateHeaderEmpty();
}
- //@Test
+ @Test
public void testStateFooterInstantChange() {
super.testStateFooterInstantChange();
}
- //@Test
+ @Test
public void testStateFooterEmpty() {
super.testStateFooterEmpty();
}
- //@Test
+ @Test
public void testCapitalHeaderInstantChange() {
super.testCapitalHeaderInstantChange();
}
- //@Test
+ @Test
public void testCapitalHeaderEmpty() {
super.testCapitalHeaderEmpty();
}
- //@Test
+ @Test
public void testCapitalFooterInstantChange() {
super.testCapitalFooterInstantChange();
}
- //@Test
+ @Test
public void testCapitalFooterEmpty() {
super.testCapitalFooterEmpty();
}
15 years, 1 month
JBoss Rich Faces SVN: r22111 - in branches/4.0.X/ui/core/ui/src/main: resources/META-INF/cdk/attributes and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-03-09 10:11:51 -0500 (Wed, 09 Mar 2011)
New Revision: 22111
Added:
branches/4.0.X/ui/core/ui/src/main/resources/META-INF/cdk/attributes/ajaxBehavior-prop.xml
Modified:
branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
Log:
(refactoring) RF-9952 Taglib: ajax has no attributes
- reviewed by Anton Belevich
Modified: branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
===================================================================
--- branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2011-03-09 15:09:44 UTC (rev 22110)
+++ branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2011-03-09 15:11:51 UTC (rev 22111)
@@ -54,7 +54,8 @@
*
*/
-@JsfBehavior(id = "org.ajax4jsf.behavior.Ajax", tag = @Tag(name = "ajax", handler = "org.richfaces.view.facelets.html.AjaxHandler", type = TagType.Facelets))
+@JsfBehavior(id = "org.ajax4jsf.behavior.Ajax", tag = @Tag(name = "ajax", handler = "org.richfaces.view.facelets.html.AjaxHandler", type = TagType.Facelets),
+ attributes = {"ajaxBehavior-prop.xml"})
public class AjaxBehavior extends ClientBehavior implements AjaxClientBehavior {
public static final String BEHAVIOR_ID = "org.ajax4jsf.behavior.Ajax";
@@ -64,7 +65,7 @@
enum PropertyKeys {
data, execute, onbeforedomupdate, onbegin, oncomplete, onerror, queueId, render,
- status, disabled, limitRender, immediate, bypassUpdates, onbeforesubmit, event, listener
+ status, disabled, limitRender, immediate, bypassUpdates, onbeforesubmit
}
private Set<String> execute;
@@ -90,8 +91,6 @@
setOnbeforedomupdate((String) value);
} else if (compare(PropertyKeys.onbegin, name)) {
setOnbegin((String) value);
- } else if (compare(PropertyKeys.event, name)) {
- setEvent((String) value);
} else if (compare(PropertyKeys.oncomplete, name)) {
setOncomplete((String) value);
} else if (compare(PropertyKeys.onerror, name)) {
@@ -103,9 +102,6 @@
} else if (compare(PropertyKeys.disabled, name)) {
value = expFactory.coerceToType(value, Boolean.class);
setDisabled((Boolean)value);
- } else if (compare(PropertyKeys.listener, name)) {
- value = expFactory.coerceToType(value, MethodExpression.class);
- setListener((MethodExpression) value);
} else if (compare(PropertyKeys.limitRender, name)) {
value = expFactory.coerceToType(value, Boolean.class);
setLimitRender((Boolean) value);
@@ -143,26 +139,8 @@
public void setData(Object data) {
getStateHelper().put(PropertyKeys.data, data);
}
-
- @Attribute
- public MethodExpression getListener() {
- return (MethodExpression) getStateHelper().eval(PropertyKeys.listener);
- }
- public void setListener(MethodExpression listener) {
- getStateHelper().put(PropertyKeys.listener, listener);
- }
-
@Attribute
- public String getEvent() {
- return (String) getStateHelper().eval(PropertyKeys.event);
- }
-
- public void setEvent(String event) {
- getStateHelper().put(PropertyKeys.event, event);
- }
-
- @Attribute
public Collection<String> getExecute() {
return getCollectionValue(PropertyKeys.execute, execute);
}
Added: branches/4.0.X/ui/core/ui/src/main/resources/META-INF/cdk/attributes/ajaxBehavior-prop.xml
===================================================================
--- branches/4.0.X/ui/core/ui/src/main/resources/META-INF/cdk/attributes/ajaxBehavior-prop.xml (rev 0)
+++ branches/4.0.X/ui/core/ui/src/main/resources/META-INF/cdk/attributes/ajaxBehavior-prop.xml 2011-03-09 15:11:51 UTC (rev 22111)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+<cdk:properties xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:cdk="http://jboss.org/schema/richfaces/cdk/extensions"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee">
+ <property>
+ <property-name>listener</property-name>
+ <property-class>javax.el.MethodExpression</property-class>
+ </property>
+ <property>
+ <property-name>event</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+</cdk:properties>
15 years, 1 month
JBoss Rich Faces SVN: r22110 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-03-09 10:09:44 -0500 (Wed, 09 Mar 2011)
New Revision: 22110
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java
Log:
removed issue tracking RFPL-1193
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java 2011-03-09 15:04:01 UTC (rev 22109)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java 2011-03-09 15:09:44 UTC (rev 22110)
@@ -26,7 +26,6 @@
import java.net.URL;
import org.richfaces.tests.metamer.ftest.abstractions.DataTableFacetsTest;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.model.ExtendedDataTable;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -47,64 +46,62 @@
model = new ExtendedDataTable(pjq("div.rf-edt[id$=richEDT]"));
}
- @Test(groups = "4.0.0.Final")
- @IssueTracking("https://issues.jboss.org/browse/RFPL-1193")
+ @Test
public void testNoDataInstantChange() {
super.testNoDataInstantChange();
}
- @Test(groups = "4.0.0.Final")
- @IssueTracking("https://issues.jboss.org/browse/RFPL-1193")
+ @Test
public void testNoDataEmpty() {
super.testNoDataEmpty();
}
- @Test
+ //@Test
public void testHeaderInstantChange() {
super.testHeaderInstantChange();
}
- @Test
+ //@Test
public void testHeaderEmpty() {
super.testHeaderEmpty();
}
- @Test
+ //@Test
public void testStateHeaderInstantChange() {
super.testStateHeaderInstantChange();
}
- @Test
+ //@Test
public void testStateHeaderEmpty() {
super.testStateHeaderEmpty();
}
- @Test
+ //@Test
public void testStateFooterInstantChange() {
super.testStateFooterInstantChange();
}
- @Test
+ //@Test
public void testStateFooterEmpty() {
super.testStateFooterEmpty();
}
- @Test
+ //@Test
public void testCapitalHeaderInstantChange() {
super.testCapitalHeaderInstantChange();
}
- @Test
+ //@Test
public void testCapitalHeaderEmpty() {
super.testCapitalHeaderEmpty();
}
- @Test
+ //@Test
public void testCapitalFooterInstantChange() {
super.testCapitalFooterInstantChange();
}
- @Test
+ //@Test
public void testCapitalFooterEmpty() {
super.testCapitalFooterEmpty();
}
15 years, 1 month