[ 
https://issues.apache.org/jira/browse/WW-5352?focusedWorklogId=902569&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-902569
 ]

ASF GitHub Bot logged work on WW-5352:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Jan/24 08:51
            Start Date: 30/Jan/24 08:51
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart commented on code in PR #227:
URL: https://github.com/apache/struts-site/pull/227#discussion_r1470787068


##########
source/getting-started/processing-forms.md:
##########
@@ -178,8 +179,18 @@ public class Register extends ActionSupport {
 }
 ```
 
-In the `Register` class note that we've declared an attribute named 
`personBean` of type `Person` and there is a public 
-get and set method for this object.
+In the `Register` class, note that we've declared an attribute named 
`personBean` of type `Person`, there are public 
+getter and setter methods for this object, and the getter is annotated with 
`@StrutsParameter(depth = 1)`.
+
+In the previous [Coding Struts 2 Actions](coding-actions) tutorial, we 
annotated the username <strong>setter</strong>,

Review Comment:
   `**setter**` instead of `<strong>setter</strong>`?



##########
source/getting-started/processing-forms.md:
##########
@@ -178,8 +179,18 @@ public class Register extends ActionSupport {
 }
 ```
 
-In the `Register` class note that we've declared an attribute named 
`personBean` of type `Person` and there is a public 
-get and set method for this object.
+In the `Register` class, note that we've declared an attribute named 
`personBean` of type `Person`, there are public 
+getter and setter methods for this object, and the getter is annotated with 
`@StrutsParameter(depth = 1)`.
+
+In the previous [Coding Struts 2 Actions](coding-actions) tutorial, we 
annotated the username <strong>setter</strong>,
+which took a simple String as its parameter type, with `@StrutsParameter`. In 
this example, we are using a "Bean"
+object (sometimes referred to as a DTO or model object) to encapsulate the 
form data. When we choose to use a DTO
+instead of a primitive, String, or other TypeConverter supported object, we 
must annotate the <strong>getter</strong>

Review Comment:
   `**setter**` instead of `<strong>setter</strong>`?



##########
source/security/index.md:
##########
@@ -113,8 +113,75 @@ header to each JSP file
 <%@ page contentType="text/html; charset=UTF-8" %>
 ```
 
+### Defining and annotating your Action parameters
+
+> Note: Since 6.4 using `struts.parameters.requireAnnotations=true`. Or by 
default from 7.0.

Review Comment:
   Do we have a ticket to enable this by default in S7?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 902569)
    Time Spent: 10.5h  (was: 10h 20m)

> 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: 10.5h
>  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)

Reply via email to