struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Lewis <>
Subject ognl: calling action method inside iterator tag
Date Fri, 21 May 2010 23:10:05 GMT
Wondering if it's possible (struts From my testing it
doesn't appear possible to to call an action method from inside an
iterator tag. I can't find any documentation on it so hoping an
experienced user can shed some light on this mystery. I can call the
method fine outside the iterator but inside the call is masked. It's
odd because a property reference on the action is returned in the
iterator but not my method call. Below is my code fragment. The call
to getErrorCount never makes it to the action but the later call to
fileSubmissionErrors.size is resolved which doesn't make sense to me.
One is a property on the action the other a method. If it doesn't work
I suppose I can push a utility object on the action context and
reference it inside the iterator instead of keeping the utility method
on the action class. Thanks for any help.


			<s:iterator value="%{fileSubmissionErrors}" status="errorStatus">
                        <s:set var="errorCount"
                        <td style="vertical-align:top;"
value="%{ + ' (' + #errorCount + ')'}"/>


                        <s:property value="errorMessage"/>

                    <s:if test="%{#errorStatus.first}">
                        <td style="vertical-align:top;"
                            TODO: calculate penalty
                <s:set name="currentCategory" value=""/>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message