[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-dev
Subject:    [jira] [Comment Edited] (WW-5093) inconsistent scope for variables created with s:set and s:url
From:       "Aleksandr Mashchenko (Jira)" <jira () apache ! org>
Date:       2020-10-09 7:00:00
Message-ID: JIRA.13334507.1602189719000.16588.1602226800700 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/WW-5093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17210664#comment-17210664 \
] 

Aleksandr Mashchenko edited comment on WW-5093 at 10/9/20, 6:59 AM:
--------------------------------------------------------------------

AFAIR the scope is the same. Can you back up your claim with example?

Usually there is a little value in setting s:url or s:text to different scope, and if \
really needed it can be achieved with the s:set tag.

Var in s:property doesn't make sense at all.

Overall, these are different tags for different purposes.


was (Author: aleksandr-m):
AFAIR the scope is the same. Can you back up your claim with example?

Usually there is a little value in setting s:url or s:text to different scope, and if \
really needed it can be achieved with the s:set tag.

And var in s:property doesn't make sens at all.

Overall, these are different tags for different purposes.

> inconsistent scope for variables created with s:set and s:url
> -------------------------------------------------------------
> 
> Key: WW-5093
> URL: https://issues.apache.org/jira/browse/WW-5093
> Project: Struts 2
> Issue Type: Bug
> Components: Core Tags
> Affects Versions: 2.5.22
> Reporter: nikos dimitrakas
> Priority: Major
> Labels: scope, tag, var
> Fix For: 2.6
> 
> 
> The implementation of s:set and s:url and s:text is not consistent and not well \
> documented.   Creating a variable with s:set puts the variable in a different \
> default scope than creating a variable with s:url or s:text (with the attribute \
> var). It is also not documented what the default scope is. After testing I could \
> conclude that the scope for a variable created by s:url is request, while the \
> default of s:set is not. Furthermore, s:set offers a possibility to specify the \
> scope with an attribute, But s:url and s:text do not.   Possible options would be \
> offering the possibility to specify the scope attribute in s:url and s:text, or \
> dropping support for the var attribute for s:url and s:text and only allow s:set to \
> create variables (thus being forced to nest s:url and s:text inside an s:set). That \
> would be symmetric with how s:property does not offer the var attribute. At minimum \
> all three tags should have the same default and their default should be explicitly \
> specified in the documentation (in the tld and the online manual / tag reference)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic