3 Replies Latest reply on Aug 10, 2009 12:17 PM by Benno Markiewicz

    f:setPropertyActionListener doesn't work when ajaxSingle in

    Benno Markiewicz Newbie

      The problems:

      a) With ajaxSingle="true" on a commandButton in a rich:dataTable the f:setPropertyActionListener don't work. No setters were accessed - see the console log, when you try out the code. Why?

      b) With ajaxSingle="false": When you click on the "Edit" buttons sometimes the the setters are called, sometimes not. Or the outpanel shows the old previous data, but this doesn't seam to be a reRender issue. In this case a4j:outputPanel with ajaxRendered="true" is used.

      Thank you for your help/hints.

      See these simplified code snippets


       <!-- Show data from session based dataholder -->
       <a4j:outputPanel ajaxRendered="true">
       <!--datatable -->
       <a4j:form >
       value ="#{tableManager.model}"
       binding ="#{tableManager.dataTable}"
       var ="dataItem"
       rows ="10"
       <h:outputText value="#{dataItem}" />
       <!-- Click on the button to set data to dataholder -->
       target="#{testDataHolder.bar}" />

       <bean id="testDataHolder" class="com.test.TestDataHolder" scope="session"/>

      package com.test;
      import org.apache.commons.logging.Log;
      import org.apache.commons.logging.LogFactory;
      public class TestDataHolder {
       private Object foo;
       private Object bar;
       private static final Log LOG = LogFactory.getLog(TestDataHolder.class);
       public Object getBar() {
       LOG.error(String.format("getBar %s", bar));
       return bar;
       public Object getFoo() {
       LOG.error(String.format("getFoo %s", foo));
       return foo;
       public void setBar(final Object theBar) {
       LOG.error(String.format("setBar %s", theBar));
       bar = theBar;
       public void setFoo(final Object theFoo) {
       LOG.error(String.format("setFoo %s", theFoo));
       foo = theFoo;