Re: [Wicket-user] Flexible markup with same Java classes

2007-03-27 Thread Chris Colman
> Let's say I've created a Layout and corresponding Java classes for the > following page > > -- > | Header | > -- > | | | > | Menu | Content | > | | | > -- > | Footer | > -- > > Each section

Re: [Wicket-user] Flexible markup with same Java classes - autoAdd?

2007-03-27 Thread Chris Colman
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

[Wicket-user] Flexible markup with same Java classes

2007-03-26 Thread Chris Colman
> 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

Re: [Wicket-user] Flexible markup with same Java classes

2007-03-26 Thread Harald Gruber
> 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

Re: [Wicket-user] Flexible markup with same Java classes

2007-03-26 Thread Igor Vaynberg
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

Re: [Wicket-user] Flexible markup with same Java classes

2007-03-26 Thread Igor Vaynberg
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

[Wicket-user] Flexible markup with same Java classes

2007-03-26 Thread Chris Colman
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