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

Reply via email to