Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-84

Please add setFactory method to ComponentTag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • taglib.swing
    • 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()

      { 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            jshowlett Scott Howlett
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: