2 Replies Latest reply on Mar 4, 2011 5:35 AM by forn

    a4j:commandLink + a4j:param + rich:column

    forn

      Hello to All.

      i have the next code (RF 4.0.x):

       

      <a4j:outputPanel ajaxRendered="true" layout="block">
         <h:form>
          <rich:panel id="mainPanel"
           header="#{not empty uiManager.treeManager.currentSelection?uiManager.treeManager.currentSelection.name:'Выберите папку для отображения'}"
           style="valign:top">
           <rich:dataScroller for="dataTable" maxPages="10" rendered="#{not empty uiManager.treeManager.currentSelection}"/>
           <rich:extendedDataTable id="dataTable"
            rendered="#{not empty uiManager.treeManager.currentSelection}"
            noDataLabel="Данные отсутствуют" var="essence"
            selectionMode="multipleKeyboardFree" sortMode="single"
            value="#{uiManager.tableTreeManager.data}"
            enableContextMenu="true"
            rows="20"
            style="height:350px; width:900px;"
            rowKeyConverter="#{uiManager.tableTreeManager.rowKeyConverter}"
            rowKeyVar="row">
            <f:facet name="header">
             <h:outputText value="#{uiManager.tableTreeManager.tableTitle}" />
            </f:facet>
            <c:forEach
             items="#{uiManager.tableTreeManager.attributesForDisplay}"
             var="attribute">
             <rich:column label="#{attribute.name}" 
               sortBy="#{attribute}" 
               sortOrder="#{uiManager.tableTreeManager.data.stateHolder.sortOrders[attribute.code]}"
               sortable="true"
               sortIconAscending="/images/portal/utils/order-asc.gif"
               sortIconDescending="/images/portal/utils/order-desc.gif">
               <h:form>
              <f:facet name="header">
                <a4j:commandLink  value="#{attribute.name}" render="dataTable" action="#{uiManager.tableTreeManager.data.sortTable}">
                 <a4j:param value="#{attribute.code}" assignTo="#{uiManager.tableTreeManager.data.sortAttributeCode}"" />
                </a4j:commandLink>
              </f:facet>
              <a4j:region rendered="#{attribute.type=='string'}">
               <h:outputText value="#{essence.dataAsMap[attribute.code]}" />
              </a4j:region>
              <a4j:region rendered="#{attribute.type=='integer'}">
               <h:outputText value="#{essence.dataAsMap[attribute.code]}" />
              </a4j:region>
              
              <a4j:region rendered="#{attribute.type=='floated'}">
               <h:outputText value="#{essence.dataAsMap[attribute.code]}" />
              </a4j:region>
              <a4j:region rendered="#{attribute.type=='bool'}">
               <h:selectBooleanCheckbox
                value="#{essence.dataAsMap[attribute.code]}" readonly="true"
                disabled="true" />
              </a4j:region>
              <a4j:region rendered="#{attribute.type=='timestamp'}">
               <h:outputText value="#{essence.dataAsMap[attribute.code]}" />
              </a4j:region>
              <a4j:region
               rendered="#{(attribute.type=='linkNto1') and (not empty essence.dataAsMap[attribute.code])}">
               <h:outputText
                value="#{essence.dataAsMap[attribute.code].title}" />
              </a4j:region>
              </h:form>
             </rich:column>
            </c:forEach>
           </rich:extendedDataTable>
           <rich:dataScroller for="dataTable" maxPages="10" rendered="#{not empty uiManager.treeManager.currentSelection}"/>
          </rich:panel>
         </h:form>
        </a4j:outputPanel>
      

       

      But when i click to the column header table refresh but action in commandlink and a4j:param dont invoke. Why? =(