Author: jjamrich
Date: 2011-04-18 08:09:35 -0400 (Mon, 18 Apr 2011)
New Revision: 22429
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/csv.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsr303.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsfValidator.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/list.xhtml
Log:
Set the same interface for all type validators
Change all pages to use the same interface and differs only in
validators used.
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java 2011-04-18
11:55:15 UTC (rev 22428)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java 2011-04-18
12:09:35 UTC (rev 22429)
@@ -50,7 +50,11 @@
logger = LoggerFactory.getLogger(getClass());
logger.info("initializing bean " + getClass().getName());
attributes =
Attributes.getComponentAttributesFromFacesConfig(UIRichMessage.class, getClass());
-
+
+ // setting up incorrect values to fire-up validator
+ simpleInput1 = "-5";
+ simpleInput2 = "-5";
+
// to get working this component example correctly is required that for
// property has been initialized
attributes.setAttribute("for", "simpleInput1");
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/csv.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/csv.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/csv.xhtml 2011-04-18
12:09:35 UTC (rev 22429)
@@ -0,0 +1,175 @@
+<?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">
+ <style type="text/css">
+ .rf-msg-err {
+ display: block !important;
+ margin-bottom: 6px;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="component">
+ <script type="text/javascript">
+ function setCorrectValues() {
+ $('input[id$=simpleInput1]').val('4');
+ $('input[id$=simpleInput2]').val('4');
+ }
+
+ function setWrongValues() {
+ $('input[id$=simpleInput1]').val('-5');
+ $('input[id$=simpleInput2]').val('-5');
+ }
+ </script>
+
+ <input id="setCorrectValuesButton" type="button"
value="set correct values" onclick="setCorrectValues()"/>
+ <input id="setWrongValuesButton" type="button"
value="set wrong values" onclick="setWrongValues()"/>
+
+ <rich:message id="simpleInputMsg"
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="#{richMessageBean.attributes['for'].value}"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ facets="#{richMessageBean.attributes['facets'].value}"
+ family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
+ <h:panelGrid columns="3">
+ <h:outputLabel for="simpleInput1"
value="#{minMaxBean.description}" />
+ <h:inputText id="simpleInput1"
value="#{minMaxBean.value}" label="Input 1"
converter="#{minMaxBean.converter}">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="simpleInputMsg1"
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput1"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+
facets="#{richMessageBean.attributes['facets'].value}"
+
family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
+
+ <h:outputLabel for="simpleInput2"
value="#{minMaxBean.description}" />
+ <h:inputText id="simpleInput2"
value="#{minMaxBean.value}" label="Input 2"
converter="#{minMaxBean.converter}">
+ <rich:validator />
+ </h:inputText>
+ <rich:message id="simpleInputMsg2"
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput2"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+
facets="#{richMessageBean.attributes['facets'].value}"
+
family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
+
+ </h:panelGrid>
+
+ <br/>
+
+ <h:commandButton id="hButton" value="h:commandButton"
style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton"
value="a4j:commandButton"/>
+
+ <br/>
+ <rich:messages id="msgs"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richMessageBean.attributes}"
id="attributes"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsfValidator.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsfValidator.xhtml 2011-04-18
11:55:15 UTC (rev 22428)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsfValidator.xhtml 2011-04-18
12:09:35 UTC (rev 22429)
@@ -39,115 +39,129 @@
</f:viewParam>
</f:metadata>
</ui:define>
-
+
<ui:define name="component">
+ <script type="text/javascript">
+ function setCorrectValues() {
+ $('input[id$=simpleInput1]').val('4');
+ $('input[id$=simpleInput2]').val('4');
+ }
+ function setWrongValues() {
+ $('input[id$=simpleInput1]').val('-5');
+ $('input[id$=simpleInput2]').val('-5');
+ }
+ </script>
+
+ <input id="setCorrectValuesButton" type="button"
value="set correct values" onclick="setCorrectValues()"/>
+ <input id="setWrongValuesButton" type="button"
value="set wrong values" onclick="setWrongValues()"/>
+
<rich:message id="simpleInputMsg"
-
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
-
for="#{richMessageBean.attributes['for'].value}"
-
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
-
rendered="#{richMessageBean.attributes['rendered'].value}"
-
showDetail="#{richMessageBean.attributes['showDetail'].value}"
-
showSummary="#{richMessageBean.attributes['showSummary'].value}"
-
childCount="#{richMessageBean.attributes['childCount'].value}"
-
children="#{richMessageBean.attributes['children'].value}"
-
dir="#{richMessageBean.attributes['dir'].value}"
-
facets="#{richMessageBean.attributes['facets'].value}"
-
family="#{richMessageBean.attributes['family'].value}"
-
lang="#{richMessageBean.attributes['lang'].value}"
-
onclick="#{richMessageBean.attributes['onclick'].value}"
-
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
-
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
-
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
-
onkeyup="#{richMessageBean.attributes['onkeyup'].value}"
-
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
-
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
-
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
-
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
-
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
-
rendererType="#{richMessageBean.attributes['rendererType'].value}"
-
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
-
style="#{richMessageBean.attributes['style'].value}"
-
styleClass="#{richMessageBean.attributes['styleClass'].value}"
-
title="#{richMessageBean.attributes['title'].value}"
- />
- <!-- ajax input, kombinacia a4j a input -->
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="#{richMessageBean.attributes['for'].value}"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+
facets="#{richMessageBean.attributes['facets'].value}"
+
family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
+
<h:panelGrid columns="3">
- <h:outputLabel for="simpleInput1" value="Simple Input
1" />
- <h:inputText id="simpleInput1"
value="#{richMessageBean.simpleInput1}" label="Input 1" >
- <f:validateLength maximum="5" minimum="2"
/>
+ <h:outputLabel for="simpleInput1"
value="#{minMaxBean.description}" />
+ <h:inputText id="simpleInput1"
value="#{richMessageBean.simpleInput1}" label="Input 1" >
+ <f:validateLongRange minimum="2" maximum="10"
/>
</h:inputText>
<rich:message id="simpleInputMsg1"
-
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="simpleInput1"
-
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
-
rendered="#{richMessageBean.attributes['rendered'].value}"
-
showDetail="#{richMessageBean.attributes['showDetail'].value}"
-
showSummary="#{richMessageBean.attributes['showSummary'].value}"
-
childCount="#{richMessageBean.attributes['childCount'].value}"
-
children="#{richMessageBean.attributes['children'].value}"
-
dir="#{richMessageBean.attributes['dir'].value}"
-
facets="#{richMessageBean.attributes['facets'].value}"
-
family="#{richMessageBean.attributes['family'].value}"
-
lang="#{richMessageBean.attributes['lang'].value}"
-
onclick="#{richMessageBean.attributes['onclick'].value}"
-
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
-
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
-
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
-
onkeyup="#{richMessageBean.attributes['onkeyup'].value}"
-
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
-
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
-
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
-
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
-
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
-
rendererType="#{richMessageBean.attributes['rendererType'].value}"
-
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
-
styleClass="#{richMessageBean.attributes['styleClass'].value}"
-
style="#{richMessageBean.attributes['style'].value}"
-
title="#{richMessageBean.attributes['title'].value}"
- />
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput1"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+
facets="#{richMessageBean.attributes['facets'].value}"
+
family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
</h:panelGrid>
-
+
<h:panelGrid columns="3">
- <h:outputLabel for="simpleInput2" value="Simple Input
2" />
+ <h:outputLabel for="simpleInput2"
value="#{minMaxBean.description}" />
<h:inputText id="simpleInput2"
value="#{richMessageBean.simpleInput2}" label="Input 2" >
- <f:validateLength maximum="5" minimum="2"
/>
+ <f:validateLongRange minimum="2" maximum="10"
/>
</h:inputText>
<rich:message id="simpleInputMsg2"
-
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="simpleInput2"
-
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
-
rendered="#{richMessageBean.attributes['rendered'].value}"
-
showDetail="#{richMessageBean.attributes['showDetail'].value}"
-
showSummary="#{richMessageBean.attributes['showSummary'].value}"
-
childCount="#{richMessageBean.attributes['childCount'].value}"
-
children="#{richMessageBean.attributes['children'].value}"
-
dir="#{richMessageBean.attributes['dir'].value}"
-
facets="#{richMessageBean.attributes['facets'].value}"
-
family="#{richMessageBean.attributes['family'].value}"
-
lang="#{richMessageBean.attributes['lang'].value}"
-
onclick="#{richMessageBean.attributes['onclick'].value}"
-
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
-
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
-
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
-
onkeyup="#{richMessageBean.attributes['onkeyup'].value}"
-
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
-
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
-
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
-
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
-
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
-
rendererType="#{richMessageBean.attributes['rendererType'].value}"
-
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
-
styleClass="#{richMessageBean.attributes['styleClass'].value}"
-
style="#{richMessageBean.attributes['style'].value}"
-
title="#{richMessageBean.attributes['title'].value}"
- />
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput2"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+
facets="#{richMessageBean.attributes['facets'].value}"
+
family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
</h:panelGrid>
-
+
<br/>
-
+
<h:commandButton id="hButton" value="h:commandButton"
style="margin-right: 10px;"/>
<a4j:commandButton id="a4jButton"
value="a4j:commandButton"/>
+
+ <br/>
+ <rich:messages id="msgs"/>
</ui:define>
<ui:define name="outOfTemplateAfter">
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsr303.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsr303.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsr303.xhtml 2011-04-18
12:09:35 UTC (rev 22429)
@@ -0,0 +1,170 @@
+<?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">
+ <style type="text/css">
+ .rf-msg-err {
+ display: block !important;
+ margin-bottom: 6px;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="component">
+ <script type="text/javascript">
+ function setCorrectValues() {
+ $('input[id$=simpleInput1]').val('4');
+ $('input[id$=simpleInput2]').val('4');
+ }
+
+ function setWrongValues() {
+ $('input[id$=simpleInput1]').val('-5');
+ $('input[id$=simpleInput2]').val('-5');
+ }
+ </script>
+
+ <input id="setCorrectValuesButton" type="button"
value="set correct values" onclick="setCorrectValues()"/>
+ <input id="setWrongValuesButton" type="button"
value="set wrong values" onclick="setWrongValues()"/>
+
+ <rich:message id="simpleInputMsg"
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="#{richMessageBean.attributes['for'].value}"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+
facets="#{richMessageBean.attributes['facets'].value}"
+
family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
+ <h:panelGrid columns="3">
+ <h:outputLabel for="simpleInput1"
value="#{minMaxBean.description}" />
+ <h:inputText id="simpleInput1" value="#{minMaxBean.value}"
label="Input 1" converter="#{minMaxBean.converter}"/>
+ <rich:message id="simpleInputMsg1"
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput1"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+
facets="#{richMessageBean.attributes['facets'].value}"
+
family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
+
+ <h:outputLabel for="simpleInput2"
value="#{minMaxBean.description}" />
+ <h:inputText id="simpleInput2"
value="#{minMaxBean.value}" label="Input 2"
converter="#{minMaxBean.converter}"/>
+ <rich:message id="simpleInputMsg2"
+
ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput2"
+
keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+
rendered="#{richMessageBean.attributes['rendered'].value}"
+
showDetail="#{richMessageBean.attributes['showDetail'].value}"
+
showSummary="#{richMessageBean.attributes['showSummary'].value}"
+
childCount="#{richMessageBean.attributes['childCount'].value}"
+
children="#{richMessageBean.attributes['children'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+
facets="#{richMessageBean.attributes['facets'].value}"
+
family="#{richMessageBean.attributes['family'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+
onclick="#{richMessageBean.attributes['onclick'].value}"
+
ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+
onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+
onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+
onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+
onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+
onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+
onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+
onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+
rendererType="#{richMessageBean.attributes['rendererType'].value}"
+
rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
+
styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
+ />
+ </h:panelGrid>
+
+ <br/>
+
+ <h:commandButton id="hButton" value="h:commandButton"
style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton"
value="a4j:commandButton"/>
+
+ <br/>
+ <rich:messages id="msgs"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richMessageBean.attributes}"
id="attributes"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/list.xhtml 2011-04-18
11:55:15 UTC (rev 22428)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/list.xhtml 2011-04-18
12:09:35 UTC (rev 22429)
@@ -1,42 +1,50 @@
-<?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 Message</ui:define>
-
- <ui:define name="links">
-
- <metamer:testPageLink id="jsfValidator"
outcome="jsfValidator" value="Simple JSF Validation">
- Page containing inputs with simple JSF validators and
<b>rich:message</b>s.
- </metamer:testPageLink>
-
- </ui:define>
-
- </ui:composition>
-
-</html>
+<?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 Message</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="csv" outcome="csv"
value="Client Side Validation">
+ Simple page that contains <b>rich:validator</b> for input
with JSR-303 validator.
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="jsr303" outcome="jsr303"
value="JSR-303 Bean Validation">
+ Page containing input with JSR-303 validator.
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="jsfValidator"
outcome="jsfValidator" value="Simple JSF Validation">
+ Page containing input with simple JSF validator.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>