javascript - XPages - trigger validation before executing CSJS? -


i have button executes csjs before doing trigger document validation. validate document before saving using ssjs , display errors control. validation works fine when press "save" button triggers save document simple action. possible trigger validation before executing csjs?

there few options.

you put csjs in oncomplete event of button's eventhandler (you need go properties of eventhandler, not properties of button find oncomplete).

you call csjs via ssjs method view.postscript("mycsjsfunction()").

if use csjs tab button, trigger before submission server-side processing. it's designed client-side checking occur , prevent server-side, e.g. using return confirm("are sure?") check whether user wants cancel out of document or delete document etc.


Comments

Popular posts from this blog

c - sscanf() double showing zeros -

command line - Python: find current directory of remote "cmd.exe" processes -

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -