Re: [Wicket-user] Can I have multple template for single class?

2006-12-17 Thread Carfield Yim
On 12/15/06, Erik van Oosten [EMAIL PROTECTED] wrote: Hi Carfield, Try something like: public Logon() { setVariant(Boolean.valueOf(getRequest().getParameter(isliteversion)) ? lite : normal); } Just found out we need to overload method getVariation() instead. By the way, may be we can

Re: [Wicket-user] Can I have multple template for single class?

2006-12-17 Thread Erik van Oosten
You could that. However, if you follow a Wicket generated link you loose the parameter. Better aproach is to use style. Either overload Session.getStyle() or call Session.setStyle() (note: I've also never used this :) ). For the rest this works the same as variants. Regards, Erik.

[Wicket-user] Can I have multple template for single class?

2006-12-15 Thread Carfield Yim
The choice to use which from code? Like public Class Logon extends WebPage { public Logon() { if(true.equals(getRequest().getParameter(isliteversion))) // choose template 1 else // choose template 2 } }

Re: [Wicket-user] Can I have multple template for single class?

2006-12-15 Thread Erik van Oosten
Hi Carfield, Try something like: public Logon() { setVariant(Boolean.valueOf(getRequest().getParameter(isliteversion)) ? lite : normal); } Regards, Erik. Carfield Yim schreef: The choice to use which from code? Like public Class Logon extends WebPage { public Logon() {

Re: [Wicket-user] Can I have multple template for single class?

2006-12-15 Thread Carfield Yim
Then it will refer to lite.html and normal.html?? On 12/15/06, Erik van Oosten [EMAIL PROTECTED] wrote: Hi Carfield, Try something like: public Logon() { setVariant(Boolean.valueOf(getRequest().getParameter(isliteversion)) ? lite : normal); } Regards, Erik. Carfield Yim

Re: [Wicket-user] Can I have multple template for single class?

2006-12-15 Thread Erik van Oosten
No, its Logon_lite.html and Logon_normal.html. You can also still use i18n and style versions. I forgot the exact order but then you'll get files like Logon_en_lite_green.html for English, variant lite and style green. Regards, Erik. Carfield Yim schreef: Then it will refer to lite.html