Two comments:

1) onSuccessFromComponent, in theory, should work, but IFF "Component" doesn't also have its own onSuccess handler. 2) Normally, what I do in these situations, is to encapsulate the events with a custom event. That hides the details of component from users of the component, so even if, eg, form component events change, or if I change the guts of the component to operate differently, I can still keep that "public" contract via the custom event.

Robert

On Jun 15, 2009, at 6/156:07 PM , Piero Sartini wrote:

Hello!

I have a problem with the event bubbling stuff. A form is located inside a component which in turn is embedded inside my page. Now I am trying to process
the form in my page.

There is more than one component inside the page so there is the need to specify the component who triggers the event. Without this, everything works
fine. (example: onSuccess() works, onSuccessFromComponent() and
onSuccessFromForm() do not work.)

I would have expected that onSuccessFromComponent() works in this scenario.

Is this something that should work, do I miss something or is it a bug?

        Piero

-------8 <------------------------------------------------------------------
public abstract class Page {

        /** This works fine!! */
        void onSuccess() {
        }

        /** these fail */
        public void onSuccessFromMyComponentId() {
        }
        public void onSuccessFromMyFormId() {
                // this was just a test... normally we don't know the ID
        }
}

Page.tml:
<t:MyComponent t:id="MyComponentId"/>
<t:MyComponent t:id="MyOtherComponentId"/>

MyComponent.tml:
<t:form t:id="MyFormId" ......
-------8 <------------------------------------------------------------------


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


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

Reply via email to