Replacing a bean by a HTML Area with custom HTML

Forum to discuss the Web client version of Servoy.

Replacing a bean by a HTML Area with custom HTML

Postby pbakker » Mon Aug 14, 2006 9:49 am

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
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby IT2Be » Mon Aug 14, 2006 11:18 am

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.
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby pbakker » Mon Aug 14, 2006 11:33 am

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
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby IT2Be » Mon Aug 14, 2006 11:42 am

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
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby pbakker » Mon Aug 14, 2006 3:55 pm

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 <a href="">xxxxx</a> 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 <a href....> 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
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 3 guests