Konstantin, Can you give me an example?
thx bjorn Konstantin Ignatyev wrote: > > Had the same problem when I started with T after > spending too much time with Struts. > > In T Layout is usually done upside down compared to > struts: layout is handled by Border component that is > wrapper to the page content. > > Feels weird initially but works well. > > --- bjornharvold <[EMAIL PROTECTED]> wrote: > >> >> Ok, I've been barking up a tree the whole day... and >> I'm not even sure it's >> the wrong one. >> >> I want to be able to do real component templating >> like struts has it's >> tiles. So my page (CoolPage) would look something >> like this: >> <t:layout/> >> >> .. a one liner >> >> My CoolPage.java would have some string properties >> referring to components >> that it would inject into layout. It also extends an >> abstract class which >> has the default template associated with it >> (Layout): >> >> class CoolPage extends AbstractPage { >> @Component(parameters{"navbar=coolnavbar", >> "header=coolheader"}) >> private Layout _layout; >> >> private String _coolnavbar = "navbarComponentName" >> private String _coolheader = "headerComponentName" >> >> etc... >> } >> >> The component names might be delegated down several >> levels of components to >> whatever component needs that specific information. >> >> Then Layout.html would look something like: >> <div t:type="navbar"/> >> >> Layout.java looks like this: >> class Layout { >> private String _navbar; >> >> accessors here >> } >> >> The problem occurs because Layout.html does NOT grab >> the injected string >> names put resolves the component to be of type >> navbar which does not exist. >> >> I am doing this because the look-and-feel of the >> application carries 3 >> layers of components. The layers have just been >> created to wrap the >> components in Yahoo UI divs mostly. I don't want to >> have to redo the default >> layout on every tapestry page if something >> changes.That's why i am trying to >> keep all that in one layout and inject components >> into the layout. The >> layout class doesn't know what component goes where, >> it should just hold a >> basket of injected components and the template >> should know where to put the >> components. >> >> Any ideas?... or is there a better way? >> -- >> View this message in context: >> > http://www.nabble.com/Templating-with-Tapestry-5-tf3659025.html#a10223765 >> Sent from the Tapestry - User mailing list archive >> at Nabble.com. >> >> >> > --------------------------------------------------------------------- >> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> > > > Konstantin Ignatyev > > > > > PS: If this is a typical day on planet earth, humans will add fifteen > million tons of carbon to the atmosphere, destroy 115 square miles of > tropical rainforest, create seventy-two miles of desert, eliminate between > forty to one hundred species, erode seventy-one million tons of topsoil, > add 2,700 tons of CFCs to the stratosphere, and increase their population > by 263,000 > > Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs > a Strategy for Reforming Universities and Public Schools. New York: > State University of New York Press, 1997: (4) (5) (p.206) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Templating-with-Tapestry-5-tf3659025.html#a10224896 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]