title: a4j:support within a rich:modalPanel
body: <p>I've hit a wall.
  I know the a4j and rich tags pretty well (I use Seam 2.2.0 and Richfaces 3.3.1). However, I'm trying to do something quite simple, but in a rich:modalPanel.</p>
  
  <p>It seems that rich:modalPanels do not allow Ajax events to be fired. Here's a simple breakdown:
  I have a h:selectOneMenu with some items in it and whose value is attached to a backing bean. Attached to that h:selectOneMenu is a a4j:support tag so that whenever the change event is fired, the backing bean should get updated. Truly simple stuff eh?</p>
  
  <p>However, when this h:selectOneMenu is in a rich:modalPanel the onchange event doesn't update the backing bean until the rich:modalPanel closes.</p>
  
  <p>I can confirm this because I'm running it in Eclipse debug mode and I have a breakpoint on the setter of the property that's hooked up to the h:selectOneMenu.
  This is driving me mad! This is vanilla stuff for Ajax, but rich:modalPanels don't seem to allow it.</p>
  
  <p>So, the question is: can I do Ajax stuff within a rich:modalPanel? I'm basically trying to use the rich:modalPanel as a form (I've tried a4j:form and h:form to no avail) that reacts to changes to the drop down (e.g. when the user changes the drop down, a certain part of the form should get reRendered). Am I trying to do something that's not possible?</p>
  
  <p>Here's a simplified version of the modalPanel:</p>
  
  <pre><code>&lt;rich:modalPanel id="quickAddPanel"&gt;
      &lt;div&gt;
          &lt;a4j:form id="quickAddPaymentForm" ajaxSubmit="true"&gt;
                  &lt;s:decorate id="paymentTypeDecorator"&gt;
                      &lt;a4j:region&gt;
                          &lt;h:selectOneMenu
                              id="paymentType"
                              required="true"
                              value="#{backingBean.paymentType}"
                              tabindex="1"&gt;
                              &lt;s:selectItems 
                                  label="#{type.description}"
                                  noSelectionLabel="Please select..."
                                  value="#{incomingPaymentTypes}"
                                  var="type"/&gt;
                              &lt;s:convertEnum/&gt;
                              &lt;a4j:support 
                                  ajaxSingle="true" 
                                  event="onchange"
                                  eventsQueue="paymentQueue"
                                  immediate="true"
                                  limitToList="true"
                                  reRender="paymentTypeDecorator, paymentDetailsOutputPanel, quickAddPaymentForm"/&gt;
                          &lt;/h:selectOneMenu&gt;
                      &lt;/a4j:region&gt;
                  &lt;/s:decorate&gt;
              &lt;/fieldset&gt;
  
              &lt;fieldset class="standard-form"&gt;
                  &lt;div class="form-title"&gt;Payment details&lt;/div&gt;
                  &lt;a4j:outputPanel id="paymentDetailsOutputPanel"&gt;
                      &lt;h:outputText value="This should change whenever dropdown changes: #{backingBean.paymentType}"/&gt;
                  &lt;/a4j:outputPanel&gt;
              &lt;/fieldset&gt;
          &lt;/a4j:form&gt;
      &lt;/div&gt;
  &lt;/rich:modalPanel&gt;
  </code></pre>
  
  <p>Regards,
  Andy</p>