1 Reply Latest reply on May 14, 2007 12:27 AM by sergeysmirnov

    a4j:support and back-end processing

    neoko

      Hi!. I've been trying for a few days how to show a modalPanel after a request to the server ends succesfully. I tried different codes, but now, I'm trying to make it work these two ones:

      <a4j:form id="form">
       <a4j:commandLink action="#{phaseHome.edit}" value="i" oncomplete="Richfaces.showModalPanel('form:phasePanel')">
       <a4j:actionparam name="phaseId" value="#{projectPlan.phases['i'].id}" assignTo="#{phaseHome.phaseId}"/>
       </a4j:commandLink>
      <rich:modalPanel id="phasePanel">
       <f:facet name="header">
       <h:outputText value="Modal Panel"/>
       </f:facet>
       <a4j:include viewId="phase.xhtml"/>
       <a href="javascript:Richfaces.hideModalPanel('form:phasePanel')">Close</a>
       </rich:modalPanel>
       </a4j:form>
      

      and, the second one:
      <a4j:form id="form">
      <s:link action="#{phaseHome.edit(projectPlan.phases['i'].id)}" value="i">
       <a4j:support action="#{phaseHome.editTwo}" event="onclick" oncomplete="Richfaces.showModalPanel('form:phasePanel')" ajaxSingle="true"/>
       </s:link>
       <rich:modalPanel id="phasePanel">
       <f:facet name="header">
       <h:outputText value="Modal Panel"/>
       </f:facet>
       <a4j:include viewId="phase.xhtml"/>
       <a href="javascript:Richfaces.hideModalPanel('form:phasePanel')">Close</a>
       </rich:modalPanel>
       </a4j:form>
      

      I'm using Seam, and because EL enhancements of Seam don't work with Ajax4JSF, i'm trying to find a solution to this problem using <a4j:support> or any kind of resource that may wait to execute the JavaScript code until the back-end processing ended.
      Anyone can give me any clue?
      Thanks :)