You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "David Gagnon (JIRA)" <ji...@apache.org> on 2006/06/13 14:57:16 UTC

[jira] Created: (STR-2887) TagUtils.instance is private final. Please allow to change the instance with a custom one! Maybe put it protected only!

TagUtils.instance is private final.  Please allow to change the instance with a custom one!  Maybe put it protected only!
-------------------------------------------------------------------------------------------------------------------------

         Key: STR-2887
         URL: http://issues.apache.org/struts/browse/STR-2887
     Project: Struts Action 1
        Type: Improvement

  Components: Apps  
    Versions: 1.2.9    
    Reporter: David Gagnon
    Priority: Trivial


Hi all,

 I'm running with struts 1.1 and I tried to migrate to 1.2.9 this morning.  My biggest problem is that I needed to change the code base of my 1.1 to put new feature I needeed.  One of them is that I introduced new scope like: window scope So I have
ApplicationScope
SessionScope
WindowScope
RequestScope
PageScope.

This allow me to have multiple browser windows on the same application and they not interfering. To do so I needed to patch the RequestUtil.lookup and now the TagUtils.lookup method.  My problem is that there is no way in.  The TagUtils defines an instance but it's a private final variable.  So no way to plug in a new TagUtils classe in there?!  For sure that would be a good feature for me :-)

If the instance variable is at least protected and not final.  It would be possible to create my new WindowScopeEnabledTagUtils class that inherit from  tagUtils and change the instance for my new instance.  That would have been great!  Is that can be done ? Is there a reason why thing are like that?
Have been away from the lastest version of struts and I have some catchup to do :-)

Thanks for your help
Best Regards
/David



public class TagUtils {

   /**
    * The Singleton instance.
    */
   private static final TagUtils instance = new TagUtils();


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (STR-2887) TagUtils.instance is private final. Please allow to change the instance with a custom one! Maybe put it protected only!

Posted by "James Mitchell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2887?page=all ]
     
James Mitchell resolved STR-2887:
---------------------------------

    Resolution: Fixed

> TagUtils.instance is private final.  Please allow to change the instance with a custom one!  Maybe put it protected only!
> -------------------------------------------------------------------------------------------------------------------------
>
>          Key: STR-2887
>          URL: http://issues.apache.org/struts/browse/STR-2887
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Apps
>     Versions: 1.2.9
>     Reporter: David Gagnon
>     Priority: Trivial

>
> Hi all,
>  I'm running with struts 1.1 and I tried to migrate to 1.2.9 this morning.  My biggest problem is that I needed to change the code base of my 1.1 to put new feature I needeed.  One of them is that I introduced new scope like: window scope So I have
> ApplicationScope
> SessionScope
> WindowScope
> RequestScope
> PageScope.
> This allow me to have multiple browser windows on the same application and they not interfering. To do so I needed to patch the RequestUtil.lookup and now the TagUtils.lookup method.  My problem is that there is no way in.  The TagUtils defines an instance but it's a private final variable.  So no way to plug in a new TagUtils classe in there?!  For sure that would be a good feature for me :-)
> If the instance variable is at least protected and not final.  It would be possible to create my new WindowScopeEnabledTagUtils class that inherit from  tagUtils and change the instance for my new instance.  That would have been great!  Is that can be done ? Is there a reason why thing are like that?
> Have been away from the lastest version of struts and I have some catchup to do :-)
> Thanks for your help
> Best Regards
> /David
> public class TagUtils {
>    /**
>     * The Singleton instance.
>     */
>    private static final TagUtils instance = new TagUtils();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Reopened: (STR-2887) TagUtils.instance is private final. Please allow to change the instance with a custom one! Maybe put it protected only!

Posted by James Mitchell <jm...@apache.org>.
Oops, sorry.

--
James Mitchell




On Jun 23, 2006, at 8:46 AM, Wendy Smoak (JIRA) wrote:

>      [ http://issues.apache.org/struts/browse/STR-2887?page=all ]
>
> Wendy Smoak reopened STR-2887:
> ------------------------------
>
>
> Reopening to set the fix version, closed issues can't be edited.
>
>> TagUtils.instance is private final.  Please allow to change the  
>> instance with a custom one!  Maybe put it protected only!
>> --------------------------------------------------------------------- 
>> ----------------------------------------------------
>>
>>          Key: STR-2887
>>          URL: http://issues.apache.org/struts/browse/STR-2887
>>      Project: Struts Action 1
>>         Type: Improvement
>
>>   Components: Apps
>>     Versions: 1.2.9
>>     Reporter: David Gagnon
>>     Priority: Trivial
>>      Fix For: 1.3.5
>
>>
>> Hi all,
>>  I'm running with struts 1.1 and I tried to migrate to 1.2.9 this  
>> morning.  My biggest problem is that I needed to change the code  
>> base of my 1.1 to put new feature I needeed.  One of them is that  
>> I introduced new scope like: window scope So I have
>> ApplicationScope
>> SessionScope
>> WindowScope
>> RequestScope
>> PageScope.
>> This allow me to have multiple browser windows on the same  
>> application and they not interfering. To do so I needed to patch  
>> the RequestUtil.lookup and now the TagUtils.lookup method.  My  
>> problem is that there is no way in.  The TagUtils defines an  
>> instance but it's a private final variable.  So no way to plug in  
>> a new TagUtils classe in there?!  For sure that would be a good  
>> feature for me :-)
>> If the instance variable is at least protected and not final.  It  
>> would be possible to create my new WindowScopeEnabledTagUtils  
>> class that inherit from  tagUtils and change the instance for my  
>> new instance.  That would have been great!  Is that can be done ?  
>> Is there a reason why thing are like that?
>> Have been away from the lastest version of struts and I have some  
>> catchup to do :-)
>> Thanks for your help
>> Best Regards
>> /David
>> public class TagUtils {
>>    /**
>>     * The Singleton instance.
>>     */
>>    private static final TagUtils instance = new TagUtils();
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the  
> administrators:
>    http://issues.apache.org/struts/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[jira] Reopened: (STR-2887) TagUtils.instance is private final. Please allow to change the instance with a custom one! Maybe put it protected only!

Posted by "Wendy Smoak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2887?page=all ]
     
Wendy Smoak reopened STR-2887:
------------------------------


Reopening to set the fix version, closed issues can't be edited.

> TagUtils.instance is private final.  Please allow to change the instance with a custom one!  Maybe put it protected only!
> -------------------------------------------------------------------------------------------------------------------------
>
>          Key: STR-2887
>          URL: http://issues.apache.org/struts/browse/STR-2887
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Apps
>     Versions: 1.2.9
>     Reporter: David Gagnon
>     Priority: Trivial
>      Fix For: 1.3.5

>
> Hi all,
>  I'm running with struts 1.1 and I tried to migrate to 1.2.9 this morning.  My biggest problem is that I needed to change the code base of my 1.1 to put new feature I needeed.  One of them is that I introduced new scope like: window scope So I have
> ApplicationScope
> SessionScope
> WindowScope
> RequestScope
> PageScope.
> This allow me to have multiple browser windows on the same application and they not interfering. To do so I needed to patch the RequestUtil.lookup and now the TagUtils.lookup method.  My problem is that there is no way in.  The TagUtils defines an instance but it's a private final variable.  So no way to plug in a new TagUtils classe in there?!  For sure that would be a good feature for me :-)
> If the instance variable is at least protected and not final.  It would be possible to create my new WindowScopeEnabledTagUtils class that inherit from  tagUtils and change the instance for my new instance.  That would have been great!  Is that can be done ? Is there a reason why thing are like that?
> Have been away from the lastest version of struts and I have some catchup to do :-)
> Thanks for your help
> Best Regards
> /David
> public class TagUtils {
>    /**
>     * The Singleton instance.
>     */
>    private static final TagUtils instance = new TagUtils();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (STR-2887) TagUtils.instance is private final. Please allow to change the instance with a custom one! Maybe put it protected only!

Posted by "James Mitchell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2887?page=all ]
     
James Mitchell closed STR-2887:
-------------------------------


> TagUtils.instance is private final.  Please allow to change the instance with a custom one!  Maybe put it protected only!
> -------------------------------------------------------------------------------------------------------------------------
>
>          Key: STR-2887
>          URL: http://issues.apache.org/struts/browse/STR-2887
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Apps
>     Versions: 1.2.9
>     Reporter: David Gagnon
>     Priority: Trivial

>
> Hi all,
>  I'm running with struts 1.1 and I tried to migrate to 1.2.9 this morning.  My biggest problem is that I needed to change the code base of my 1.1 to put new feature I needeed.  One of them is that I introduced new scope like: window scope So I have
> ApplicationScope
> SessionScope
> WindowScope
> RequestScope
> PageScope.
> This allow me to have multiple browser windows on the same application and they not interfering. To do so I needed to patch the RequestUtil.lookup and now the TagUtils.lookup method.  My problem is that there is no way in.  The TagUtils defines an instance but it's a private final variable.  So no way to plug in a new TagUtils classe in there?!  For sure that would be a good feature for me :-)
> If the instance variable is at least protected and not final.  It would be possible to create my new WindowScopeEnabledTagUtils class that inherit from  tagUtils and change the instance for my new instance.  That would have been great!  Is that can be done ? Is there a reason why thing are like that?
> Have been away from the lastest version of struts and I have some catchup to do :-)
> Thanks for your help
> Best Regards
> /David
> public class TagUtils {
>    /**
>     * The Singleton instance.
>     */
>    private static final TagUtils instance = new TagUtils();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (STR-2887) TagUtils.instance is private final. Please allow to change the instance with a custom one! Maybe put it protected only!

Posted by "Wendy Smoak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2887?page=all ]
     
Wendy Smoak resolved STR-2887:
------------------------------

    Resolution: Fixed

> TagUtils.instance is private final.  Please allow to change the instance with a custom one!  Maybe put it protected only!
> -------------------------------------------------------------------------------------------------------------------------
>
>          Key: STR-2887
>          URL: http://issues.apache.org/struts/browse/STR-2887
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Apps
>     Versions: 1.2.9
>     Reporter: David Gagnon
>     Priority: Trivial
>      Fix For: 1.3.5

>
> Hi all,
>  I'm running with struts 1.1 and I tried to migrate to 1.2.9 this morning.  My biggest problem is that I needed to change the code base of my 1.1 to put new feature I needeed.  One of them is that I introduced new scope like: window scope So I have
> ApplicationScope
> SessionScope
> WindowScope
> RequestScope
> PageScope.
> This allow me to have multiple browser windows on the same application and they not interfering. To do so I needed to patch the RequestUtil.lookup and now the TagUtils.lookup method.  My problem is that there is no way in.  The TagUtils defines an instance but it's a private final variable.  So no way to plug in a new TagUtils classe in there?!  For sure that would be a good feature for me :-)
> If the instance variable is at least protected and not final.  It would be possible to create my new WindowScopeEnabledTagUtils class that inherit from  tagUtils and change the instance for my new instance.  That would have been great!  Is that can be done ? Is there a reason why thing are like that?
> Have been away from the lastest version of struts and I have some catchup to do :-)
> Thanks for your help
> Best Regards
> /David
> public class TagUtils {
>    /**
>     * The Singleton instance.
>     */
>    private static final TagUtils instance = new TagUtils();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STR-2887) TagUtils.instance is private final. Please allow to change the instance with a custom one! Maybe put it protected only!

Posted by "Wendy Smoak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2887?page=all ]

Wendy Smoak updated STR-2887:
-----------------------------

    Fix Version: 1.3.5

http://svn.apache.org/viewvc?rev=416275&view=rev

> TagUtils.instance is private final.  Please allow to change the instance with a custom one!  Maybe put it protected only!
> -------------------------------------------------------------------------------------------------------------------------
>
>          Key: STR-2887
>          URL: http://issues.apache.org/struts/browse/STR-2887
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Apps
>     Versions: 1.2.9
>     Reporter: David Gagnon
>     Priority: Trivial
>      Fix For: 1.3.5

>
> Hi all,
>  I'm running with struts 1.1 and I tried to migrate to 1.2.9 this morning.  My biggest problem is that I needed to change the code base of my 1.1 to put new feature I needeed.  One of them is that I introduced new scope like: window scope So I have
> ApplicationScope
> SessionScope
> WindowScope
> RequestScope
> PageScope.
> This allow me to have multiple browser windows on the same application and they not interfering. To do so I needed to patch the RequestUtil.lookup and now the TagUtils.lookup method.  My problem is that there is no way in.  The TagUtils defines an instance but it's a private final variable.  So no way to plug in a new TagUtils classe in there?!  For sure that would be a good feature for me :-)
> If the instance variable is at least protected and not final.  It would be possible to create my new WindowScopeEnabledTagUtils class that inherit from  tagUtils and change the instance for my new instance.  That would have been great!  Is that can be done ? Is there a reason why thing are like that?
> Have been away from the lastest version of struts and I have some catchup to do :-)
> Thanks for your help
> Best Regards
> /David
> public class TagUtils {
>    /**
>     * The Singleton instance.
>     */
>    private static final TagUtils instance = new TagUtils();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STR-2887) TagUtils.instance is private final. Please allow to change the instance with a custom one! Maybe put it protected only!

Posted by "James Mitchell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2887?page=comments#action_37589 ] 

James Mitchell commented on STR-2887:
-------------------------------------

I have added a setInstance() method (and a junit test).  

Also, unlike the current test for this class, which caches the TagUtils instance, I have grepped through the entire codebase and do not see where the framework does the same.



> TagUtils.instance is private final.  Please allow to change the instance with a custom one!  Maybe put it protected only!
> -------------------------------------------------------------------------------------------------------------------------
>
>          Key: STR-2887
>          URL: http://issues.apache.org/struts/browse/STR-2887
>      Project: Struts Action 1
>         Type: Improvement

>   Components: Apps
>     Versions: 1.2.9
>     Reporter: David Gagnon
>     Priority: Trivial

>
> Hi all,
>  I'm running with struts 1.1 and I tried to migrate to 1.2.9 this morning.  My biggest problem is that I needed to change the code base of my 1.1 to put new feature I needeed.  One of them is that I introduced new scope like: window scope So I have
> ApplicationScope
> SessionScope
> WindowScope
> RequestScope
> PageScope.
> This allow me to have multiple browser windows on the same application and they not interfering. To do so I needed to patch the RequestUtil.lookup and now the TagUtils.lookup method.  My problem is that there is no way in.  The TagUtils defines an instance but it's a private final variable.  So no way to plug in a new TagUtils classe in there?!  For sure that would be a good feature for me :-)
> If the instance variable is at least protected and not final.  It would be possible to create my new WindowScopeEnabledTagUtils class that inherit from  tagUtils and change the instance for my new instance.  That would have been great!  Is that can be done ? Is there a reason why thing are like that?
> Have been away from the lastest version of struts and I have some catchup to do :-)
> Thanks for your help
> Best Regards
> /David
> public class TagUtils {
>    /**
>     * The Singleton instance.
>     */
>    private static final TagUtils instance = new TagUtils();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira