I have a jsf/facelts page with 2 date fields, which I initalise to some default values (in
bean) from Page Action.
It all works fine except:
when JBoss AS is freshly restarted and I click on the link to bring up the JSF page. In
which case Seam forward to Login page, and after successful login attached error
(javax.faces.convert.ConverterException: Value must be a date) is thrown. Error does not
appear if I do not initalise date fields to default values.
Not sure how to avoid this error.
| @Name("paymentReconciliation")
| public class PaymentReconciliation {
|
|
| private Date settlementDateFrom = null;
| private Date settlementDateTo = null;
|
| //called from page action to set dates values to some default
| public String pageAction() {
| if (settlementDateFrom == null) {
|
|
setSettlementDateFrom(DateTime.getMonthBegin(DateTime.offsetMonth(DateTime.clearTime(new
Date()), -1)));
| }
|
| if (settlementDateTo == null)
{setSettlementDateTo(DateTime.getMonthEnd(DateTime.offsetMonth(DateTime.clearTime(new
Date()), -1)));
| }
| return "";
| }
|
| ...
| }
| XHTML
| ...
| <h:outputLabel for="settlementDateFromRichPanel">Settlement date
from</h:outputLabel>
| <h:panelGrid id="settlementDateFromPanel" columns="2"
width="100%" rowClasses="calendar-row" columnClasses="ecol1,
ecol2">
| <a4j:outputPanel id="settlementDateFromRichPanel"
layout="block">
| <rich:calendar value="#{paymentReconciliation.settlementDateFrom}"
| popup="true" datePattern="dd-MM-yyyy"
enableManualInput="true" id="settlementDateFrom"/>
| </a4j:outputPanel>(dd-mm-yyyy)
| </h:panelGrid>
|
| <h:outputLabel for="settlementDateToRichPanel">Settlement date
to</h:outputLabel>
| <h:panelGrid id="settlementDateToPanel" columns="2"
width="100%" rowClasses="calendar-row" columnClasses="ecol1,
ecol2">
| <a4j:outputPanel id="settlementDateToRichPanel"
layout="block">
| <rich:calendar value="#{paymentReconciliation.settlementDateTo}"
| popup="true" datePattern="dd-MM-yyyy"
enableManualInput="true" id="settlementDateTo"/>
| </a4j:outputPanel>(dd-mm-yyyy)
| </h:panelGrid>
| ....
|
| Error
| 11:19:40,059 ERROR [DebugPageHandler] redirecting to debug page
| javax.faces.convert.ConverterException: Value must be a date.
| at
javax.faces.convert.DateTimeConverter.getAsObject(DateTimeConverter.java:390)
| at org.jboss.seam.pages.Param.getValueFromRequest(Param.java:144)
| at org.jboss.seam.core.Pages.applyRequestParameterValues(Pages.java:633)
| at
org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRestoreView(AbstractSeamPhaseListener.java:73)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:95)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| ...
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109699#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...