Zamae

The Prosciutto Project

a small footprint mobile application engine and browser - and open source!

onerror tag

The onerror tag indicates which action (other than default) should Prosciutto take in case a form is not available to be visible and is required to be visible.

In this example, we are telling Prosciutto that if such condition is met anytime, it should automatically perform a goback action and try to show this form's caller form.

    <onerror>goback<onerror/>

    
The onerror tag should always be declared before any form is declared, at the top in the model.xml file, inside the application tag.
It comes in quite handy on connected applications, where some forms need be fetched from a server, and for some reason the required form is not available for downloading.

The default action Prosciutto performs in such cases is actually a goback, but you can also declare any of the possible Prosciutto actions here, using the act_param parameter. For example, showing a specific error form you could have defined for your users can be achieved just by declaring the onerror tag as follows (assuming your error form has an ID of 52000):
    <onerror act_param="52000">goto<onerror/>

    


Back to UI objects listing