-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.6-RC1
-
Component/s: Layouts & Widgets
When deploying a custom template widget that uses Ajax4JSF, if this widgets ends up being nested inside a List Widget the ajax rerendering is broken.
Typical A4JLog output is :
debug[18:08:23,265]: Header Ajax-Expired not found, search in <meta> debug[18:08:23,265]: search for elements by name 'meta' in element #document debug[18:08:23,265]: Find <meta name='Ajax-Update-Ids' content=''> debug[18:08:23,265]: Find <meta name='Ajax-Response' content='true'> debug[18:08:23,265]: Find <meta name='Ajax-Update-Ids' content=''> debug[18:08:23,265]: Find <meta name='Ajax-Response' content='true'> debug[18:08:23,265]: Header Ajax-Update-Ids not found, search in <meta> debug[18:08:23,265]: search for elements by name 'meta' in element #document debug[18:08:23,265]: Find <meta name='Ajax-Update-Ids' content=''> warn[18:08:23,265]: No information in response about elements to replace
The output responses contains 2 meta-tags for indicating the rerendered zones :
... <head> <meta name="Ajax-Update-Ids" content="" /><title></title> </head> <body> ... <meta name="Ajax-Update-Ids" content="facesStatusMessagePanel,caseViewPanel" /> ... </body>
Because of this duplicated Ajax-Update-Ids only the first is read, and A4J does not replace anything on the client side.
warn[18:08:23,265]: No information in response about elements to replace
This seem like a A4J bug, nevertheless this is reproductible only when the target custom template widget using <a4j:commandLink> is nested inside a List Widgets.
Digging deeper shows that the List Widgets uses a xhtml template that defines
... <a4j:region renderRegionOnly="true" id="#{widget.id}_region"> <a4j:outputPanel id="#{widget.id}_panel" styleClass="widgetPanel listWidgetPanel #{widgetProperty_styleClass}"> ... </a4j:outputPanel> </a4j:region> ...
NB : target template is list_widget_template.xhtml
Removing the renderRegionOnly="true" attribute seems to solve the issue and A4J is back to normal.