Search code examples
magnolia

Magnolia detail subapp commit action


I'm on magnolia 6.2.15 and I need to generate data from some fields that users insert in a content detail subapp. I thought about creating a subclass of magnolia "SaveDetailSubAppAction", in the "execute" method to do the job. I can retrieve fields value but, how can I generate new fields data values and insert that in the form before validation and commit to jcr datasource?


Solution

  • Well you can't. Or rather you shouldn't. The form is means for user to enter the data. If you create data programatically, you either send it directly to the datasource or store it directly on the node that datasource operates on.

    If you want to show generated data to user for approval prior saving, then you need to create custom field that would have the place for extra input and would react on user generated input directly prior to saving content.