> Let's say I've created a Layout and corresponding Java classes for the
> following page
>
> --
> | Header |
> --
> | | |
> | Menu | Content |
> | | |
> --
> | Footer |
> --
>
> Each section
I was just wondering if another possible solution to this might be to
somehow use autoAdd - ie., only add the components to the page class
when requested based on the components in the markup.
I'm not sure if the autoAdd is intended for this purpose or if it's a
completely different beast altogeth
> or even
>
> mypage() { add(new HeaderPanel("header") { public boolean isvisible()
{
> return !MyPage.this.getVariation().contains("noheader"); }}
>
> if the header panel is pretty cheap to construct
>
> -igor
Yes that looks like an quicker and easier solution. The header is very
cheap to cons
> I want to be able to have the flexibility to leave the header out in
> certain markup variations without wicket generating an error because the
> page tries to add the header component.
guess in your base webpage you should fill the header-div/span with a
default WebMarkupContainer ( add(new W
or even
mypage() { add(new HeaderPanel("header") { public boolean isvisible() {
return !MyPage.this.getVariation().contains("noheader"); }}
if the header panel is pretty cheap to construct
-igor
On 3/26/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
so you want to keep the same page class, an
so you want to keep the same page class, and solely control this from
markup? you have to research the api for getting the markup and then search
it for an attribute or whatever marker you set, but if you dont mind
controlling this via the variation string itself something like this might
work:
c
Let's say I've created a Layout and corresponding Java classes for the
following page
--
| Header |
--
| | |
| Menu | Content |
| | |
--
| Footer |
--
Each section is implemented by a separat