1 Reply Latest reply on Nov 21, 2007 12:16 AM by Sun Zhen

    Message resources doesn't work on a4j:commandLink in column

    Sun Zhen Newbie

      I've got ajax4jsf work with jsf1.2 and facelet1.4.
      But when I put message resource on view I got something strange.
      When I use a4j:commandLink or a4j:commandButton tag in rich:column tag, the first time Ok, and click on the link or button, all resource message disappear.
      When i move the a4j:commandLink tag out of rich:column tag ,all fine.
      This take place on t:columns too.

      Here is the code:

      <a4j:region id="resultsArea" renderRegionOnly="false">
      <h:form id="queryPageForm">
      <h:panelGroup id="dataTableList">
      <f:loadBundle basename="ApplicationResources" var="msg" />
      <rich:dataTable
      onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
      onRowMouseOut="this.style.backgroundColor='#ffffff'"
      cellpadding="0" cellspacing="0" width="700" border="0"
      value="#{departmentsBackingBean.model}" var="item">
      <f:facet name="header">
      <rich:columnGroup>
      <rich:column>
      <rich:spacer />
      </rich:column>
      <rich:column>
      <h:outputText value="showName" />
      <a4j:commandLink actionListener="#{departmentsBackingBean.sort}"
      reRender="dataTable,resultScroller"
      limitToList="false" immediate="true">
      <f:param name="sortProperty" value="showName" />
      <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender"/>
      <h:outputText value="#{msg['namekey.default.Departments.showName']}"/>
      </a4j:commandLink>
      </rich:column>
      <rich:column>
      <h:outputText value="fullName" />
      </rich:column>
      </rich:columnGroup>
      </f:facet>
      <rich:column>
      <h:outputText value="" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{item.showName}" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{item.fullName}" />
      </rich:column>
      </rich:dataTable>
      </h:panelGroup>
      <h:panelGroup id="resultScroller">
      <a4j:commandLink actionListener="#{departmentsBackingBean.next}"
      reRender="dataTable,resultScroller" limitToList="false"
      value="#{msg['page.next']}" />
      <a4j:commandLink actionListener="#{departmentsBackingBean.last}"
      reRender="dataTable,resultScroller" limitToList="true"
      value="Last" />
      </h:panelGroup>
      </h:form>
      </a4j:region>

      I will appliciate so much for any help.