Re: toHTMLString
Re: toHTMLString
- Subject: Re: toHTMLString
- From: Dev WO <email@hidden>
- Date: Thu, 23 Jun 2005 20:03:51 +0200
Humm,
I cannot appendToResponse as the resulting string is used somewhere
else in the application and not sent back to the browser.
I need to use it in my framework (to extend an already existing
class) to make the new string available as if it was an attribute of
the parent class:
class Source
(has href(), title())
class SourceEX extends source
has string link which should be "<a href="href()ESCAPED"
title="title()">
I tried importing appserver:
import com.webobjects.appserver.*;
then either:
stringByEscapingHTMLString(href())
href().stringByEscapingHTMLString()
but always complaining about:
SourceEX.java:24: cannot resolve symbol
symbol : method stringByEscapingHTMLString (java.lang.String)
...
On WOMessage there is a static method String
stringByEscapingHTMLString(String) that is used by WO to escape
HTML. If you are just writing out to the response, you can use
woresponse.appendContentHTMLString(String) and it will call that
method and just write the response directly out.
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden