Now that I have a better understanding of your question, please try the following.
- In your toolbar, create a basicLeafNode inside the toolbar and call it "Cancel", which you likely already have
- Put the client side code in the onClick event that is similar to below.
Do not do what I suggest in my original answer by disabling validation
<xe:toolbar id="toolbar1" xp:key="MastHeader">
<xe:this.treeNodes>
<xe:basicLeafNode label="Cancel">
<xe:this.onClick><![CDATA[location.href="/dbpath/yourdb.nsf?logout&redirectTo=/dbpath/yourdb.nsf";]]></xe:this.onClick>
</xe:basicLeafNode>
</xe:this.treeNodes></xe:toolbar>
If this is what you already tried, please verify your code. This should not trigger any serverside validation. If you are using clientside validation, your results may vary.
Please check the box to "Process data without validation" in your event. Check this box, and the validation step will be skipped. Of the things you tried, I would use context.redirectToPage(view)
with this option. This is a server-side event. This assumes you are not using clientside javascript to perform validation which is what it sounds like you are doing. Unlike the screenshot, you will want to perform a full update.
