Author: mvitenkov
Date: 2009-04-01 12:20:07 -0400 (Wed, 01 Apr 2009)
New Revision: 13346
Modified:
trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp
trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorProperty.jsp
Log:
+new features like type... commited
Modified: trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp 2009-04-01
15:49:49 UTC (rev 13345)
+++ trunk/test-applications/jsp/src/main/webapp/Validator/Validator.jsp 2009-04-01
16:20:07 UTC (rev 13346)
@@ -3,85 +3,85 @@
<%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="validatorSubviewID">
-
- <rich:panel>
+
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText>Single input field with label and message. Validated by AJAX on
every changing.</h:outputText>
+ </f:facet>
+ <h:outputLabel for="ltext" value="#{lengthBean.textDescription}"
/>
+ <h:inputText id="ltext" value="#{lengthBean.text}">
+ <rich:ajaxValidator event="onchange" />
+ </h:inputText>
+ </rich:panel>
+ <h2>Input fields with label and message in the JSF dataTable. Each
+ field validated by AJAX on "onchange" event</h2>
+ <rich:graphValidator value="#{dataValidator}"
id="graphValidatorID"
+ binding="#{dataValidator.graphValidatorComponent}"
summary="#{dataValidator.summary}"
+ type="customGraphValidator">
+ <rich:dataTable value="#{dataValidator.beans}" var="dataBean"
+ id="table">
<f:facet name="header">
- <h:outputText>Single input field with label and message. Validated by AJAX on
every changing.</h:outputText>
+ <h:outputText
+ value="Validate values in the data table. Total sum for an all integer values
validated for a value less then 20" />
</f:facet>
- <h:outputLabel for="ltext"
value="#{lengthBean.textDescription}" />
- <h:inputText id="ltext" value="#{lengthBean.text}">
- <rich:ajaxValidator event="onchange" />
- </h:inputText>
- <rich:message for="ltext" showDetail="true"
showSummary="true" />
- </rich:panel>
- <a4j:region>
- <h2>Input fields with label and message in the JSF dataTable.
- Each field validated by AJAX on "onchange" event</h2>
- <rich:graphValidator value="#{dataValidator}"
- binding="#{dataValidator.graphValidatorComponent}"
id="graphValidatorID"
- rendered="#{dataValidator.rendered}">
- <rich:dataTable value="#{dataValidator.beans}" var="dataBean"
id="table">
+
+ <h:column>
<f:facet name="header">
- <h:outputText
- value="Validate values in the data table. Total sum for an all integer values
validated for a value less then 20" />
+ <h:outputText value="text field" />
</f:facet>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="text field" />
- </f:facet>
- <h:outputLabel for="text" value="#{dataBean.textDescription}"
/>
- <h:inputText id="text" value="#{dataBean.text}">
- <rich:ajaxValidator event="onchange" />
- </h:inputText>
- </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="integer field" />
- </f:facet>
- <h:outputLabel for="intValue"
value="#{dataBean.intDescription}" />
- <h:inputText id="intValue" value="#{dataBean.intValue}">
- <rich:ajaxValidator event="onchange" />
- </h:inputText>
- <rich:message for="intValue" showDetail="true"
showSummary="true" />
- </h:column>
- <f:facet name="footer">
- <h:panelGroup>
- <h:outputText>in addition to fields validation, total sum for an all integer
values validated for a value less then 20.</h:outputText>
- <a4j:commandButton value="Submit all
fields"></a4j:commandButton>
- </h:panelGroup>
+ <h:outputLabel for="text" value="#{dataBean.textDescription}"
/>
+ <h:inputText id="text" value="#{dataBean.text}">
+ <rich:ajaxValidator event="onchange" />
+ </h:inputText>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="integer field" />
</f:facet>
- </rich:dataTable>
- </rich:graphValidator>
- </a4j:region>
+ <h:outputLabel for="intValue"
value="#{dataBean.intDescription}" />
+ <h:inputText id="intValue" value="#{dataBean.intValue}">
+ <rich:ajaxValidator event="onchange" />
+ </h:inputText>
+ </h:column>
+ <f:facet name="footer">
+ <h:panelGroup>
+ <h:outputText>in addition to fields validation, total sum for an all integer
values validated for a value less then 20.</h:outputText>
+ <a4j:commandButton value="Submit all
fields"></a4j:commandButton>
+ </h:panelGroup>
+ </f:facet>
+ </rich:dataTable>
+ </rich:graphValidator>
<br />
- <%--<rich:graphValidator value="#{graphValidator}">--%>
+ <%--rich:graphValidator value="#{graphValidator}"--%>
<h:panelGrid columns="2" border="2"
id="panelGridID">
<f:facet name="header">
<h:outputText value="Ajax Validator test" />
</f:facet>
- <h:outputLabel for="mailValue" value="Mail validation:" />
+ <h:outputLabel for="mailValue" value="Mail validation*:" />
<h:panelGroup>
<h:inputText value="#{validator.text}" id="mailValue">
<rich:ajaxValidator binding="#{validator.ajaxValidatorComponent}"
data="{param1:'param1',param2:'param2'}"
- disableDefault="#{validator.disableDefault}" event="onchange"
+ disableDefault="#{validator.disableDefault}" event="onblur"
eventsQueue="#{validator.eventsQueue}" focus="mailValue"
id="ajaxValidatorID"
- ignoreDupResponses="#{validator.ignoreDupResponses}"
+ ignoreDupResponses="#{validator.ignoreDupResponses}"
limitToList="#{validator.limitToList}"
onbeforedomupdate="#{event.onbeforedomupdate}"
- oncomplete="#{event.oncomplete}"
onsubmit="#{event.onsubmit}"
- rendered="#{validator.rendered}"
+ oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}"
+ rendered="#{validator.rendered}"
requestDelay="#{validator.requestDelay}"
reRender="mailValue,booleanValue,assertTrue,eanValue,creditValue"
- status="mailValue"
- ajaxListener="#{validator.processAjax}"></rich:ajaxValidator>
+ status="mailValue" ajaxListener="#{validator.processAjax}"
+ summary="#{validator.summary}"
timeout="#{validator.timeout}">
+ <a4j:support event="onblur" reRender="hiddenField"
action="#"></a4j:support>
+ </rich:ajaxValidator>
</h:inputText>
<rich:message for="mailValue" showDetail="true"
showSummary="true" />
+ <h:inputHidden value="#{validator.temp}" id="hiddenField"/>
</h:panelGroup>
<h:outputLabel for="booleanValue" value="AssertFalse
validation:" />
@@ -94,7 +94,7 @@
</h:panelGroup>
<h:outputLabel for="assertTrue" value="AssertTrue validation:"
/>
- <h:panelGroup>
+ <h:panelGroup>
<h:selectBooleanCheckbox value="#{validator.assertTrue}"
id="assertTrue">
<rich:ajaxValidator event="onchange"></rich:ajaxValidator>
@@ -102,7 +102,7 @@
<rich:message for="assertTrue" showDetail="true"
showSummary="true" />
</h:panelGroup>
- <h:outputLabel for="dateValue" value="Future validation:" />
+ <h:outputLabel for="dateValue" value="Future validation*:"
/>
<h:panelGroup>
<h:inputText value="#{validator.dateValue}" id="dateValue"
converter="dateValueConverter">
@@ -164,11 +164,12 @@
<a4j:commandButton value="validate all fields"
reRender="panelGridID"></a4j:commandButton>
<f:facet name="footer">
- <h:outputText value="...together with graphValidator" />
+ <h:outputText
+ value="*-total length > 20,but < 50 (graphValidator test)"
/>
</f:facet>
</h:panelGrid>
- <%--</rich:graphValidator>--%>
+ <%--/rich:graphValidator--%>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorProperty.jsp 2009-04-01
15:49:49 UTC (rev 13345)
+++ trunk/test-applications/jsp/src/main/webapp/Validator/ValidatorProperty.jsp 2009-04-01
16:20:07 UTC (rev 13346)
@@ -3,16 +3,20 @@
<%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="validatorPropertySubviewID">
- <a4j:commandButton value="add(ajaxValidator) test"
action="#{validator.add}"></a4j:commandButton>
+ <a4j:commandButton value="add(ajaxValidator) test"
+ action="#{validator.add}"></a4j:commandButton>
- <a4j:commandButton value="add(graphValidator) test"
action="#{dataValidator.add}"></a4j:commandButton>
+ <a4j:commandButton value="add(graphValidator) test"
+ action="#{dataValidator.add}"></a4j:commandButton>
<br />
<br />
<h:panelGrid columns="2" style="display:block;
vertical-align:top;">
- <h:outputText value="Ajax Validator test" style="align:center;
font-weight:bold;"/>
- <h:outputText value="Graph Validator test" style="align:center;
font-weight:bold;"/>
- <h:panelGrid columns="2" border="2">
-
+ <h:outputText value="Ajax Validator test"
+ style="align:center; font-weight:bold;" />
+ <h:outputText value="Graph Validator test"
+ style="align:center; font-weight:bold;" />
+ <h:panelGrid columns="2" border="2">
+
<h:outputText value="ajaxSingle" />
<h:selectBooleanCheckbox value="#{validator.ajaxSingle}"
onchange="submit();" />
@@ -59,6 +63,11 @@
<h:selectBooleanCheckbox value="#{validator.submitted}"
onchange="submit();" />
+ <h:outputText value="summary" />
+ <h:inputText value="#{validator.summary}">
+ <a4j:support event="onchange"
reRender="ajaxValidatorID"></a4j:support>
+ </h:inputText>
+
<h:outputText value="timeout" />
<h:inputText value="#{validator.timeout}">
<a4j:support event="onchange"
reRender="ajaxValidatorID"></a4j:support>
@@ -71,11 +80,11 @@
value="Binding" />
<h:outputText value="#{dataValidator.bindLabel}" />
- <h:outputText value="rendered" />
- <h:selectBooleanCheckbox value="#{dataValidator.rendered}"
- onchange="submit();" />
+ <h:outputText value="summary" />
+ <h:inputText value="#{dataValidator.summary}">
+ <a4j:support event="onchange"
reRender="graphValidatorID"></a4j:support>
+ </h:inputText>
</h:panelGrid>
-
</h:panelGrid>
</f:subview>
\ No newline at end of file