Re: Renaming "parameters" to "attributes" in tags
Greg Huber <[email protected]>
| Newsgroups | gmane.comp.jakarta.struts.devel |
|---|---|
| Message-ID | <[email protected]> |
Works ok. I tried it from branch feature/WW-5465-attributes. On 06/10/2024 17:57, Lukasz Lenart wrote: > Here is the PR addressing this proposal > https://github.com/apache/struts/pull/1067 > > niedz., 6 paź 2024 o 07:40 Lukasz Lenart<[email protected]> napisał(a): >> 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] >