-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 6.0-HF30, 7.10-HF12, 8.2
-
Fix Version/s: 11.2
-
Component/s: Seam / JSF UI
The failure is reproducible when trying to use f:ajax or a4j:ajax within nxdir tags to make a call request triggered by an event.
- Example:
<ui:fragment xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:nxu="http://nuxeo.org/nxweb/util" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:nxl="http://nuxeo.org/nxforms/layout" xmlns:c="http://java.sun.com/jstl/core" xmlns:nxdir="http://nuxeo.org/nxdirectory"> <nxdir:selectOneListbox value="#{field_1}" directoryName="continent" id="#{widget.id}" required="true" localize="true" > <f:attribute name="sourceComponentId" value="#{widget.id}" /> <f:attribute name="targetComponentId" value="#{widget.id}_valueHolder" /> <f:ajax execute="@this" render="#{widget.id}_panel" listener="#{selectionActions.setValueFromComponent}" /> </nxdir:selectOneListbox> <a4j:outputPanel id="#{widget.id}_panel" layout="block"> <nxu:valueHolder id="#{widget.id}_valueholder" var="show" defaultValue="#{field_1}"> <c:if test="#{show == 'africa'}"> <ui:fragment> <nxl:subWidget> <nxl:widget widget="#{widget}" value="#{value}" /> </nxl:subWidget> </ui:fragment> </c:if> <c:if test="#{show == 'europe'}"> pouetfalse <ui:fragment> <nxl:subWidget> <nxl:widget widget="#{widget}" value="#{value}" /> </nxl:subWidget> </ui:fragment> </c:if> </nxu:valueHolder> </a4j:outputPanel> </ui:fragment>
is not triggering the ajax call.
- Can work with this workaround:
<ui:fragment xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:nxu="http://nuxeo.org/nxweb/util" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:nxl="http://nuxeo.org/nxforms/layout" xmlns:c="http://java.sun.com/jstl/core" xmlns:nxdir="http://nuxeo.org/nxdirectory"> <h:selectOneListbox size="0" id="#{widget.id}_list" value="#{field_1}" required="#{required}"> <f:attribute name="sourceComponentId" value="#{widget.id}" /> <f:attribute name="targetComponentId" value="#{widget.id}_valueHolder" /> <nxdir:selectItems directoryName="continent" var="item" itemValue="#{item.id}" itemLabel="#{item.vocabulary.label}" /> <f:ajax execute="@this" render="#{widget.id}_panel" listener="#{selectionActions.setValueFromComponent}" /> </h:selectOneListbox> <a4j:outputPanel id="#{widget.id}_panel" layout="block"> <nxu:valueHolder id="#{widget.id}_valueholder" var="selection" defaultValue="#{field_1}"> <c:if test="#{selection == 'africa'}"> <ui:fragment> <nxl:subWidget> <nxl:widget widget="#{widget}" value="#{value}" /> </nxl:subWidget> </ui:fragment> </c:if> <c:if test="#{selection == 'europe'}"> Hello </c:if> </nxu:valueHolder> </a4j:outputPanel> </ui:fragment>