Sjef Bosman
asked on
XPages: how can I add Server-Side JavaScript to a custom control property?
I created a custom control with some buttons in it. I want these buttons to be generic, so the real code of the buttons should be passed in one of the properties. How should I create such a property? It works, for the Client-side JS it is no problem (type=String, editor=Client Side Script Editor), the server side code is different though, there is no such thing as a Server Side Script Editor.
The Type is ok, I only want the correct Editor. Or if you have a better way to create new event handlers in a custom control...?
The Type is ok, I only want the correct Editor. Or if you have a better way to create new event handlers in a custom control...?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Anytime! I feel the same way - I've learned tons since I started this project last year (about 16 months of development). My Proposal Factory app now spans 8 databases and has been in Beta for a week now. No bugs reported (yet), and the users love it!
Hey, thanks for the tip about defining the function right in the editor - I hadn't thought of doing that!
Hey, thanks for the tip about defining the function right in the editor - I hadn't thought of doing that!
ASKER
Welcome!
ASKER
1, 2, 3 are clear
4 I do a little differently, here's my code that circumvents the problem you mentioned:
return function () {
var viewPanel= getComponent("viewMails");
var ids= viewPanel.getSelectedIds()
dosomething(param.assoc, ids);
}
By the way, this XPages application is already running, but I now discover more and more nice features that I knew nothing about a year ago. A 2nd application is being developed that uses far less code that that 1st one. That's what Progress is, I suppose.
Thanks a bunch!!