0 Replies Latest reply on Nov 23, 2007 12:50 PM by John McClain

    possible Scrollabledatatable JIRA issue - need confirmation

    John McClain Newbie

      I am attempting to bind a scrollabledatatable component to an HtmlScrollableDataTable in my backing bean. Without the binding="#{CASLISTFORM.tbl}" attribute on the component, the view renders fine. When I add the binding attribute, I get the folowing in debug.seam:

      An Error Occurred:
      Component casetableform:casetable not instance of org.richfaces.component.UIScrollableDataTable
      +- Stack Trace
      
      java.lang.IllegalArgumentException: Component casetableform:casetable not instance of org.richfaces.component.UIScrollableDataTable
      
      +- Component Tree
      
      <AjaxViewRoot id="_viewRoot" immediate="false" locale="en" renderKitId="HTML_BASIC" renderRegionOnly="false" rendered="true" selfRendered="false" submitted="false" transient="false" viewId="/caselist.xhtml">
      
       <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
      
       <html xmlns="http://www.w3.org/1999/xhtml"> <link href="stylesheet/fraud.css" rel="stylesheet" type="text/css"/> <style> .col { padding-left: 5px; } </style> <body> <div id="caselistdiv" style="padding: 10px;">
      
       <HtmlForm enctype="application/x-www-form-urlencoded" id="casetableform" prependId="true" rendered="true" style="width:802px;margin:auto;border:solid 1px" submitted="false" transient="false">
      
       <HtmlScrollableDataTable ajaxSingle="false" bypassUpdates="false" columnClasses="col" componentState="org.richfaces.component.UIScrollableDataTable$1@2d0850" first="0" frozenColCount="0" height="600px" hideWhenScrolling="false" id="casetable" ignoreDupResponses="false" limitToList="false" onRowDblClick="A4J.AJAX.Submit('_viewRoot','casetableform',event,{'parameters':{'casetableform:casetable:j_id3':'casetableform:casetable:j_id3'} ,'actionUrl':'/fraud/caselist.seam'} )" onselectionchange="A4J.AJAX.Submit('_viewRoot','casetableform',event,{'parameters':{'casetableform:casetable:j_id4':'casetableform:casetable:j_id4'} ,'actionUrl':'/fraud/caselist.seam'} )" rendered="true" requestDelay="-2147483648" rowIndex="-1" rows="50" sortListener="org.richfaces.event.sort.SingleColumnSortListener@184df1d" sortMode="single" timeout="-2147483648" transient="false" var="case" width="800px" binding="#{CASELISTFORM.tbl}">
      


      Both my view and the rendered component tree show I have an instance of HtmlScrollableDatatable - which isa UIScrollableDataTable


      here is backing bean:
      @Stateful
      @Name("CASELISTFORM")
      public class CaseListFormBean implements ICaseListForm {
      
       //private Selection rowSelected;
       private UIScrollableDataTable tbl;
      .
      .
      @Factory
       public UIScrollableDataTable getTbl() {
       if (tbl == null)
       tbl = new HtmlScrollableDataTable();
       return tbl;
       }
      
       public void setTbl(UIScrollableDataTable tbl) {
       this.tbl = tbl;
       }
      .
      

      here is view:
      .
      .
      <div
       id="caselistdiv"
       style="padding: 10px;">
      
       <h:form
       id="casetableform"
       style="width:802px;margin:auto;border:solid 1px">
      
       <a4j:commandButton value="call del" action="#{CASELISTFORM.delRow}" />
      <rich:scrollableDataTable
       id="casetable"
       rows="50"
       columnClasses="col"
       value="#{caseList}"
       var="case"
       sortMode="single"
       width="800px"
       height="600px"
       binding="#{CASELISTFORM.tbl}">
      .
      .
      

      I have changed build.xml to include richfaces-impl and ui in the /lib dir of the EAR file
      My env is

      jboss 4.2.0
      Richfaces 3.1.2.GA
      Seam 2.0.0.GA

      My Questions are
      1) If this is not a bug, then how to I get a binding to the scrollabledatatable - I want to be able to select rows, and delete them and have the scrollabledatatable update itself (remove the rows) without having to requery the DB
      2) I am second guessing myself here - but is this the right EAR structure - to have impl and ui in /lib dir of the EAR instead of the lib dir of the WAR - I have tried it both ways (in both ear and war, and just ear) but the results are the same?