Hi,
I'm new to Tacos (and Tapestry) and I'm trying to make some forms for
adding/editing inter-related objects. What I'm trying to do is probably
very simple, but I'm missing something to get it all working.
Here's a simplified example: I have a BlogPost and BlogPostImage classes
and I want to create a single form that will allow me to specify the
fields of the BlogPost and add any number of BlogPostImage objects to
that BlogPost.
I was able to take the AjaxForm examples that use "notes" and get
something like that to work for adding/editing my BlogPostImage objects,
but I can't seem to figure the "right" way to associate those
BlogPostImage objects with my BlogPost.
I have:
<property name="blogPost" persist="session"/>
in my .page file.
In my .html template file I have something like this for adding new
(empty) BlogPostImage object:
<a jwcid="@tacos:AjaxDirectLink" listener="listener:doAddImage"
updateComponents="ognl:{'images'}">Add Image</a>
The problem is that in the doAddImage() method, the getBlogPost() always
returns null. So, I guess my question is: How do I make that blogPost
available when I invoke the AjaxDirectLink? I thought that this would
happen automatically since it was set to persist. Do I have to pass it
as a parameter to the doAddImage() listener method? Hopefully not ...
I hope my question makes some sense. Thanks in advance for any tips.
Hans
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel