Details
-
Type: Improvement
-
Status: Closed
-
Priority: 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.
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).