Great. I must have just imagined the anti-pattern comment or got it the wrong
way around.
Thanks
Eelco Hillenius wrote:
>
>> Any distinct differences between using MarkupContainer.get(path) or just
>> holding a reference to a component? The latter seems faster and more
>> consistent with GWT/Swing?
>>
>> Got a vague memory of reading somewhere that holding lots of references
>> to
>> Components is an anti-pattern but I can't find it again and I don't think
>> it
>> elaborated.
>>
>> I'm thinking of simple use cases like wanting to disable a button during
>> an
>> event. So should I do get("myButton") or when I create the button hold
>> onto
>> a reference?
>
> I would hold onto a reference. Much better when you refactor and for
> tracking down what happens in your code. And it doesn't matter for
> memory consumption here, as you'd have myButton in your hierarchy
> anyway, right?
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/MarkupContainer.get%28path%29-or-hold-reference--tf4358991.html#a12423048
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]