I tried to pass a parameter with the Smartclient URL, but no success.
The wicki says :
{serverUrl}/servoy-client/mySolutionName.jnlp?a={value}
Opens a Smart Client and launches the specified solution. The argument value is passed into the Solutions onOpen event handler.
does it arrive onOpen of the solution, or onOpen of the loginSolutionName ?
does this arrive as a named parameter (a in this example), or is this something like event.getParameter(‘a’) ?
After 1 Week with no answers, I need to know if the question is understandable, or if maybe it’s not really common, to pass a parameter with
the servoy url ?
Thank you for answer. I think that’s what I’m not familiar with.
In the onOpen-property of the solution I typed globals.setEnvironment(argsArray)
the firs statement in globals.setEnvironment(argsArray) is application.output(argsArray, LOGGINGLEVEL.ERROR) and
the result of this (javaconsole) is: undefined
The Link looks like:
http://???.???.???.???:8080/servoy-client/GigDoodle.jnlp?userid=test
This is standard JavaScript. The arguments array is a special variable passed to your methods.
You access it with its name, which is ‘arguments’ so for example:
if (arguments && arguments.length > 0) {
application.output(arguments[0], LOGGINGLEVEL.INFO);
}
in the onOpen of the solution , but receive still undefined
in the onOpen of the LoginSolution , but receive undefined too.
Does some security stuff on the server 2008 r2, or some enhanced security stuff from
servoy, influence the passing of a parameter ?
Is the link I showed above a correct syntax (wondering if the Named parameter in the wicki “a” is
necessary, but the receiving is just a array-position)?
Please be aware that using a deeplink, java won’t create a shortcut on your desktop anymore (if you used this before)
This can be solved by using the ‘profiles’ in Servoy Admin pages.
mboegem:
If I remember correctly, you have to specify a global method in the deeplink as well.
Otherwise the parameters will not be passed correctly.
What I experianced:
The placeholder method is not necessary for a single parameter, but the letter a !
The a means “argument” and has a different meaning then in a html/php link, where
the letter(s) left the = are the name of a parameter.
mboegem:
The deeplink should look like: ```
{serverUrl}/servoy-client/mySolutionName.jnlp?m=login&a={value}
Yeas, this is the right way if you like to start a specific method and pass a parameter, because
de letters m means method and the a means argument.
But my link now looks like ```
{serverUrl}/servoy-client/mySolutionName.jnlp?a={value}
- in the onSolutionOpen of the loginSolutionName of the solution
- in the onSolutionOpen of the solution itself
Thank you @all for your patience !
Regards