You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Luther Baker <lu...@gmail.com> on 2009/05/24 22:15:49 UTC

Pages and Namespaces

Assuming a parent page (Layout.html) that contains a link <a href=""
wicket:id="a-contact"> with corresponding code in Layout.java ...

Now, I'd like to extend that with a child page ... that happens to contain
text that also embeds a link to the same place. In my child page, I just so
happen to the use the same id ... and I find out, the ids conflict.

In this case it is easy enough for me to simply change one of the ids - but
that seems odd. What if I were using someone else's library of pages? I
would've thought there'd be some namespace style separation where id's in
subclasses can't conflict with id's in super classes.

Is that naive - or am I just missing a design point?

Thanks,

-Luther

Re: Pages and Namespaces

Posted by Alex Objelean <al...@yahoo.com>.
You could avoid this kind of problems if you would create a panel as a holder
of your child page components (introducing this way a kind of namespacing
inside the panel).

Alex 



luther.baker wrote:
> 
> Assuming a parent page (Layout.html) that contains a link    with
> corresponding code in Layout.java ...
> 
> Now, I'd like to extend that with a child page ... that happens to contain
> text that also embeds a link to the same place. In my child page, I just
> so
> happen to the use the same id ... and I find out, the ids conflict.
> 
> In this case it is easy enough for me to simply change one of the ids -
> but
> that seems odd. What if I were using someone else's library of pages? I
> would've thought there'd be some namespace style separation where id's in
> subclasses can't conflict with id's in super classes.
> 
> Is that naive - or am I just missing a design point?
> 
> Thanks,
> 
> -Luther
> 
> 

-- 
View this message in context: http://www.nabble.com/Pages-and-Namespaces-tp23697595p23698271.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org