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 <s...@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<users-unsubscr...@wicket.apache.org>
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to