Thanks, but do I have to create a HTML template for both CustomTr and CustomTd separetely? In fact, the web designer, who is not a java developper, should have to create herself the templates, shouldn't she? If yes, each time she will want to change a page, she will have to modify also the component template, won't she? What is the "normal" procedure between the web-designer and the java developper regarding component?
BW 2006/7/16, Christian Mittendorf <[EMAIL PROTECTED]>:
Hello! Go and check out the paramter element: http://tapestry.apache.org/tapestry4/UsersGuide/spec.html#spec.parameter You create your components by creating jwc and html files. And you add a parameter information to your CustomTd.jwc file: <parameter name="value" required="yes" /> Now you can access this parameter as a property using the same name in your CustomTd component: <td><span jwcid="@Insert" value="ognl:value.foo">foo</span></td> And in your CustomTr you add your td like this: <tr jwcid="[EMAIL PROTECTED]"> <td jwcid="[EMAIL PROTECTED]" value="ognl:foo.bar">...</td> </tr> Christian Am 15.07.2006 um 20:55 schrieb Blackwings: > Hello everybody, > > I'm new in Tapestry and, in fact, my boss asked me to try Tapestry > to be > able to compare with Struts in term of development time, > efficiency, etc > etc... yes, we are going to replace our old GUI web layer ;-) > > Anyway, I have a question maybe you will be able to answer : > > I would like to know how I could render a component, for example a > list of > custom <td ...></td> inside a custom <tr...></tr> component. > > <table> > <tr jwcid="[EMAIL PROTECTED]" ...> > <td class="myTdClass">Something here</td> > <td class="mySecondTdClass" >Something else here</td> > <td jwcid="[EMAIL PROTECTED]" ...>Placeholder #1</td> > <td jwcid="%remove%" ...>Placeholder #2</td> > <td jwcid="%remove%" ...>Placeholder #3</td> > </tr> > </table> > > So I want to be able to render something like that. CustomTr is > aware it > needs CustomTd and should pass some parameters to CustomTd. > CustomTd is a component which need some parameters to be render. > And I can imagine I could have another component CustomTr2 capable > to nest > the same CustomTd. > My problem is the way to defined and declare them. Is it possible > to create > only one template, a page template to define this sort of "nested > component" > > or do I have to ask the web-designer to create another template for > the > CustomTd component as well? > > I found how to create one component but not how to create a nested > component > and to pass parameters from the "parent" to the "child". > > The main question is in fact, how to create nested component that need > parameter from the parent? > > Thanks a lot > > BW --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]