Hi, If you're looking like:
page.tml: <t:mycomponent t:id="foo"/> mycomponent.tml: <t:form> ... </t:form> Then, if you don't catch the form event within mycomponent, it will bubble up and appear as if it came from mycomponent, so the event handler in page.tml would look like: onSubmitFromFoo() { } So you don't need to worry about making a dynamic id for the form within Wizard. Now, if your wizard has multiple forms and you need each of those to bubble separately, then your best bet is to handle the event from within your Wizard component and then to generate a new event with the same information. Then you could have a "submitFormX" event and a "submitFormY" event. In either case, it will bubble up as an event from "foo" (where foo is the id of the component in page.tml). HTH, Robert On Nov 7, 2012, at 11/79:47 AM , nquirynen wrote: > Ok I think I found the answer: Event bubbling > > Now my bigger problem is that I can't give the Form component inside the > Wizard component a dynamic id, because component ids are static. > > What I was trying: (doesn't work) > > Wizard.tml > ------------ > > <t:Form t:id="${formId}"> > ... > </t:Form> > > Wizard.java > ------------- > > public String getFormId() { > return clientId+"Form"; > } > > boolean onSuccess() { // --> Event bubbling > return false; > } > > Page.tml > ---------- > > <t:Wizard t:id="wizard"> > ... > </t:Wizard> > > Page.class > ------------ > > void onSuccessFromWizardForm() { > ... > } > > > I hope this shows what I am trying. > > Nathan > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/catch-events-from-Form-in-component-tp5717772p5717775.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > 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