Author: jjamrich
Date: 2011-05-09 17:11:13 -0400 (Mon, 09 May 2011)
New Revision: 22480
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidableGroupNumericInputs.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupAllComponents.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupBooleanInputs.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupNumericInputs.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/all.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/list.xhtml
modules/tests/metamer/trunk/application/src/test/java/org/richfaces/tests/metamer/TestRichTreeModelRecursiveAdaptorBeanSerialization.java
Log:
Add some rich components into metamer within graphValidator
Add some components + new validation groups to test rich:graphValidator
behavior.
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java 2011-05-06
18:27:42 UTC (rev 22479)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichGraphValidatorBean.java 2011-05-09
21:11:13 UTC (rev 22480)
@@ -22,20 +22,23 @@
package org.richfaces.tests.metamer.bean.rich;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
+import javax.faces.model.SelectItem;
import javax.validation.constraints.AssertTrue;
-import javax.validation.constraints.Size;
-import javax.validation.groups.Default;
+import javax.validation.constraints.NotNull;
+import org.hibernate.validator.constraints.NotEmpty;
import org.richfaces.component.UIGraphValidator;
import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.validation.groups.ValidationGroup1;
-import org.richfaces.tests.metamer.validation.groups.ValidationGroup2;
+import org.richfaces.tests.metamer.validation.groups.ValidationGroupBooleanInputs;
+import org.richfaces.tests.metamer.validation.groups.ValidationGroupNumericInputs;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -45,20 +48,62 @@
* @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
* @version $Revision$
*/
-@ManagedBean(name="richGraphValidatorBean")
+@ManagedBean(name = "richGraphValidatorBean")
@ViewScoped
public class RichGraphValidatorBean implements Serializable, Cloneable {
+ /** Valid value of numeric inputs */
+ public static final int REQUIRED_INT_VALUE = 10;
+
/** Generated UID */
private static final long serialVersionUID = -960575870621302059L;
+
private static Logger logger;
+ private final String smile = ":-)";
private Attributes attributes;
- @Size(min = 5, max = 15, message = "Wrong size for password")
- private String password;
- @Size(min = 5, max = 15, message = "Wrong size for password")
- private String passwordConfirm;
+ private List<SelectItem> selectItems;
+ @NotNull
+ @NotEmpty
+ private String autocompleteInput = smile;
+ @NotNull
+ @NotEmpty
+ private String inplaceSelect = smile;
+ @NotNull
+ @NotEmpty
+ private String inplaceInput = smile;
+ @NotNull
+ @NotEmpty
+ private String select = smile;
+ private Integer inputNumberSlider = new Integer(REQUIRED_INT_VALUE);
+ private Integer inputNumberSpinner = new Integer(REQUIRED_INT_VALUE);
+ @NotNull
+ @NotEmpty
+ private String inputText = smile;
+ @NotNull
+ @NotEmpty
+ private String inputSecret = smile;
+ @NotNull
+ @NotEmpty
+ private String inputTextarea = smile;
+ private Boolean selectBooleanCheckbox = Boolean.TRUE;
+ @NotEmpty
+ private List<SelectItem> selectManyCheckbox = createSelectItems();
+ @NotNull
+ @NotEmpty
+ private String selectOneListbox = smile;
+ @NotEmpty
+ private List<SelectItem> selectManyListbox = createSelectItems();
+ @NotNull
+ @NotEmpty
+ private String selectOneMenu = smile;
+ @NotEmpty
+ private List<SelectItem> selectManyMenu = createSelectItems();
+ @NotNull
+ @NotEmpty
+ private String selectOneRadio = smile;
+
@PostConstruct
public void init(){
logger = LoggerFactory.getLogger(getClass());
@@ -69,25 +114,60 @@
attributes.setAttribute("type",
"org.richfaces.BeanValidator");
}
- @AssertTrue(message = "Different passwords entered! [Default Group]")
- public boolean isPasswordsEquals() {
- return password.equals(passwordConfirm);
+ @AssertTrue(message = "One of following inputs doesn't contain smile or
numeric value 10!")
+ public boolean isAllInputsCorrect(){
+
+ return autocompleteInput.contains(smile)
+ && inplaceSelect.contains(smile)
+ && inplaceInput.contains(smile)
+ && select.contains(smile)
+ && inputNumberSlider.equals(new Integer(10))
+ && inputNumberSpinner.equals(new Integer(10))
+ && inputText.contains(smile)
+ && inputSecret.contains(smile)
+ && inputTextarea.contains(smile)
+ && selectBooleanCheckbox.booleanValue()
+ && !selectManyCheckbox.isEmpty()
+ && selectOneListbox.contains(smile)
+ && !selectManyListbox.isEmpty()
+ && selectOneMenu.contains(smile)
+ && !selectManyMenu.isEmpty()
+ && selectOneRadio.contains(smile);
}
- @AssertTrue(message = "Different passwords entered! [G1]",
groups={ValidationGroup1.class})
- public boolean isRovnakeHesla() {
- return password.equals(passwordConfirm);
+ @AssertTrue(message = "One of following inputs doesn't contain smile",
+ groups = {ValidationGroupNumericInputs.class})
+ public boolean isAllTextInputsCorrect() {
+ return inputNumberSlider.equals(new Integer(10))
+ && inputNumberSpinner.equals(new Integer(10));
}
- @AssertTrue(message = "Different passwords entered! [G2 + Default Group]",
groups = {ValidationGroup2.class,Default.class})
- public boolean isPokusUspesny() {
- return password.equals(passwordConfirm);
+ @AssertTrue(message = "One of following inputs doesn't contain smile",
+ groups = {ValidationGroupBooleanInputs.class})
+ public boolean isAllBooleanInputsCorrect() {
+ return inputNumberSlider.equals(new Integer(10))
+ && inputNumberSpinner.equals(new Integer(10));
}
- public void storeNewPassword() {
+ public void anotherActionOnAllComponents() {
FacesContext.getCurrentInstance().addMessage(null,
- new FacesMessage(FacesMessage.SEVERITY_INFO, "Succesfully
changed!", "Succesfully changed!"));
+ new FacesMessage(FacesMessage.SEVERITY_INFO, "Action sucessfully
done!", "Action sucessfully done!"));
}
+
+ private List<SelectItem> createSelectItems() {
+ List<SelectItem> result = new ArrayList<SelectItem>();
+ result.add(new SelectItem("a", "Abcd"));
+ result.add(new SelectItem("b", "Bcde"));
+ result.add(new SelectItem("c", "Cdef"));
+ result.add(new SelectItem("d", "Defg"));
+ result.add(new SelectItem(smile, smile));
+
+ return result;
+ }
+
+ public Class<?> getValidationGroups() {
+ return ValidationGroupNumericInputs.class;
+ }
public Attributes getAttributes() {
return attributes;
@@ -97,19 +177,142 @@
this.attributes = attributes;
}
- public String getPassword() {
- return password;
+ public String getAutocompleteInput() {
+ return autocompleteInput;
}
- public void setPassword(String password) {
- this.password = password;
+ public void setAutocompleteInput(String autocompleteInput) {
+ this.autocompleteInput = autocompleteInput;
}
- public String getPasswordConfirm() {
- return passwordConfirm;
+ public String getInplaceSelect() {
+ return inplaceSelect;
}
- public void setPasswordConfirm(String passwordConfirm) {
- this.passwordConfirm = passwordConfirm;
+ public void setInplaceSelect(String inplaceSelect) {
+ this.inplaceSelect = inplaceSelect;
}
+
+ public String getInplaceInput() {
+ return inplaceInput;
+ }
+
+ public void setInplaceInput(String inplaceInput) {
+ this.inplaceInput = inplaceInput;
+ }
+
+ public String getSelect() {
+ return select;
+ }
+
+ public void setSelect(String select) {
+ this.select = select;
+ }
+
+ public List<SelectItem> getSelectItems() {
+ if (selectItems == null ) {
+ selectItems = createSelectItems();
+ }
+ return selectItems;
+ }
+
+ public void setSelectItems(List<SelectItem> selectItems) {
+ this.selectItems = selectItems;
+ }
+
+ public Integer getInputNumberSlider() {
+ return inputNumberSlider;
+ }
+
+ public void setInputNumberSlider(Integer inputNumberSlider) {
+ this.inputNumberSlider = inputNumberSlider;
+ }
+
+ public Integer getInputNumberSpinner() {
+ return inputNumberSpinner;
+ }
+
+ public void setInputNumberSpinner(Integer inputNumberSpinner) {
+ this.inputNumberSpinner = inputNumberSpinner;
+ }
+
+ public String getInputText() {
+ return inputText;
+ }
+
+ public void setInputText(String inputText) {
+ this.inputText = inputText;
+ }
+
+ public String getInputSecret() {
+ return inputSecret;
+ }
+
+ public void setInputSecret(String inputSecret) {
+ this.inputSecret = inputSecret;
+ }
+
+ public String getInputTextarea() {
+ return inputTextarea;
+ }
+
+ public void setInputTextarea(String inputTextarea) {
+ this.inputTextarea = inputTextarea;
+ }
+
+ public Boolean getSelectBooleanCheckbox() {
+ return selectBooleanCheckbox;
+ }
+
+ public void setSelectBooleanCheckbox(Boolean selectBooleanCheckbox) {
+ this.selectBooleanCheckbox = selectBooleanCheckbox;
+ }
+
+ public List<SelectItem> getSelectManyCheckbox() {
+ return selectManyCheckbox;
+ }
+
+ public void setSelectManyCheckbox(List<SelectItem> selectManyCheckbox) {
+ this.selectManyCheckbox = selectManyCheckbox;
+ }
+
+ public String getSelectOneListbox() {
+ return selectOneListbox;
+ }
+
+ public void setSelectOneListbox(String selectOneListbox) {
+ this.selectOneListbox = selectOneListbox;
+ }
+
+ public List<SelectItem> getSelectManyListbox() {
+ return selectManyListbox;
+ }
+
+ public void setSelectManyListbox(List<SelectItem> selectManyListbox) {
+ this.selectManyListbox = selectManyListbox;
+ }
+
+ public String getSelectOneMenu() {
+ return selectOneMenu;
+ }
+
+ public void setSelectOneMenu(String selectOneMenu) {
+ this.selectOneMenu = selectOneMenu;
+ }
+
+ public List<SelectItem> getSelectManyMenu() {
+ return selectManyMenu;
+ }
+
+ public void setSelectManyMenu(List<SelectItem> selectManyMenu) {
+ this.selectManyMenu = selectManyMenu;
+ }
+
+ public String getSelectOneRadio() {
+ return selectOneRadio;
+ }
+
+ public void setSelectOneRadio(String selectOneRadio) {
+ this.selectOneRadio = selectOneRadio;
+ }
}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidableGroupNumericInputs.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidableGroupNumericInputs.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidableGroupNumericInputs.java 2011-05-09
21:11:13 UTC (rev 22480)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.groups;
+
+/**
+ * Validation Group for Numeric Inputs
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public interface ValidableGroupNumericInputs {
+
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupAllComponents.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupAllComponents.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupAllComponents.java 2011-05-09
21:11:13 UTC (rev 22480)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.groups;
+
+/**
+ * Validation group for page with many rich components
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public interface ValidationGroupAllComponents {
+
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupBooleanInputs.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupBooleanInputs.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupBooleanInputs.java 2011-05-09
21:11:13 UTC (rev 22480)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.groups;
+
+/**
+ * Validation Group for Boolean Inputs
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public interface ValidationGroupBooleanInputs {
+
+}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupNumericInputs.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupNumericInputs.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroupNumericInputs.java 2011-05-09
21:11:13 UTC (rev 22480)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.groups;
+
+/**
+ * Implementation test
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public class ValidationGroupNumericInputs implements ValidableGroupNumericInputs {
+
+}
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/all.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/all.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/all.xhtml 2011-05-09
21:11:13 UTC (rev 22480)
@@ -0,0 +1,185 @@
+<?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">
+
+ </style>
+ </ui:define>
+
+ <ui:define name="component">
+ <script type="text/javascript">
+ </script>
+
+ <h:form>
+ <ui:fragment
rendered="#{richGraphValidatorBean.attributes['summary'].value==null
+ || richGraphValidatorBean.attributes['summary'].value==''}"
>
+ <rich:graphValidator id="gv1"
+ value="#{richGraphValidatorBean}"
+
groups="#{richGraphValidatorBean.attributes['groups'].value}"
+ type="#{richGraphValidatorBean.attributes['type'].value}"
+
rendered="#{richGraphValidatorBean.attributes['rendered'].value}"
>
+ <rich:panel header="Many rich components within rich:graphValidator"
style="width:500px">
+ <rich:messages globalOnly="true" />
+ <h:panelGrid columns="3">
+ <h:outputText for="inplaceSelect" value="Inplace Select"
/>
+ <rich:inplaceSelect id="inplaceSelect"
value="#{richGraphValidatorBean.inplaceSelect}" >
+ <f:selectItems value="#{richGraphValidatorBean.selectItems}" />
+ </rich:inplaceSelect>
+ <rich:message for="inplaceSelect" />
+
+ <h:outputText for="inplaceInput" value="Inplace Input"
/>
+ <rich:inplaceInput id="inplaceInput"
value="#{richGraphValidatorBean.inplaceInput}" />
+ <rich:message for="inplaceInput" />
+
+ <h:outputText for="select" value="Select" />
+ <rich:select id="select"
value="#{richGraphValidatorBean.select}" >
+ <f:selectItems value="#{richGraphValidatorBean.selectItems}" />
+ </rich:select>
+ <rich:message for="select" />
+
+ <h:outputText for="inputNumberSlider" value="Input Number
Slider" />
+ <rich:inputNumberSlider id="inputNumberSlider"
value="#{richGraphValidatorBean.inputNumberSlider}" />
+ <rich:message for="inputNumberSlider" />
+
+ <h:outputText for="inputNumberSpinner" value="Input Number
Spinner" />
+ <rich:inputNumberSpinner id="inputNumberSpinner"
value="#{richGraphValidatorBean.inputNumberSpinner}" />
+ <rich:message for="inputNumberSpinner" />
+
+ <h:outputText for="autocomplete" value="Autocomplete"
/>
+ <rich:autocomplete id="autocomplete"
value="#{richGraphValidatorBean.autocompleteInput}" />
+ <rich:message for="autocomplete" />
+
+ <h:outputText for="inputText" value="Input Text" />
+ <h:inputText id="inputText"
value="#{richGraphValidatorBean.inputText}" />
+ <rich:message for="inputText" />
+
+ <h:outputText for="inputSecret" value="Input Secret" />
+ <h:inputSecret id="inputSecret"
value="#{richGraphValidatorBean.inputSecret}" />
+ <rich:message for="inputSecret" />
+
+ <h:outputText for="inputTextarea" value="Input Text Area"
/>
+ <h:inputTextarea id="inputTextarea"
value="#{richGraphValidatorBean.inputTextarea}" />
+ <rich:message for="inputTextarea" />
+
+ <h:outputText for="selectBooleanCheckbox" value="Select Boolean
Checkbox" />
+ <h:selectBooleanCheckbox id="selectBooleanCheckbox"
value="#{richGraphValidatorBean.selectBooleanCheckbox}" />
+ <rich:message for="selectBooleanCheckbox" />
+
+ <h:outputText for="selectManyCheckbox" value="Select Many
Checkbox" />
+ <h:selectManyCheckbox id="selectManyCheckbox"
+
value="#{richGraphValidatorBean.selectManyCheckbox}" >
+ <f:selectItems
value="#{richGraphValidatorBean.selectItems}" />
+ </h:selectManyCheckbox>
+ <rich:message for="selectManyCheckbox" />
+
+ <h:outputText for="selectOneListbox" value="Select One
Listbox" />
+ <h:selectOneListbox id="selectOneListbox"
value="#{richGraphValidatorBean.selectOneListbox}" >
+ <f:selectItems value="#{richGraphValidatorBean.selectItems}" />
+ </h:selectOneListbox>
+ <rich:message for="selectOneListbox" />
+
+ <h:outputText for="selectManyListbox" value="Select Many
Listbox" />
+ <h:selectManyListbox id="selectManyListbox"
value="#{richGraphValidatorBean.selectManyListbox}" >
+ <f:selectItems value="#{richGraphValidatorBean.selectItems}" />
+ </h:selectManyListbox>
+ <rich:message for="selectManyListbox" />
+
+ <h:outputText for="selectOneMenu" value="Select One Menu"
/>
+ <h:selectOneMenu id="selectOneMenu"
value="#{richGraphValidatorBean.selectOneMenu}" >
+ <f:selectItems value="#{richGraphValidatorBean.selectItems}" />
+ </h:selectOneMenu>
+ <rich:message for="selectOneMenu" />
+
+ <h:outputText for="selectManyMenu" value="Select Many Menu"
/>
+ <h:selectManyMenu id="selectManyMenu"
value="#{richGraphValidatorBean.selectManyMenu}" >
+ <f:selectItems value="#{richGraphValidatorBean.selectItems}" />
+ </h:selectManyMenu>
+ <rich:message for="selectManyMenu" />
+
+ <h:outputText for="selectOneRadio" value="Select One Radio"
/>
+ <h:selectOneRadio id="selectOneRadio"
value="#{richGraphValidatorBean.selectOneRadio}" >
+ <f:selectItems value="#{richGraphValidatorBean.selectItems}" />
+ </h:selectOneRadio>
+ <rich:message for="selectOneRadio" />
+
+ </h:panelGrid>
+ <a4j:commandButton value="Apply changes"
+ action="#{richGraphValidatorBean.anotherActionOnAllComponents}" />
+ </rich:panel>
+ </rich:graphValidator>
+ </ui:fragment>
+
+ <ui:fragment
rendered="#{richGraphValidatorBean.attributes['summary'].value!=null
+ &&
richGraphValidatorBean.attributes['summary'].value!=''}" >
+ <rich:graphValidator id="gv2"
+ value="#{richGraphValidatorBean}"
+
groups="#{richGraphValidatorBean.attributes['groups'].value}"
+
rendered="#{richGraphValidatorBean.attributes['rendered'].value}"
+
summary="#{richGraphValidatorBean.attributes['summary'].value}"
+ type="#{richGraphValidatorBean.attributes['type'].value}"
>
+ <rich:panel header="Change password" style="width:500px">
+ <rich:messages for="gv2" />
+ <rich:messages globalOnly="true" />
+ <h:panelGrid columns="3">
+
+ </h:panelGrid>
+ <a4j:commandButton value="Store changes"
+ action="#{richGraphValidatorBean.anotherActionOnAllComponents}" />
+ </rich:panel>
+ </rich:graphValidator>
+ </ui:fragment>
+
+ </h:form>
+
+ <br />
+ <rich:messages id="msgs" value="#{richGraphValidatorBean}"
/>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richGraphValidatorBean.attributes}"
+ id="attributes" />
+ </ui:define>
+
+</ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/list.xhtml 2011-05-06
18:27:42 UTC (rev 22479)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/list.xhtml 2011-05-09
21:11:13 UTC (rev 22480)
@@ -31,8 +31,8 @@
<ui:define name="links">
- <metamer:testPageLink id="jsr303" outcome="jsr303"
value="JSR-303 Bean Validation">
- Page containing input with JSR-303 validator within
<b>rich:graphValidator</b>
+ <metamer:testPageLink id="all" outcome="all"
value="Rich components within graphValidator">
+ Page containing many different rich components within
<b>rich:graphValidator</b>
</metamer:testPageLink>
</ui:define>
Modified:
modules/tests/metamer/trunk/application/src/test/java/org/richfaces/tests/metamer/TestRichTreeModelRecursiveAdaptorBeanSerialization.java
===================================================================
---
modules/tests/metamer/trunk/application/src/test/java/org/richfaces/tests/metamer/TestRichTreeModelRecursiveAdaptorBeanSerialization.java 2011-05-06
18:27:42 UTC (rev 22479)
+++
modules/tests/metamer/trunk/application/src/test/java/org/richfaces/tests/metamer/TestRichTreeModelRecursiveAdaptorBeanSerialization.java 2011-05-09
21:11:13 UTC (rev 22480)
@@ -51,10 +51,10 @@
*/
public class TestRichTreeModelRecursiveAdaptorBeanSerialization {
+ PrintStream sysout;
+
private Set<Integer> notEquals = new TreeSet<Integer>();
- PrintStream sysout;
-
@BeforeClass
public void redirectOut() {
sysout = System.out;