[ https://issues.apache.org/jira/browse/WW-5352?focusedWorklogId=902327&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-902327 ]
ASF GitHub Bot logged work on WW-5352: -------------------------------------- Author: ASF GitHub Bot Created on: 29/Jan/24 15:08 Start Date: 29/Jan/24 15:08 Worklog Time Spent: 10m Work Description: kusalk commented on PR #865: URL: https://github.com/apache/struts/pull/865#issuecomment-1914890075 @lukaszlenart I was hoping you could clear up some confusion of mine as I'm not well versed in how the Struts TypeConversion functionality behaves. I'm trying to understand whether it is possible to set a collection of Model class objects on an Action where only a setter exists? For example - for the following action, ``` public class ExampleAction { // Configured with some TypeConverter public void setModels(List<Model> models) { this.models = models; } public static class Model { public String name; } } ``` is it possible to configure a TypeConverter that would allow the following request to execute as intended? `example.action?models[0].name=kusal&models[1].name=lukasz` If so, I may need to tweak the StrutsParameter mechanism to also recognise annotations on Setters (which is what this draft PR does). Issue Time Tracking ------------------- Worklog Id: (was: 902327) Time Spent: 9h 20m (was: 9h 10m) > 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 20m > 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)