Hi All,
How can we call a servoy method from a Headless Client, by using the HeadlessClient Plug-in?
Thanks,
Hi All,
How can we call a servoy method from a Headless Client, by using the HeadlessClient Plug-in?
Thanks,
if you want to executed something in another headless client that you can use the headless client plugin for that yes
(it doesn’t really matter what kind of client is the start of this)
I have tried by calling a method in a Headless Client by using the Headlessclient Plug-in. But, all the UI Changes done in the method isn’t getting affected in the current client. My AIM is to run a method in a separate thread, so as not to block the UI. But, as It need to change the Client UI as well, that isn’t working, by running the method in a Headless Client.
Is there any work-around for this?
Thanks,
The headless client runs without a head (GUI) and runs serverside… so it’s not surprise you are not seeing UI updates in scripts when you run it because they are actually running on the server. If you need to update a UI you have to run the code in the smart client where the UI has to be updated.
Infop:
I have tried by calling a method in a Headless Client by using the Headlessclient Plug-in. But, all the UI Changes done in the method isn’t getting affected in the current client. My AIM is to run a method in a separate thread, so as not to block the UI. But, as It need to change the Client UI as well, that isn’t working, by running the method in a Headless Client.Is there any work-around for this?
currently this is not supported in servoy,
There are hacks around it if you would use your own plugin that just executes functions in another thread.
But that can be quite dangerous because if threading issues. For example calling UI stuff again should be done through the plugin, you shouldnt touch any elements.xxxxx.yyyy stuff in that script.
This is because UI access can only be done through 1 main thread.
What exactly are you trying to develop? there may be other ways to get there.
Jan Aleman:
What exactly are you trying to develop? there may be other ways to get there.
Hi Jan,
I just want to run a upload process of a large movie file in a separate thread and simultaneously updating the progress bar in the Client’s UI in Web Client with out blocking the UI. Is there any other ways of accompolishing this? Please, let me know.
Thanks
that uploading, where do you upload that to? What kind of client are we talking here about? Web or Smart?
So are we talking here about the upload in a browser to a webclient (then there is no script running)
or are we talking about uploading from a smart client to a server?
that upload is already possible with the new FilePlugin features
jcompagner:
that uploading, where do you upload that to? What kind of client are we talking here about? Web or Smart?So are we talking here about the upload in a browser to a webclient (then there is no script running)
or are we talking about uploading from a smart client to a server?
that upload is already possible with the new FilePlugin features
Here, I am mentioning Web Client. I want to display the upload progress in a WebClient and that Upload progress should NOT block the UI.
Thanks,
thats not possible and also can’t be solved by using another headless client through the headless client plugin.
There is no script running when you upload something. Thats happens purely in the browser, only after everything is upload to the server a client gets a event that an upload did happen.
Also what do you mean with not block the ui? you should be able to upload something and when that happens the user should be able to do anything he wants in the solution? So go to other forms and so on?
that would be only possible if you have another browser window or tab where the upload happens in. And maybe there use some new html 5 stuff or a flash uploader.
But all this you have to build something your self in html. (and maybe also the backend by own own servlet)
Infop:
Jan Aleman:
What exactly are you trying to develop? there may be other ways to get there.Hi Jan,
I just want to run a upload process of a large movie file in a separate thread and simultaneously updating the progress bar in the Client’s UI in Web Client with out blocking the UI. Is there any other ways of accompolishing this? Please, let me know.
Thanks
We’re doing this in smart client. Used Patrick’s streaming files demo solution as our starting point (never would have figured it out on our own):
https://www.servoyforge.net/news/43
Just checked and it seems to work in web client as well.
[attachment=0]Picture 1.png[/attachment]
but the streaming features of the file plugin doesnt make much sense in the WebClient…
Because that doesn’t really do anything, the file plugin streams between client and server and for a smart client it is:
[client-pc] [server-pc]
but for a web client it is:
[browser-pc] [client&server-pc]
So for a web client the progress you see is between client and server pc which is the same machine.
Ah yes, that makes sense.
How about this then: in the updater callback method that is running on the client/server-PC, call browser-PC javascript code at periodic intervals to update a progress bar in the browser using Sean’s web client utilities plugin.