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++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -