You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ya...@apache.org on 2017/12/09 11:15:09 UTC
[struts-site] branch restful updated: A few extra small fixes
This is an automated email from the ASF dual-hosted git repository.
yasserzamani pushed a commit to branch restful
in repository https://gitbox.apache.org/repos/asf/struts-site.git
The following commit(s) were added to refs/heads/restful by this push:
new 5077102 A few extra small fixes
5077102 is described below
commit 50771025fe1f7b11d37cbecf6dd7a33b4b8cf886
Author: Yasser Zamani <ya...@apache.org>
AuthorDate: Sat Dec 9 14:44:19 2017 +0330
A few extra small fixes
---
source/core-developers/action-mapper.md | 8 ++++----
source/core-developers/after-annotation.md | 4 ++--
source/core-developers/annotations.md | 4 ++--
source/core-developers/before-annotation.md | 4 ++--
source/core-developers/before-result-annotation.md | 4 ++--
source/core-developers/conversion-annotation.md | 4 ++--
source/core-developers/create-if-null-annotation.md | 4 ++--
source/core-developers/custom-validator-annotation.md | 3 +--
source/core-developers/date-range-field-validator-annotation.md | 2 +-
source/core-developers/double-range-field-validator-annotation.md | 7 +++----
source/core-developers/element-annotation.md | 4 ++--
source/core-developers/email-validator-annotation.md | 1 -
source/core-developers/input-config-annotation.md | 4 ++--
source/core-developers/int-range-field-validator-annotation.md | 4 ++--
source/core-developers/key-annotation.md | 3 +--
source/core-developers/key-property-annotation.md | 5 ++---
.../core-developers/string-length-field-validator-annotation.md | 4 ++--
source/core-developers/type-conversion-annotation.md | 2 +-
source/core-developers/validation-annotation.md | 2 +-
source/core-developers/visitor-field-validator-annotation.md | 7 +++----
20 files changed, 37 insertions(+), 43 deletions(-)
diff --git a/source/core-developers/action-mapper.md b/source/core-developers/action-mapper.md
index c97ca3f..84500d9 100644
--- a/source/core-developers/action-mapper.md
+++ b/source/core-developers/action-mapper.md
@@ -155,16 +155,16 @@ It is configured through `struts.xml`. For example, with the following entries i
/user:struts,:struts
"/>
```
-When `PrefixBasedActionMapper#getMapping(HttpServletRequest, ConfigurationManager)}` or `PrefixBasedActionMapper#getUriFromActionMapping(ActionMapping)}`
+When `PrefixBasedActionMapper#getMapping(HttpServletRequest, ConfigurationManager)` or `PrefixBasedActionMapper#getUriFromActionMapping(ActionMapping)`
is invoked, `PrefixBasedActionMapper` will check each possible prefix (url prefix terminating just before a `/`) to find
the most specific `ActionMapper` that returns a mapping when asked to map the request. If none are found, null is returned
-for both `PrefixBasedActionMapper#getMapping(HttpServletRequest, ConfigurationManager)}` and
-`PrefixBasedActionMapper#getUriFromActionMapping(ActionMapping)}` methods.
+for both `PrefixBasedActionMapper#getMapping(HttpServletRequest, ConfigurationManager)` and
+`PrefixBasedActionMapper#getUriFromActionMapping(ActionMapping)` methods.
### PrefixBasedActionProxyFactory
Prefix based factory should be used with `org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper` to use
-appropriate {@link com.opensymphony.xwork2.ActionProxyFactory} connected with given `org.apache.struts2.dispatcher.mapper.ActionMapper`.
+appropriate `com.opensymphony.xwork2.ActionProxyFactory` connected with given `org.apache.struts2.dispatcher.mapper.ActionMapper`.
Add below entry to `struts.xml` to enable the factory:
diff --git a/source/core-developers/after-annotation.md b/source/core-developers/after-annotation.md
index 0ce3c5f..c760bdd 100644
--- a/source/core-developers/after-annotation.md
+++ b/source/core-developers/after-annotation.md
@@ -8,11 +8,11 @@ parent:
# After Annotation
-Marks a action method that needs to be called after the main action method and the result was executed. Return value is ignored.
+Marks an action method that needs to be called after the main action method and the result was executed. Return value is ignored.
## Usage
-The After annotation can be applied at method level.
+The `After` annotation can be applied at method level.
## Parameters
diff --git a/source/core-developers/annotations.md b/source/core-developers/annotations.md
index 2655675..ba55111 100644
--- a/source/core-developers/annotations.md
+++ b/source/core-developers/annotations.md
@@ -17,8 +17,8 @@ This page serves as a reference for all annotations across the framework.
## Action Annotations
-Since 2.1, these annotations are provided by the [Convention Plugin](../plugins/convention/). Codebehind and Zero Config
-plugins are deprecated from 2.1 on.
+Since Struts 2.1, these annotations are provided by the [Convention Plugin](../plugins/convention/). Codebehind and Zero Config
+plugins are deprecated from Struts 2.1 on.
Action annotations are available when the framework scans the classpath for Action classes, rather than specifying
individual mappings through XML configuration. See the [Convention Plugin](../plugins/convention/) page for information
diff --git a/source/core-developers/before-annotation.md b/source/core-developers/before-annotation.md
index 67ba3c4..c050505 100644
--- a/source/core-developers/before-annotation.md
+++ b/source/core-developers/before-annotation.md
@@ -8,11 +8,11 @@ parent:
# Before Annotation
-Marks a action method that needs to be executed before the main action method.
+Marks an action method that needs to be executed before the main action method.
## Usage
-The Before annotation can be applied at method level.
+The `Before` annotation can be applied at method level.
## Parameters
diff --git a/source/core-developers/before-result-annotation.md b/source/core-developers/before-result-annotation.md
index 0c325ba..662ecf3 100644
--- a/source/core-developers/before-result-annotation.md
+++ b/source/core-developers/before-result-annotation.md
@@ -8,11 +8,11 @@ parent:
# BeforeResult Annotation
-Marks a action method that needs to be executed before the result. Return value is ignored.
+Marks an action method that needs to be executed before the result. Return value is ignored.
## Usage
-The BeforeResult annotation can be applied at method level.
+The `BeforeResult` annotation can be applied at method level.
## Parameters
diff --git a/source/core-developers/conversion-annotation.md b/source/core-developers/conversion-annotation.md
index 142d67b..3d02faa 100644
--- a/source/core-developers/conversion-annotation.md
+++ b/source/core-developers/conversion-annotation.md
@@ -12,7 +12,7 @@ A marker annotation for type conversions at Type level.
## Usage
-The Conversion annotation must be applied at Type level.
+The `Conversion` annotation must be applied at Type level.
## Parameters
@@ -27,7 +27,7 @@ The Conversion annotation must be applied at Type level.
</thead>
<tbody>
<tr>
- <td>conversion</td>
+ <td>conversions</td>
<td>no</td>
<td> </td>
<td>used for Type Conversions applied at Type level.</td>
diff --git a/source/core-developers/create-if-null-annotation.md b/source/core-developers/create-if-null-annotation.md
index ceea03f..0889ad8 100644
--- a/source/core-developers/create-if-null-annotation.md
+++ b/source/core-developers/create-if-null-annotation.md
@@ -8,11 +8,11 @@ parent:
# CreateIfNull Annotation
-Sets the CreateIfNull for type conversion.
+Sets the `CreateIfNull` for type conversion.
## Usage
-The CreateIfNull annotation must be applied at field or method level.
+The `CreateIfNull` annotation must be applied at field or method level.
## Parameters
diff --git a/source/core-developers/custom-validator-annotation.md b/source/core-developers/custom-validator-annotation.md
index 36dba80..1463378 100644
--- a/source/core-developers/custom-validator-annotation.md
+++ b/source/core-developers/custom-validator-annotation.md
@@ -8,7 +8,7 @@ parent:
# CustomValidator Annotation
-This annotation can be used for custom validators. Use the ValidationParameter annotation to supply additional params.
+This annotation can be used for custom validators. Use the `ValidationParameter` annotation to supply additional params.
## Usage
@@ -66,7 +66,6 @@ The annotation must be applied at method or type level.
```java
@CustomValidator(type ="customValidatorName", fieldName = "myField")
-
```
## Adding Parameters
diff --git a/source/core-developers/date-range-field-validator-annotation.md b/source/core-developers/date-range-field-validator-annotation.md
index f57ce81..3d242b3 100644
--- a/source/core-developers/date-range-field-validator-annotation.md
+++ b/source/core-developers/date-range-field-validator-annotation.md
@@ -96,6 +96,7 @@ The annotation must be applied at method level.
<td class='confluenceTd'>Format used to parse min/max value.</td>
</tr>
</table>
+</p>
If neither `min` nor `max` is set, nothing will be done.
@@ -103,5 +104,4 @@ If neither `min` nor `max` is set, nothing will be done.
```java
@DateRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, min = "2005/01/01", max = "2005/12/31")
-
```
diff --git a/source/core-developers/double-range-field-validator-annotation.md b/source/core-developers/double-range-field-validator-annotation.md
index 4482a9c..501ce73 100644
--- a/source/core-developers/double-range-field-validator-annotation.md
+++ b/source/core-developers/double-range-field-validator-annotation.md
@@ -8,7 +8,7 @@ parent:
# DoubleRangeFieldValidator Annotation
-This validator checks that a double field has a value within a specified range. If neither min nor max is set, nothing will be done.
+This validator checks that a double field has a value within a specified range. If neither `min` nor `max` is set, nothing will be done.
## Usage
@@ -107,15 +107,14 @@ The annotation must be applied at method level.
<td class='confluenceTd'> </td>
<td class='confluenceTd'>OGNL expression used to obtain the exclusive maximum number can be. </td>
</tr>
- </table>
+ </table> </p>
If neither `min` nor `max` is set, nothing will be done.
-The values for min and max must be inserted as String values so that "0" can be handled as a possible value.
+The values for `min` and `max` must be inserted as String values so that `"0"` can be handled as a possible value.
## Examples
```java
@DoubleRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, minInclusive = "0.123", maxInclusive = "99.987")
-
```
diff --git a/source/core-developers/element-annotation.md b/source/core-developers/element-annotation.md
index de727db..0c1ca05 100644
--- a/source/core-developers/element-annotation.md
+++ b/source/core-developers/element-annotation.md
@@ -8,11 +8,11 @@ parent:
# Element Annotation
-Sets the Element for type conversion.
+Sets the `Element` for type conversion.
## Usage
-The Element annotation must be applied at field or method level.
+The `Element` annotation must be applied at field or method level.
## Parameters
diff --git a/source/core-developers/email-validator-annotation.md b/source/core-developers/email-validator-annotation.md
index 4e98625..e2391c9 100644
--- a/source/core-developers/email-validator-annotation.md
+++ b/source/core-developers/email-validator-annotation.md
@@ -66,5 +66,4 @@ The annotation must be applied at method level.
```java
@EmailValidator(message = "Default message", key = "i18n.key", shortCircuit = true)
-
```
diff --git a/source/core-developers/input-config-annotation.md b/source/core-developers/input-config-annotation.md
index 61f1606..71829f2 100644
--- a/source/core-developers/input-config-annotation.md
+++ b/source/core-developers/input-config-annotation.md
@@ -8,11 +8,11 @@ parent:
# InputConfig Annotation
-Marks a action method that if it's not validated by `ValidationInterceptor` then execute `input` method or `input` result.
+Marks an action method that if it's not validated by `ValidationInterceptor` then execute `input` method or `input` result.
## Usage
-The InputConfig annotation can be applied at method level.
+The `InputConfig` annotation can be applied at method level.
## Parameters
diff --git a/source/core-developers/int-range-field-validator-annotation.md b/source/core-developers/int-range-field-validator-annotation.md
index c825d6f..4d8db41 100644
--- a/source/core-developers/int-range-field-validator-annotation.md
+++ b/source/core-developers/int-range-field-validator-annotation.md
@@ -8,7 +8,7 @@ parent:
# IntRangeFieldValidator Annotation
-This validator checks that a numeric field has a value within a specified range. If neither min nor max is set,
+This validator checks that a numeric field has a value within a specified range. If neither `min` nor `max` is set,
nothing will be done.
## Usage
@@ -91,6 +91,7 @@ The annotation must be applied at method level.
<td class='confluenceTd'>Enable parsing of min/max value.</td>
</tr>
</table>
+</p>
If neither `min` nor `max` is set, nothing will be done.
@@ -100,5 +101,4 @@ If neither `min` nor `max` is set, nothing will be done.
@IntRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, min = "0", max = "42")
@IntRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, minExpression = "${minValue}", maxExpression = "${maxValue}")
-
```
\ No newline at end of file
diff --git a/source/core-developers/key-annotation.md b/source/core-developers/key-annotation.md
index 557b9ca..2d548bf 100644
--- a/source/core-developers/key-annotation.md
+++ b/source/core-developers/key-annotation.md
@@ -12,7 +12,7 @@ Sets the Key for type conversion.
## Usage
-The Key annotation must be applied at field or method level.
+The `Key` annotation must be applied at field or method level.
## Parameters
@@ -42,5 +42,4 @@ The Key annotation must be applied at field or method level.
// The key property for User objects within the users collection is the <code>userName</code> attribute.
@Key( value = java.lang.Long.class )
private Map<Long, User> userMap;
-
```
diff --git a/source/core-developers/key-property-annotation.md b/source/core-developers/key-property-annotation.md
index a3208d7..61d9a14 100644
--- a/source/core-developers/key-property-annotation.md
+++ b/source/core-developers/key-property-annotation.md
@@ -8,11 +8,11 @@ parent:
# KeyProperty Annotation
-Sets the KeyProperty for type conversion.
+Sets the `KeyProperty` for type conversion.
## Usage
-The KeyProperty annotation must be applied at field or method level.
+The `KeyProperty` annotation must be applied at field or method level.
This annotation should be used with Generic types, if the key property of the key element needs to be specified.
@@ -44,5 +44,4 @@ This annotation should be used with Generic types, if the key property of the ke
// The key property for User objects within the users collection is the <code>userName</code> attribute.
@KeyProperty( value = "userName" )
protected List<User> users = null;
-
```
diff --git a/source/core-developers/string-length-field-validator-annotation.md b/source/core-developers/string-length-field-validator-annotation.md
index b815e46..6a9de73 100644
--- a/source/core-developers/string-length-field-validator-annotation.md
+++ b/source/core-developers/string-length-field-validator-annotation.md
@@ -9,7 +9,7 @@ parent:
# StringLengthFieldValidator Annotation
This validator checks that a String field is of the right length. It assumes that the field is a String.
-If neither minLength nor maxLength is set, nothing will be done.
+If neither `minLength` nor `maxLength` is set, nothing will be done.
## Usage
@@ -91,6 +91,7 @@ The annotation must be applied at method level.
<td class='confluenceTd'>OGNL expression used to obtain the maximum length the String can be. </td>
</tr>
</table>
+</p>
If neither `minLength` nor `maxLength` is set, nothing will be done.
@@ -98,5 +99,4 @@ If neither `minLength` nor `maxLength` is set, nothing will be done.
```java
@StringLengthFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, trim = true, minLength = "5", maxLength = "12")
-
```
diff --git a/source/core-developers/type-conversion-annotation.md b/source/core-developers/type-conversion-annotation.md
index 76c3987..9875348 100644
--- a/source/core-developers/type-conversion-annotation.md
+++ b/source/core-developers/type-conversion-annotation.md
@@ -23,7 +23,7 @@ This annotation is used for class and application wide conversion rules.
## Usage
-The TypeConversion annotation can be applied at property and method level.
+The `TypeConversion` annotation can be applied at property and method level.
## Parameters
diff --git a/source/core-developers/validation-annotation.md b/source/core-developers/validation-annotation.md
index 207df1e..89ab9e5 100644
--- a/source/core-developers/validation-annotation.md
+++ b/source/core-developers/validation-annotation.md
@@ -8,7 +8,7 @@ parent:
# Validation Annotation
-This annotation has been deprecated since 2.1 as its previous purpose, to define classes that support annotation validations,
+This annotation has been deprecated since Struts 2.1 as its previous purpose, to define classes that support annotation validations,
is no longer necessary.
## Usage
diff --git a/source/core-developers/visitor-field-validator-annotation.md b/source/core-developers/visitor-field-validator-annotation.md
index 9699562..9b3c0f7 100644
--- a/source/core-developers/visitor-field-validator-annotation.md
+++ b/source/core-developers/visitor-field-validator-annotation.md
@@ -9,12 +9,12 @@ parent:
# VisitorFieldValidator Annotation
The validator allows you to forward validator to object properties of your action
-using the objects own validator files. This allows you to use the ModelDriven development
+using the objects own validator files. This allows you to use the `ModelDriven` development
pattern and manage your validations for your models in one place, where they belong, next to
your model classes.
-The VisitorFieldValidator can handle either simple Object properties, Collections of Objects, or Arrays.
-The error message for the VisitorFieldValidator will be appended in front of validator messages added
+The `VisitorFieldValidator` can handle either simple Object properties, Collections of Objects, or Arrays.
+The error message for the `VisitorFieldValidator` will be appended in front of validator messages added
by the validations for the Object message.
## Usage
@@ -79,5 +79,4 @@ The annotation must be applied at method level.
```java
@VisitorFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, context = "action alias", appendPrefix = true)
-
```
--
To stop receiving notification emails like this one, please contact
['"commits@struts.apache.org" <co...@struts.apache.org>'].