Hello all,

I'm trying to get <t:updateActionListener> working but am having some problems. I've got the following table on one page:

<h:dataTable value="#{institutionHandler.institutionsModel}" var="institution" styleClass="tableReport" rowClasses="row,altrow">
   <h:column>
       <f:facet name="header">
           <h:outputText value="#{labels.institutionNameLabel}" />
       </f:facet>
       <h:outputText value="#{institution.name}" />
   </h:column>
   <h:column>
       <f:facet name="header">
           <h:outputText value="#{labels.viewLabel}" />
       </f:facet>
       <h:commandLink action="viewInstitution" immediate="true">
           <h:outputText value="#{labels.viewLabel}" />
<t:updateActionListener property="#{institutionHandler.currentInstitutionId}" value="#{institution.id}" />
       </h:commandLink>
   </h:column>
</h:dataTable>

When the InstitutionHandler.setCurrentInstitutionId() method is called the institution is loaded from the Hibernate backend. The view page that it goes to just displays the institution information in non-editable form with a link to allow the user to edit it.

In theory everything should be working well, as far as I understand. The strange thing is that when the view page is loaded no institution has been loaded because the institution id hasn't been properly set. I did some logging and the InstititionHandler.setCurrentInstitutionId() method is only ever called on the listing page. On the view page the InstititionHandler.setCurrentInstitutionId() method is never called, only the InstititionHandler.getCurrentInstitutionId() method is called.

Is there something I'm missing here?

Thanks,
Rich

Reply via email to