Author: jjamrich
Date: 2011-10-21 08:24:54 -0400 (Fri, 21 Oct 2011)
New Revision: 22837
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/single.xhtml
Log:
RFPL-1721: fixing scripts for set wrong value and and event attrbitute to validator
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/single.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/single.xhtml 2011-10-21
08:44:17 UTC (rev 22836)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richValidator/single.xhtml 2011-10-21
12:24:54 UTC (rev 22837)
@@ -48,59 +48,11 @@
<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$=regexp]').val('100');
- $('input[id$=custom]').val('RichFaces');
- $('input[id$=past]').val(inPast.format("d mmm yyyy"));
- $('input[id$=future]').val(inFuture.format("d mmm
yyyy"));
- $('input[id$=stringSize]').val('JSF');
- $('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
+ $('input[id$=min]').val('4');
}
- 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$=regexp]').val('@@@');
- $('input[id$=custom]').val('@@@');
- $('input[id$=past]').val(inFuture.format("d mmm
yyyy"));
- $('input[id$=future]').val(inPast.format("d mmm
yyyy"));
- $('input[id$=stringSize]').val('JSF 2');
- $('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
+ function setWrongValues() {
+ $('input[id$=min]').val('1');
}
</script>
@@ -108,8 +60,10 @@
<input id="setWrongValuesButton" type="button"
value="set wrong values" onclick="setWrongValues()"/>
<h:panelGrid columns="3">
-
- <rich:validator
data="#{richValidatorBean.attributes['data'].value}"
+
+ <h:outputLabel for="min"
value="#{minBean.description}" />
+ <h:inputText id="min" value="#{minBean.value}"
label="#{minBean.label}" converter="#{minBean.converter}">
+ <rich:validator
data="#{richValidatorBean.attributes['data'].value}"
disabled="#{richValidatorBean.attributes['disabled'].value}"
immediate="#{richValidatorBean.attributes['immediate'].value}"
onbeforedomupdate="#{richValidatorBean.attributes['onbeforedomupdate'].value}"
@@ -119,14 +73,9 @@
onerror="#{richValidatorBean.attributes['onerror'].value}"
queueId="#{richValidatorBean.attributes['queueId'].value}"
status="#{richValidatorBean.attributes['status'].value}"
- >
-
- <h:outputLabel for="min"
value="#{minBean.description}" />
- <h:inputText id="min" value="#{minBean.value}"
label="#{minBean.label}" converter="#{minBean.converter}" />
+ event="blur" />
+ </h:inputText>
<rich:message id="minMsg" for="min" />
-
-
- </rich:validator>
</h:panelGrid>