Replacing a bean by a HTML Area with custom HTML

Hi,

I have this (GUI) bean I’m using in the rich client, which obviously doesn’t work in the WebClient.

In trying to come up with a solution for this, I though of determining the ApllicationType and if <> Webclient, show the bean, else, hide the bean and show an HTML area with som HTML to create the same GUI.

So far, so good. I’m able to test the applicationType, hide/show the bean/HTML area depending on the applicationType and build the GUI appearacne of the Bean in the HTML using HTML.

Now I come to the following: Interaction between my Servoy solution and the HMTL I put into the HTML area… When a user does something in the HTL area (type some text, change a selection, choose a value etc), I need these changes to get noticed in my solution, i.e.: I need a method to get fired…

Can this be done somwhow? I looked at the sourcecode of the pages Servoy creates automatically, but couldn’t figure out how to do so…

Any thoughts appreciated,

Paul

Is it your own bean paul?
If so you can add a constructor to make it an applet…

Concerning your html, you can add a hyperlink to a javascript method.

Man, do I make a lot of typos… :?

Marcel, I’m trying to replace the bean in the Webclient by HTML in a HTML area. The HTML contains Comboboxes, inputfields etc. As far as I know, I cannot add a hyperlink in such a way that when the selection of the comboxos changes, the link of the hyperlink is called.

Secondly, the javascript:methodname(arguments) notation for hyperlinks in a HTML area does not seem to work in the WebClient (the hyperlink points to the root of the WebSite, I think).

And adding a contruction to the bean to make it an applet: how would this help my situation? I don’t think I follow you there…

Paul

As far as I know, I cannot add a hyperlink in such a way that when the selection of the comboxos changes, the link of the hyperlink is called.

Well that is possible by using Javascript with a ‘normal’ website. Can’t tell you how to implement it in a webclient though…

And adding a contruction to the bean to make it an applet: how would this help my situation?

I can imagine (have not yet tested that though) than an applet simply works within a webclient…

Hope I can help you a little

Turns out that at this moment applets are sees as beans when it comes to building the WebPage in the WebClient, so an image of them is created.

javascript:methodname(arguments) does work. I must have done something wrong before, but it only works on xxxxx tags.

Attaching a Servoy method to an onclick event of a button inside custom HTML in a HTML area is not really possible. You can look at how the method is called when clicking on a link (the solution), but it involves hardcoding variables that are determined at runtime, so doens’t help much.

So, to conclude: for the moment, this isn’;t a viable option.

Paul