Hi,

My team has adopted wicket as it's web framework and we have been busy
creating a lot of interesting Panels to build pages for our product.  It is
turning out that most of the time all the components on the page are Panels
and we end up with a situation like this:

MyPage.java
--------------
public class MyPage extends BasePage
{
  MyPage()
  {
    add(SomePanel("c1"));
    add(SomePanel("c2"));
    add(SomePanel("c3"));
    add(SomePanel("c4"));
  }
}

MyPage.html
---------------
<wicket:extend>
  <wicket:container wicket:id="c1"/>
  <wicket:container wicket:id="c2"/>
  <wicket:container wicket:id="c3"/>
  <wicket:container wicket:id="c4"/>
</wicket:extend>

It would be nice if we didn't have to write html files for pages in these
situations and instead just do something like this:

MyPage.java
--------------
public class MyPage extends BasePage
{
  MyPage()
  {
    addToRepeater(SomePanel("c1"));
    addToRepeater(SomePanel("c2"));
    addToRepeater(SomePanel("c3"));
    addToRepeater(SomePanel("c4"));
  }
}

Where BasePage will have a method called addToRepeater which just adds the
component to the repeater. 

I see we could do some trickery by implementing
IMarkupResourceStreamProvider on the BasePage to force the template of it's
child classes to always use BasePage.html.  I'm not sure this is the best
way of doing this, does anyone have any comments on using this approach?

Thanks,

Scott
-- 
View this message in context: 
http://www.nabble.com/Child-page-with-no-html-tp20945577p20945577.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to