Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.1.0.BETA2, 3.1
-
Fix Version/s: 3.1.0.RC1, 3.1, EE-3.0.0.GA_P01
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces3 Trunk Revision# 29244
Firefox, Chrome, IE
-
Assignee Priority:P1
Description
When embedding some ace components inside an f:ajax tag there is a JS error and the component doesn't function. (So far this has been reproduced with ace:tooltip and ace:panel and can not be reproduced with ace:menu)
ace:tooltip:
Error: syntax error
Source File: http://localhost:8080/Case10868Example/
Line: 17, Column: 579
Source Code:
ice.ace.jq(function() {widget_form_testTooltip = new ice.ace.Tooltip({"global":false,"id":"form:testTooltip","displayListener":false,"forComponent":"form:output",content:document.getElementById('form:testTooltip_content').innerHTML,"show":{"when":{"event":"mouseover"},"delay":140,"effect":{"length":500,"type":"fade"}},"hide":{"when":{"event":"mouseout"},"delay":0,"fixed":true,"effect":{"length":500,"type":"fade"}},"position":{"container":ice.ace.jq(ice.ace.escapeClientId('form:output')).parent(),"corner":{"target":"bottomRight","tooltip":"topLeft"}},"behaviors":{"display":}});});
ace:panel:
Error: syntax error
Source File: http://localhost:8080/panel/panelFAjax.jsf
Line: 9, Column: 176
Source Code:
widget_frm_panel = new ice.ace.Panel("frm:panel",{"visible":true,"toggleable":true,"toggleSpeed":1000,"collapsed":false,"closable":true,"closeSpeed":1000,"behaviors":{"toggle":}});
I've attached a simplified test case.
ace:tooltip:
Error: syntax error
Source File: http://localhost:8080/Case10868Example/
Line: 17, Column: 579
Source Code:
ice.ace.jq(function() {widget_form_testTooltip = new ice.ace.Tooltip({"global":false,"id":"form:testTooltip","displayListener":false,"forComponent":"form:output",content:document.getElementById('form:testTooltip_content').innerHTML,"show":{"when":{"event":"mouseover"},"delay":140,"effect":{"length":500,"type":"fade"}},"hide":{"when":{"event":"mouseout"},"delay":0,"fixed":true,"effect":{"length":500,"type":"fade"}},"position":{"container":ice.ace.jq(ice.ace.escapeClientId('form:output')).parent(),"corner":{"target":"bottomRight","tooltip":"topLeft"}},"behaviors":{"display":}});});
ace:panel:
Error: syntax error
Source File: http://localhost:8080/panel/panelFAjax.jsf
Line: 9, Column: 176
Source Code:
widget_frm_panel = new ice.ace.Panel("frm:panel",{"visible":true,"toggleable":true,"toggleSpeed":1000,"collapsed":false,"closable":true,"closeSpeed":1000,"behaviors":{"toggle":}});
I've attached a simplified test case.
From what I understand, we don't support f:ajax within ACE components. And when you wrap a block of components with f:ajax, it's as if you put the f:ajax with every component in that block that is a ClientBehaviorHolder that supports the eventName that the f:ajax is using. So really it's not valid to wrap ACE components with an f:ajax.
If there is some scenario where we're trying to make the f:ajax only apply to some h: components in the block and not any ACE components, then I would first examine if an event name had been specified, instead of being set to null, so that could keep it from being set on the ACE components, which hopefully wouldn't share that event name. If that's not doable, then we could modify the ACE generator so that our generated Base classes, which are ClientBehaviorHolder implementators, would override UIComponentBase.addClientBehavior(String eventName, ClientBehavior behavior) to specifically not add javax.faces.component.behavior.AjaxBehavior, while allowing org.icefaces.ace.component.ajax.AjaxBehavior.