1 Reply Latest reply on Nov 4, 2008 5:41 PM by sergeysmirnov

    rich:effect should start automatically ... onload or somethi

    nimo22

      I have a panel with a text:

      <a4j:region>
      <a4j:commandLink value="showMessage" reRender="myPanel">
      
      <rich:panel id="myPanel" rendered="true">
      <h:outputLabel value="Show Message" />
      <rich:effect for="window" event="onload" type="Opacity" params="duration:0.8, from:1.0, to:0.0" />
      </rich:panel>
      <a4j:region>


      Now, when I click the commandLink, then my Panel is reRendered successfully, but I want that the rich:effect starts automatically, when the panel is reRendered.

      I want this:
      "I click the commandLink, the panel gets reRendered and the message "Show Message" appears and vanish after 0.8 sec."

      How can I do that ??

      Any Ideas?

        • 1. Re: rich:effect should start automatically ... onload or som

          You define is an effect triggered when window is loaded. Why you are expect to have it working during the re-rendering then onload is not invoked by the browser.

          One of the possible option:
          1. move rich:effect away from the body of the panel
          2. define the name for rich:effect and use its name as a name of javascript function for oncomplete