0

I have a custom control that has a property defined that I need to access in a client side script.

Is there a simple way to access compositeData client side?

  • 1
    Found the answer in this post: http://stackoverflow.com/questions/9568519/getting-to-scope-varibles-in-client-side-javascript-csjs-on-xpages Basically, set up a client side var in a scriptBlock tag. – Michael G. Smith Jul 04 '12 at 17:36

1 Answers1

0

As stated in your own comment you can generate a piece of script using a scriptblock. Another way is to use a xp:inputHidden with the value #{compositeData.yourpropertyname}. When using the scriptblock approach be aware that the generated code also generates a unique var name which you can identify.

this is to prevent multiple instances of the same custom control to overide the same javascript variable.

jjtbsomhorst
  • 1,667
  • 11
  • 28