
| Key: |
STR-2887
|
| Type: |
Improvement
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Trivial
|
| Assignee: |
Unassigned
|
| Reporter: |
David Gagnon
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
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();
|
|
Description
|
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();
|
Show » |
|
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.