This is the kind of think that Block's are great at; you can have a parameter of type Block on your reusable component, and use <t:delegate to="theBlockProperty"/> in your template to include the Block's content at a specific point inside your component's template. It all just fits together at runtime.
On Fri, Mar 19, 2010 at 2:58 PM, Liliana Liu <l...@novodiagroup.com> wrote: > Hello, > > I am relatively new to Tapestry, am using 5.1.0.5 on a project, and hoping > someone can help point me in the right > direction. To reuse functionality for user signup to a web site, I have > coded a custom component that contains a form that has the common fields and > common processing including onPrepare(), onValidateForm(), and onSuccess(). > This component > has been used successfully in other pages but now I have a page that needs > to add one textfield to the form to gather > one domain specific data in order to perform its user signup. > > The intent is to handle this domain specific field and it's processing in > the page only and rely on the component for all > common processing. I have thought of a couple of options neither of which I > have gotten to work. > > 1. Somehow inject the field into the form. It looks like I can inject the > form object that's in the component into my page. > However I don't see a method on the form object to programmatically add a > TextField component to the form > 2. Remove the form declaration and the submit button from the component and > put it in the page instead. Then pass > the form object as a parameter to the component. But doing this breaks > the component, its onPrepare() > is no longer called presumably because there is no form declared in the > component. > > Any pointers would be appreciated. Thanks. > > Liliana Liu > l...@novodiagroup.com > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org