3 Replies Latest reply on Sep 20, 2007 10:50 AM by Maksim Kaszynski

    rich:scrollableDataTable and Exception: String index out of

    todd Brown Newbie

      Page contains a rich:scrollableDataTable

      <div class="boxContent">
       <rich:scrollableDataTable id="${id}tab3" value="#{bean.allResults.data}" var="row" width="100%">
       <em:richColumn tableId="${id}" columnId="${id}2" cellProperty="f2" headerClass="byTimeHeader" class="w100" title="T" />
       <em:richColumn tableId="${id}" columnId="${id}3" cellProperty="f3" headerClass="byTimeHeader" class="w100" title="E" />
       <c:if test="${showDate}">
       <em:richColumn tableId="${id}" columnId="${id}3b" cellProperty="time" headerClass="byTimeHeader" class="" title="Date" type="java.util.Date" dateType="date"/>
       </c:if>
       <c:if test="${showTime}">
       <em:richColumn tableId="${id}" columnId="${id}3c" cellProperty="time" headerClass="byTimeHeader" class="" title="Time" type="java.util.Date" dateType="time"/>
       </c:if>
       <em:richColumn tableId="${id}" columnId="${id}4" cellProperty="f4" headerClass="byTimeHeader" class="" title="F" type="java.lang.Float"/>
       <em:richColumn tableId="${id}" columnId="${id}5" cellProperty="f5" headerClass="byTimeHeader" class="" title="hrtF" type="java.lang.Float"/>
       <em:richColumn tableId="${id}" columnId="${id}6" cellProperty="f6" headerClass="byTimeHeader" class="" title="x" type="java.lang.Float"/>
       <em:richColumn tableId="${id}" columnId="${id}7" cellProperty="f7" headerClass="byTimeHeader" class="" title="y" type="java.lang.Float"/>
       <em:richColumn tableId="${id}" columnId="${id}8" cellProperty="f8" headerClass="byTimeHeader" class="" title="x/y" type="java.lang.Float"/>
       <em:richColumn tableId="${id}" columnId="${id}9" cellProperty="f9" headerClass="byTimeHeader" class="" title="x vs y" type="java.lang.Float"/>
       </rich:scrollableDataTable>
       </div>

      where em:richColumn is a facelet that boils down to this:

      <rich:column id="${columnId}" width="${width}" headerClass="${headerClass}">
       <f:facet name="header">
       <h:outputText value="${title}" />
       </f:facet>
       <h:outputText value="#{propertyBind}">
       <emCore:isDate class="${type}" >
       <f:convertDateTime dateStyle="${dateStyle}" timeZone="America/New_York" timeStyle="${timeStyle}" type="${dateType}" />
       </emCore:isDate>
       <emCore:isDouble class="${type}" >
       <f:convertNumber maxFractionDigits="${maxFraction}" minFractionDigits="${minFraction}"/>
       </emCore:isDouble>
       </h:outputText>
       </rich:column>


      If I switch to a rich:dataTable (for testing purposes) I do not get the exception...


      Sep 19, 2007 12:47:59 PM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/queries/dailySummary.xhtml]
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
       at java.lang.String.substring(String.java:1768)
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer$3.renderContent(ScrollableDataTableBaseRenderer.java:111)
       at org.richfaces.renderkit.html.ExtendedColumnVisitor.visit(ExtendedColumnVisitor.java:31)
       at org.richfaces.renderkit.html.ColumnWalker.iterateOverColumns(ColumnWalker.java:42)
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.renderHeaders(ScrollableDataTableBaseRenderer.java:475)
       at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(ScrollableDataTableRenderer.java:303)
       at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(ScrollableDataTableRenderer.java:552)
       at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135)
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.encodeEnd(ScrollableDataTableBaseRenderer.java:731)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:829)
       at org.richfaces.component.UIScrollableDataTable.encodeEnd(UIScrollableDataTable.java:335)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:79)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:810)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
       at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:810)
       at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
       at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
       at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeChildren(AjaxContainerRenderer.java:97)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:810)
       at org.ajax4jsf.component.UIAjaxRegion.encodeChildren(UIAjaxRegion.java:113)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:890)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:270)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
       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:220)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:227)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:211)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:817)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:623)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:444)
       at java.lang.Thread.run(Thread.java:595)



      Rich faces 3.1
      JSF 1.2_3
      facelets-1.1.12 (recompiled to use el api release w/ jsd 1.2_3)