ICEfaces
  1. ICEfaces
  2. ICE-7670

Allow ace components to be nested in an f:ajax tag

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.RC2
    • Fix Version/s: 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 3.0
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      Currently if you nest an ace component in an f:ajax tag, JavaScript errors will be thrown and the component won't function correctly. The feature request is see if there is a way that the ace component can somehow ignore the f:ajax tag event. This is useful in a large form where ajax is needed on all inputs but also ace components (such as ace:tooltip) can be used.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #27259 Thu Jan 19 10:35:21 MST 2012 art.zambrano ICE-7670 added code so that ace components ignore f:ajax behaviors
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/renderkit/CoreRenderer.java
        Arran Mccullough created issue -
        Hide
        Arran Mccullough added a comment -

        Attached test case showing the error when using an ace:tooltip in a panel that uses the f:ajax tag.

        Show
        Arran Mccullough added a comment - Attached test case showing the error when using an ace:tooltip in a panel that uses the f:ajax tag.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case10868Example.zip [ 13992 ]
        Attachment Case10868ExampleWAR.zip [ 13993 ]
        Arran Mccullough made changes -
        Salesforce Case [5007000000KF87C]
        Ken Fyten made changes -
        Fix Version/s 3.0.1 [ 10282 ]
        Assignee Priority P1
        Assignee Arturo Zambrano [ artzambrano ]
        Hide
        Arturo Zambrano added a comment - - edited

        Fixed at revision 27259.

        Added code so that ace components ignore f:ajax behaviors.

        The reason why there was no exception thrown on the server side, as I had expected, was because the f:ajax tag was being used without specifying an event, so the default event was being used for the ace component. However, the script rendered was being generated by the f:ajax class (javax.faces.component.behavior.AjaxBehavior) which assumes that the script will go in an on* attribute or in a context where the 'event' variable is defined, but in ace components we render the behavior scripts as part of a JSON object and we invoke those functions at different points of the code. So, the 'event' variable wasn't being found and an error was thrown. Now, the script from f:ajax won't be rendered, which will result in an empty function being called (unless there are other client behaviors like ace:ajax or ace:animation attached to the component).

        Show
        Arturo Zambrano added a comment - - edited Fixed at revision 27259. Added code so that ace components ignore f:ajax behaviors. The reason why there was no exception thrown on the server side, as I had expected, was because the f:ajax tag was being used without specifying an event, so the default event was being used for the ace component. However, the script rendered was being generated by the f:ajax class (javax.faces.component.behavior.AjaxBehavior) which assumes that the script will go in an on* attribute or in a context where the 'event' variable is defined, but in ace components we render the behavior scripts as part of a JSON object and we invoke those functions at different points of the code. So, the 'event' variable wasn't being found and an error was thrown. Now, the script from f:ajax won't be rendered, which will result in an empty function being called (unless there are other client behaviors like ace:ajax or ace:animation attached to the component).
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 3.0 [ 10241 ]
        Fix Version/s 3.0.1 [ 10282 ]
        Assignee Priority P1
        Ken Fyten made changes -
        Affects [Documentation (User Guide, Ref. Guide, etc.)]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: