1

When using the system scripting interface ("system/scripting") of sirius-web (part of the sirius framework), what method is available to use to get a specific registered Part to use in my script?

Yalla T.
  • 3,707
  • 3
  • 23
  • 36

2 Answers2

2

Create an object implementing sirius.web.templates.GlobalContextExtender and add the object by extending the collectScripting Method:

globalParameterCollector.accept("objectNameToAccess", objectToAdd);

Can be accessed from within the scripting by calling:

@objectNameToAccess.methodName()
  • previously all parts available in java were available under ctx.getPart()/ ctx.getParts() - is something similiar no longer possible ? – Yalla T. Jun 18 '18 at 08:55
0

One could extend the DefaultGlobalContextExtender and place an instance of Injector in the context...

Andreas Haufler
  • 401
  • 4
  • 9