3 Replies Latest reply on Apr 14, 2008 3:21 PM by Gena

    Attribute event for ajax support component j_id757 must be l

    Gena Newbie

      Hello,
      because of differences in event handling betweed ie and firefox we need to use something like:

      <a4j:support event='#{browserType=="ie"?"onclick":"onchange"}' .../>
      


      Since RF 3.2.0GA it's not possible anymore (UIAjaxSupport line 79 throws an exception).

      This is a drawback in opposite to the previous release. Please correct it.

      Many thanks,
      Gena

        • 1. Re: Attribute event for ajax support component must be liter
          Gena Newbie

          The dirty workaround could be this one, but i think the guys will find a better solution.

          if ("event".equals(name)) {
           try {
           setEvent(((String)binding.getValue(getFacesContext().getELContext())));
           }
           catch (ELException e) {
           throw new FacesException(e);
           }
          
           /* throw new FacesException(Messages.getMessage(
           Messages.EVENT_MUST_BE_LITERAL,
           getClientId(getFacesContext())));
           */
          }


          • 2. Re: Attribute event for ajax support component j_id757 must
            Maksim Kaszynski Apprentice

            Gena,
            Unfortunately, event was never supposed to be set via EL-expression.
            It looks like your app relied on some exploit, but now it doesn't work anymore.
            We will not handle EL-expression for event attribute as it can seriously impact stability of support component.

            • 3. Re: Attribute event for ajax support component j_id757 must
              Gena Newbie

              Dear Maksim,

              Is any correct workaround possible without ugly duplicating of the supported components?

              The background of the problem is the difference in handling of the onchange-event on radio buttons between IE and FF browsers. Usually it doesn't matter, but in conjunction with ajax, the rerendering by IE on onchange event happens one click later then necessary (even by loss of focus).

              The onclick event works in this case correct with IE (as the onchange in FF). The behaviour on onclick event in FF is in this case also incorrect: it rerenders the page fragment on each click (also if no change happens). So i need realy work with "onclick" in IE and "onchange" in FF.

              I think there could be some another usecases for EL-usage in event-attribute. In my opinion is as more dynamic as possible always good, also if the incorrect usage can result in some troubles.

              Kind regards

              Gena