Dates in calendar components are reproducing.

Hi All,

I am facing a big problem.

I have two calendar components

1) fromDate

2) toDate

when page loded first time fromDate field will be remains blank and toDate field contains current date by default.

I am also validating these date fields.

My problem is that if user filled wrong dates and click on ok proper error message displayed.If user moves on another page and come back on previous page those wrong date are still remains.

While my aim is, when user again moves on previous page fromDate field should be blank and toDate field should be filled with current date.

I know there is an option in web.xml i.e.

<context-param>

<param-name>javax.faces.STATE_SAVING_METHOD</param-name>

<param-value>client</param-value>

</context-param>

But if i am trying to use this way other things are giving problem.

So please anybody have any idea,Please tell me early.

Don't mind my english because i am weak in english.

Your sincerly,

Sharad

[1086 byte] By [@passw0rd@a] at [2007-11-27 6:22:39]
# 1

How is the user moving on to a different page? Do they click a button to move on? How do they move off the page if the dates are invalid? Perhaps the button that moves off the page, regardless of whether the dates are valid could clear out the date fields of invalid dates?

Do you have the Calendar components bound to a session bean property?

jetsonsa at 2007-7-12 17:39:48 > top of Java-index,Development Tools,Java Tools...
# 2

Hi,

Thanks for reply.

User is moving on other page via html/javascript menu.My calender component is not binded with session bean it is using page bean properties.

I am giving the JSP code for calendar...........

<ui:calendar binding="#{BasicUnavailability.toDate}" columns="10"

dateFormatPattern="MM/dd/yyyy" id="toDate" required="true"

style="left: 343px; top: 35px; position: absolute"

validator="#{BasicUnavailability.toDate_validate}" />

Please tell me the solution of this problem.

With Regards,

Sharad

@passw0rd@a at 2007-7-12 17:39:48 > top of Java-index,Development Tools,Java Tools...
# 3

Hi,

Thanks for reply.

User is moving on other page via html/javascript menu.My calender component is not binded with session bean it is using page bean properties.

I am giving the JSP code for calendar...........

<ui:calendar binding="#{BasicUnavailability.toDate}" columns="10"

dateFormatPattern="MM/dd/yyyy" id="toDate" required="true"

style="left: 343px; top: 35px; position: absolute"

validator="#{BasicUnavailability.toDate_validate}" />

Please tell me the solution of this problem.

With Regards,

Sharad

@passw0rd@a at 2007-7-12 17:39:48 > top of Java-index,Development Tools,Java Tools...