my code work, if by definition each WebPage and Panel must have own markup
?

MyBasePage.java:
public class MyBasePage extends WebPage {

public MyBasePage() {
add(new MyPanel("panel"));
}
}

no MyBasePage.html, i remove it.

SubPage.java:
public class SubPage extends MyBasePage {
 public SubPage() {
}

}

SubPage.html:
<html>
<body>
<span wicket:id="panel"/>
</body>
</html>

MyPanel.html
<body>
<wicket:panel>
<span>MyPanel</span>
</wicket:panel>
</body>


On Fri, Feb 14, 2014 at 10:56 PM, Sven Meier <s...@meiers.net> wrote:

> With a wicket:id declared in Html markup, a corresponding component with
> the same id has to present as child.
>
> It doesn't matter when the child component is added: in the constructor or
> one of its super constructors (or even later).
> This does not have anything to do with markup inheritance.
>
> Hope this helps
> Sven
>
>
> On 02/14/2014 07:34 PM, Farrukh SATTOROV wrote:
>
>> Hi everyone. I confused when i look to standard wicket heloworld example
>> and try understanding  snippet of <span wicket:id="mainNavigation"/>. How
>> HelloWorld.html works without <extend></extend> while id mainNavigation
>> located in superclass (WicketExamplePage). Explain to me mechanism of
>> looking for wicket:id in this case.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
С уважением и наилучшими пожеланиями
*Фаррух*

Reply via email to