3 Replies Latest reply on Mar 17, 2009 8:14 AM by tnt9062

    scrollableDataTable: Master Detail relation with scrollableD

    tnt9062

      Anyone can point me to sample with master-detail scrollableDataTables ?

      I try so:

      1. Place two tables in JSP, each in own form
      2. In master table place a4j:support with event="onselectionchange"
      3. In reRender of master table put ids of detail table outputText components which need to update.

      Next problems detected:
      1. If new rowcount not equal with old rowcount then scrollableGrid sizeBox position still wrong.
      2. If new rowcount less than old rowcount and was selected last row, then loadData method in custom model fired with bugged params startRow and endRow (startRow from old data, endRow from new data)
      3. If detail table has no rows after start App, she still blank always (also after reRender)
      4. In some cases headers in table are dissapear if few scrollableTables placed in one JSP (and in own form tag). Can't reproduce it now, but suddenly anyone knows what the problem?

        • 1. Re: scrollableDataTable: Master Detail relation with scrolla
          tnt9062

          up

          • 2. Re: scrollableDataTable: Master Detail relation with scrolla
            ilya_shaikovsky

            show your code.. you trying to update the children components?

            Next code works fine for me.

             <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1" height="400px"
             width="700px" id="carList" rows="40" columnClasses="col"
             value="#{dataTableScrollerBean.allCars}" var="category" sortMode="single"
             binding="#{dataTableScrollerBean.table}"
             sortOrder="#{dataTableScrollerBean.order}"
             selection="#{dataTableScrollerBean.selection}">
            
             <rich:column id="make">
             <f:facet name="header"><h:outputText styleClass="headerText" value="Make" /></f:facet>
             <h:outputText value="#{category.make}" />
             </rich:column>
             <rich:column id="model">
             <f:facet name="header"><h:outputText styleClass="headerText" value="Model" /></f:facet>
             <h:outputText value="#{category.model}" />
             </rich:column>
             <rich:column id="price">
             <f:facet name="header"><h:outputText styleClass="headerText" value="Price" /></f:facet>
             <h:outputText value="#{category.price}" />
             </rich:column>
             <rich:column id="mileage">
             <f:facet name="header"><h:outputText styleClass="headerText" value="Mileage" /></f:facet>
             <h:outputText value="#{category.mileage}" />
             </rich:column>
             <rich:column width="200px" id="vin">
             <f:facet name="header"><h:outputText styleClass="headerText" value="VIN" /></f:facet>
             <h:outputText value="#{category.vin}" />
             </rich:column>
             <rich:column id="stock">
             <f:facet name="header"><h:outputText styleClass="headerText" value="Stock" /></f:facet>
             <h:outputText value="#{category.stock}" />
             </rich:column>
             <a4j:support event="onselectionchange" value="Show Current Selection" reRender="table"
             action="#{dataTableScrollerBean.takeSelection}" />
             </rich:scrollableDataTable>
             <rich:scrollableDataTable value="#{dataTableScrollerBean.selectedCars}" var="sel" id="table" width="400px" height="300px" rows="20">
             <f:facet name="header">123</f:facet>
             <rich:column>
             <f:facet name="header"><h:outputText value="Make" /></f:facet>
             <h:outputText value="#{sel.make}" />
             </rich:column>
             <rich:column id="model">
             <f:facet name="header"><h:outputText value="Model" /></f:facet>
             <h:outputText value="#{sel.model}" />
             </rich:column>
             <rich:column id="price">
             <f:facet name="header"><h:outputText value="Price" /></f:facet>
             <h:outputText value="#{sel.price}" />
             </rich:column>
             <rich:column id="mileage">
             <f:facet name="header"><h:outputText value="Mileage" /></f:facet>
             <h:outputText value="#{sel.mileage}" />
             </rich:column>
             <rich:column id="stock">
             <f:facet name="header"><h:outputText value="Stock" /></f:facet>
             <h:outputText value="#{sel.stock}" />
             </rich:column>
             </rich:scrollableDataTable>
            


            • 3. Re: scrollableDataTable: Master Detail relation with scrolla
              tnt9062

              Hi, Ilya!

              if reRender whole table, in IE she blinking and in some cases broken.
              Sample https://jira.jboss.org/jira/browse/RF-6498 (that which not fixed)

              Also in this realization in own data model i have wrong startRow and endRow values.

              i need refresh only data in table...