[
https://issues.apache.org/jira/browse/WW-5352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17811950#comment-17811950
]
Nate edited comment on WW-5352 at 1/29/24 3:51 PM:
---------------------------------------------------
It should and indeed already does in fact work without a type converter. On an
existing Struts 6.3 project I have a page with an s:form element that contains
the following hidden fields in an iterative fashion:
<s:hidden
name="view.collection[%{#attr.row_rowNum - 1}].oid"
id="view.collection[%{#attr.row_rowNum - 1}].oid" />
Where row_rowNum is a displayTable property containing the current row number
of the table with uid row that iterates over view.collection. the full table
contains 5 of such hidden inputs alongside a dojo 1.16 select in each row. And
this is currently functional without a specific typeConverter for the element
inside the collection.
Edit: this is in response to the work log item by Lukasz.
was (Author: kerkhofs):
It should and indeed already does in fact work without a type converter. On an
existing Struts 6.3 project I have a page with an s:form element that contains
the following hidden fields in an iterative fashion:
<s:hidden
name="view.collection[%{#attr.row_rowNum - 1}].oid"
id="view.collection[%{#attr.row_rowNum - 1}].oid" />
Where row_rowNum is a displayTable property containing the current row number
of the table with uid row that iterates over view.collection. the full table
contains 5 of such hidden inputs alongside a dojo 1.16 select in each row. And
this is currently functional without a specific typeConverter for the element
inside the collection.
> Implement annotation mechanism for injectable fields via parameters
> -------------------------------------------------------------------
>
> Key: WW-5352
> URL: https://issues.apache.org/jira/browse/WW-5352
> Project: Struts 2
> Issue Type: Improvement
> Components: Core, Core Interceptors
> Reporter: Kusal Kithul-Godage
> Priority: Minor
> Fix For: 6.4.0
>
> Time Spent: 9h 40m
> Remaining Estimate: 0h
>
> struts.parameters.requireAnnotations
>
> Require an explicit annotation '@StrutsParameter' on one of:
> Getter/Setter/Field/ReturnType for injecting parameters.
>
> This mechanism is intended to be a more usable replacement for
> 'ParameterNameAware'
--
This message was sent by Atlassian Jira
(v8.20.10#820010)