1 Reply Latest reply on Nov 21, 2007 6:25 AM by Yevgen Kravchenko

    scrollabledatatable binding question

    John McClain Newbie

      I want to be able to get the data for the selected row in a scrollabeldatatable. I would like to use the "selection" attribute of the scrollabledatatable. Seems simple enough. here is my view code for the scrollabeldatatable tag:

      <h:form
       id="casetableform"
       style="width:802px;margin:auto;border:solid 1px">
      <rich:scrollableDataTable
       id="casetable"
       rows="50"
       columnClasses="col"
       value="#{caseList}"
       var="case"
       sortMode="single"
       width="800px"
       height="600px"
       selection="#{CASELISTFORM.rowSelected}"
       binding="#{CASELISTFORM.tbl}">
      .
      .
      .
      

      here is my backing bean:
      @Stateless
      @Name("CASELISTFORM")
      public class CaseListFormBean implements ICaseListForm {
      
       private Selection rowSelected;
       private UIScrollableDataTable tbl;
      .
      .
      .
      public Selection getRowSelected() {
       return rowSelected;
       }
      
       public void setRowSelected(Selection rowSelected) {
       this.rowSelected = rowSelected;
       }
      
       public UIScrollableDataTable getTbl() {
       return tbl;
       }
      
       public void setTbl(UIScrollableDataTable tbl) {
       this.tbl = tbl;
       }
      
      
      


      The error I get using the type for the binding UIScrollabelDataTable is :

      SEVERE: Error Rendering View[/caselist.xhtml]
      javax.faces.FacesException: javax.el.ELException: /caselist.xhtml @213,33 binding="#{CASELISTFORM.tbl}": java.lang.IllegalArgumentException: argument type mismatch
      

      OK - so I tried HtmlScrollableDataTable as the type instead. It gives me an exception stating that "casetableform:casetable is not of type UIScrollabelDataTable" - that is why I switched types. Yet neither binding works.
      The error occurs when the scrollableDataTable is rendering - I want to be able to call a serverside method from a richMenuItem that gets the selected row, then delete the row and have the grid remove the row without rerendering the whole grid (the last part may be a separate question but any help is appreciated)