You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ji...@codehaus.org on 2003/09/10 17:49:10 UTC

[jira] Commented: (JELLY-84) Please add setFactory method to ComponentTag

The following comment has been added to this issue:

     Author: Scott Howlett
    Created: Wed, 10 Sep 2003 10:47 AM
       Body:
This actually isn't as important as I thought - I can get the behavior I want by overriding the newInstance() method in my derived tag.
---------------------------------------------------------------------
View the issue:

  http://jira.codehaus.org/secure/ViewIssue.jspa?key=JELLY-84


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JELLY-84
    Summary: Please add setFactory method to ComponentTag
       Type: Improvement

     Status: Unassigned
   Priority: Minor

 Time Spent: Unknown
  Remaining: Unknown

    Project: jelly
 Components: 
             taglib.swing

   Assignee: 
   Reporter: Scott Howlett

    Created: Fri, 5 Sep 2003 1:07 AM
    Updated: Fri, 5 Sep 2003 1:07 AM

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(){
                return new MyComponent(foo);
            });
    }
}


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


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira