You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alberto Brosich <ab...@ogs.trieste.it> on 2014/03/04 00:29:14 UTC
Best practices with subclassing and subpackaging
Hi,
I have an application with several pages, mounted in webapplication,
that do not have markup file associated. The markup file is selected
using variations in the parent class. I would like to split pages in
subpackages but if I move the markup file
(ParentPageClass_variation.html) in the subpackages too, it doesn't
work, obviously.
So, some questions.
Is it a good practice in wicket this kind of subclassing?
Is there a way to override the resolving of the markup filename?
I took a look to the apidocs without success.
Best regards
Alberto
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Best practices with subclassing and subpackaging
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
If a markup container (like a page, a panel, a border, ...) has no its own
markup file then the markup is looked up by using its parent.
It is possible to have many child pages in their own packages and few
markup files next to the parent's page.
See
http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/markup/IMarkupResourceStreamProvider.htmlfor
a way to use custom loading of the markup.
Martin Grigorov
Wicket Training and Consulting
On Tue, Mar 4, 2014 at 1:29 AM, Alberto Brosich <ab...@ogs.trieste.it>wrote:
>
> Hi,
>
> I have an application with several pages, mounted in webapplication,
> that do not have markup file associated. The markup file is selected
> using variations in the parent class. I would like to split pages in
> subpackages but if I move the markup file
> (ParentPageClass_variation.html) in the subpackages too, it doesn't
> work, obviously.
>
> So, some questions.
>
> Is it a good practice in wicket this kind of subclassing?
>
> Is there a way to override the resolving of the markup filename?
> I took a look to the apidocs without success.
>
> Best regards
>
> Alberto
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>