Try giving your MyLayout component an id in MyPage.tml and use that id in
the event handler name. You can't reference the id of the form component
because it's not a direct child of the page. When an event bubbles up, it
will appear to be coming from the immediate child. I think you can even omit
the id and just have Object onSuccess(), provided there isn't any other form
on the page.

Benny

On Tue, Jun 8, 2010 at 7:57 AM, Paul Stanton <p...@mapshed.com.au> wrote:

> "Note that events that are not handled by a component will bubble up to the
> component's container"
>
> I'm a little confused because I thought this meant I could have a component
> containing components and handle the events from the root container aka the
> page ?
>
> eg
>
> MyLayout.tml
> ...
> <t:form t:id="myForm">
>   <t:body />
>   <t:submit t:id="mySubmit" />
> </t:form>
> ...
>
> MyPage.tml
> <html t:type="mylayout" ...>
>   <p>some content</p>
> </html>
>
> MyPage.java
> ...
> Object onSuccessFromMyForm()
> {
>   LOG.debug("onSuccessFromMyForm");
> }
> ...
>
> Should this listener get called or should I get :
> Request event 'success' (on component MyPage:myForm.success) was not
> handled; you must provide a matching event handler method in the component
> or in one of its containers.
>
> ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to