Hello,
I would like to display a success-message with a control value like that : Your dossier ${dossierIdControl} has been processeed. Is-it possible and how? Thank you for your help! -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Vincent,
The `message` parameter supports XPath Value Templates (see link below), so something like `success-message(message = "Your dossier {//dossierIdControl} has been processed.")` should do the trick. You'll let me know if this works for you. https://doc.orbeon.com/form-runner/advanced/buttons-and-processes/actions-form-runner#success-message-and-error-message ‑Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alessandro,
Thank you for the response, it works! Another question, is it possible to define the message in a localized property? Also, in my process action I would like to send the form to an external service and then read a response header from the service and display it in the sucess message? -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Vincent,
For localization, I imagine one possibility could be to use Form Runner resources to define the properties (see 1st link below), like: <property as="xs:string" name="oxf.fr.resource.*.*.en.acme.message" value="My message"/> <property as="xs:string" name="oxf.fr.resource.*.*.fr.acme.message" value="Mon message"/> Then in XPath use the `xxf:r()` function (see 2nd link below), as follows: xxf:r( 'acme.message', 'fr-fr-resources' ) I haven't tried this myself, so consider the above as pseudo-code ;). Regarding your second question, unfortunately, you currently can't extract the message from a response until we implement #1688 (see 3rd link below), which we'll hopefully do sooner than later. https://doc.orbeon.com/configuration/properties/form-runner#overriding-resources https://doc.orbeon.com/xforms/xpath/extension-functions/extension-core#xxf-r https://github.com/orbeon/orbeon-forms/issues/1688 ‑Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
Hi Vincent, did you get a chance to try setting properties to define your own
resources to be localized, as suggested in my previous message? If so did that work for you? ‑Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Yes it works!
I managed like this : <property as="xs:string" name="oxf.fr.detail.submit.title.*.*" value="submit-dialog-title"/> <property as="xs:string" name="oxf.fr.detail.submit.message.forem.*" value="submit-dialog-message"/> <property as="xs:string" name ="oxf.fr.resource.*.*.fr.detail.messages.submit-dialog-title" value="Demande envoyée"/> <property as="xs:string" name ="oxf.fr.resource.*.*.fr.detail.messages.submit-dialog-message" value="Votre formulaire a bien été envoyé"/> Thank you -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Excellent Vincent, I'm glad overriding the resources with properties worked
for you, and thank you for the update! ‑Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by Alessandro Vernet
Hi Alessandro,
thank you for this thread, that helps me a lot. But I would like to ask you how to do the same for error-message with custom message filled by submission servlet response. I have following in my properties-local.xml: and my submitXform returns: Is it possible to show servlet XML response in error dialog? I would like to keep user on xform, not to replace its content by replace="all" option. Thanks in advanced. Jan. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
In reply to this post by Alessandro Vernet
Hi Alessandro,
-- thanks for replies in this thread, it was very helpful to me. Is it possible use same concept for display error-message with custom error message prefilled from my custom servlet XML response that is used for xform send? I'm struggling with this usecase (searching docs, forums, even source code), but I feel it should be simple as success-message. I have in my properties-local.xml <property as="xs:string" name="oxf.fr.detail.process.send.apcmu-v4.*"> require-uploads then validate-all then send( uri = "http://localhost:8080/apcmu/submitXform", replace = "instance", instance = "fr-send-submission-response", method = "post", content = "xml", annotate = "id", nonrelevant = "keep" ) recover error-message(message="Custom message: {//message} !!!") </property> and my submitXform servlet returns: HTTP/1.1 500 Internal Server Error Connection: keep-alive Server: apcmu Content-Type: application/xml; charset=UTF-8 Content-Length: 71 Date: Wed, 17 Apr 2019 08:56:32 GMT <exceptions><exception><message>error from backend application</message></exception></exceptions> I would like to stay on xform and not to replace it by different page or content -> just let user close error dialog and try to send again. Thanks in advanced. Kind Regards, Jan. On Wednesday, November 21, 2018 at 8:26:47 AM UTC+1, Alessandro Vernet wrote: Hi Vincent, You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi Jan,
Unfortunately, for now this isn't possible. However, this is a top Request for Enhancement, so we'll hopefully get to do this soon. And in the meantime, I've added a +1 from you on issue #1688 linked below. https://github.com/orbeon/orbeon-forms/issues/1688 ‑Alex ----- -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alessandro, thank you for your time. We'll go with some workaround. I'll
keep my eye on github issue you posted. Jan. -- Sent from: http://discuss.orbeon.com/ -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Free forum by Nabble | Edit this page |