Thanks - nice and short answer Daniel :)

But I changed my method to:

public List getTags(Long postId) {
       return getTagManager().getTagsByPostId(postId, 1);
   }

and I am testing it with:
     <span jwcid="@For" source="ognl:tags(2l)" value="ognl:tag">
     <span jwcid="@Insert" value="ognl:tag.name"></span>
And I keep getting this error:
java.lang.NoSuchMethodException tags(java.lang.Long)

I did try changing my method parameter to a primitive type (long postId) and source="ognl:tags(post.id)" but I still get the
same exception. Am I missing something here?


Daniel Lydiard wrote:

ognl:myMethod(tag.id)


----- Original Message ----- From: "Nima Boustanian" <[EMAIL PROTECTED]>
To: "Tapestry users" <tapestry-user@jakarta.apache.org>
Sent: Monday, March 13, 2006 1:38 AM
Subject: [Newb] Sending arguments via ognl


Hey all

How do you send arguments to methods via ognl? I have something like this:

<tr jwcid="@For" source="ognl:posts" value="ognl:post" class="tableheader">
                <tr>
<td><span jwcid="@Insert" value="ognl:post.title">Post title</span></td>
                </tr>
                <span jwcid="@For" source="ognl:tags" value="ognl:tag">
                    <span jwcid="@Insert" value="ognl:tag.id"></span>
               </span>


Now I want to for each loop in the second For statement send the tag.id to a method in my
corresponding Java class. How can this be done?

Thanks!

---------------------------------------------------------------------
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]





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

Reply via email to