Merge pull request #225 from apache/feature/WW-5360-status
[WW-5360] Documents how conversion works and the new properties of the status object
diff --git a/source/tag-developers/iterator-tag.md b/source/tag-developers/iterator-tag.md
index 31382f1..263eca4 100644
--- a/source/tag-developers/iterator-tag.md
+++ b/source/tag-developers/iterator-tag.md
@@ -7,6 +7,10 @@
---
# iterator
+{:.no_toc}
+
+* Will be replaced with the ToC, excluding the header
+{:toc}
Please make sure you have read the [Tag Syntax](tag-syntax) document and understand how tag attribute syntax works.
@@ -24,6 +28,30 @@
{% remote_file_content https://raw.githubusercontent.com/apache/struts/master/core/src/site/resources/tags/iterator-attributes.html %}
+## Conversion
+
+Values generated by the tag are subject of internal conversion mechanism. It means when generating ordinary numbers
+and then using them with `<s:property/>`, the Integers will be converted to Strings using the current locale.
+This can impact how the numbers are presented. To avoid conversion you can use the `status` object and its `countStr`
+and `indexStr` which are a String representation of the numbers. The following example demonstrates the case when
+using `fa_IR` locale:
+
+```jsp
+<s:iterator begin="1" end="3" status="status">
+ <s:property/>
+ <s:textfield id="text_%{#status.countStr}" name="test[%{#status.indexStr}]"/>
+</s:iterator>
+```
+
+```html
+۰
+<input type="text" name="test[0]" value="" id="text_1">
+۱
+<input type="text" name="test[1]" value="" id="text_2">
+۲
+<input type="text" name="test[2]" value="" id="text_3">
+```
+
## Examples
The following example retrieves the value of the getDays() method of the current object on the value stack and uses
@@ -35,8 +63,8 @@
</s:iterator>
```
-The following example uses a {@link Bean} tag and places it into the ActionContext. The iterator tag will retrieve that
-object from the `ActionContext` and then calls its `getDays()` method as above. The status attribute is also used
+The following example uses a [Bean](bean-tag) tag and places it into the `ActionContext`. The iterator tag will retrieve
+that object from the `ActionContext` and then calls its `getDays()` method as above. The status attribute is also used
to create an `IteratorStatus` object, which in this example, its `odd()` method is used to alternate row colours:
```jsp