You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Moore <pm...@yahoo.com> on 2006/08/17 10:13:07 UTC

listener desired on "For" component

Hi there --

I have a situation where I am displaying (using a For component) a list of
editable items. When the form is submitted I would like to have a listener
defined by the component containing the For component called for each iteration
through  For's body after all the components within that loop iteration have
been rewound. 

There doesn't to be any to do this gracefully. I am settling on making one
compound component as the body for the For component. This compound component
has the listener method, which is being called manually within the component's
cleanupAfterRender(cycle). It seems like there should be a better way and I was
wondering if anyone had any suggestions? 

Should I modify the For component so that a listener method could be defined?

Thanks for any ideas.

-Pat

What I would like:

<span jwcid="definesListenerA">
    <span jwcid="@For" afterIterationListener="listener:processItem">
        <span jwcid="thisThing"/>
        <span jwcid="thatThing"/>
        <span jwcid="oneMoreThing"/>
    </span>
</span>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: listener desired on "For" component

Posted by Patrick Moore <pm...@yahoo.com>.
Thanks ... I didn't think to look for another component. It doeslook like
InvokeListener is the correct thing to use.

-Pat

--- Steve Shucker <ss...@vmsinfo.com> wrote:

> Try putting an @InvokeListener component in your @For loop.
> 
> -Steve
> 
> -----Original Message-----
> From: Patrick Moore [mailto:pm24601@yahoo.com] 
> Sent: Thursday, August 17, 2006 1:13 AM
> To: Tapestry users
> Subject: listener desired on "For" component 
> 
> Hi there --
> 
> I have a situation where I am displaying (using a For component) a list of
> editable items. When the form is submitted I would like to have a listener
> defined by the component containing the For component called for each
> iteration
> through  For's body after all the components within that loop iteration have
> been rewound. 
> 
> There doesn't to be any to do this gracefully. I am settling on making one
> compound component as the body for the For component. This compound
> component
> has the listener method, which is being called manually within the
> component's
> cleanupAfterRender(cycle). It seems like there should be a better way and I
> was
> wondering if anyone had any suggestions? 
> 
> Should I modify the For component so that a listener method could be
> defined?
> 
> Thanks for any ideas.
> 
> -Pat
> 
> What I would like:
> 
> <span jwcid="definesListenerA">
>     <span jwcid="@For" afterIterationListener="listener:processItem">
>         <span jwcid="thisThing"/>
>         <span jwcid="thatThing"/>
>         <span jwcid="oneMoreThing"/>
>     </span>
> </span>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: listener desired on "For" component

Posted by Steve Shucker <ss...@vmsinfo.com>.
Try putting an @InvokeListener component in your @For loop.

-Steve

-----Original Message-----
From: Patrick Moore [mailto:pm24601@yahoo.com] 
Sent: Thursday, August 17, 2006 1:13 AM
To: Tapestry users
Subject: listener desired on "For" component 

Hi there --

I have a situation where I am displaying (using a For component) a list of
editable items. When the form is submitted I would like to have a listener
defined by the component containing the For component called for each
iteration
through  For's body after all the components within that loop iteration have
been rewound. 

There doesn't to be any to do this gracefully. I am settling on making one
compound component as the body for the For component. This compound
component
has the listener method, which is being called manually within the
component's
cleanupAfterRender(cycle). It seems like there should be a better way and I
was
wondering if anyone had any suggestions? 

Should I modify the For component so that a listener method could be
defined?

Thanks for any ideas.

-Pat

What I would like:

<span jwcid="definesListenerA">
    <span jwcid="@For" afterIterationListener="listener:processItem">
        <span jwcid="thisThing"/>
        <span jwcid="thatThing"/>
        <span jwcid="oneMoreThing"/>
    </span>
</span>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org