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

Lukasz Lenart <[email protected]>
Newsgroups gmane.comp.jakarta.struts.devel
Message-ID <CAMopvkNX-6UUdqKNC3GyUgoYX9oe+vZTdCAQ-+vZ0etHvFK9Sw@mail.gmail.com>
I fixed the issue with missing modules. Also added a short-circuit
once "attributes" cannot be found in ValueStack - I could also add a
flag to re-enable old behaviour if needed.

wt., 8 paź 2024 o 08:40 Greg Huber <[email protected]> napisał(a):
>
> 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]
> >
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.