Hi Igor,

Thanks for your answer. It's a nice solution as well although I
personally don't like to create too many anonymous classes. Kinda messes
up the code in my opinion :)

I was thinking there might be a resource for 'most common wicket
patterns' or something similar. Guess wicket is too young for that yet?

Anyway, wicket is a great framework - I managed to  push it through as
the framework for my current project and cannot wait to dig deeper into
it. :)

Thanks again,
Che




> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Igor Vaynberg
> Sent: Monday, September 04, 2006 8:05 PM
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] Wicket coding style
> 
> there is no "one" way that is considered the best. wicket is 
> code-centric so you can adapt it to your coding style.
> 
> personally - i would have the panel be abstract and have an 
> abstract onclick() which the link would forward to. then in 
> this onclick i would set the page - that way your reusable 
> panel doesnt need to know anything about the page and you can do 
> 
> add(new MyCustomPanel("panel") { void onclick() { 
> setResponsePage(MyPage.class); } }
> 
> or
> 
> add(new MyCustomPanel("panel") { void onclick() { 
> setResponsePage(new MyPage(some params)); } } 
> 
> but to the panel its all the same.
> 
> -Igor
> 
> 
> 
> 
> On 9/4/06, Che Schneider <[EMAIL PROTECTED]> wrote:
> 
>       Hi all,
>       
>       Is there a decent resource somewhere on how to do 
> things 'properly' (aka
>       nice and clean :) in wicket?
>       I can always think of quite a few ways to solve a 
> problem but since I am
>       totally new to wicket I am not sure which way is the 
> right one.. 
>       
>       Example:
>       In a custom panel I want to create a link to another 
> page. Since I want
>       to reuse my panel, that link should be dynamic.
>       Is it better to have a constructor argument for the 
> class to link to? Or
>       should I better have the panel only accept a custom 
> model that has a
>       getter for the class?
>       Or is there an even better way? :)
>       
>       Thanks a lot in advance,
>       Che
>       
>       
>       ______________________________
>       DISCLAIMER: This e-mail message is intended for the 
> addressee(s) or authorized recipient only. If you are not the 
> addressee, or an authorized recipient, you are specifically 
> advised that any use, distribution, publication, copying or 
> repetition of this information is prohibited. If you have 
> received this information in error, please notify us 
> immediately (+31 (0)20 50 25 800) and destroy this message. 
>       
>       
> --------------------------------------------------------------
> -----------
>       Using Tomcat but need to do more? Need to support web 
> services, security?
>       Get stuff done quickly with pre-integrated technology 
> to make your job easier 
>       Download IBM WebSphere Application Server v.1.0.1 based 
> on Apache Geronimo
>       
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
dat=121642 
>       _______________________________________________
>       Wicket-user mailing list
>       Wicket-user@lists.sourceforge.net
>       
> https://lists.sourceforge.net/lists/listinfo/wicket-user 
> <https://lists.sourceforge.net/lists/listinfo/wicket-user> 
>       
> 
> 
> ______________________________
> DISCLAIMER: This e-mail message is intended for the 
> addressee(s) or authorized recipient only. If you are not the 
> addressee, or an authorized recipient, you are specifically 
> advised that any use, distribution, publication, copying or 
> repetition of this information is prohibited. If you have 
> received this information in error, please notify us 
> immediately (+31 (0)20 50 25 800) and destroy this 
> message.______________________________
> DISCLAIMER: This e-mail message is intended for the 
> addressee(s) or authorized recipient only. If you are not the 
> addressee, or an authorized recipient, you are specifically 
> advised that any use, distribution, publication, copying or 
> repetition of this information is prohibited. If you have 
> received this information in error, please notify us 
> immediately (+31 (0)20 50 25 800) and destroy this message.
> 
______________________________
DISCLAIMER: This e-mail message is intended for the addressee(s) or authorized 
recipient only. If you are not the addressee, or an authorized recipient, you 
are specifically advised that any use, distribution, publication, copying or 
repetition of this information is prohibited. If you have received this 
information in error, please notify us immediately (+31 (0)20 50 25 800) and 
destroy this message.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to