helper method?

protected <T extends Component> T setMarkupId(T component, String markupId)
{
  component.setMarkupId(markupId);
  return component;
}


On Mon, Mar 29, 2010 at 7:00 PM, David Chang <david_q_zh...@yahoo.com>wrote:

> Here is what I am using the follow pattern to set up ID for a wicket
> component:
>
> Label abc = new Label("abcd", "abcdedfg");
> abc.setOutputMarkupId(true).setMarkupId(abc.getId());
>
> It takes two lines to do this.
>
> Can I do something like
>
> Label abc = new Label("abcd",
> "abcdedfg").setOutputMarkupId(true).setMarkupId(???);
>
> Is this doable? If yes, then what should go to replace ???
>
> Thanks!
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to