Executing a Servoy method from a link in the browser bean

Hi All

I’ve made a Servoy Solution in which I use the browser bean to show a webpage I made. Now I would like to be able to make a link in my webpage that triggers a method in Servoy.
I’ve tried using deeplinks, but that doesn’t work properly. Above that I don’t want to start another Servoy instance. Servoy is already running and displaying my webpage in the browser-bean.

Has anyone a suggestion?

Thanks in advance

Jasper

Hi Jasper, can you explain, what doesn’t work with the deeplinking?

Do you give arguments to the deeplink? or is there another client opened?

No I didn’t use arguments, I used the following syntax:
http://localhost:8080/servoy-client/ser … obalMethod

When I click the link another client is opened with another solution than mySolution.

Because a client is opened I assume the syntax of the url is right. But then I really don’t understand why the other solution is opened.

ah oke, that’s the old way of deeplinking.
The new way is something different. (let me look for that, don’t know this out of my head!)

btw: are you sure the already opened client is also one that starts with: http://localhost:8080/bladibladi?

I noticed a weird thing that may be why the other solution is opened on the deeplink.

When I click “smart client launch” from my solution in Servoy Developer the other solution appears in the Servoy Client.

When I have the right solution opened in the Servoy client and I click the (deep)link in the browser-bean the same (wrong) solution is opened after 3 error messages.

I got some closer.

In the solution settings I changed the type from module to normal. Now the link opens the right solution-screen and executes the global method I specified. (I only get the message “failed to copy argument”).

The solution is opened in a new Servoy Client window. I actually want it to change the page of the opened Servoy Client.

Is there a way to do that?

I actually want it to change the page of the opened Servoy Client.

Is there a way to do that?

I don’t think so, you are opening a new solution from the browser and not telling Servoy to open a new solution.

I don’t know what/why you do this but why don’t you attach the other solution a module and start it from a form with a button/buttons which in turn start the startup method of that solution

See the image below.

I have the map in the browser bean. The map converts an address to a latitude/longitude and I want to post that lat/lng back to use in Servoy.

Besides that, if the deeplinking works, I can think of many more things I would want to use deeplinking for.

In this way I don’t need opening another Servoy Client, extra clicks before the user is back at the same page etc.

Any help is welcome

and you are firing this deeplink-method from developer? or really from the client?
From which I understand, if the (localhost) client is already open it should not open a second one!

I do open the link in Servoy Client. Though I fire it from a link in the web-page, in de browser-bean in Servoy Client. Maybe that causes it to open another window??

I think so because you are working with an instance of the native browser.

yeah, but should not matter.
As fas as I understood it, you can launch a deeplink from anywhere (for instance from you local OS scheduler) and than the client should not open twice, but the already opened client should receive this.

What happens if you do this: (make sure every client is closed)

1.) fire a deeplink in your local browser with a method and argument(the client should open, right?)
2.) fire the same deeplink in your local browser. Does Servoy starts a new client?

Maybe someone of Servoy can clarify this?

When i fire the deeplink from my local browser Servoy client opens (actually… it only opens if i still have servoy developer running).
After that when i fire the same link from the same local browser another Servoy client opens.

The way i see it the deeplink always tries to open a new Servoy Client. It will fail if the developer isn’t running.

GoogleJaps:
See the image below.

I have the map in the browser bean. The map converts an address to a latitude/longitude and I want to post that lat/lng back to use in Servoy.

Besides that, if the deeplinking works, I can think of many more things I would want to use deeplinking for.

In this way I don’t need opening another Servoy Client, extra clicks before the user is back at the same page etc.

Any help is welcome

Which url are you calling for this result?
Or is it the java example?

Hi all,

today I ran into the same problem. Everytime I use the deeplink, a new Servoy Client instance would be opened. I use the deeplink with a method eg.:

http://localhost:8080/servoy-client/servoy_client/mySolution.jnlp/method=myMethod

Is there a way to control whether the link opens a new Servoy Client instance or not?

I think this only happens if you test this running from developer. Doing this from a real server it should not start a second client.

Hmmm… I do this from a real server, not via developer.

But the difference to Jasper is, that I fire the link from local Browser (outside Servoy Client) and not via Browser Bean (inside Servoy Client). Could this be the problem?

Servoy 3.5.5
Windows XP
JRE 1.6.0_05_b13