Show error when send mail fail

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

Show error when send mail fail

bruno.buzzi
Hi,

We have the following configuration:
<property as="xs:string" name="oxf.fr.detail.process.send.*.*">
          require-valid
          then email  
          then save-final    
          then navigate(uri = javascript:alert("Saved"))
          recover error-message("Mail-Error")
</property>  

We want to show an error dialog when send mail fail.

But until now i was unable to do it.

How we can achieve that ?

regards,
bruno

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: Show error when send mail fail

Alessandro  Vernet
Administrator
Hi Bruno,

Your `recover` never kicks in because `save-final` already does a `recover`:

    <property as="xs:string"  name="oxf.fr.detail.process.save-final.*.*">
        require-uploads
        then validate-all
        then save
        then new-to-edit
        then success-message("save-success")
        recover error-message("database-error")
    </property>

So maybe, instead of using `save-final`, you could copy the content of that
process into your, but without the last `success-message()` and
`error-message()`. You'll let me know if this works 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
Reply | Threaded
Open this post in threaded view
|

Re: Show error when send mail fail

bruno.buzzi
Alex,

thanks for your answer. it was solved in process.send as:
          require-valid
          then require-uploads
          then validate-all
          then email  
          then save
          then new-to-edit    
          then navigate(uri = "javascript:alert('Form Saved')")
          recover navigate(uri = "javascript:alert('Error when sending the
email')")

regards,
bruno

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: Show error when send mail fail

Alessandro  Vernet
Administrator
Perfect Bruno, I'm glad bypassing `save-final` which does a `recover` solved
the issue. 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