Re: [Wicket-develop] bridge pattern

2006-07-05 Thread Ittay Dror
Eelco Hillenius wrote: > If that's what you want, why not do something simple like this? > > public interface IComponentFactory { > >Button createButton(MarkupContainer parent, String id); > } > > class YuiComponentFactory implements IComponentFactory { > > public Button createButton(Ma

Re: [Wicket-develop] bridge pattern

2006-07-05 Thread Eelco Hillenius
If that's what you want, why not do something simple like this? public interface IComponentFactory { Button createButton(MarkupContainer parent, String id); } class YuiComponentFactory implements IComponentFactory { public Button createButton(MarkupContainer parent, String id) { return

Re: [Wicket-develop] bridge pattern

2006-07-05 Thread Ittay Dror
everything is doable, the question is about design (not if i can make it work, but if i can make it work reusing code, easy to change etc.) say i have YuiButton and YuiMenu, both need to contribute the same js to the header. now i want to reuse the code that adds this header contribution. I can

Re: [Wicket-develop] bridge pattern

2006-07-05 Thread Eelco Hillenius
Maybe you could be more explicit in what you mean? The differences between those versions would primarily be in the different javascript/ css dependencies they use, which is easy to configure using header contributors. And they would need some different initializations, which you could maybe do wi