If your web.xml specifies configuration=deployment and you want to report
the runtime error on a custom page then in your Application class:
protected void init() {
...
getApplicationSettings().setInternalErrorPage(MyInternalErrorPage.class);
...
}
class MyInternalErrorPage extend WebPage {
public MyInternalErrorPage() {
Session.get().error("Some custom generic error");
throw new RestartResponseException( Application.get().getHomePage() );
}
}
Also, do you have <wicket:extend /> in your parent HTML file and
<wicket:child> in your extended markup file?
https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%2527sXHTMLtags-Elementwicket%253Aextend
https://cwiki.apache.org/WICKET/markup-inheritance.html
But if this was working for you in 5.x then I presume you do have the
markup inheritence setup right.
~ Thank you,
Paul Bors
On Sat, Feb 2, 2013 at 3:52 PM, Marios Skounakis <[email protected]> wrote:
> I've seen this happen too. It's not related to inheritance. If you add a
> component in code and omit it in the html file, you get different behavior
> in the following cases:
>
> - if your web.xml specifies configuration=deployment, you don't get an
> error
> - if you web.xml specifies configuration=development, you get a runtime
> exception
>
>
> On Fri, Feb 1, 2013 at 3:29 PM, Martin Grigorov <[email protected]
> >wrote:
>
> > Hi,
> >
> > I think there are no changes in this area.
> > Do you extend/inherit the markup or completely override it ?
> > I expect to see <wicket:extend> instead of <wicket:panel> in
> > MyNewPanel.html.
> > Create a quickstart and attach it to a ticket in Jira please.
> >
> >
> > On Fri, Feb 1, 2013 at 2:12 PM, Dmitriy Neretin <
> > [email protected]> wrote:
> >
> > > Hi Folks,
> > >
> > > I have another problem during Wicket 6 migration. This time it is a
> > problem
> > > with markup inheritance.
> > >
> > > I have an old wicket panel and appropriate markup file:
> > > MyOldGoodWicketPanel & MyOldGoodWicketPanel.html
> > >
> > > Markup file looks like this:
> > >
> > > <wicket:panel>
> > > ... stuff ...
> > > </wicket:panel>
> > >
> > > Some months ago I needed for the same Panel another Markup, so what I
> > did:
> > >
> > > class MyNewPanel extends MyOldGoodWicketPanel {
> > > almost the same stuff
> > > }
> > >
> > > and an appropriate markup file:
> > >
> > > MyNewPanel.html with following markup:
> > >
> > > <wicket:panel>
> > > ... other stuff ...
> > > </wicket:panel>
> > >
> > > It worked pretty well in the Wicket 1.5, but now I get Exceptions, that
> > the
> > > components from the super class (MyOldGoodWicketPanel) are not found in
> > the
> > > subclass/ in the markup file of the sublclass...
> > >
> > > Can somebody explain me what happened?
> > >
> > > Regards,
> > > Dmitriy
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
> >
>