Normally you define a node type form for view and edit of existing nodes:
<config evaluator="node-type" condition="my:nodeType"> ...
This is one time solution for alle nodes of this type and lifecycle. To use a facetted approach, you could now add form configuration depending on a metadata property, like:
<config evaluator="facet-node-type" condition="my:nodeType,my:state=open">
<config evaluator="facet-node-type" condition="my:nodeType,my:state=closed">
This means (given this facet-node-type exists and works :) you should have a resulting form configuration of the 'node-type' and one 'facet-node-type' given your node either have state 'open' or 'closed'
This evaluation is done Share-server-side, so the state (my:state) should preferable be read-only in the resulting forms.
In my example we could have a text field for an 'open' node and none for a 'closed' on.
To make this work we need to define the 'facet-node-type' in the form-config xml
<evaluator id="facet-node-type" class="com.redpill-linpro.alfresco.web.config.forms.FacetNodeTypeEvaluator" />
and mainly the java code Source FacetNodeTypeEvaluator.java
Finally lets show the full 'condition' definition available:
Where <node-type> is the prefix-nodetype like in the standard node-type evaluator ...
Where <property-evals> is of the format:
And <property-eval> is of the format
So I could write the following to select only 'my:node-type' nodes with 'my:state' 'open' or 'closed' and 'my:color' set to 'blue'
This can be used to have a form definition where one-large common form (section) is defined and various small modifications of this is in facet-node-type sections depending on the metadata of the node.