1 Reply Latest reply on Mar 10, 2008 11:13 AM by alethes

    a4j:commandLink action not called

    alethes

      I have two dataTables whose respective values are drawn from two distinct lists in the same managed bean. Selecting a row in the first table re-renders the second table. In turn, selecting a row in the second table is supposed to re-render a graphic image. The two tables and the image are all on the same page.

      The issue I can't get around is that the first table works fine, but the action specified in the second table's <a4j:commandLink> tag isn't working as expected. An Ajax request is submitted, but it's not hitting the corresponding method in my managed bean.


      <h:dataTable id="floors" var="floor"
       value="#{virtualHallway.floors}"
       styleClass="scrollerTable table"
       headerClass="standardTable_Header" rowClasses="standardTable_Row1,standardTable_Row2"
       columnClasses="standardTable_ColumnCentered">
      
       <t:column>
       <f:facet name="header">
       <h:outputText value="#{messages['vh.floor']}"/>
       </f:facet>
       <a4j:commandLink action="#{virtualHallway.refreshImagePaths}" value="#{floor.name}"
       reRender="imagePaths">
       <f:param name="floorId" value="#{floor.id}"/>
       </a4j:commandLink>
       </t:column>
      </h:dataTable>
      
      <h:dataTable id="imagePaths" var="imagePath" value="#{virtualHallway.imagePaths}"
       styleClass="scrollerTable table"
       headerClass="standardTable_Header" rowClasses="standardTable_Row1,standardTable_Row2"
       columnClasses="standardTable_ColumnCentered">
      
       <h:column>
       <f:facet name="header">
       <h:outputText value="#{messages['vh.thumbnail']}"/>
       </f:facet>
       <a4j:commandLink action="#{virtualHallway.refreshImage}" reRender="fullSizeImage">
       <h:graphicImage url="#{imagePath.thumbnailPath}"/>
       <f:param name="pathId" value="#{imagePath.id}"/>
       </a4j:commandLink>
       </h:column>
      </h:dataTable>
      
      <h:graphicImage id="fullSizeImage" url="#{virtualHallway.selectedFullSizeImagePath}"/>



      If I replace the first table's action with #{virtualHallway.refreshImage}, the refreshImage() method is called. But that method is not called from my second table.

      Any help would be appreciated.