0
votes

on my application I have a dialog which I re-use across my application. sometimes I call it via ssjs and sometimes csjs. the dialog contains buttons and sometimes I want for them the oncomplete event for an eventhandler to perform a csjs action and sometimes not.

I was wondering how I can pass through csjs code/function to the custom control and use it in the oncomplete event of an eventhandler.

normally I would use the compositeData method to get the value but that is ssjs.

can anyone guide me?

1

1 Answers

0
votes

You can provide the CSJS, that should be executed in the oncomplete event, as string property to the custom control and compute the client-side code for the event on the server-side.

If you, for example, name the property csjsOncomplete, the computed value for the client-side event would be #{javascript:return (compositeData.csjsOncomplete || '');} .