[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
TextPane with HTML code  XML
Forum Index -> Development
Author Message
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Hi Björn,

I did not succeed to put a text containing HTML code into the text pane control
(i.e "line 1<br>line 2").
As I have seen in the demo workspace this works perfectly if I enter the text directly into the text pane.
But if I pass it with a property function from the bean or even add it in the property field directly with the designer, the html code is not being resolved.

Frauke

CaptainCasa

Power User
[Avatar]

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

Hi Frauke,

in the workplace example the text is coming from a bean property... the TEXTAREA on the same page is not "in contact" with the TEXTPANE - they just refer to the same property.

Do not input XML/HTML code in the layout editor: the xml will be translated into < etc. characters. You need to refer to a property (or a resource reference, what is the same...).

Maybe you give us some mini-example that shows the problem? Thanks!

Regards! Björn

Björn Müller, CaptainCasa GmbH
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline


public class Test1Bean {
public String getText() { return "Line 1<br>Line2"; }
}
 Filename test1.jsp [Disk] Download
 Description
 Filesize 823 bytes
 Downloaded:  459 time(s)

CaptainCasa

Power User
[Avatar]

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

Hi Frauke,

there is an attribute CONTENTTYPE in the TEXTPANE: please set this to "text/html"...

Björn

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