On Thu, May 27, 2010 at 2:30 PM, Christian Märzinger <
christian.maerzin...@gmail.com> wrote:

> Hi!
>
> How can I embedd a page in another page?
>
> i have following Homepage
>
> <wicket>
> <div id="header" class="borderedBlock">
> <table width="100%">
>    header text
> <br />
>    header text 2
> </table>
> </div>
> <table width="100%">
> <tr>
> <td id="left" class="borderedBlock">
> <ul>
> <div id="treeTable"><wicket:child /></div>
> </ul>
> </td>
> <td id="content" class="borderedBlock">
> <div id="map2"><wicket:child /></div>
> </td>
> </tr>
> </table>
> <div id="footer" class="borderedBlock">@ footer footer</div>
> </wicket>
>
> now i try to put a map in the content and a tree table at the left side
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
Wicket (just like Java) does not support multiple inheritance.  If you're
creating a base page that has two blocks that need to be filled in, you can:

1 - make one of them use the wicket:child tag - like you have done.  pages
that are subclasses will then wrap wicket:extend tags around their content,
and this will appear in the place of the wicket:child tag
2 - then, for the other location, use something like <div
wicket:id="tree">[tree]</div> and in your base page java, do:
add(createTreeForThisPage("tree")), where createTreeForThisPage is defined
as "protected abstract Component createTreeForThisPage(String id)".  Pages
that extend this base page will be required to return the component for that
location.

Or, you can skip the inheritance and use "#2" above for both locations on
the page.

-- 
Jeremy Thomerson
http://www.wickettraining.com

Reply via email to