Dashboard > People > codesmell > 2008 > Mai > 11 > Wicket DropDownChoice with eye-candy
  codesmell Log In   View a printable version of the current page.  
  Wicket DropDownChoice with eye-candy
Added by Uwe Schaefer, last edited by Uwe Schaefer on Mai 11, 2008
Labels: 

thinking twice, ajax-indicators are not at all eye-candy, but useful from an usablity perspective.

/**
 * Adds an AJAX-Indicator to DropDownChoice 
 * @author Eyal Golan
 */
class DropDownChoiceWithAjaxIndicator extends DropDownChoice implements IAjaxIndicatorAware
{
    private static final long serialVersionUID = 1365817942506006686L;
    private final WicketAjaxIndicatorAppender indicatorAppender = new WicketAjaxIndicatorAppender();

    public DropDownChoiceWithAjaxIndicator(final String id, final IModel choices, final IChoiceRenderer renderer,
            final MarkupContainer markupContainer)
    {
        super(id, choices, renderer);
        init(markupContainer);
    }

    public DropDownChoiceWithAjaxIndicator(final String id, final IModel model, final IModel choices,
            final IChoiceRenderer renderer, final MarkupContainer markupContainer)
    {
        super(id, model, choices, renderer);
        init(markupContainer);
    }

    public DropDownChoiceWithAjaxIndicator(final String id, final IModel model, final IModel choices,
            final MarkupContainer markupContainer)
    {
        super(id, model, choices);
        init(markupContainer);
    }

    public DropDownChoiceWithAjaxIndicator(final String id, final IModel model, final List<Serializable> data,
            final IChoiceRenderer renderer, final MarkupContainer markupContainer)
    {
        super(id, model, data, renderer);
        init(markupContainer);
    }

    public DropDownChoiceWithAjaxIndicator(final String id, final IModel model, final List<Serializable> choices,
            final MarkupContainer markupContainer)
    {
        super(id, model, choices);
        init(markupContainer);
    }

    public DropDownChoiceWithAjaxIndicator(final String id, final IModel choices, final MarkupContainer markupContainer)
    {
        super(id, choices);
        init(markupContainer);
    }

    public DropDownChoiceWithAjaxIndicator(final String id, final List<Serializable> data,
            final IChoiceRenderer renderer, final MarkupContainer markupContainer)
    {
        super(id, data, renderer);
        init(markupContainer);
    }

    public DropDownChoiceWithAjaxIndicator(final String id, final List<Serializable> choices,
            final MarkupContainer markupContainer)
    {
        super(id, choices);
        init(markupContainer);
    }

    public DropDownChoiceWithAjaxIndicator(final String id, final MarkupContainer markupContainer)
    {
        super(id);
        init(markupContainer);
    }

    public String getAjaxIndicatorMarkupId()
    {
        return this.indicatorAppender.getMarkupId();
    }

    private void init(final MarkupContainer markupContainer)
    {
        add(this.indicatorAppender);
    }
}
Mai 2008
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
             

Wicket, Guice and java.lang.reflect.Type
Wicket SecureForm

This site is powered by a free Atlassian Confluence Personal Server License. Evaluate Confluence for your organisation or read more about Confluence licensing here.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators