Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
ComponentTag requires a Factory to be passed in via its constructor. This places restrictions on the kind of Factory that can be used.
I have a class drived from ComponentTag that wants to pass in a Factory that uses info from the derived class, something like this:
class MyTag extends ComponentTag {
private String foo;
public MyTag() {
super(new Factory() {
public Object newInstance()
}
}
That won't work, but if I had a setFactory() method, I could just do this:
public MyTag() {
setFactory(new Factory() {
public Object newInstance(){ return new MyComponent(foo); }
);
}
which would work just fine.
Thanks,
Scott