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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]