Link to home
Start Free TrialLog in
Avatar of Sjef Bosman
Sjef BosmanFlag for France

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...?

ASKER CERTIFIED SOLUTION
Avatar of Bill-Hanson
Bill-Hanson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sjef Bosman

ASKER

Clues for me: MethodBinding and Method Binding Editor. I thought I'd tried them all, there are too many and the explanation is, er, concise...

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!!
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!
Welcome!