-
Type: Sub-task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: 9.10
-
Component/s: Layouts & Widgets
Cross validation and ajax re-rendering of groups of widgets works correctly using
layouts, and makes it possible to define generic dependencies between widgets of a
given layout.
A cross-validation example is already provided in Nuxeo on the user layout page,
when confirming the chosen password. Other use cases would be good if a generic
mechanism or helpers needed to be extracted.
This is also valuable when filtering selections according to other criteria (chain se-
lects behaviour is an example, it could be useful to get some generic helpers for it).
Another feature would be to display additional fields depending on a selected value
in the form. For instance, when choosing the document "type", we should be able
to choose data specific to this type, and make required widgets (or other kinds of
validations) behave as expected.
Currently the principal problem about it is to manage the page display in case of a
validation error, and to maintain the group of widgets visibility depending on the se-
lected value: sometimes a context value, bound to the conversation, is needed to
maintain that state (which is bad for standalone layouts reuse).
Some other examples are :
Depending of the value selected in a selectOneDirectory :
- another field is read only
- another field is not rendered
Ideally, we would like something like :
<properties widgetMode="edit">
<property name="required">${widgetName1.value=="somevalue1"}</property>
The same kind of expression should be usable for :changing mode (readonly or
hidden)
The key points are :
- avoid having dedicated ids to add to the xhtml templates
- avoid the actionListener code that browse the JSF tree
In order to manage visibility on a complete bloc (several widgets at a time),
we may define this property at row (or rowGroup ?) level ?