2 Replies Latest reply on Aug 7, 2009 9:14 AM by Raffael Schmid

    how to disable action execution on ajax requests

    Raffael Schmid Newbie

      INITIAL POSITION


      We are using SEAM together with RICHFACES.
      We've got the following page configuration with an action (called actionBean.doBefore), that should be executed once on page load:



      <page>
      <action  execute="#{actionBean.doBefore}"/>
      <navigation from-action="#{actionBean.doAfter}">
      <redirect view-id="/view/component/test.xhtml" />
      </navigation>
      </page>



      PROBLEM


      The action is even executed when we validate a field per ajax:



      <h:inputText value="#{formBean.price}" id="price" required="true">
      <a4j:support event="onblur" reRender="price" ajaxSingle="true" bypassUpdates="true" />
      </h:inputText>



      or use a suggestion box (even when you type):


      <rich:suggestionbox id="suggestionBoxId" for="city" suggestionAction="#{suggest.autocomplete}" var="result" minChars="3" nothingLabel="No capitals found" ajaxSingle="true" bypassUpdates="true" selfRendered="true" ><h:column>
      <h:outputText value="#{result.cityName}" />
      </h:column>
      </rich:suggestionbox>



      QUESTION


      Is there a way to disable that?


      Thanks in advance
      Raffi