Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WW-5360] Introduces additional countStr & indexStr to allow to ignore conversion #852

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

lukaszlenart
Copy link
Member

@lukaszlenart lukaszlenart commented Jan 21, 2024

Direct output of <s:iterator/> tag is automatically converted from Integer to String by the internal conversion mechanism. In some languages this isn't a desired behaviour as you still want to use a proper european numbers when generating HTML tags. To overcome this problem you can use countStr and indexStr (hint: propose a better naming) to avoid the conversion.

This will allow to produce a proper form:

<s:iterator begin="1" end="3" status="status">
    <s:property/>
    <s:textfield id="text_%{#status.countStr}" name="test[%{#status.indexStr}]"/>
</s:iterator>
    ۰
    <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">

Closes WW-5360

@lukaszlenart lukaszlenart marked this pull request as ready for review January 21, 2024 09:44
@asfgit asfgit force-pushed the fix/WW-5360-iterator branch 2 times, most recently from 455e7e9 to d258029 Compare January 22, 2024 07:54
Copy link

sonarcloud bot commented Jan 27, 2024

@lukaszlenart lukaszlenart merged commit b836072 into master Jan 28, 2024
9 checks passed
@lukaszlenart lukaszlenart deleted the fix/WW-5360-iterator branch January 28, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant