4 Replies Latest reply on Mar 3, 2008 10:59 AM by Leonardo Cardoso

    t:datatable & a4j

    khanmurtuza Newbie

      trying to add ajax capability to the tomahawk datatable component..I thought by onlu changing <h:form> to <a4j:form> will work..but nothing happens, dataTable remains the same after ant action..below is the code..any idea..

      <a4j:form id="dataForm" ajaxSubmit="true" reRender="data">
      <t:dataTable id="data"
      styleClass="scrollerTable"
      headerClass="standardTable_Header"
      footerClass="standardTable_Header"
      rowClasses="standardTable_Row1,standardTable_Row2"
      columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
      var="car"
      value="#{pagedSort.cars}"
      preserveDataModel="true"
      rows="10"
      rowId="#{car.type}"
      rowOnClick="alert('rowId: ' + this.id)"
      sortColumn="#{pagedSort.sort}"
      sortAscending="#{pagedSort.ascending}"
      preserveSort="true">
      <h:column>
      <f:facet name="header"></f:facet>
      <h:outputText value="#{car.id}" />
      </h:column>
      <h:column>
      <f:facet name="header">
      <t:commandSortHeader columnName="type" arrow="true" immediate="false">
      <h:outputText value="Car Type" />
      </t:commandSortHeader>
      </f:facet>
      <h:outputText value="#{car.type}" />
      </h:column>
      <h:column>
      <f:facet name="header">
      <t:commandSortHeader columnName="color" arrow="true" immediate="false">
      <h:outputText value="Car Color" />
      </t:commandSortHeader>
      </f:facet>
      <h:inputText value="#{car.color}" >
      <f:validateLength maximum="10"/>
      </h:inputText>
      </h:column>
      </t:dataTable>

      <h:panelGrid columns="1" styleClass="scrollerTable2" columnClasses="standardTable_ColumnCentered" >
      <t:dataScroller id="scroll_1"
      for="data"
      fastStep="10"
      pageCountVar="pageCount"
      pageIndexVar="pageIndex"
      styleClass="scroller"
      paginator="true"
      paginatorMaxPages="9"
      paginatorTableClass="paginator"
      paginatorActiveColumnStyle="font-weight:bold;"
      immediate="true">

      <f:facet name="first" >
      <t:graphicImage url="../images/first.gif" border="1" />
      </f:facet>
      <f:facet name="last">
      <t:graphicImage url="../images/last.gif" border="1" />
      </f:facet>
      <f:facet name="previous">
      <t:graphicImage url="../images/prev.gif" border="1" />
      </f:facet>
      <f:facet name="next">
      <t:graphicImage url="../images/next.gif" border="1" />
      </f:facet>
      <f:facet name="fastforward">
      <t:graphicImage url="../images/lastDisabled.gif" border="1" />
      </f:facet>
      <f:facet name="fastrewind">
      <t:graphicImage url="../images/firstDisabled.gif" border="1" />
      </f:facet>
      </t:dataScroller>

      </h:panelGrid>
      </a4j:form>