You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Chris Webb <ch...@voxsurf.com> on 2008/01/06 02:37:45 UTC

Overriding panel markup

Hi,

I wondering what's the best approach to overriding the markup for a 
panel. Is there a method I can override or should I just extend the 
Panel? I thought extending might be overkill if all I want to do is 
specify different markup but not change the functionality. Specically 
I'm trying to override the markup for 
org.apache.wicket.authentication.panel.SignInPanel to restructure it but 
maintain all of the wicket ids, etc.

cheers,
chris


Re: Overriding panel markup

Posted by shetc <sh...@bellsouth.net>.
Excellent! Thanks for your help.
-- 
View this message in context: http://www.nabble.com/Overriding-panel-markup-tp14642196p19161133.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


Re: Overriding panel markup

Posted by pixologe <pi...@mailinator.com>.

shetc wrote:
> 
> Is it possible to give a newbie some pointers on how this extension would
> work?
> 

Just create a class MyPanel.java

class MyPanel extends Panel {
// constructors, custom methods etc...
}

and a markup file MyPanel.html:
<html>
<body>
<wicket:extend>
<!-- MyPanel specific markup goes here -->
</wicket:extend>
</body>
</html>

That's all :)

HTH
-- 
View this message in context: http://www.nabble.com/Overriding-panel-markup-tp14642196p19157016.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


Re: Overriding panel markup

Posted by shetc <sh...@bellsouth.net>.
Hi Eelco,

Is it possible to give a newbie some pointers on how this extension would
work?

Thanks,
Steve



Eelco Hillenius wrote:
> 
>> I wondering what's the best approach to overriding the markup for a
>> panel. Is there a method I can override or should I just extend the
>> Panel?
> 
> You should extend it. You *could* use a custom resolution (see the
> custom markup example in wicket-examples), but extending the class is
> easier to implement (and probably to maintain).
> 
>> I thought extending might be overkill if all I want to do is
>> specify different markup but not change the functionality. Specically
>> I'm trying to override the markup for
>> org.apache.wicket.authentication.panel.SignInPanel to restructure it but
>> maintain all of the wicket ids, etc.
> 
> Just create another class. You VM can handle it :-)
> 
> Eelco
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Overriding-panel-markup-tp14642196p19154336.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


Re: Overriding panel markup

Posted by Chris Webb <ch...@voxsurf.com>.
I imagine it can :)

cheers

Eelco Hillenius wrote:
>> I wondering what's the best approach to overriding the markup for a
>> panel. Is there a method I can override or should I just extend the
>> Panel?
>>     
>
> You should extend it. You *could* use a custom resolution (see the
> custom markup example in wicket-examples), but extending the class is
> easier to implement (and probably to maintain).
>
>   
>> I thought extending might be overkill if all I want to do is
>> specify different markup but not change the functionality. Specically
>> I'm trying to override the markup for
>> org.apache.wicket.authentication.panel.SignInPanel to restructure it but
>> maintain all of the wicket ids, etc.
>>     
>
> Just create another class. You VM can handle it :-)
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   

Re: Overriding panel markup

Posted by Eelco Hillenius <ee...@gmail.com>.
> I wondering what's the best approach to overriding the markup for a
> panel. Is there a method I can override or should I just extend the
> Panel?

You should extend it. You *could* use a custom resolution (see the
custom markup example in wicket-examples), but extending the class is
easier to implement (and probably to maintain).

> I thought extending might be overkill if all I want to do is
> specify different markup but not change the functionality. Specically
> I'm trying to override the markup for
> org.apache.wicket.authentication.panel.SignInPanel to restructure it but
> maintain all of the wicket ids, etc.

Just create another class. You VM can handle it :-)

Eelco

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