Greetings all,

I was wondering what Wicket users & devs might thing of a possible API change 
for a future version (maybe Wicket 7?) of including a varargs array of 
Component as the final parameter of all of the various MarkupContainer 
subclasses?  I find myself doing things like these a lot:

    pnlNoRsvp = new WebMarkupContainer("pnlNoRsvp");
    pnlRsvp = new StatusPanel("pnlRsvp");
    pnlConfirm = new ConfirmPanel("pnlConfirm");
    pnlRsvpRules = new RsvpRulesPanel("pnlRsvpRules");

    RsvpPage.this.add(
        new Label("event.title"),
        new CssFeedbackPanel("feedback"),
        new Form<RsvpPage>("frmRsvp", cpm) {
          {
            add(pnlNoRsvp, pnlRsvp, pnlConfirm);
          }
        },
        pnlRsvpRules
    );

-- or --
    
    Form<RsvpPage> frmRsvp = new Form<RsvpPage>("frmRsvp", cpm);
    frmRsvp.add(pnlNoRsvp, pnlRsvp, pnlConfirm);

    RsvpPage.this.add(
        new Label("event.title"),
        new CssFeedbackPanel("feedback"),
        frmRsvp,
        pnlRsvpRules
    );

--

If Form and the various other Wicket MarkupContainer's had constructors with 
Component... as their final parameter, it would be possible to do something 
like:

    RsvpPage.this.add(
        new Label("event.title"),
        new CssFeedbackPanel("feedback"),
        new Form<RsvpPage>("frmRsvp", cpm, pnlNoRsvp, pnlRsvp, pnlConfirm),
        pnlRsvpRules
    );

--

Granted, this would balloon the number of constructors throughout the framework 
just to save a bit of typing.  Curious what others might think...

Best regards,
Zac Bedell
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to