Re: Wicket as a templating engine
Interesting. I may try to make a generic wicket:insert=quot;abc.xyzquot; tag that uses the page's default property model to resolve the abc.xyz. Will this work? Two other cool things I'm looking for: 1) Does wicket:extend support a codeBehind attribute? Say I have 20 stateless pages and I want them all to extend one BasePage and then use my wicket:insert tag for the fairly simple dynamic stuff. 2) To avoid tag soup, I don't want things like if statements or loops in the templates. However, I would like to have wicket:insert support property model values that resolve to collections. So can someone suggest a way to use repeaters in a generic way? Something like this: wicket:insert=quot;addressListquot; item=quot;addressquot; wicket:insert=quot;address.firstNamequot;/br/ /wicket:insert If I can get this much working, I can wicket for the entire site! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-as-a-templating-engine-tp4399165p4399701.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket as a templating engine
I'm using wicket page inheritance to take care of consistent look and feel for pages but I'm stuck on one detail... In the markup for a WebPage, I need to insert dynamic text in lots of places. What is the closest wicket has to something like this: htmlbodyadd text here wicket:call=quot;theThingquot;, and also here wicket:call=quot;theThingquot;, and in a few other places too./body/html class ExamplePage extends WebPage{ String xyz; ... public String getTheThing(){ return xyz + new Date().toString(); } } I was thinking adding a label and turning off the tags, or maybe use wicket:message somehow? I am looking for a concise way to do it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-as-a-templating-engine-tp4399165p4399165.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket as a templating engine
write your own tag handler. use wicket:message as a template. see WicketMessageResolver and WicketMessageTagHandler -igor On Fri, Feb 17, 2012 at 8:36 PM, pkc pkci...@gmail.com wrote: I'm using wicket page inheritance to take care of consistent look and feel for pages but I'm stuck on one detail... In the markup for a WebPage, I need to insert dynamic text in lots of places. What is the closest wicket has to something like this: htmlbodyadd text here wicket:call=quot;theThingquot;, and also here wicket:call=quot;theThingquot;, and in a few other places too./body/html class ExamplePage extends WebPage{ String xyz; ... public String getTheThing(){ return xyz + new Date().toString(); } } I was thinking adding a label and turning off the tags, or maybe use wicket:message somehow? I am looking for a concise way to do it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-as-a-templating-engine-tp4399165p4399165.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org