4 Replies Latest reply on Dec 4, 2008 6:22 AM by demetrio812

    a4j:support bug with IE?

    demetrio812

      Hi,
      I have this piece of code:

      <h:form>
       <h:selectOneRadio value="#{orderHelper.tipoUtenteOrdine}" layout="pageDirection">
       <f:selectItem itemValue="L" itemLabel="1" />
       <f:selectItem itemValue="R" itemLabel="2" />
       <f:selectItem itemValue="A" itemLabel="3" />
       <a4j:support event="onchange" reRender="optionPanel"></a4j:support>
       </h:selectOneRadio>
      </h:form>
      <h:panelGrid id="optionPanel" columns="1" width="100%" cellpadding="0" cellspacing="0">
       <s:div rendered="#{orderHelper.tipoUtenteOrdine=='L'}">
       1
       </s:div>
       <s:div rendered="#{orderHelper.tipoUtenteOrdine=='R'}">
       2
       </s:div>
       <s:div rendered="#{orderHelper.tipoUtenteOrdine=='A'}">
       3
       </s:div>
      </h:panelGrid>
      


      It works fine with safari and firefox (when I click the "1" checkbox it shows the "1" div, etc.) but with IE it gives problems: I click on "1" checkbox and nothing happens, if I click in the panelgrid area it shows, or if I click on "2" checkbox it shows the "1" div, then I click on "3" checkbox and it shows the "2" div, like if it first reRender and then update the value.

      It's a a4j:support with h:selectOneRadio related bug because if I use a4j:commandButton or a4j:commandLink it works, also if I use "onclick" instead of "onchange" it works good on the 3 browsers.

      Is it a bug?

      Thanks

      Demetrio

      P.S.: the code is inserted in a page that use facelets, and I'm seeing another bug that happen only on IE during reRender of a s:decorate tag, I'll tell you later when I discover more. Thanks.

        • 1. Re: a4j:support bug with IE?
          ilya_shaikovsky

          just change the support with simple alert('test') and you will see the same. This issue is browser related. Fireform rises event on actual change and IE rises only after change and blur.

          • 2. Re: a4j:support bug with IE?
            demetrio812

            So the only solution is to use onclick in this case?

            I also noticed another proble with IE 7 and a4j:support, this is the simplified code:


            <h:form>
             <h:selectOneMenu value="..">
             <f:selectItems value="..." />
             <a4j:support event="onchange" reRender="externalArea" />
             </h:selectOneMenu>
            </h:form>
            <s:div id="externalArea">
             <s:decorate ... />
            </s:div>
            


            When I reRender the s:div in IE the content of s:decorate disappear, if I put some other tag instead of s:decorate it works, also if I reRender an element inside s:decorate it works. It gives me no problems on Firefox and Safari.

            Did you ever see this? Might I post this to Seam forum?

            Thanks

            Demetrio

            • 3. Re: a4j:support bug with IE?
              ilya_shaikovsky

              We could update any elements that has representation in DOM between requests. So wrap this area with a4j:outputPanel and update the panel instead of s:decorate.

              • 4. Re: a4j:support bug with IE?
                demetrio812

                I did update the s:div outside, btw I'll try with a4j:outputPanel and I'll let you know...

                thanks!!

                Demetrio