You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Beer <da...@gmail.com> on 2013/03/08 15:17:34 UTC

Page Hierachy and Packages

Hi All

I am new Wicket and like what I have found so far. My problem is that I 
have created a few pages and forms and placed them in a package named 
"auth". I can navigate to the pages easily but they don't seem to 
inherite the CSS from the BasePage which is in a different package. Also 
any links to the HomePage which is in the default package is not found.

My BasePage HTML looks like the following:

<html xmlns="http://www.w3.org/1999/xhtml"
       
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"
       xml:lang="en"
       lang="en">
   <head>
     <wicket:head>
       <wicket:link>
         <link rel="stylesheet" type="text/css" href="style.css"/>
       </wicket:link>
     </wicket:head>
   </head>
   <body>
     <div id="container">
       <div id="header">
         <header wicket:id="headerpanel"/>
       </div>
       <div class="content_container">
         <wicket:child/>
       </div>
       <div id="footer">
         <footer wicket:id="footerpanel" />
       </div>
     </div>
   </body>
</html>

My AdminPage which is in the auth package is never finds the css file 
declared in the base page.

My project structure is as follows:

src/main/java/example/BasePage and HomePage
src/main/java/example/auth/AdminPage and SignInPage and SignOutPage

<html xmlns:wicket="http://wicket.apache.org">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <title>AdminPage</title>
   </head>
   <body>
     <wicket:extend>
       <h2>Welcome ADMIN!</h2>
       <p>
         This page should only be accessible if you are signed in as an 
administrator.
       </p>
       <p>
         <wicket:link><a href="HomePage.html">Home</a></wicket:link><br/>
         <wicket:link><a href="SignOutPage.html">Sign Out</a></wicket:link>
       </p>
     </wicket:extend>
   </body>
</html>

I mount the pages in the xxApplication class as follows:

mountPage("/Home", HomePage.class);
mountPage("/guest-list", GuestListPage.class);
mountPage("/auth/adminpage", AdminPage.class);
mountPage("/auth/signin", SignInPage.class);
mountPage("/auth/signout", SignOutPage.class);

How can fix the navigation and the location of the css file so that it 
is found. The css file is located the Webapps dir.

Thanks

David

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


Re: Page Hierachy and Packages

Posted by David Beer <da...@gmail.com>.
Hi Nick

Thanks for replying. Yes all pages extend my BasePage and I use the the
<wicket:extend> tag in the html. I get the page content as expected, the
css is not applied as it is looking for it in the same package as Sven
pointed out.


On 8 March 2013 14:33, Nick Pratt <nb...@gmail.com> wrote:

> Do the pages in your auth package inherit from your BasePage class?  In
> your auth package pages markup, do you have <wicket:extend> tags?
>
> Nick
>
> On Fri, Mar 8, 2013 at 9:17 AM, David Beer <da...@gmail.com> wrote:
>
>> Hi All
>>
>> I am new Wicket and like what I have found so far. My problem is that I
>> have created a few pages and forms and placed them in a package named
>> "auth". I can navigate to the pages easily but they don't seem to inherite
>> the CSS from the BasePage which is in a different package. Also any links
>> to the HomePage which is in the default package is not found.
>>
>> My BasePage HTML looks like the following:
>>
>> <html xmlns="http://www.w3.org/1999/**xhtml<http://www.w3.org/1999/xhtml>
>> "
>>       xmlns:wicket="http://wicket.**apache.org/dtds.data/wicket-**
>> xhtml1.4-strict.dtd<http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd>
>> "
>>       xml:lang="en"
>>       lang="en">
>>   <head>
>>     <wicket:head>
>>       <wicket:link>
>>         <link rel="stylesheet" type="text/css" href="style.css"/>
>>       </wicket:link>
>>     </wicket:head>
>>   </head>
>>   <body>
>>     <div id="container">
>>       <div id="header">
>>         <header wicket:id="headerpanel"/>
>>       </div>
>>       <div class="content_container">
>>         <wicket:child/>
>>       </div>
>>       <div id="footer">
>>         <footer wicket:id="footerpanel" />
>>       </div>
>>     </div>
>>   </body>
>> </html>
>>
>> My AdminPage which is in the auth package is never finds the css file
>> declared in the base page.
>>
>> My project structure is as follows:
>>
>> src/main/java/example/BasePage and HomePage
>> src/main/java/example/auth/**AdminPage and SignInPage and SignOutPage
>>
>> <html xmlns:wicket="http://wicket.**apache.org <http://wicket.apache.org>
>> ">
>>   <head>
>>     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>>     <title>AdminPage</title>
>>   </head>
>>   <body>
>>     <wicket:extend>
>>       <h2>Welcome ADMIN!</h2>
>>       <p>
>>         This page should only be accessible if you are signed in as an
>> administrator.
>>       </p>
>>       <p>
>>         <wicket:link><a href="HomePage.html">Home</a><**
>> /wicket:link><br/>
>>         <wicket:link><a href="SignOutPage.html">Sign Out</a></wicket:link>
>>       </p>
>>     </wicket:extend>
>>   </body>
>> </html>
>>
>> I mount the pages in the xxApplication class as follows:
>>
>> mountPage("/Home", HomePage.class);
>> mountPage("/guest-list", GuestListPage.class);
>> mountPage("/auth/adminpage", AdminPage.class);
>> mountPage("/auth/signin", SignInPage.class);
>> mountPage("/auth/signout", SignOutPage.class);
>>
>> How can fix the navigation and the location of the css file so that it is
>> found. The css file is located the Webapps dir.
>>
>> Thanks
>>
>> David
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

Re: Page Hierachy and Packages

Posted by Nick Pratt <nb...@gmail.com>.
Do the pages in your auth package inherit from your BasePage class?  In
your auth package pages markup, do you have <wicket:extend> tags?

Nick

On Fri, Mar 8, 2013 at 9:17 AM, David Beer <da...@gmail.com> wrote:

> Hi All
>
> I am new Wicket and like what I have found so far. My problem is that I
> have created a few pages and forms and placed them in a package named
> "auth". I can navigate to the pages easily but they don't seem to inherite
> the CSS from the BasePage which is in a different package. Also any links
> to the HomePage which is in the default package is not found.
>
> My BasePage HTML looks like the following:
>
> <html xmlns="http://www.w3.org/1999/**xhtml <http://www.w3.org/1999/xhtml>
> "
>       xmlns:wicket="http://wicket.**apache.org/dtds.data/wicket-**
> xhtml1.4-strict.dtd<http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd>
> "
>       xml:lang="en"
>       lang="en">
>   <head>
>     <wicket:head>
>       <wicket:link>
>         <link rel="stylesheet" type="text/css" href="style.css"/>
>       </wicket:link>
>     </wicket:head>
>   </head>
>   <body>
>     <div id="container">
>       <div id="header">
>         <header wicket:id="headerpanel"/>
>       </div>
>       <div class="content_container">
>         <wicket:child/>
>       </div>
>       <div id="footer">
>         <footer wicket:id="footerpanel" />
>       </div>
>     </div>
>   </body>
> </html>
>
> My AdminPage which is in the auth package is never finds the css file
> declared in the base page.
>
> My project structure is as follows:
>
> src/main/java/example/BasePage and HomePage
> src/main/java/example/auth/**AdminPage and SignInPage and SignOutPage
>
> <html xmlns:wicket="http://wicket.**apache.org <http://wicket.apache.org>
> ">
>   <head>
>     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>     <title>AdminPage</title>
>   </head>
>   <body>
>     <wicket:extend>
>       <h2>Welcome ADMIN!</h2>
>       <p>
>         This page should only be accessible if you are signed in as an
> administrator.
>       </p>
>       <p>
>         <wicket:link><a href="HomePage.html">Home</a><**/wicket:link><br/>
>         <wicket:link><a href="SignOutPage.html">Sign Out</a></wicket:link>
>       </p>
>     </wicket:extend>
>   </body>
> </html>
>
> I mount the pages in the xxApplication class as follows:
>
> mountPage("/Home", HomePage.class);
> mountPage("/guest-list", GuestListPage.class);
> mountPage("/auth/adminpage", AdminPage.class);
> mountPage("/auth/signin", SignInPage.class);
> mountPage("/auth/signout", SignOutPage.class);
>
> How can fix the navigation and the location of the css file so that it is
> found. The css file is located the Webapps dir.
>
> Thanks
>
> David
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Page Hierachy and Packages

Posted by David Beer <da...@gmail.com>.
Hi All

Thanks for your replies I have decided to write the navigational part of 
the site in a separate panel and add it to the BasePage using a 
repeating view and avoiding Wicket Link.

Thanks

David
On 10/03/13 12:53, Bas Gooren wrote:
> Hi David,
>
> The auto linking using <wicket:link> resolves based on actual location 
> on disk if I'm not mistaken.
>
> In other words: if you want to link to the homepage from inside the 
> auth package, you should use:
>
> ../HomePage.html
>
> This means the link will also work if you are previewing the html 
> outside of wicket.
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>
> Op 8-3-2013 18:02, schreef David Beer:
>> Hi Sven
>>
>> Will try and be more clear. I have fixed the css styling thanks to your
>> suggestion on moving the link out of wicket:head.
>>
>> My question is that if I am navigating From my AdminPage in my auth 
>> package
>> to the HomePage in the package above how do I add the link in the 
>> HTML. As
>> Then AdminPage is trying to link to a file in the same package using
>> <wicket:link>?
>>
>> Thanks
>>
>> David
>>
>>
>> On 8 March 2013 16:53, Sven Meier <sv...@meiers.net> wrote:
>>
>>> Hi David,
>>>
>>> if your post was a question, I didn't understand it.
>>>
>>> Regards
>>> Sven
>>>
>>>
>>> On 03/08/2013 05:15 PM, David Beer wrote:
>>>
>>>> Hi Sven
>>>>
>>>> Thanks for this so it is better to add the css outside of the
>>>> <wicket:head>
>>>> like you would with normal html pages. Is it possible to get the
>>>> navigation
>>>> to go up a level so to navigate to HomePage actually points to the
>>>> HomePage
>>>> in the correct package and as mounted at HomePage.
>>>>
>>>> Thanks
>>>>
>>>> David
>>>>
>>>>
>>>> On 8 March 2013 14:39, Sven Meier <sv...@meiers.net> wrote:
>>>>
>>>>   Hi,
>>>>> if you keep style.css in your web root, you'll have to remove the
>>>>> <wicket:link> tag in your markup.
>>>>> Otherwise AutoLinkResolver will think yoy're keeping the css 
>>>>> beside your
>>>>> component.
>>>>>
>>>>> Sven
>>>>>
>>>>>
>>>>> On 03/08/2013 03:17 PM, David Beer wrote:
>>>>>
>>>>>   Hi All
>>>>>> I am new Wicket and like what I have found so far. My problem is 
>>>>>> that I
>>>>>> have created a few pages and forms and placed them in a package 
>>>>>> named
>>>>>> "auth". I can navigate to the pages easily but they don't seem to
>>>>>> inherite
>>>>>> the CSS from the BasePage which is in a different package. Also any
>>>>>> links
>>>>>> to the HomePage which is in the default package is not found.
>>>>>>
>>>>>> My BasePage HTML looks like the following:
>>>>>>
>>>>>> <html 
>>>>>> xmlns="http://www.w3.org/1999/****xhtml<http://www.w3.org/1999/**xhtml>
>>>>>> <http://www.w3.org/**1999/xhtml <http://www.w3.org/1999/xhtml>>
>>>>>> "
>>>>>> xmlns:wicket="http://wicket.****apache.org/dtds.data/wicket-**<http://apache.org/dtds.data/wicket-**> 
>>>>>>
>>>>>> xhtml1.4-strict.dtd<http://**wicket.apache.org/dtds.data/**
>>>>>> wicket-xhtml1.4-strict.dtd<http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd> 
>>>>>>
>>>>>> "
>>>>>>         xml:lang="en"
>>>>>>         lang="en">
>>>>>>     <head>
>>>>>>       <wicket:head>
>>>>>>         <wicket:link>
>>>>>>           <link rel="stylesheet" type="text/css" href="style.css"/>
>>>>>>         </wicket:link>
>>>>>>       </wicket:head>
>>>>>>     </head>
>>>>>>     <body>
>>>>>>       <div id="container">
>>>>>>         <div id="header">
>>>>>>           <header wicket:id="headerpanel"/>
>>>>>>         </div>
>>>>>>         <div class="content_container">
>>>>>>           <wicket:child/>
>>>>>>         </div>
>>>>>>         <div id="footer">
>>>>>>           <footer wicket:id="footerpanel" />
>>>>>>         </div>
>>>>>>       </div>
>>>>>>     </body>
>>>>>> </html>
>>>>>>
>>>>>> My AdminPage which is in the auth package is never finds the css 
>>>>>> file
>>>>>> declared in the base page.
>>>>>>
>>>>>> My project structure is as follows:
>>>>>>
>>>>>> src/main/java/example/BasePage and HomePage
>>>>>> src/main/java/example/auth/****AdminPage and SignInPage and 
>>>>>> SignOutPage
>>>>>>
>>>>>> <html xmlns:wicket="http://wicket.****apache.org 
>>>>>> <http://apache.org> <
>>>>>> http://wicket.apache.org>
>>>>>>
>>>>>> ">
>>>>>>     <head>
>>>>>>       <meta http-equiv="Content-Type" content="text/html;
>>>>>> charset=UTF-8"/>
>>>>>>       <title>AdminPage</title>
>>>>>>     </head>
>>>>>>     <body>
>>>>>>       <wicket:extend>
>>>>>>         <h2>Welcome ADMIN!</h2>
>>>>>>         <p>
>>>>>>           This page should only be accessible if you are signed 
>>>>>> in as an
>>>>>> administrator.
>>>>>>         </p>
>>>>>>         <p>
>>>>>>           <wicket:link><a href="HomePage.html">Home</a><****
>>>>>>
>>>>>> /wicket:link><br/>
>>>>>>           <wicket:link><a href="SignOutPage.html">Sign
>>>>>> Out</a></wicket:link>
>>>>>>         </p>
>>>>>>       </wicket:extend>
>>>>>>     </body>
>>>>>> </html>
>>>>>>
>>>>>> I mount the pages in the xxApplication class as follows:
>>>>>>
>>>>>> mountPage("/Home", HomePage.class);
>>>>>> mountPage("/guest-list", GuestListPage.class);
>>>>>> mountPage("/auth/adminpage", AdminPage.class);
>>>>>> mountPage("/auth/signin", SignInPage.class);
>>>>>> mountPage("/auth/signout", SignOutPage.class);
>>>>>>
>>>>>> How can fix the navigation and the location of the css file so 
>>>>>> that it
>>>>>> is
>>>>>> found. The css file is located the Webapps dir.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> David
>>>>>>
>>>>>> ------------------------------****----------------------------**
>>>>>> --**---------
>>>>>> To unsubscribe, e-mail: 
>>>>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>>>> <us...@wicket.apache.org> 
>>>>>>
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>> ------------------------------****----------------------------**
>>>>> --**---------
>>>>> To unsubscribe, e-mail: 
>>>>> users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>>> <us...@wicket.apache.org> 
>>>>>
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>> ------------------------------**------------------------------**--------- 
>>>
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apache.org<us...@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


Re: Page Hierachy and Packages

Posted by Bas Gooren <ba...@iswd.nl>.
Hi David,

The auto linking using <wicket:link> resolves based on actual location 
on disk if I'm not mistaken.

In other words: if you want to link to the homepage from inside the auth 
package, you should use:

../HomePage.html

This means the link will also work if you are previewing the html 
outside of wicket.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 8-3-2013 18:02, schreef David Beer:
> Hi Sven
>
> Will try and be more clear. I have fixed the css styling thanks to your
> suggestion on moving the link out of wicket:head.
>
> My question is that if I am navigating From my AdminPage in my auth package
> to the HomePage in the package above how do I add the link in the HTML. As
> Then AdminPage is trying to link to a file in the same package using
> <wicket:link>?
>
> Thanks
>
> David
>
>
> On 8 March 2013 16:53, Sven Meier <sv...@meiers.net> wrote:
>
>> Hi David,
>>
>> if your post was a question, I didn't understand it.
>>
>> Regards
>> Sven
>>
>>
>> On 03/08/2013 05:15 PM, David Beer wrote:
>>
>>> Hi Sven
>>>
>>> Thanks for this so it is better to add the css outside of the
>>> <wicket:head>
>>> like you would with normal html pages. Is it possible to get the
>>> navigation
>>> to go up a level so to navigate to HomePage actually points to the
>>> HomePage
>>> in the correct package and as mounted at HomePage.
>>>
>>> Thanks
>>>
>>> David
>>>
>>>
>>> On 8 March 2013 14:39, Sven Meier <sv...@meiers.net> wrote:
>>>
>>>   Hi,
>>>> if you keep style.css in your web root, you'll have to remove the
>>>> <wicket:link> tag in your markup.
>>>> Otherwise AutoLinkResolver will think yoy're keeping the css beside your
>>>> component.
>>>>
>>>> Sven
>>>>
>>>>
>>>> On 03/08/2013 03:17 PM, David Beer wrote:
>>>>
>>>>   Hi All
>>>>> I am new Wicket and like what I have found so far. My problem is that I
>>>>> have created a few pages and forms and placed them in a package named
>>>>> "auth". I can navigate to the pages easily but they don't seem to
>>>>> inherite
>>>>> the CSS from the BasePage which is in a different package. Also any
>>>>> links
>>>>> to the HomePage which is in the default package is not found.
>>>>>
>>>>> My BasePage HTML looks like the following:
>>>>>
>>>>> <html xmlns="http://www.w3.org/1999/****xhtml<http://www.w3.org/1999/**xhtml>
>>>>> <http://www.w3.org/**1999/xhtml <http://www.w3.org/1999/xhtml>>
>>>>> "
>>>>> xmlns:wicket="http://wicket.****apache.org/dtds.data/wicket-**<http://apache.org/dtds.data/wicket-**>
>>>>> xhtml1.4-strict.dtd<http://**wicket.apache.org/dtds.data/**
>>>>> wicket-xhtml1.4-strict.dtd<http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd>
>>>>> "
>>>>>         xml:lang="en"
>>>>>         lang="en">
>>>>>     <head>
>>>>>       <wicket:head>
>>>>>         <wicket:link>
>>>>>           <link rel="stylesheet" type="text/css" href="style.css"/>
>>>>>         </wicket:link>
>>>>>       </wicket:head>
>>>>>     </head>
>>>>>     <body>
>>>>>       <div id="container">
>>>>>         <div id="header">
>>>>>           <header wicket:id="headerpanel"/>
>>>>>         </div>
>>>>>         <div class="content_container">
>>>>>           <wicket:child/>
>>>>>         </div>
>>>>>         <div id="footer">
>>>>>           <footer wicket:id="footerpanel" />
>>>>>         </div>
>>>>>       </div>
>>>>>     </body>
>>>>> </html>
>>>>>
>>>>> My AdminPage which is in the auth package is never finds the css file
>>>>> declared in the base page.
>>>>>
>>>>> My project structure is as follows:
>>>>>
>>>>> src/main/java/example/BasePage and HomePage
>>>>> src/main/java/example/auth/****AdminPage and SignInPage and SignOutPage
>>>>>
>>>>> <html xmlns:wicket="http://wicket.****apache.org <http://apache.org> <
>>>>> http://wicket.apache.org>
>>>>>
>>>>> ">
>>>>>     <head>
>>>>>       <meta http-equiv="Content-Type" content="text/html;
>>>>> charset=UTF-8"/>
>>>>>       <title>AdminPage</title>
>>>>>     </head>
>>>>>     <body>
>>>>>       <wicket:extend>
>>>>>         <h2>Welcome ADMIN!</h2>
>>>>>         <p>
>>>>>           This page should only be accessible if you are signed in as an
>>>>> administrator.
>>>>>         </p>
>>>>>         <p>
>>>>>           <wicket:link><a href="HomePage.html">Home</a><****
>>>>>
>>>>> /wicket:link><br/>
>>>>>           <wicket:link><a href="SignOutPage.html">Sign
>>>>> Out</a></wicket:link>
>>>>>         </p>
>>>>>       </wicket:extend>
>>>>>     </body>
>>>>> </html>
>>>>>
>>>>> I mount the pages in the xxApplication class as follows:
>>>>>
>>>>> mountPage("/Home", HomePage.class);
>>>>> mountPage("/guest-list", GuestListPage.class);
>>>>> mountPage("/auth/adminpage", AdminPage.class);
>>>>> mountPage("/auth/signin", SignInPage.class);
>>>>> mountPage("/auth/signout", SignOutPage.class);
>>>>>
>>>>> How can fix the navigation and the location of the css file so that it
>>>>> is
>>>>> found. The css file is located the Webapps dir.
>>>>>
>>>>> Thanks
>>>>>
>>>>> David
>>>>>
>>>>> ------------------------------****----------------------------**
>>>>> --**---------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>>> <us...@wicket.apache.org>
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>   ------------------------------****----------------------------**
>>>> --**---------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>> <us...@wicket.apache.org>
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>


Re: Page Hierachy and Packages

Posted by David Beer <da...@gmail.com>.
Hi Sven

Will try and be more clear. I have fixed the css styling thanks to your
suggestion on moving the link out of wicket:head.

My question is that if I am navigating From my AdminPage in my auth package
to the HomePage in the package above how do I add the link in the HTML. As
Then AdminPage is trying to link to a file in the same package using
<wicket:link>?

Thanks

David


On 8 March 2013 16:53, Sven Meier <sv...@meiers.net> wrote:

> Hi David,
>
> if your post was a question, I didn't understand it.
>
> Regards
> Sven
>
>
> On 03/08/2013 05:15 PM, David Beer wrote:
>
>> Hi Sven
>>
>> Thanks for this so it is better to add the css outside of the
>> <wicket:head>
>> like you would with normal html pages. Is it possible to get the
>> navigation
>> to go up a level so to navigate to HomePage actually points to the
>> HomePage
>> in the correct package and as mounted at HomePage.
>>
>> Thanks
>>
>> David
>>
>>
>> On 8 March 2013 14:39, Sven Meier <sv...@meiers.net> wrote:
>>
>>  Hi,
>>>
>>> if you keep style.css in your web root, you'll have to remove the
>>> <wicket:link> tag in your markup.
>>> Otherwise AutoLinkResolver will think yoy're keeping the css beside your
>>> component.
>>>
>>> Sven
>>>
>>>
>>> On 03/08/2013 03:17 PM, David Beer wrote:
>>>
>>>  Hi All
>>>>
>>>> I am new Wicket and like what I have found so far. My problem is that I
>>>> have created a few pages and forms and placed them in a package named
>>>> "auth". I can navigate to the pages easily but they don't seem to
>>>> inherite
>>>> the CSS from the BasePage which is in a different package. Also any
>>>> links
>>>> to the HomePage which is in the default package is not found.
>>>>
>>>> My BasePage HTML looks like the following:
>>>>
>>>> <html xmlns="http://www.w3.org/1999/****xhtml<http://www.w3.org/1999/**xhtml>
>>>> <http://www.w3.org/**1999/xhtml <http://www.w3.org/1999/xhtml>>
>>>> "
>>>> xmlns:wicket="http://wicket.****apache.org/dtds.data/wicket-**<http://apache.org/dtds.data/wicket-**>
>>>> xhtml1.4-strict.dtd<http://**wicket.apache.org/dtds.data/**
>>>> wicket-xhtml1.4-strict.dtd<http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd>
>>>> >
>>>>
>>>> "
>>>>        xml:lang="en"
>>>>        lang="en">
>>>>    <head>
>>>>      <wicket:head>
>>>>        <wicket:link>
>>>>          <link rel="stylesheet" type="text/css" href="style.css"/>
>>>>        </wicket:link>
>>>>      </wicket:head>
>>>>    </head>
>>>>    <body>
>>>>      <div id="container">
>>>>        <div id="header">
>>>>          <header wicket:id="headerpanel"/>
>>>>        </div>
>>>>        <div class="content_container">
>>>>          <wicket:child/>
>>>>        </div>
>>>>        <div id="footer">
>>>>          <footer wicket:id="footerpanel" />
>>>>        </div>
>>>>      </div>
>>>>    </body>
>>>> </html>
>>>>
>>>> My AdminPage which is in the auth package is never finds the css file
>>>> declared in the base page.
>>>>
>>>> My project structure is as follows:
>>>>
>>>> src/main/java/example/BasePage and HomePage
>>>> src/main/java/example/auth/****AdminPage and SignInPage and SignOutPage
>>>>
>>>> <html xmlns:wicket="http://wicket.****apache.org <http://apache.org> <
>>>> http://wicket.apache.org>
>>>>
>>>> ">
>>>>    <head>
>>>>      <meta http-equiv="Content-Type" content="text/html;
>>>> charset=UTF-8"/>
>>>>      <title>AdminPage</title>
>>>>    </head>
>>>>    <body>
>>>>      <wicket:extend>
>>>>        <h2>Welcome ADMIN!</h2>
>>>>        <p>
>>>>          This page should only be accessible if you are signed in as an
>>>> administrator.
>>>>        </p>
>>>>        <p>
>>>>          <wicket:link><a href="HomePage.html">Home</a><****
>>>>
>>>> /wicket:link><br/>
>>>>          <wicket:link><a href="SignOutPage.html">Sign
>>>> Out</a></wicket:link>
>>>>        </p>
>>>>      </wicket:extend>
>>>>    </body>
>>>> </html>
>>>>
>>>> I mount the pages in the xxApplication class as follows:
>>>>
>>>> mountPage("/Home", HomePage.class);
>>>> mountPage("/guest-list", GuestListPage.class);
>>>> mountPage("/auth/adminpage", AdminPage.class);
>>>> mountPage("/auth/signin", SignInPage.class);
>>>> mountPage("/auth/signout", SignOutPage.class);
>>>>
>>>> How can fix the navigation and the location of the css file so that it
>>>> is
>>>> found. The css file is located the Webapps dir.
>>>>
>>>> Thanks
>>>>
>>>> David
>>>>
>>>> ------------------------------****----------------------------**
>>>> --**---------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>>> <us...@wicket.apache.org>
>>>> >
>>>>
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>  ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apa**che.org<http://apache.org>
>>> <us...@wicket.apache.org>
>>> >
>>>
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Page Hierachy and Packages

Posted by Sven Meier <sv...@meiers.net>.
Hi David,

if your post was a question, I didn't understand it.

Regards
Sven

On 03/08/2013 05:15 PM, David Beer wrote:
> Hi Sven
>
> Thanks for this so it is better to add the css outside of the <wicket:head>
> like you would with normal html pages. Is it possible to get the navigation
> to go up a level so to navigate to HomePage actually points to the HomePage
> in the correct package and as mounted at HomePage.
>
> Thanks
>
> David
>
>
> On 8 March 2013 14:39, Sven Meier <sv...@meiers.net> wrote:
>
>> Hi,
>>
>> if you keep style.css in your web root, you'll have to remove the
>> <wicket:link> tag in your markup.
>> Otherwise AutoLinkResolver will think yoy're keeping the css beside your
>> component.
>>
>> Sven
>>
>>
>> On 03/08/2013 03:17 PM, David Beer wrote:
>>
>>> Hi All
>>>
>>> I am new Wicket and like what I have found so far. My problem is that I
>>> have created a few pages and forms and placed them in a package named
>>> "auth". I can navigate to the pages easily but they don't seem to inherite
>>> the CSS from the BasePage which is in a different package. Also any links
>>> to the HomePage which is in the default package is not found.
>>>
>>> My BasePage HTML looks like the following:
>>>
>>> <html xmlns="http://www.w3.org/1999/**xhtml<http://www.w3.org/1999/xhtml>
>>> "
>>> xmlns:wicket="http://wicket.**apache.org/dtds.data/wicket-**
>>> xhtml1.4-strict.dtd<http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd>
>>> "
>>>        xml:lang="en"
>>>        lang="en">
>>>    <head>
>>>      <wicket:head>
>>>        <wicket:link>
>>>          <link rel="stylesheet" type="text/css" href="style.css"/>
>>>        </wicket:link>
>>>      </wicket:head>
>>>    </head>
>>>    <body>
>>>      <div id="container">
>>>        <div id="header">
>>>          <header wicket:id="headerpanel"/>
>>>        </div>
>>>        <div class="content_container">
>>>          <wicket:child/>
>>>        </div>
>>>        <div id="footer">
>>>          <footer wicket:id="footerpanel" />
>>>        </div>
>>>      </div>
>>>    </body>
>>> </html>
>>>
>>> My AdminPage which is in the auth package is never finds the css file
>>> declared in the base page.
>>>
>>> My project structure is as follows:
>>>
>>> src/main/java/example/BasePage and HomePage
>>> src/main/java/example/auth/**AdminPage and SignInPage and SignOutPage
>>>
>>> <html xmlns:wicket="http://wicket.**apache.org <http://wicket.apache.org>
>>> ">
>>>    <head>
>>>      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>>>      <title>AdminPage</title>
>>>    </head>
>>>    <body>
>>>      <wicket:extend>
>>>        <h2>Welcome ADMIN!</h2>
>>>        <p>
>>>          This page should only be accessible if you are signed in as an
>>> administrator.
>>>        </p>
>>>        <p>
>>>          <wicket:link><a href="HomePage.html">Home</a><**
>>> /wicket:link><br/>
>>>          <wicket:link><a href="SignOutPage.html">Sign Out</a></wicket:link>
>>>        </p>
>>>      </wicket:extend>
>>>    </body>
>>> </html>
>>>
>>> I mount the pages in the xxApplication class as follows:
>>>
>>> mountPage("/Home", HomePage.class);
>>> mountPage("/guest-list", GuestListPage.class);
>>> mountPage("/auth/adminpage", AdminPage.class);
>>> mountPage("/auth/signin", SignInPage.class);
>>> mountPage("/auth/signout", SignOutPage.class);
>>>
>>> How can fix the navigation and the location of the css file so that it is
>>> found. The css file is located the Webapps dir.
>>>
>>> Thanks
>>>
>>> David
>>>
>>> ------------------------------**------------------------------**---------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@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


Re: Page Hierachy and Packages

Posted by David Beer <da...@gmail.com>.
Hi Sven

Thanks for this so it is better to add the css outside of the <wicket:head>
like you would with normal html pages. Is it possible to get the navigation
to go up a level so to navigate to HomePage actually points to the HomePage
in the correct package and as mounted at HomePage.

Thanks

David


On 8 March 2013 14:39, Sven Meier <sv...@meiers.net> wrote:

> Hi,
>
> if you keep style.css in your web root, you'll have to remove the
> <wicket:link> tag in your markup.
> Otherwise AutoLinkResolver will think yoy're keeping the css beside your
> component.
>
> Sven
>
>
> On 03/08/2013 03:17 PM, David Beer wrote:
>
>> Hi All
>>
>> I am new Wicket and like what I have found so far. My problem is that I
>> have created a few pages and forms and placed them in a package named
>> "auth". I can navigate to the pages easily but they don't seem to inherite
>> the CSS from the BasePage which is in a different package. Also any links
>> to the HomePage which is in the default package is not found.
>>
>> My BasePage HTML looks like the following:
>>
>> <html xmlns="http://www.w3.org/1999/**xhtml<http://www.w3.org/1999/xhtml>
>> "
>> xmlns:wicket="http://wicket.**apache.org/dtds.data/wicket-**
>> xhtml1.4-strict.dtd<http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd>
>> "
>>       xml:lang="en"
>>       lang="en">
>>   <head>
>>     <wicket:head>
>>       <wicket:link>
>>         <link rel="stylesheet" type="text/css" href="style.css"/>
>>       </wicket:link>
>>     </wicket:head>
>>   </head>
>>   <body>
>>     <div id="container">
>>       <div id="header">
>>         <header wicket:id="headerpanel"/>
>>       </div>
>>       <div class="content_container">
>>         <wicket:child/>
>>       </div>
>>       <div id="footer">
>>         <footer wicket:id="footerpanel" />
>>       </div>
>>     </div>
>>   </body>
>> </html>
>>
>> My AdminPage which is in the auth package is never finds the css file
>> declared in the base page.
>>
>> My project structure is as follows:
>>
>> src/main/java/example/BasePage and HomePage
>> src/main/java/example/auth/**AdminPage and SignInPage and SignOutPage
>>
>> <html xmlns:wicket="http://wicket.**apache.org <http://wicket.apache.org>
>> ">
>>   <head>
>>     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>>     <title>AdminPage</title>
>>   </head>
>>   <body>
>>     <wicket:extend>
>>       <h2>Welcome ADMIN!</h2>
>>       <p>
>>         This page should only be accessible if you are signed in as an
>> administrator.
>>       </p>
>>       <p>
>>         <wicket:link><a href="HomePage.html">Home</a><**
>> /wicket:link><br/>
>>         <wicket:link><a href="SignOutPage.html">Sign Out</a></wicket:link>
>>       </p>
>>     </wicket:extend>
>>   </body>
>> </html>
>>
>> I mount the pages in the xxApplication class as follows:
>>
>> mountPage("/Home", HomePage.class);
>> mountPage("/guest-list", GuestListPage.class);
>> mountPage("/auth/adminpage", AdminPage.class);
>> mountPage("/auth/signin", SignInPage.class);
>> mountPage("/auth/signout", SignOutPage.class);
>>
>> How can fix the navigation and the location of the css file so that it is
>> found. The css file is located the Webapps dir.
>>
>> Thanks
>>
>> David
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Page Hierachy and Packages

Posted by Sven Meier <sv...@meiers.net>.
Hi,

if you keep style.css in your web root, you'll have to remove the 
<wicket:link> tag in your markup.
Otherwise AutoLinkResolver will think yoy're keeping the css beside your 
component.

Sven

On 03/08/2013 03:17 PM, David Beer wrote:
> Hi All
>
> I am new Wicket and like what I have found so far. My problem is that 
> I have created a few pages and forms and placed them in a package 
> named "auth". I can navigate to the pages easily but they don't seem 
> to inherite the CSS from the BasePage which is in a different package. 
> Also any links to the HomePage which is in the default package is not 
> found.
>
> My BasePage HTML looks like the following:
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"
>       xml:lang="en"
>       lang="en">
>   <head>
>     <wicket:head>
>       <wicket:link>
>         <link rel="stylesheet" type="text/css" href="style.css"/>
>       </wicket:link>
>     </wicket:head>
>   </head>
>   <body>
>     <div id="container">
>       <div id="header">
>         <header wicket:id="headerpanel"/>
>       </div>
>       <div class="content_container">
>         <wicket:child/>
>       </div>
>       <div id="footer">
>         <footer wicket:id="footerpanel" />
>       </div>
>     </div>
>   </body>
> </html>
>
> My AdminPage which is in the auth package is never finds the css file 
> declared in the base page.
>
> My project structure is as follows:
>
> src/main/java/example/BasePage and HomePage
> src/main/java/example/auth/AdminPage and SignInPage and SignOutPage
>
> <html xmlns:wicket="http://wicket.apache.org">
>   <head>
>     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>     <title>AdminPage</title>
>   </head>
>   <body>
>     <wicket:extend>
>       <h2>Welcome ADMIN!</h2>
>       <p>
>         This page should only be accessible if you are signed in as an 
> administrator.
>       </p>
>       <p>
>         <wicket:link><a href="HomePage.html">Home</a></wicket:link><br/>
>         <wicket:link><a href="SignOutPage.html">Sign 
> Out</a></wicket:link>
>       </p>
>     </wicket:extend>
>   </body>
> </html>
>
> I mount the pages in the xxApplication class as follows:
>
> mountPage("/Home", HomePage.class);
> mountPage("/guest-list", GuestListPage.class);
> mountPage("/auth/adminpage", AdminPage.class);
> mountPage("/auth/signin", SignInPage.class);
> mountPage("/auth/signout", SignOutPage.class);
>
> How can fix the navigation and the location of the css file so that it 
> is found. The css file is located the Webapps dir.
>
> Thanks
>
> David
>
> ---------------------------------------------------------------------
> 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