Hi,
ObjectRenderers do not replace a Layout. They are classes that know how to
render objects of a specific class. For example:
class A {
private int a;
public int getA() { return a; }
private int b;
public int getB() { return b; }
}
public class ARenderer implements ObjectRenderer {
public String doRender(Object o) {
if(o == null) {
return null;
} else if {! (o instanceof A)) {
return null;
} else {
A obj = (A) o;
return "Sum = " + (obj.getA() + obj.getB());
}
}
They are specified in a properties configuration file as follows:
log4j.renderer.A = ARenderer
Yoav Shapira
Millennium Research Informatics
-----Original Message-----
From: Søren Ehrhorn [mailto:soer...@jyskebank.dk]
Sent: Thursday, June 03, 2004 7:36 AM
To: 'log4...@logging.apache.org'
Subject: ObjectRenders
Hi,
Im trying to incorperate ObjectRenders in min J2EE framework, but i dont
know howto. Do they replase Layout??
Regards,
Søren