Author: ppitonak(a)redhat.com
Date: 2011-03-09 05:15:02 -0500 (Wed, 09 Mar 2011)
New Revision: 22094
Added:
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/converter/
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/converter/EmptyStringToNullConverter.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/AssertFalseBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/AssertTrueBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/DecimalMinMaxBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/DigitsBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/FutureBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MaxBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MinBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MinMaxBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/NotEmptyBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/NotNullBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/PastBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/PatternBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/SizeBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/Validable.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/list.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
added 2 pages for testing validation
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-03-09
09:27:32 UTC (rev 22093)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -161,6 +161,7 @@
components.put("richToolbarGroup", "Rich Toolbar Group");
components.put("richTooltip", "Rich Tooltip");
components.put("richTree", "Rich Tree");
+ components.put("richValidator", "Rich Validator");
}
private void createSkinList() {
Added:
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
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichValidatorBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * 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.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.behavior.ClientValidatorImpl;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:validator.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richValidatorBean")
+@ViewScoped
+public class RichValidatorBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes =
Attributes.getBehaviorAttributesFromFacesConfig(ClientValidatorImpl.class, getClass());
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/converter/EmptyStringToNullConverter.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/converter/EmptyStringToNullConverter.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/converter/EmptyStringToNullConverter.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -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.converter;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.FacesConverter;
+
+/**
+ * Converter used for converting empty strings to null.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@FacesConverter(value = "emptyStringToNullConverter")
+public class EmptyStringToNullConverter implements Converter {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getAsObject(FacesContext context, UIComponent component, String value)
{
+ if (value.isEmpty()) {
+ return null;
+ } else {
+ return value;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getAsString(FacesContext context, UIComponent component, Object value)
{
+ if (value == null) {
+ return "";
+ }
+
+ return value.toString();
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/AssertFalseBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/AssertFalseBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/AssertFalseBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.validation;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.AssertFalse;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class AssertFalseBean extends Validable<Boolean> {
+
+ public AssertFalseBean() {
+ value = false;
+ }
+
+ @AssertFalse
+ @Override
+ public Boolean getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(Boolean intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Boolean, false";
+ }
+
+ @Override
+ public String getLabel() {
+ return "assertFalse";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/AssertTrueBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/AssertTrueBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/AssertTrueBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.validation;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.AssertTrue;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class AssertTrueBean extends Validable<Boolean> {
+
+ public AssertTrueBean() {
+ value = true;
+ }
+
+ @AssertTrue
+ @Override
+ public Boolean getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(Boolean intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Boolean, true";
+ }
+
+ @Override
+ public String getLabel() {
+ return "assertTrue";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/DecimalMinMaxBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/DecimalMinMaxBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/DecimalMinMaxBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * 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.validation;
+
+import java.math.BigDecimal;
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.DecimalMin;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class DecimalMinMaxBean extends Validable<BigDecimal> {
+
+ public DecimalMinMaxBean() {
+ value = new BigDecimal(3);
+ }
+
+ @DecimalMin("2.5")
+ @DecimalMax("9.688")
+ @Override
+ public BigDecimal getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(BigDecimal intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Decimal, from 2.5 to 9.688";
+ }
+
+ @Override
+ public String getLabel() {
+ return "decimalMinMax";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/DigitsBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/DigitsBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/DigitsBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.validation;
+
+import java.math.BigDecimal;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Digits;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class DigitsBean extends Validable<BigDecimal> {
+
+ public DigitsBean() {
+ value = new BigDecimal("2.567");
+ }
+
+ @Digits(integer = 3, fraction = 4)
+ @Override
+ public BigDecimal getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(BigDecimal intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Decimal, 3 digits integer and 4 fraction";
+ }
+
+ @Override
+ public String getLabel() {
+ return "digits";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/FutureBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/FutureBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/FutureBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.validation;
+
+import java.util.Date;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Future;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class FutureBean extends Validable<Date> {
+
+ public FutureBean() {
+ value = new Date(System.currentTimeMillis() + 4 * 24 * 3600 * 1000);
+ }
+
+ @Future
+ @Override
+ public Date getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(Date intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Date, future";
+ }
+
+ @Override
+ public String getLabel() {
+ return "future";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MaxBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MaxBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MaxBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.validation;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Max;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class MaxBean extends Validable<Integer> {
+
+ public MaxBean() {
+ value = 9;
+ }
+
+ @Max(10)
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(Integer intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Integer, max 10";
+ }
+
+ @Override
+ public String getLabel() {
+ return "max";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MinBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MinBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MinBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.validation;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Min;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class MinBean extends Validable<Integer> {
+
+ public MinBean() {
+ value = 4;
+ }
+
+ @Min(2)
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(Integer intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Integer, min 2";
+ }
+
+ @Override
+ public String getLabel() {
+ return "min";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MinMaxBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MinMaxBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/MinMaxBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.validation;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class MinMaxBean extends Validable<Integer> {
+
+ public MinMaxBean() {
+ value = 4;
+ }
+
+ @Min(2)
+ @Max(10)
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(Integer intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Integer, from 2 to 10";
+ }
+
+ @Override
+ public String getLabel() {
+ return "minMax";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/NotEmptyBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/NotEmptyBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/NotEmptyBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.validation;
+
+import javax.faces.bean.ManagedBean;
+import org.hibernate.validator.constraints.NotEmpty;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class NotEmptyBean extends Validable<String> {
+
+ public NotEmptyBean() {
+ value = "RichFaces 4";
+ }
+
+ @NotEmpty
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(String text) {
+ this.value = text;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Text, not empty";
+ }
+
+ @Override
+ public String getLabel() {
+ return "notEmpty";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/NotNullBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/NotNullBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/NotNullBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.validation;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.NotNull;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class NotNullBean extends Validable<String> {
+
+ public NotNullBean() {
+ value = "RichFaces 4";
+ }
+
+ @NotNull
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(String text) {
+ this.value = text;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Text value, not null";
+ }
+
+ @Override
+ public String getLabel() {
+ return "notNull";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/PastBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/PastBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/PastBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.validation;
+
+import java.util.Date;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Past;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class PastBean extends Validable<Date> {
+
+ public PastBean() {
+ value = new Date(System.currentTimeMillis() - 4 * 24 * 3600 * 1000);
+ }
+
+ @Past
+ @Override
+ public Date getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(Date intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Date, past";
+ }
+
+ @Override
+ public String getLabel() {
+ return "past";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/PatternBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/PatternBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/PatternBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.validation;
+
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Pattern;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class PatternBean extends Validable<String> {
+
+ public PatternBean() {
+ value = "richFaces 4";
+ }
+
+ @Pattern(regexp = "[a-z].*")
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(String text) {
+ this.value = text;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Text, pattern '[a-z].*'";
+ }
+
+ @Override
+ public String getLabel() {
+ return "pattern";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/SizeBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/SizeBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/SizeBean.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.faces.bean.ManagedBean;
+import javax.validation.constraints.Size;
+
+/**
+ * Helper bean for testing JSR-303.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean
+public class SizeBean extends Validable<List<String>> {
+
+ public SizeBean() {
+ value = new ArrayList<String>();
+ value.add("A");
+ value.add("B");
+ }
+
+ @Size(min = 2, max = 4)
+ @Override
+ public List<String> getValue() {
+ return value;
+ }
+
+ @Override
+ public void setValue(List<String> intValue) {
+ this.value = intValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return "Selection size, from 2 to 4";
+ }
+
+ @Override
+ public String getLabel() {
+ return "size";
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/Validable.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/Validable.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/Validable.java 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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.validation;
+
+import java.lang.reflect.ParameterizedType;
+
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+/**
+ * Helper abstract class for testing JSR-303.
+ *
+ * @author asmirnov, <a href="mailto:ppitonak@redhat.com">Pavol
Pitonak</a>
+ * @version $Revision$
+ */
+public abstract class Validable<T> {
+
+ T value;
+
+ public T getValue() {
+ return value;
+ }
+
+ public void setValue(T value) {
+ this.value = value;
+ }
+
+ public Converter getConverter() {
+ Class<T> parameterType = (Class<T>) ((ParameterizedType)
getClass().getGenericSuperclass()).getActualTypeArguments()[0];
+ return
FacesContext.getCurrentInstance().getApplication().createConverter(parameterType);
+ }
+
+ public abstract String getDescription();
+
+ public abstract String getLabel();
+}
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/csv.xhtml 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+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">
+
+ </ui:define>
+
+ <ui:define name="component">
+ <script type="text/javascript">
+ function setCorrectValues() {
+ var today = new Date();
+ var inPast = new Date(today.getTime() - 4 * 24 * 3600 * 1000);
+ var inFuture = new Date(today.getTime() + 4 * 24 * 3600 * 1000);
+
+ $('input[id$=assertTrue]')[0].checked = true;
+ $('input[id$=assertFalse]')[0].checked = false;
+ $('input[id$=decimalMinMax]').val('3');
+ $('input[id$=digits]').val('2.567');
+ $('input[id$=max]').val('9');
+ $('input[id$=min]').val('4');
+ $('input[id$=minMax]').val('4');
+ $('input[id$=notEmpty]').val('RichFaces 4');
+ $('input[id$=notNull]').val('RichFaces 4');
+ $('input[id$=pattern]').val('richFaces 4');
+ $('input[id$=past]').val(inPast.format("d mmm yyyy"));
+ $('input[id$=future]').val(inFuture.format("d mmm
yyyy"));
+ $('input[value=A]')[0].checked=true
+ $('input[value=B]')[0].checked=true
+ $('input[value=C]')[0].checked=false
+ $('input[value=D]')[0].checked=false
+ $('input[value=E]')[0].checked=false
+ $('input[value=F]')[0].checked=false
+ }
+
+ function setWrongValues() {
+ var today = new Date();
+ var inPast = new Date(today.getTime() - 4 * 24 * 3600 * 1000);
+ var inFuture = new Date(today.getTime() + 4 * 24 * 3600 * 1000);
+
+ $('input[id$=assertTrue]')[0].checked = false;
+ $('input[id$=assertFalse]')[0].checked = true;
+ $('input[id$=decimalMinMax]').val('10.668');
+ $('input[id$=digits]').val('15.627123');
+ $('input[id$=max]').val('122');
+ $('input[id$=min]').val('-544');
+ $('input[id$=minMax]').val('-5');
+ $('input[id$=notEmpty]').val('');
+ $('input[id$=notNull]').val('');
+ $('input[id$=pattern]').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
+ $('input[value=B]')[0].checked=false
+ $('input[value=C]')[0].checked=false
+ $('input[value=D]')[0].checked=false
+ $('input[value=E]')[0].checked=false
+ $('input[value=F]')[0].checked=true
+ }
+ </script>
+
+ <input id="setCorrectValuesButton" type="button"
value="set correct values" onclick="setCorrectValues()"/>
+ <input id="setWrongValuesButton" type="button"
value="set wrong values" onclick="setWrongValues()"/>
+
+ <h:panelGrid columns="3">
+
+ <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}"
+ />
+ </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}"
+ />
+ </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}"
+ />
+ </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}"
+ />
+ </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}"
+ />
+ </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}"
+ />
+ </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}"
+ />
+ </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}"
+ />
+ </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}"
+ />
+ </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}"
+ />
+ </h:inputText>
+ <rich:message id="patternMsg" for="pattern" />
+
+ <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}"
+ />
+ </h:inputText>
+ <rich:message id="pastMsg" for="past" />
+
+ <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}"
+ />
+ </h:inputText>
+ <rich:message id="futureMsg" for="future" />
+
+ <h:outputLabel for="size"
value="#{sizeBean.description}" />
+ <h:selectManyCheckbox id="size"
value="#{sizeBean.value}" label="#{sizeBean.label}" >
+ <f:selectItem itemValue="A"
itemLabel="A"/>
+ <f:selectItem itemValue="B"
itemLabel="B"/>
+ <f:selectItem itemValue="C"
itemLabel="C"/>
+ <f:selectItem itemValue="D"
itemLabel="D"/>
+ <f:selectItem itemValue="E"
itemLabel="E"/>
+ <f:selectItem itemValue="F"
itemLabel="F"/>
+ </h:selectManyCheckbox>
+ <rich:message id="sizeMsg" for="size" />
+ </h:panelGrid>
+
+ <br/>
+
+ <h:commandButton id="hButton" value="h:commandButton"
style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton"
value="a4j:commandButton"/>
+
+ <br/>
+ <rich:messages/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richValidatorBean.attributes}"
id="attributes"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/jsr303.xhtml 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+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">
+
+ </ui:define>
+
+ <ui:define name="component">
+ <script type="text/javascript">
+ function setCorrectValues() {
+ var today = new Date();
+ var inPast = new Date(today.getTime() - 4 * 24 * 3600 * 1000);
+ var inFuture = new Date(today.getTime() + 4 * 24 * 3600 * 1000);
+
+ $('input[id$=assertTrue]')[0].checked = true;
+ $('input[id$=assertFalse]')[0].checked = false;
+ $('input[id$=decimalMinMax]').val('3');
+ $('input[id$=digits]').val('2.567');
+ $('input[id$=max]').val('9');
+ $('input[id$=min]').val('4');
+ $('input[id$=minMax]').val('4');
+ $('input[id$=notEmpty]').val('RichFaces 4');
+ $('input[id$=notNull]').val('RichFaces 4');
+ $('input[id$=pattern]').val('richFaces 4');
+ $('input[id$=past]').val(inPast.format("d mmm yyyy"));
+ $('input[id$=future]').val(inFuture.format("d mmm
yyyy"));
+ $('input[value=A]')[0].checked=true
+ $('input[value=B]')[0].checked=true
+ $('input[value=C]')[0].checked=false
+ $('input[value=D]')[0].checked=false
+ $('input[value=E]')[0].checked=false
+ $('input[value=F]')[0].checked=false
+ }
+
+ function setWrongValues() {
+ var today = new Date();
+ var inPast = new Date(today.getTime() - 4 * 24 * 3600 * 1000);
+ var inFuture = new Date(today.getTime() + 4 * 24 * 3600 * 1000);
+
+ $('input[id$=assertTrue]')[0].checked = false;
+ $('input[id$=assertFalse]')[0].checked = true;
+ $('input[id$=decimalMinMax]').val('10.668');
+ $('input[id$=digits]').val('15.627123');
+ $('input[id$=max]').val('122');
+ $('input[id$=min]').val('-544');
+ $('input[id$=minMax]').val('-5');
+ $('input[id$=notEmpty]').val('');
+ $('input[id$=notNull]').val('');
+ $('input[id$=pattern]').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
+ $('input[value=B]')[0].checked=false
+ $('input[value=C]')[0].checked=false
+ $('input[value=D]')[0].checked=false
+ $('input[value=E]')[0].checked=false
+ $('input[value=F]')[0].checked=true
+ }
+ </script>
+
+ <input id="setCorrectValuesButton" type="button"
value="set correct values" onclick="setCorrectValues()"/>
+ <input id="setWrongValuesButton" type="button"
value="set wrong values" onclick="setWrongValues()"/>
+
+ <h:panelGrid columns="3">
+
+ <h:outputLabel for="assertTrue"
value="#{assertTrueBean.description}" />
+ <h:selectBooleanCheckbox id="assertTrue"
value="#{assertTrueBean.value}" label="#{assertTrueBean.label}" />
+ <rich:message id="assertTrueMsg" for="assertTrue"
/>
+
+ <h:outputLabel for="assertFalse"
value="#{assertFalseBean.description}" />
+ <h:selectBooleanCheckbox id="assertFalse"
value="#{assertFalseBean.value}" label="#{assertFalseBean.label}"
/>
+ <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: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: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: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: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: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: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: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:message id="patternMsg" for="pattern" />
+
+ <h:outputLabel for="past"
value="#{pastBean.description}" />
+ <h:inputText id="past" value="#{pastBean.value}"
label="#{pastBean.label}" >
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ </h:inputText>
+ <rich:message id="pastMsg" for="past" />
+
+ <h:outputLabel for="future"
value="#{futureBean.description}" />
+ <h:inputText id="future"
value="#{futureBean.value}" label="#{futureBean.label}" >
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ </h:inputText>
+ <rich:message id="futureMsg" for="future" />
+
+ <h:outputLabel for="size"
value="#{sizeBean.description}" />
+ <h:selectManyCheckbox id="size"
value="#{sizeBean.value}" label="#{sizeBean.label}" >
+ <f:selectItem itemValue="A"
itemLabel="A"/>
+ <f:selectItem itemValue="B"
itemLabel="B"/>
+ <f:selectItem itemValue="C"
itemLabel="C"/>
+ <f:selectItem itemValue="D"
itemLabel="D"/>
+ <f:selectItem itemValue="E"
itemLabel="E"/>
+ <f:selectItem itemValue="F"
itemLabel="F"/>
+ </h:selectManyCheckbox>
+ <rich:message id="sizeMsg" for="size" />
+ </h:panelGrid>
+
+ <br/>
+
+ <h:commandButton id="hButton" value="h:commandButton"
style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton"
value="a4j:commandButton"/>
+
+ <br/>
+ <rich:messages/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/list.xhtml 2011-03-09
10:15:02 UTC (rev 22094)
@@ -0,0 +1,46 @@
+<?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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+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/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Validator</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="csv" outcome="csv"
value="Client Side Validation">
+ Simple page that contains <b>rich:validator</b> testing the
support for JSR-303 and input boxes for all validator's attributes.
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="jsr303" outcome="jsr303"
value="JSR-303 Bean Validation">
+ Page containing input with various JSR-303 validators.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>