[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Request: in textpane with html, allow links with functionality  XML
Forum Index -> Development
Author Message
moebus

Power User

Joined: 21/11/2007 12:49:18
Messages: 93
Offline

This could be used as workaround for
my previous request, but only when at least basic functionality can be used within the generated html - and I think it is worth to create anyway.

We need to have links that trigger a roundtrip to the server, and display images. A possible scenario is as follows:

have defined a
Code:
<textpane 
         contenttype="text/html"
         text="{d.mybean.myhtml}"
         actionListener="{d.mybean.onLink}" />
 

and then html (as delivered through getMyhtml() method) may contain
Code:
please click <a href="myfunction>here</a> 
 when you look at this image <img src="images/coolpic.png" /> 

should load the image from the current server (no need to know the server url in our application code), and the link should invoke the action listener (the function onLink(ActionEvent e), and the url of this link ("myfunction") must be available on server side, it could be passed as a parameter of BaseActionEvent.
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

....I do not encourage you to use the Java-based-html browser.

First it is not really displaying things in synch with the environment (font, ...). It is fine for showing small HTMLs in a popup or so (online help), but that's it. For any serious HTML rendering we recommend to embed the native browser. Of course this is a heavy weight component, so it's not suitable to be placed into page just because of one link.

Second I would not open up an area of extra logic within the HTML. Then you have two battle fields, the HTML one with a lot of compromises.

Björn

Björn Müller, CaptainCasa GmbH
moebus

Power User

Joined: 21/11/2007 12:49:18
Messages: 93
Offline

Thanks for the hint, but then we have the same problem: how to create a link that triggers roundtrips in the captain-casa world?

second problem: we had enbedded several browser tag in some test pages and done lots of refreshes - this sometimes crashed the client (hard protection violations), so "browser" really seems to be a "heavy" control to use only in very "controlled" use cases.
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5521
Offline

...this is what I mean with "Second": I would not have a second eventing level in the html-"inlay" (I am just coming from the dentist...) - parallel to the normal controls - neither with the Java-Browser nor with the real-browser.

Currently we do not have a multi-line-flexible-vertical-size link, but a single-line-link.

We have a TEXTPANE which doese the flexivle-vertical-size thing, so we could add some dynamic behaviour there. And also some mouse-over-formatting - so I see not too big problems to have a selectable "link-like" area.

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team