0 Replies Latest reply on May 13, 2008 4:57 PM by justinmiller

    a4j:support and rich:effect and onchange event

    justinmiller

      I'm have a selectOneMenu that, depending on which item is selected, will display different form controls. It's easy enough to add an a4j:support tag catching the onchange event and reRendering the rest of the form.

      I'd like to make it a little more spiffy by adding a BlindUp effect, followed by a BlindDown effect, a la:

      <h:selectOneMenu ...>
       <a4j:support event="onchange" reRender="wrapper"
       onsubmit="blindUp({targetId: 'someId'})"
       oncomplete="blindDown({targetId: 'someId'})"/>
      </h:selectOneMenu>
      
      <rich:effect name="blindUp" type="BlindUp"/>
      <rich:effect name="blindDown" type="BlindDown"/>
      
      <a4j:outputPanel id="wrapper">
       <div id="someId">
       ...
       </div>
      </a4j:outputPanel>
      


      This almost works. I don't see the BlindUp effect, but I do see the BlindDown effect. And the selectOneMenu disappears entirely (it appears it's style is being set to 'display: none' and I know I'm not explicitly doing that).

      Is there anything wrong with this approach? Is there a better way?

      Thanks in advance!
      Justin