Hi, is there a way to open a smart client from another smart client at runtime? I am looking for a way to open another SC in a separate session.
You can probably use application.showURL(jnlpURL), just make sure that the server-admin property “servoy.allowExistingClientActivate” is set to true.
ptalbot:
You can probably use application.showURL(jnlpURL), just make sure that the server-admin property “servoy.allowExistingClientActivate” is set to true.
Thanks for the quick response!
I am looking for an API which can pass some parameters to the new session. I’d like the new session or second session to know that it is created by another session through showURL. Does Servoy have this kind of functionality?
just make sure that the server-admin property “servoy.allowExistingClientActivate” is set to true.
@Patrick: why do you think that is needed?
@Erik: Just launch a new Client using the application.showURl like Patrick suggested and pass some info to it through the deeplink
Paul
@Paul: I thought this was was needed to launch a new instance, at least it was my understanding until now, but I must say that I never used this feature…
Looking closer at the explanations in the wiki now:
“servoy.allowExistingClientActivate: when true, when a Servoy Smart Client is already opened on a machine and from that machine a deeplink url is called that specifies a deeplink method, instead of opening a new Smart Client, the method is invoked inside the existing Smart Client.”
I realize that it would actually have to be set to false if one wanted to use a deeplink url to launch another instance.
Am I right or is this only valid for yet another use case?
You’re correct: if you want to launch a second smart Client instance on the same machine, you need to have it unchecked.
Paul
Got it now. Thanks Paul!
pbakker:
@Erik: Just launch a new Client using the application.showURl like Patrick suggested and pass some info to it through the deeplink
Paul
Hi Paul, I am already using showURL to create another SC instance. However, the parameters passed to the new application through the deepLink or queryString are not secured. Is there a way in Servoy where we can pass parameters through a body like POST so that information remains hidden from user’s display?
I don’t see how you could programmatically trigger a POST in a browser from within a Smart Client.
What most people do is store the required info temporarily in the database against a UUID and then pass the UUID into the deeplink.
Paul
Honestly I was expecting a better and cleaner way to do this, but thanks very much anyway.