Re: Calling Methods based on page parameters

2007-09-16 Thread darrengreer
lse could seem longer than reflection, but in the case of > reflection you need to write 50+ properties. > -- View this message in context: http://www.nabble.com/Calling-Methods-based-on-page-parameters-tf4448115.html#a12725909 Sent from the Wicket - User mailing list a

Re: Calling Methods based on page parameters

2007-09-16 Thread darrengreer
-- View this message in context: http://www.nabble.com/Calling-Methods-based-on-page-parameters-tf4448115.html#a12711488 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Calling Methods based on page parameters

2007-09-16 Thread David Bernard
Hi, If you use if or switch, put at the top the most used. Using if/else could seem longer than reflection, but in the case of reflection you need to write 50+ properties. Regards. darrengreer wrote: I'm going to give it a go with the switch statement, thanks to both of you. I'll let you kno

Re: Calling Methods based on page parameters

2007-09-16 Thread darrengreer
I'm going to give it a go with the switch statement, thanks to both of you. I'll let you know how it goes. Of course, if you can just use numbers, then you can just use switch()... /Gwyn -- View this message in context: http://www.nabble.com/Calling-Methods-based-on-page-

Re: Calling Methods based on page parameters

2007-09-16 Thread Gwyn Evans
My expectation would be that it wouldn't be significant/noticeable, but it should be easy enough to knock up a test to confirm and quantify that... Of course, if you can just use numbers, then you can just use switch()... /Gwyn On Sunday, September 16, 2007, 1:01:02 PM, darrengreer <[EMAIL PROTE

Re: Calling Methods based on page parameters

2007-09-16 Thread darrengreer
a list of if/else >if ("up".equals(panelType)) { > return new UserPanel(id); >} >if( "xx".equals(panelType)) { > ... >} > -- View this message in context: http://www.nabble.com/Calling-Methods-based-on-page-parameters-tf4448115.

Re: Calling Methods based on page parameters

2007-09-15 Thread David Bernard
Hi, First I suggest you to create a factory class in charge of converting string to instance : Panel MyFactory.newComponent(String panelType, String id); To implement the method, I see 2 ways: 1/ a list of if/else if ("up".equals(panelType)) { return new UserPanel(id); } if( "xx".equ

Calling Methods based on page parameters

2007-09-15 Thread darrengreer
could point me in the right direction, or explain to me how much easier this is to do using some wicket feature I haven't figure out yet. -- View this message in context: http://www.nabble.com/Calling-Methods-based-on-page-parameters-tf4448115.html#a1