I'm facing a similar issue as this one : Embedding a link (or other html) in a JSF message
I want to embed an anchor tag in h:messages. This solution mentioned will work with JSF 1.2. But I'm stuck with JSF 1.1 on my project. ResponseWriterWrapper is not available for 1.2. Any way around this?
@BalusC - Thanks for all ur posts across the web :)
Asked
Active
Viewed 438 times
1
1 Answers
0
Just create your own ResponseWriterWrapper
class.
public abstract class ResponseWriterWrapper extends ResponseWriter {
public abstract ResponseWriter getWrapped();
@Override
public String getContentType() {
return getWrapped().getContentType();
}
@Override
public String getCharacterEncoding() {
return getWrapped().getCharacterEncoding();
}
@Override
public void flush() throws IOException {
getWrapped().flush();
}
@Override
public void startDocument() throws IOException {
getWrapped().startDocument();
}
// Etc... Just override all abstract methods of ResponseWriter
// and delegate the call to getWrapped(). There are 15 of them.
}
It's basically a convenience class so that you don't need to implement all of 15 abstract methods whenever you need only one or two of them.

BalusC
- 1,082,665
- 372
- 3,610
- 3,555
-
Thanks a lot. Will try this one & get back. – Manish T Aug 03 '11 at 10:06