How to dynamically choose a layout to create a document
-------------------------------------------------------
Key: NXP-5423
URL: https://jira.nuxeo.org/browse/NXP-5423
Project: Nuxeo Enterprise Platform
Issue Type: Question
Reporter: Damien Metzler
We have to create a "News" document.
Based on a boolean property "news:external" the layout to create the doc is not
the same.
I orverloaded the layout_default_template like this :
<c:if test="#{layout.mode == 'edit' or layout.mode == 'create'}">
<table class="dataInput">
<tbody>
<tr>
<td class="labelColumn">
<h:outputText value="Titre"/>
</td>
<td class="fieldColumn" >
<h:inputText value="#{changeableDocument.dc.title}"
required="true" maxlength="250" styleClass="dataInputText"/>
</td>
</tr>
<tr>
<td class="labelColumn">
<h:outputText value="News externe"/>
</td>
<td class="fieldColumn" >
<h:selectOneRadio value="#{changeableDocument.news.external}"
id="external_checkbox" >
<f:selectItem itemValue="#{true}"
itemLabel="#{messages['label.yes']}" />
<f:selectItem itemValue="#{false}"
itemLabel="#{messages['label.no']}" />
<a4j:support event="onchange" reRender="news_edit"/>
</h:selectOneRadio>
<h:message styleClass="errorMessage" for="external_checkbox"
id="external_message" />
</td>
</tr>
</tbody>
</table>
<a4j:outputPanel id="news_edit">
Externe : <h:outputText value="#{changeableDocument.news.external}"/>
<br/>
</a4j:outputPanel>
</c:if>
I see the Ajax request that is fired on the onchange event, but the
a4j:outputPanel is not updated.
Is there a way to make things work, or the nuxeo layout system prevents from
making blind use of a4j tags ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets