Hi,

Yes, sorry, this part is still to be completed.
In your case you can use "layoutValue" instead of "item".
Condition "#{nxu:test(layoutValue.customSchema.fieldA == 'XXX', 'view', 'hidden')}" will work too. Please note that it would not be as easy to achieve that kind of behavior in edit mode (where ajax calls would have to be involved).

Regards,

--
Anahide Tchertchian, Nuxeo
Mail: [email protected] - Tel: +33 (0)1 40 33 79 87
http://www.nuxeo.com - http://www.nuxeo.org


Sean Radford a écrit :
Hi,

Can you change the widget mode depending on the item being rendered?

e.g. The widget for Field B should be hidden when Field A of the item has a value of 'XXX'

so something like:

<widget name="fieldB" type="text">
 <labels>
   <label mode="any">Field B</label>
 </labels>
 <translated>false</translated>
 <fields>
   <field schema="someSchema">fieldB</field>
  </fields>
  <widgetModes>
<mode value="view">#{nxu:test(item.getPropertyValue('customSchema:fieldA') == 'XXX', 'view', 'hidden')}</mode>
  </widgetModes> </widget>

I guess 8.2.4 of the manual would probably help, but that currently has a TODO.

Thanks,

Sean


_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to