Re: Renaming "parameters" to "attributes" in tags

"Burton Rhodes" <[email protected]>
Newsgroups gmane.comp.jakarta.struts.devel
Message-ID <[email protected]>
I would argue for changing the name to "attributes" since v7 introduces 
breaking changes already, and this will avoid confusion moving forward.  
Your PR seems to work fine in my test environment (provided I changed 
some of my overridden .ftl files).

Just FYI, building the latest snapshot (PR 1067), required me to 
manually install the following modules:
struts2-sitemesh2-jakarta
struts2-velocity-tools-jsp-jakarta
struts2-velocity-tools-view-jakarta
I assume these will be included in the parent pom at some point?


Thanks,
Burton

------ Original Message ------
From "Lukasz Lenart" <[email protected]>
To "Struts Developers List" <[email protected]>
Date 10/6/2024 12:40:17 AM
Subject Renaming "parameters" to "attributes" in tags

>Hi,
>
>During investigation of issue WW-5452 [1] I discovered that
>"parameters" used in tags templates are not the same as HttpParameters
>aka "parameters" [2] - the name is just coincidence or a bad design.
>A tag instance supposed to be always on top of the ValueStack and
>evaluating "parameters" should reach the tag's "parameters" [3]
>instead of HttpParameters available via ActionContext [4]
>
>My proposal is to rename "parameters" in templates to "attributes" and
>avoid looking for "attributes" in other scopes. Or at least remove
>ActionContext lookup for "parameters" and also in other scopes (rather
>a hack than fix).
>The first approach is safer but breaks all the templates (also all
>existing plugins providing tags), yet those plugins must be updated to
>use JakartaEE anyway.
>
>Any thoughts?
>
>[1] https://issues.apache.org/jira/browse/WW-5452
>[2] https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/components/Component.java#L500-L502
>[3] https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/views/freemarker/ScopesHashModel.java#L93
>[4] https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/views/freemarker/ScopesHashModel.java#L100
>
>
>Cheers
>--
>Łukasz
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.