You'll need to use a Struts Tag (with OGNL) to call a method with parameters. JSP's EL doesn't support calling methods with arguments.

Matt

On Jan 22, 2008, at 1:34 PM, sarat.pediredla wrote:


Hello,

My action has a method like below

public int getCommentCount(BlogPost post) {
.......
}

In my JSP, I iterate through a list of objects as follows

<s:iterator value="posts" id="post">
  ..........
</s:iterator>

How do I call the getCommentCount method inside the s:iterator passing an
instance of the current post?

${commentCount(post)} does not seem to work and I cannot find any reference on the net allowing me to call a method in my action from the JSP using the
current stack object inside an iterator?
--
View this message in context: http://www.nabble.com/Calling-action- method-with-parameters-from-JSP-tp15027710s2369p15027710.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to