3 Replies Latest reply on Mar 4, 2007 4:32 AM by Piotr Walczyszyn

    StringIndexOutOfBoundsException when using selectDate

    Piotr Walczyszyn Newbie

      I get an exception when using s:selectDate, my code looks like this:

      <s:decorate>
       <h:inputText
       id="jobstartdate"
       value="#{job.start}"
       required="true"
       size="10"
       styleClass="textfield">
       <s:convertDateTime pattern="MM/dd/yyyy" />
       <a:support
       event="onblur"
       reRender="startErrors" />
       </h:inputText>
       <s:selectDate for="jobstartdate">
       <img src="../images/calendar.gif" />
       </s:selectDate>
       <br />
       <a:outputPanel id="startErrors">
       <s:message />
       </a:outputPanel>
      </s:decorate>
      

      And the exception like this:

      16:25:32,863 ERROR [STDERR] Mar 3, 2007 4:25:32 PM com.sun.facelets.FaceletViewH
      andler handleRenderException
      SEVERE: Error Rendering View[/jobs/createjob.xhtml]
      java.lang.StringIndexOutOfBoundsException: String index out of range: 2
      at java.lang.String.substring(String.java:1935)
      at org.jboss.seam.ui.UISelectDate.commaSeparate(UISelectDate.java:141)
      at org.jboss.seam.ui.UISelectDate.writeLocaleInformation(UISelectDate.ja
      va:118)
      at org.jboss.seam.ui.UISelectDate.writeScript(UISelectDate.java:98)
      at org.jboss.seam.ui.UISelectDate.encodeBegin(UISelectDate.java:70)
      at org.jboss.seam.ui.JSF.renderChild(JSF.java:341)
      at org.jboss.seam.ui.JSF.renderChildren(JSF.java:323)
      at org.jboss.seam.ui.UIDecorate.encodeChildren(UIDecorate.java:355)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSu
      pport.java:244)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSu
      pport.java:249)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSu
      pport.java:249)
      at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSu
      pport.java:249)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.jav
      a:573)
      at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapp
      er.java:101)
      at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandle
      r.java:221)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:
      384)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl...


      Any ideas what could it be?