Maybe he needs to use AjaxLinkSubmit for this.
But I'd need to see the code to know for sure.

--
Ing. Leonardo Quijano Vincenzi
DTQ Software
Web Application Design and Programming
http://www.dtqsoftware.com


Jesse Kuhnert wrote:
It's up to you, but when you use something like Ajax"Direct"Link it will invoke your method directly, bypassing most of the standard rendering model.

If you have a blogPost object bound to a property which is persisted to your session then it should be available to you in your method. Are you sure this blogPost object has been set on your property at least once with a non null object?

On 4/17/06, *Hans L* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    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
    <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>
    _______________________________________________
    Tacos-devel mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/tacos-devel
    <https://lists.sourceforge.net/lists/listinfo/tacos-devel>




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://opennotion.com





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

Reply via email to