fr-data-save-done for save-draft and save-final

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

fr-data-save-done for save-draft and save-final

bgawel
Hi,

I configured Orbeon 4.2 to have 2 buttons: save-draft and save-final.
Both buttons trigger the "fr-data-save-done" event (target="fr-form-model").

How can I check which button triggered fr-data-save-done in xforms:action?

<xforms:action ev:event="fr-data-save-done" target="fr-form-model">
 How to check which button triggered fr-data-save-done?
</xforms:action>

--
Regards,
 Bartek
Reply | Threaded
Open this post in threaded view
|

Re: fr-data-save-done for save-draft and save-final

Alessandro  Vernet
Administrator
Hi Bartek,

Right now, this is not quite possible. Could you tell us more about the use case you have in mind? What is your event handler doing? For now I created this RFE:

https://github.com/orbeon/orbeon-forms/issues/1040

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: fr-data-save-done for save-draft and save-final

bgawel
Hi Alessandro,

the use case is like that:
a requester can pass a request parameter to specify where the form data (application name, form name, document id, is draft) should be sent once persisted.
So having the event fr-data-save-done received, we would like to build the url for xforms:load.
Application name, form name and document id we can retrieve from fr-parameters-instance but how to determine if the document is a draft one or not?

--
Regards,
 Bartek

Alessandro Vernet wrote
Hi Bartek,

Right now, this is not quite possible. Could you tell us more about the use case you have in mind? What is your event handler doing? For now I created this RFE:

https://github.com/orbeon/orbeon-forms/issues/1040

Alex
Reply | Threaded
Open this post in threaded view
|

Re: fr-data-save-done for save-draft and save-final

Alessandro  Vernet
Administrator
Hi Bartek,

Makes sense. So I am afraid there is no event or API to do this at this point. We would need to implement the RFE references earlier (and if your company has an Orbeon Forms PE or Dev Support, it could use some of its dev support hours to sponsor this work).

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet