You are right again : when I remove the css file of ma BasePage, errorPage constructor is not called.
So, what is the good practice to declare style css file when you use Markup Inheritance? I thougth that put the link : <link rel="stylesheet" href="styles.css" type="text/css" /> in the head of basePage was enougth, but visibly not... 2011/5/20 Martin Grigorov <[email protected]> > You have a resource with broken url. Some css/js/image cannot be found. > > On Fri, May 20, 2011 at 11:00 AM, Mathilde Pellerin < > [email protected]> wrote: > > > thanks for your answer. > > You are right : the second call is not due to Accueil Page. > > In fact, I have an error404 page which is called when user try an url > that > > is not in the application. I don't know why, but the ErrorPage > constructor > > is called each time that I follow a link. > > This is the part of web.xml for error page : > > > > <filter-mapping> > > <filter-name>wicket.WicketWarp</filter-name> > > <url-pattern>/*</url-pattern> > > <dispatcher>REQUEST</dispatcher> > > <dispatcher>ERROR</dispatcher> > > </filter-mapping> > > > > <error-page> > > <error-code>404</error-code> > > <location>/error404</location> > > </error-page> > > > > Do you know how avoid this issue? > > > > > > > > > > 2011/5/20 Martin Grigorov <[email protected]> > > > > > It shouldn't be called as you described it. > > > Put a breakpoint in BasePage's constructor and see the thread stack. > > > > > > > > > On Fri, May 20, 2011 at 10:17 AM, Mathilde Pellerin < > > > [email protected]> wrote: > > > > > > > Hi all, > > > > > > > > I am new in wicket and I encountering a problem with my Markup > > > inheritance. > > > > In my BasePage (that extends WebPage), I have a menu with some > > > > BookmarkablePageLink : > > > > <ul class="blocklist"> > > > > <!-- MENU --> > > > > <li wicket:id="accueilpage"><a>Accueil</a></li> > > > > <li wicket:id="e4npage"><a>Infos E4N</a></li> > > > > <li wicket:id="faqpage"><a>FAQ</a></li> > > > > <li wicket:id="contactpage"><a>Contact</a></li> > > > > <!-- END MENU --> > > > > </ul> > > > > > > > > and for each link I have a code like this in my BasePage constructor > : > > > > final BookmarkablePageLink<Void> lienAccueil = new > > > > BookmarkablePageLink<Void>("accueilpage", AccueilPage.class); > > > > add(lienAccueil); > > > > > > > > It works well. > > > > But now, I want to add an attribute class to the menu selected. For > > > > example, > > > > in the AccueilPage constructor, I add that : > > > > WebMarkupContainer lienAccueil = new > WebMarkupContainer("accueilpage"); > > > > lienAccueil.add(new SimpleAttributeModifier("class", > "selected-item")); > > > > > > > > but it doesn't work. > > > > I found that BasePage constructor is called before AND after my > > > AccueilPage > > > > constructor. That's why the attribute class doesn't appear : it is > > added > > > by > > > > AccueilPage but then, it remove by BasePage constructor I guess. > > > > > > > > So I wonder : why BasePage constructor is called after AccueilPage > > > > constructor? What am I doing wrong? > > > > > > > > Thanks > > > > > > > > Kind regards, > > > > Mathilde > > > > > > > > -- > > > > *Mathilde Pellerin* > > > > Ingénieur en développement de logiciel > > > > > > > > STATLIFE > > > > tel : 01.42.11.64.88 > > > > mail : [email protected] > > > > > > > > > > > > > > > > -- > > > Martin Grigorov > > > jWeekend > > > Training, Consulting, Development > > > http://jWeekend.com <http://jweekend.com/> > > > > > > > > > > > -- > > Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : > > 06.60.78.79.03 E-mail > > : [email protected] Mon CV en ligne : > > <http://www.mathilde-pellerin.fr/> http://www.mathilde-pellerin.fr/ > Mes > > liens : <http://www.viadeo.com/fr/profile/mathilde.pellerin> > > <http://fr.linkedin.com/in/mathildepellerin> > > > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com <http://jweekend.com/> > -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : [email protected] Mon CV en ligne : <http://www.mathilde-pellerin.fr/> http://www.mathilde-pellerin.fr/ Mes liens : <http://www.viadeo.com/fr/profile/mathilde.pellerin> <http://fr.linkedin.com/in/mathildepellerin>
