On Wed, Jul 3, 2013 at 11:35 AM, Jesse Long <[email protected]> wrote:
> First, requiring the component to know, at constructor time, the wicket:id
> of the tag it will be added to makes creating components difficult and
> clumsy.
What is clumsy about it? What is difficult to creating components currently?
> What do you think about changing this pattern:
>
> add(new MyComponent("theIdInMarkup"));
>
> to this:
>
> add("theIdInMarkup", new MyComponent());
>
> This allows us to separate the construction of the components from the
> populating of the markup.
What is the benefit of this? What are the upsides?
> I can think of one downside,
> Component#replaceWith() will need some re-working.
I can think of one other: a minor breakage in a little used part of our API.
Martijn