7 Replies Latest reply on Sep 19, 2007 3:43 AM by chintan parekh

    Problem in using <rich:scrollableDataTable>

    chintan parekh Newbie

      Hi I am having following exception while using rich:scorllableDataTable in my jsp.

      
      ava.lang.StringIndexOutOfBoundsException: String index out of range: -1
      
       at java.lang.String.substring(II)Ljava.lang.String;(Unknown Source)
      
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer$3.renderContent(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;Ljavax.faces.context.ResponseWriter;Lorg.richfaces.renderkit.html.ScrollableDataTableRendererState;)V(ScrollableDataTableBaseRenderer.java:111)
      
       at org.richfaces.renderkit.html.ExtendedColumnVisitor.visit(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;Ljavax.faces.context.ResponseWriter;Lorg.richfaces.renderkit.html.ScrollableDataTableRendererState;)I(ExtendedColumnVisitor.java:31)
      
       at org.richfaces.renderkit.html.ColumnWalker.iterateOverColumns(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;Lorg.richfaces.renderkit.html.ColumnVisitor;Ljavax.faces.context.ResponseWriter;Lorg.richfaces.renderkit.html.ScrollableDataTableRendererState;)I(ColumnWalker.java:42)
      
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.renderHeaders(Ljavax.faces.context.FacesContext;Lorg.richfaces.component.UIScrollableDataTable;Z)V(ScrollableDataTableBaseRenderer.java:475)
      
       at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(Ljavax.faces.context.ResponseWriter;Ljavax.faces.context.FacesContext;Lorg.richfaces.component.UIScrollableDataTable;Lorg.ajax4jsf.renderkit.ComponentVariables;)V(ScrollableDataTableRenderer.java:303)
      
       at org.richfaces.renderkit.html.ScrollableDataTableRenderer.doEncodeEnd(Ljavax.faces.context.ResponseWriter;Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(ScrollableDataTableRenderer.java:552)
      
       at org.ajax4jsf.renderkit.RendererBase.encodeEnd(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(RendererBase.java:135)
      
       at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.encodeEnd(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(ScrollableDataTableBaseRenderer.java:731)
      
       at javax.faces.component.UIComponentBase.encodeEnd(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:539)
      
       at javax.faces.component.UIData.encodeEnd(Ljavax.faces.context.FacesContext;)V(UIData.java:573)
      
       at org.richfaces.component.UIScrollableDataTable.encodeEnd(Ljavax.faces.context.FacesContext;)V(UIScrollableDataTable.java:335)
      
       at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(RendererUtils.java:442)
      
       at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(Ljavax.faces.context.FacesContext;Ljavax.faces.context.ResponseWriter;Ljavax.faces.component.UIComponent;I)V(HtmlGridRendererBase.java:229)
      
       at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(HtmlGridRendererBase.java:101)
      
       at javax.faces.component.UIComponentBase.encodeEnd(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:539)
      
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(RendererUtils.java:419)
      
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(RendererUtils.java:400)
      
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(HtmlGroupRendererBase.java:78)
      
       at javax.faces.component.UIComponentBase.encodeEnd(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:539)
      
       at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(RendererUtils.java:442)
      
       at org.apache.myfaces.custom.tabbedpane.HtmlTabbedPaneRenderer.writeTabsContents(Ljavax.faces.context.ResponseWriter;Ljavax.faces.context.FacesContext;Lorg.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPane;I)V(HtmlTabbedPaneRenderer.java:550)
      
       at org.apache.myfaces.custom.tabbedpane.HtmlTabbedPaneRenderer.encodeEnd(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(HtmlTabbedPaneRenderer.java:232)
      
       at javax.faces.component.UIComponentBase.encodeEnd(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:539)
      
       at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(RendererUtils.java:442)
      
       at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.renderChildren(Ljavax.faces.context.FacesContext;Ljavax.faces.context.ResponseWriter;Ljavax.faces.component.UIComponent;I)V(HtmlGridRendererBase.java:229)
      
       at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGridRendererBase.encodeEnd(Ljavax.faces.context.FacesContext;Ljavax.faces.component.UIComponent;)V(HtmlGridRendererBase.java:101)
      
       at javax.faces.component.UIComponentBase.encodeEnd(Ljavax.faces.context.FacesContext;)V(UIComponentBase.java:539)
      
       at javax.faces.webapp.UIComponentTag.encodeEnd()V(UIComponentTag.java:498)
      
       at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:366)
      
       at org.apache.myfaces.shared_tomahawk.taglib.UIComponentBodyTagBase.doEndTag()I(UIComponentBodyTagBase.java:57)
      
       at jsp_servlet._webcontent._jsp._searchmanager._search.__search._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(__search.java:477)
      
      


      JSP code is as below:
      <t:panelGrid align="center" width="100%" style="margin-top: 50px;">
      
       <rich:scrollableDataTable id="advCriteriaTable"
      
       rowKeyVar="rkv"
      
       value="#{advancedSearchHelper.criteriaList}"
      
       var="count"
      
       width="700px" headerClass="HEADING"
      
       rowClasses="ROW1"
      
       style="border: 1px solid gray;width: 100%;" height="70px"
      
       rendered="#{not empty advancedSearchHelper.criteriaList}">
      
       <rich:column width="10%">
      
       <t:panelGrid columns="1">
      
       <h:outputText value="#{count.advLMFCount} LMF"
      
       styleClass="LABEL" style="font-size: 9px;" />
      
       <h:outputText value="#{count.advMADCount} CDF"
      
       styleClass="LABEL" style="font-size: 9px;" />
      
       </t:panelGrid>
      
       </rich:column>
      
      
      
       <rich:column width="10%">
      
       <t:panelGrid align="center">
      
       <t:commandButton image="/webContent/images/delete.GIF"
      
       style="height:15px; width:15px" title="Delete Criteria"
      
       action="#{advancedSearchHelper.removeCriteria}" />
      
       </t:panelGrid>
      
       </rich:column>
      
       </rich:scrollableDataTable>
      
      </t:panelGrid>
      


      When i debug the code..i can see values are setting in bean property (i.e. advancedSearchHelper.criteriaList) but while during rendering the page it is giving above exception.

      Please suggest me wht could be wrong here?

      Thanks
      Chintan