Let this be a reminder to us all not to try and fix problems late at
night after having worked and being really exhausted. The problem was
that I didn't define the tomahawk taglib on the listing page. I'm not
sure why using the <t:updateActionListener> tag didn't cause a JSP
exception when no namespace with the "t" prefix was defined, but adding
the taglib def to the page fixed the problem and all works as it should.
Rich
Richard Wallace wrote:
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