You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Joe Toth <jo...@gmail.com> on 2007/08/12 22:55:52 UTC

Border and Template

I have a couple of WebPages that I reused for different applications,
but they need to have different Borders for each application.

Using 1.3 - Currently I create an abstract WebPage that all my pages
extend, plus I create a Border for these commonly shared pages.

So, I have to maintain the same 'template' in 2 places because add() is
now a final method.

The only solution I came up with to combine the Border and the WebPage
template is to go back into all the pages that extend the template and
create an "borderAdd()" method and use that instead of the default
add().


Any thoughts? Suggestions?


Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Border and Template

Posted by Dariusz Wojtas <dw...@gmail.com>.
Yes, this technique works perfectly, I found it recently myself.
Sample may be found here:
 
http://svn.apache.org/repos/asf/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/library

See class 'Home.java' and it's parent class.

Regards
Dariusz Wojtas



igor.vaynberg wrote:
> 
> set the border as transparent, override istransparentresolver() { return
> true; } then you can add directly to the page even though in markup it is
> inside the border.
> 
> -igor
> 
> 
> 
> On 8/12/07, Joe Toth <jo...@gmail.com> wrote:
>>
>> I have a couple of WebPages that I reused for different applications,
>> but they need to have different Borders for each application.
>>
>> Using 1.3 - Currently I create an abstract WebPage that all my pages
>> extend, plus I create a Border for these commonly shared pages.
>>
>> So, I have to maintain the same 'template' in 2 places because add() is
>> now a final method.
>>
>> The only solution I came up with to combine the Border and the WebPage
>> template is to go back into all the pages that extend the template and
>> create an "borderAdd()" method and use that instead of the default
>> add().
>>
>>
>> Any thoughts? Suggestions?
>>
>>
>> Thanks
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Border-and-Template-tf4258051.html#a12132544
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Border and Template

Posted by Igor Vaynberg <ig...@gmail.com>.
set the border as transparent, override istransparentresolver() { return
true; } then you can add directly to the page even though in markup it is
inside the border.

-igor



On 8/12/07, Joe Toth <jo...@gmail.com> wrote:
>
> I have a couple of WebPages that I reused for different applications,
> but they need to have different Borders for each application.
>
> Using 1.3 - Currently I create an abstract WebPage that all my pages
> extend, plus I create a Border for these commonly shared pages.
>
> So, I have to maintain the same 'template' in 2 places because add() is
> now a final method.
>
> The only solution I came up with to combine the Border and the WebPage
> template is to go back into all the pages that extend the template and
> create an "borderAdd()" method and use that instead of the default
> add().
>
>
> Any thoughts? Suggestions?
>
>
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>