cancel
Showing results for 
Search instead for 
Did you mean: 

Lumira SDK component not ready until after APPLICATION.onStartup

ivan_camac
Participant
0 Kudos
174

I have created a Lumira SDK component which is used for getting things like the local execution hostname etc. These values are only available at runtime so the SDK component fulfils the requirement with no problems. The properties are available and can be accessed through property get methods in the contribution.ztl file. This all works fine when wired up to for example a button the user clicks, but if I try to implement the methods in the Application On Startup event, the application BIAL scripts execute before the SDK component has fully initialised and so the methods return empty property values.

During debug I can see the property values being correctly updated, but this happens long after the On Startup application script has completed.

Does anyone know how to force SDK components to initialise early?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Indeed the On Startup script is executed on the server before the SDK component was even created on the browser. State that is only know at browser is simply unknown at this point in time. The only content that your ZTL functions can return during On Startup is information that you have on the server, e.g. something like JavaScript Date.now().

Answers (1)

Answers (1)

0 Kudos

One further idea: You could add a kind of "afterInit" event to your component that you trigger from browser using firePropertiesChangedEndEvent ones you have calculated the property values. Ask the users of your component to put the startup logic there.