Ofbiz offers forms written in xml:
partyForm.xml:
<form name="AddPartyNote" type="single" target="createPartyNote"
focus-field-name="noteId" header-row-style="header-row" default-table-style="basic-table">
<auto-fields-service service-name="createPartyNote"/>
<field name="partyId"><hidden/></field>
<field name="noteId" tooltip="${uiLabelMap.PartyOptional}"><hidden/></field>
<field name="noteName" title="${uiLabelMap.FormFieldTitle_noteName}" tooltip="${uiLabelMap.PartyOptional}"> </field>
<field name="note"><textarea cols="70" rows="10"/></field>
<field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="smallSubmit"><submit button-type="text-link"/></field>
<field name="cancelLink" title=" " widget-style="smallSubmit">
<hyperlink target="${donePage}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}">
<parameter param-name="partyId"/>
</hyperlink>
</field>
</form>
For each form there is a submit button and most likely few other buttons such as cancel, update etc..
The form above serves to add a note. in order for this to happen it calls the service and the target createPartyNote.
I created to new service called createPartyNoteAndNotify, and the same for a target.
now I need to add a new button called save and notify
which does the same as the save button: <field name="submitButton" title="${uiLabelMap.Common..... from the above but with different target and service (the new ones createPartyNoteAndNotify)
I tried the following:
<auto-fields-service service-name="createPartyNoteAndNotify"/>
<field name="submitAndNotifyButton" title=" " widget-style="smallSubmit"><submit button-type="text-link"/></field>
and many more ways with no success.
How to add one more button to a form which serves an other purpose?