The xe: calendar control is based on the iNotes calendar view. As a result, events trigger only client-side JavaScript, not server-side JavaScript. Using syntax C # {javascript: ...}, you can pass evaluated SSJS, for example.
#{javascript:(userBean.accessLevel >= lotus.domino.ACL.LEVEL_AUTHOR) && userBean.canDeleteDocs}
This will verify that the user has at least database access rights and deletion privileges. Similarly, you can use the following code to get the full URL of the current page to manipulate when creating a new URL to redirect to:
var path = #{javascript:"\"" + @FullUrl('/') + "\""};
Keep in mind that server-side JavaScript will be evaluated when the function is written to XPage, and not when the button is clicked.
You can get unid using (as client-side Javascript, not server-side JavaScript) the elements [0] .unid.
See the calendar custom control in the Teamroom template that ships with Service Pack 1 or the extension library for more information.
Paul Stephen Withers
source share