Thanks, I'll look into the example. -----Original Message----- From: Yunhua Sang [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 4:35 PM To: Tapestry users Subject: Re: T4: Newbie's questions
Hi Xiahong, For Layout management, there is a example in Workbench demo: src\Workbench\src\context\WEB-INF\Border.html You may have better sense after you take a look of this page. Cheers, Yunhua On Jan 10, 2008 2:26 PM, Ulrich Stärk <[EMAIL PROTECTED]> wrote: > Zheng, Xiahong schrieb: > > Hi, > > > > I am exploring Tapestry (currently looking at 4.1.4 snapshot). So far, > > the experience has been very positive. I was able to convert a Struts > > based application to Tapestry4 in just a couple days. However, I still > > need answer to the following questions, > > > > 1) Layout management: I couldn't find a documented solution to replace > > tiles used by the old application. > > I'm no Struts expert but AFAICR tiles are just some kind of reusable > templates. In Tapestry every component you write can be compared with a > tile. Just write your component (with or without a template) and reuse > it anywhere in your projects. > To manage a common layout on all pages you write a so called Border > component which contains layout common to all pages and that contains > the RenderBody component. If you then wrap your page's components within > your Border component, the content of your Border component is > rendered around them. Look here for an example: > http://tapestry.apache.org/tapestry4.1/components/general/renderbody.html > > > > > 2) Dynamic attribute value generation: Something like the following you > > can do with JSP > > > > <input type="submit" value="${button. value}"/> > > > > How do I achieve this in Tapestry? Is there a component I can use to > > generate dynamic content as value for any arbitrary attribute of an HTML > > element? > > In Tapestry you do that with some OGNL expression. Your example would be > something like <input jwcid="@Submit" value="ognl:pageProperty" /> which > would label your button according to a call of getPageProperty() on your > page class. > > Cheers, > > Uli > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]