2 Replies Latest reply on Feb 20, 2009 11:57 AM by Nick Belaevski

    js:function is lost after scroll the SDT

    Dongyao Zhao Novice

      SDT with vertically scrollbar, the items are more than the defined rows. If scroll it, SDT dynamically load data, the js:function doesn't work any more.

      <rich:scrollableDataTable id="messagePaneId"
      height="#{layoutBean.messageTblHeight}"
      width="#{layoutBean.messageTblWidth}"
      value="#{appData.messages}" var="message"
      rows="20" rowKeyVar="rkv" sortMode="single"
      frozenColCount="1"
      rendered="${essagesView'))
      and (appData.messageCount>0)}"
      rowClasses="taskRows" columnClasses="taskColumns" style="position:absolut;">
      
       <rich:column sortable="true" id="dateString" style="#{message.messageStyle}">
       <f:facet name="header">
       <h:outputText value="Date"/>
       </f:facet>
       <h:outputText value="#{message.dateString}" />
       </rich:column>
      
       <rich:column sortable="true" id="text" width="178" style="#{message.messageStyle}">
       <f:facet name="header">
       <h:outputText value="Text"/>
       </f:facet>
       <h:outputText value="#{message.text}" title="#{message.text}"/>
       </rich:column>
      
       <rich:column sortable="true" id="category" style="#{message.messageStyle}">
       <f:facet name="header">
       <h:outputText value="Category"/>
       </f:facet>
       <h:outputText value="#{message.category}" title="#{message.category}"/>
       </rich:column>
      
       <rich:column sortable="true" id="severity" width="60" style="#{message.messageStyle}">
       <f:facet name="header">
       <h:outputText value="Severity"/>
       </f:facet>
       <h:outputText value="#{message.severity}" />
       </rich:column>
      
       <rich:column sortable="true" id="portName" width="90" style="#{message.messageStyle}">
       <f:facet name="header">
       <h:outputText value="Port"/>
       </f:facet>
       <h:outputText value="#{message.portName}" title="#{message.portName}"/>
       </rich:column>
      
       <rich:column sortable="false" width="90" style="#{message.messageStyle}">
       <f:facet name="header">
       <h:outputText value="Acknowledged"/>
       </f:facet>
       <h:selectBooleanCheckbox id="messageAckCheck#{message.id}" value="#{message.acknowledged}"
       onclick="startWait();this.disabled=true;sendAckMessage#{message.id}()">
       <a4j:jsFunction name="sendAckMessage#{message.id}" action="#{mainBean.messageAcknowledged}"
       reRender="messagePane" ajaxSingle="true" oncomplete="stopWait();">
       <a4j:actionparam name="id" value="#{message.id}" />
       </a4j:jsFunction>
       </h:selectBooleanCheckbox>
       </rich:column>
       <rich:componentControl id="messagecontrolid" for="mContextMenu" operation="show"/>
       </rich:scrollableDataTable>