1 Reply Latest reply on Jan 16, 2007 3:57 AM by Andreas Franke

    Simple action not called

    Andreas Franke Apprentice

      Hi,

      perhaps a cap in my mind.
      I try to call an action, but the method is never called

      here the jsf code fragement

      <div class="entry">
       <a4j:log hotkey="M" />
       <a4j:commandButton value="Reload" action="#{measureEdit.onListLoad}" reRender="Sensor"/>
       <div class="label">Sensor:</div>
       <div class="input">
       <a4j:region renderRegionOnly="false">
       <h:selectOneMenu id="Sensor" value="#{messkette.sensor}"
       converter="#{selectItemHelfer}" required="true" disabled="#{gesperrt}">
       <f:selectItems value="#{measureEdit.alleSensorenMitBlank}" />
       <a4j:support event="onchange" reRender="Funktion, Sensormessbereich, Einheit, Sensorwarnung" />
       </h:selectOneMenu>
       </a4j:region>
       <h:message for="Sensor" styleClass="message" />
       <div><h:outputText id="Sensorwarnung" value="#{measureEdit.sensorWarnung}" styleClass="kursiv" /></div>
       </div>
       </div>


      When I press the button the onListLoad() method from class MeasureEdit should be called, but nothing is done.
      <a4j:commandButton value="Reload" action="#{measureEdit.onListLoad}" reRender="Sensor"/>

      The pojos
      MeasureEditBean.java
      @Stateful
      @Scope(ScopeType.CONVERSATION)
      @Name("measureEdit")
      public class MeasureEditBean extends AbstractUnderEditorBean< MeasuringChain, Testbed> implements MeasureEdit{
      ....
      public String onListLoad() {
       // TODO Auto-generated method stub
       System.out.println("invoked");
       selectItemHelfer.onListLoad();
       return null;
       }
      }


      MeasureEdit.java
      @Local
      public interface MeasureEdit extends AbstractEditor<MeasuringChain> {
      
       ...
      
       public String onListLoad();
      }


      What's wrong in my mind?



      Thanks
      andi