I want to edit some values of form fields when a user views an existing node (view mode). In edit mode I don´t want to modify these values... My
Currently, I have configured a form filter for changing some form field values.
<bean id="formFilter"
class="xxx"
parent="baseFormFilter">
<property name="filterRegistry" ref="nodeFilterRegistry" />
</bean>
I have implemented the method, but this method runs in view and edit mode
public void afterGenerate(final ItemType item, final List<String> fields, final List<String> forcedFields,
final Form form, final Map<String, Object> context) {How can I differentiate these two modes?
I know that it is possible to define fields for certain modes (example: <show id="cm:creator" for-mode="view" />) in the share-config.xml, but maybe this information (if the user views or edit a node) is only available in Share, not in the repository?
Thanks
Jens