You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Riyad Kalla <rk...@gmail.com> on 2008/08/06 17:01:53 UTC

Best way to create a "Root Page" that every page in your app extends

Hey guys, having a major brain-fart today... I swear I had this figured out
at one point.

I essentially want to create a RootPage (extends WebPage) that represents
the root of every page in my app. It has an associated RootPage.html file
with it that has all the DOCTYPE stuff in it, sets all the meta-tags at the
top and page title, and right inside the <body> tags, it has a:

<div wicket:id="pageBody"></div>

The idea being that every page that extends RootPage, would provide the
actual body of the page.

I know I can do this with Panels, in that every single sub-page would
actually supply a Panel with the id "pageBody" to be added, but I was
curious what the "right" way to do this is.


-- 
View this message in context: http://www.nabble.com/Best-way-to-create-a-%22Root-Page%22-that-every-page-in-your-app-extends-tp18853127p18853127.html
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: Best way to create a "Root Page" that every page in your app extends

Posted by Riyad Kalla <rk...@gmail.com>.
Igor,
Thanks for the reply, found the page (ref:
http://cwiki.apache.org/WICKET/markup-inheritance.html), read it, felt
really stupid, and am now happily making pages :)

I think I just got a little bamboozed with all the seemingly different ways
to do this, but MI is exactly the type of solution I was looking for.

Best,
Riyad


igor.vaynberg wrote:
> 
> see markup inheritance page on the wiki
> 
> -igor
> 
> On Wed, Aug 6, 2008 at 8:01 AM, Riyad Kalla <rk...@gmail.com> wrote:
>>
>> Hey guys, having a major brain-fart today... I swear I had this figured
>> out
>> at one point.
>>
>> I essentially want to create a RootPage (extends WebPage) that represents
>> the root of every page in my app. It has an associated RootPage.html file
>> with it that has all the DOCTYPE stuff in it, sets all the meta-tags at
>> the
>> top and page title, and right inside the <body> tags, it has a:
>>
>> <div wicket:id="pageBody"></div>
>>
>> The idea being that every page that extends RootPage, would provide the
>> actual body of the page.
>>
>> I know I can do this with Panels, in that every single sub-page would
>> actually supply a Panel with the id "pageBody" to be added, but I was
>> curious what the "right" way to do this is.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Best-way-to-create-a-%22Root-Page%22-that-every-page-in-your-app-extends-tp18853127p18853127.html
>> 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
>>
>>
> 
> ---------------------------------------------------------------------
> 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/Best-way-to-create-a-%22Root-Page%22-that-every-page-in-your-app-extends-tp18853127p18853506.html
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: Best way to create a "Root Page" that every page in your app extends

Posted by Igor Vaynberg <ig...@gmail.com>.
see markup inheritance page on the wiki

-igor

On Wed, Aug 6, 2008 at 8:01 AM, Riyad Kalla <rk...@gmail.com> wrote:
>
> Hey guys, having a major brain-fart today... I swear I had this figured out
> at one point.
>
> I essentially want to create a RootPage (extends WebPage) that represents
> the root of every page in my app. It has an associated RootPage.html file
> with it that has all the DOCTYPE stuff in it, sets all the meta-tags at the
> top and page title, and right inside the <body> tags, it has a:
>
> <div wicket:id="pageBody"></div>
>
> The idea being that every page that extends RootPage, would provide the
> actual body of the page.
>
> I know I can do this with Panels, in that every single sub-page would
> actually supply a Panel with the id "pageBody" to be added, but I was
> curious what the "right" way to do this is.
>
>
> --
> View this message in context: http://www.nabble.com/Best-way-to-create-a-%22Root-Page%22-that-every-page-in-your-app-extends-tp18853127p18853127.html
> 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
>
>

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