3 Replies Latest reply on Apr 9, 2010 7:21 AM by Sean W

    Preventing full refresh of data table

    Sean W Newbie

      The behavior as of now is that if I go towards the bottom of the page and update a cell I will get a full refresh and be brought to the top of the page again no matter what I try to do in code to prevent it.  I am using Spring Webflow so I can't discount that as the culprit but here is my code if anyone has some ideas.

       

      <ui:define name="content" switchType="ajax">

      <rich:tabPanel>

      <rich:tab rendered="#{buildingResourcesModel.seriesCount>=1}" label="#{buildingResourcesModel.seriesHeadings[0]}" switchType="ajax">

      <a4j:support event="onClick" action="active-tab">

      <a4j:actionparam name="active_tab" value="1" />

      </a4j:support>

      <f:view>

      <h:form id="tab1">

      <ui:fragment id="fragment">

          <rich:dataTable rows="24"

               value="#{buildingResourcesModel.seriesSets[0]}" var="time" rowKeyVar="row"

               rowClasses="row1, row2"

               columnClasses="column1"

               cellpadding="0">

       

      <rich:column>

      <f:facet name="header"><h:outputText value="Period Ending" /></f:facet>

      <h:outputText value="#{time[0].seriesDisplay}" />

      </rich:column>

       

      <rich:columns value="#{buildingResourcesModel.columnSets[0]}" var="column" index="ind">

      <f:facet name="header"><h:outputText value="#{column.header}" /></f:facet>

       

      <a4j:outputPanel id="C_#{ind}">

      <h:inputText rendered="#{time[ind].forecastType==2}" styleClass="editable-cell-forecast" value="#{time[ind].availability}">

      <a4j:support event="onchange" action="save" reRender="tab1:j_id38:#{row}:C_#{ind}" ajaxSingle="true">

      <a4j:actionparam name="guid" value="#{time[ind].guid}" />

      <a4j:actionparam name="row" value="#{row}" />

      <a4j:actionparam name="col" value="#{ind}" />

      </a4j:support>

      </h:inputText>

       

      <h:inputText rendered="#{time[ind].forecastType!=2}" styleClass="editable-cell" value="#{time[ind].availability}">

      <a4j:support event="onchange" action="save" reRender="tab1:j_id38:#{row}:C_#{ind}" ajaxSingle="true">

      <a4j:actionparam name="guid" value="#{time[ind].guid}" />

      <a4j:actionparam name="row" value="#{row}" />

      <a4j:actionparam name="col" value="#{ind}" />

      </a4j:support>

      </h:inputText>

      </a4j:outputPanel>

      </rich:columns>

       

      </rich:dataTable>

      </ui:fragment>

      </h:form>

      </f:view>

      </rich:tab>

       

       

      </rich:tabPanel>

      </ui:define>