On Fri, 24 Apr 2009 13:39:35 +0200, Martijn Dashorst
<[email protected]> wrote:
> In what way is MyConvolutedComponentFactory.createNewMyComponent()
> better than "new MyComponent()"?
> 

ideas that come to my mind why to use this:
0) you might be able to reduce generics cluttering by using
TextField<String> = MyConvolutedComponentFactory.createTextField(model); 
with public static <T> TextField<T> createTextField(IModel<T> model);
1) be able to use AOP on components (guice). for example use @Transactional
on onClick method to tightly specify transaction boundaries.
2) you might be able to reuse (immutable,stateless) components
3) you might be able to chose any subtype of component depending on the
provided parameters


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to