Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-11 Thread Juergen Donnerstag
Please change javadoc as well if you remove final (describe in short the use case). In general I'm very very careful in opening things up. Juergen On 11/10/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Yeah. Erik, I see your point for the general case, but Alberto's case - which I have myself

Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-10 Thread Alberto Bueno
In my case, I have created a TextField component, that is a panel that contains internally a TextField wicket component. Now, if I add the method addToField, the user will have two methods: TextField.add(IBehavior behavior) TextField.addToField(IBehavior behavior) I think that this case

Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-10 Thread Eelco Hillenius
Yeah. Erik, I see your point for the general case, but Alberto's case - which I have myself sometimes too - is that you only use a panel because you have to, but you want the user to view your component as one of it's embedded elements (in his case the TextField). I think that's a valid case. So,

Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-09 Thread Alberto Bueno
Hi, now I have this solution, but I don't like it for you reasons: - Now I have two methods to add a Behavior: add(IBehavior) and addToField(IBehavior), and for the users can be confuse. - I want to have a transparent component. The user doesn't have to know that he is working with a panel.

Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-09 Thread Eelco Hillenius
I could definitively live with removing final there. And maybe some other methods too. Anyone against removing final from add(IBehavior)? Eelco On 11/9/06, Alberto Bueno [EMAIL PROTECTED] wrote: Hi, now I have this solution, but I don't like it for you reasons: - Now I have two methods to

Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-09 Thread Erik van Oosten
I am definitely /not/ against removing final, but it is not going to work (not in general that is). Alberto's defense is that the user thinks he is working with a field, while in reality he is working with a panel. I assume that Alberto is using a panel because he wants some extra

[Wicket-user] Why add(IBehavior) is final?

2006-11-08 Thread Alberto Bueno
Hi, I want to overwrite the add(IBehavior) method of the component, but this method is final. I want to use the same idea of AlternateParent when we add a new component. I have a panel, and I want to add a behavior in the panel, but the behavior is used in a field component that is in the

Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-08 Thread Erik van Oosten
Why don't you write in your panel: void addToField(Behavior b) {...}? There is no need to corrupt the meaning of Wicket methods ;) Regards, Erik. Alberto Bueno schreef: Hi, I want to overwrite the add(IBehavior) method of the component, but this method is final. I want to use the