Here is MasterPage and below it is it's parent class BasePage.
public abstract class MasterPage extends BasePage implements Protected,
ProtectedComponent
{
private static final String bodyId = "bodyPanel";
private final BaseProtectedComponent protection;
abstract protected WebMarkupContainer makeBodyPanel(String id,
PageParameters parms, Object[] objParms);
public MasterPage()
{
this(new PageParameters(), new Object[0]);
}
public MasterPage(PageParameters parms, Object[] objParms)
{
this(parms, objParms, new UnprotectedPermission());
}
public MasterPage(PageParameters parms, Object[] objParms, MyPermission
permission)
{
super(parms);
if(!isErrorPage())
{
MySession.get().resetBreadCrumbState();
}
this.protection =
BaseProtectedComponent.makeRenderProtection(permission);
setOutputMarkupId(true);
add(new TimeoutMessagePanel("timeoutMessagePanel"));
add(makeBodyPanel(bodyId, parms, objParms));
add(new MyMenuPanel("menuPanel"));
}
public boolean isProtectedComponentAction(final Action action)
{
return protection.isProtectedComponentAction(action);
}
public MyPermission getRequiredPermission()
{
return protection.getRequiredPermission();
}
}
public abstract class BasePage extends WebPage
{
public BasePage()
{
super();
init();
}
public BasePage(IModel<?> model)
{
super(model);
init();
}
public BasePage(PageParameters parameters)
{
super(parameters);
init();
}
private void init()
{
add(new Label("applicationTitle", makeTitleModel()));
add(new JQueryHeaderContributor());
add(new MainHeaderPanel("mainHeaderPanel"));
add(new MainFooterPanel("mainFooterPanel"));
}
protected IModel<String> makeTitleModel()
{
return Model.of("My App");
}
}
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/NullPointerException-in-Page-constructor-tp4657502p4657519.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]