You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by jorge miguel <jo...@hotmail.com> on 2008/07/30 20:52:02 UTC

inputDate and ppr problem

 hi. first of all this the code that i have  <tr:inputDate id="dateSubmited" autoSubmit="true" immediate="true" valueChangeListener="#{footerBean.typeChange}" value="#{reportingInformationActionHandler.rvctReporting.submissionDate}" label="Date Submited:"> <tr:validateDateTimeRange maximum="#{footerBean.maxDate}"/> <f:convertDateTime pattern="MM/dd/yyyy"/> </tr:inputDate> <tr:inputDate partialTriggers="dateSubmited" value="#{reportingInformationActionHandler.rvctReporting.countedDate}" label="Date Counted:"> <tr:validateDateTimeRange minimum="#{footerBean.submissionDate}" maximum="#{footerBean.maxDate}"/> <f:convertDateTime pattern="MM/dd/yyyy"/> </tr:inputDate>   this is a simple validation "From Date -- ToDate" the second inputDate must be bigger than the submittedDate (first inputDate= field) but less than the actual date. so the problems come in the validateDateTimeRange footerBean.submissionDate is not been updated with the new value that i type in the first input any idea why is happening this?  i.e. first InputDate 10/12/2008 in the second inputDate the minimum=10/12/2008 maximum=actualDate so if i change the first inputDate with any otherDate the second Inputdate still validating the minimum against 10/12/2008  hope is clear enough and someone can help me. and sorry for the bad english  jorge chavez
_________________________________________________________________
Los mejores conciertos en exclusiva por MSN in concert
http://video.msn.com/?mkt=es-mx

Re: inputDate and ppr problem

Posted by Richard Yee <ri...@gmail.com>.
Jorge,
The value of the dateSubmitted is
value="#{reportingInformationActionHandler.rvctReporting.submissionDate}"

The minimum in your date counted is  minimum="#{footerBean.submissionDate}"

How is the value of the submitted date getting copied to the
footerBean submissionDate?

You might want to consider using a component binding for your second
inputDate and programmatically set the validateDateTimeRange in the
listener.

As discussed in a recent email thread, updating model values in a
valueChangeListener is problematic.


-Richard

On 7/30/08, jorge miguel <jo...@hotmail.com> wrote:
>  hi.
>  first of all this the code that i have
>
> <tr:inputDate id="dateSubmited" autoSubmit="true" immediate="true"
>  valueChangeListener="#{footerBean.typeChange}"
> value="#{reportingInformationActionHandler.rvctReporting.submissionDate}"
> label="Date Submited:">
>  <tr:validateDateTimeRange
> maximum="#{footerBean.maxDate}"/>
>  <f:convertDateTime pattern="MM/dd/yyyy"/>
>  </tr:inputDate>
>  <tr:inputDate partialTriggers="dateSubmited"
> value="#{reportingInformationActionHandler.rvctReporting.countedDate}"
> label="Date Counted:">
>  <tr:validateDateTimeRange
> minimum="#{footerBean.submissionDate}"
>  maximum="#{footerBean.maxDate}"/>
>  <f:convertDateTime pattern="MM/dd/yyyy"/>
>  </tr:inputDate>
>
>   this is a simple validation "From Date -- ToDate"
>  the second inputDate must be bigger than the submittedDate (first
> inputDate= field) but less than the actual date.
>  so the problems come in the validateDateTimeRange footerBean.submissionDate
> is not been updated with the new value that i type in the first input any
> idea why is happening this?
>
> i.e. first InputDate 10/12/2008 in the second inputDate the
> minimum=10/12/2008 maximum=actualDate so if i change the first inputDate
> with any otherDate the second Inputdate still validating the minimum against
> 10/12/2008
>
> hope is clear enough and someone can help me. and sorry for the bad english
>
> jorge chavez
>
>
> ________________________________
> ¿Tus fotos son un desorden? La solución a tus males se llama Galería
> fotográfica de Windows Live