Example usage for org.apache.wicket.markup ComponentTag append

List of usage examples for org.apache.wicket.markup ComponentTag append

Introduction

In this page you can find the example usage for org.apache.wicket.markup ComponentTag append.

Prototype

public final void append(String key, CharSequence value, String separator) 

Source Link

Document

Appends specified value to the attribute

Usage

From source file:com.evolveum.midpoint.web.component.TreeThemeBasic.java

License:Apache License

@Override
public void onComponentTag(Component component, ComponentTag tag) {
    tag.append("class", "tree-theme-basic", " ");
}

From source file:com.googlecode.wicket.kendo.ui.form.Check.java

License:Apache License

@Override
protected void onComponentTag(ComponentTag tag) {
    super.onComponentTag(tag);

    tag.append("class", "k-checkbox", " ");
}

From source file:com.googlecode.wicket.kendo.ui.form.EmailTextField.java

License:Apache License

@Override
protected void onComponentTag(ComponentTag tag) {
    super.onComponentTag(tag);

    tag.append("class", "k-textbox", " ");

    if (!this.isEnabledInHierarchy()) {
        tag.append("class", "k-state-disabled", " ");
    }//from  ww w . j  a  v  a  2s. c o  m
}

From source file:com.googlecode.wicket.kendo.ui.form.Radio.java

License:Apache License

@Override
protected void onComponentTag(ComponentTag tag) {
    super.onComponentTag(tag);

    tag.append("class", "k-radio", " ");
}

From source file:com.pingunaut.wicket.chartjs.core.AbstractChartPanel.java

License:Apache License

/**
 * Instantiates a new abstract chart panel.
 * /*from   ww w  . j a  v  a2  s .c  o m*/
 * @param id
 *            the markup id
 * @param c
 *            the IModel of the chart, rendered in this panel
 * @param width
 *            the width
 * @param height
 *            the height
 */
public AbstractChartPanel(String id, IModel<C> c, final int width, final int height) {
    super(id);
    this.chart = c;
    this.width = width;
    this.height = height;
    wmc = new WebMarkupContainer("chart") {
        private static final long serialVersionUID = 3385419188467369696L;

        @Override
        protected void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            tag.append("width", String.valueOf(width), " ");
            tag.append("height", String.valueOf(height), " ");
        }
    };
}

From source file:com.premiumminds.webapp.wicket.bootstrap.BootstrapControlGroupFeedback.java

License:Open Source License

@Override
protected void onComponentTag(ComponentTag tag) {
    super.onComponentTag(tag);

    if (new FeedbackCollector(getPage()).collect(filter).size() > 0)
        tag.append("class", "has-error", " ");
}

From source file:com.premiumminds.webapp.wicket.bootstrap.BootstrapFeedbackPopover.java

License:Open Source License

@Override
protected void onComponentTag(ComponentTag tag) {
    super.onComponentTag(tag);

    if (model.getObject().size() > 0)
        tag.append("class", "has-error", " ");
}

From source file:com.premiumminds.wicket.crudifier.form.elements.DateControlGroup.java

License:Open Source License

public DateControlGroup(String id, IModel<Date> model) {
    super(id, model);

    BootstrapDatepicker datepicker = new BootstrapDatepicker("datepicker") {
        private static final long serialVersionUID = -1294334224980199521L;

        @Override// w  w  w  .  j  a va  2  s . c  o m
        protected void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            if (isEnabledInHierarchy())
                tag.append("class", "input-append", " ");
        }
    };

    dateField = new DateTextField("input", getModel()) {
        private static final long serialVersionUID = 4925601760084153117L;

        @Override
        public void error(IValidationError error) {
            MessageSource source = new MessageSource();
            Serializable message = error.getErrorMessage(source);

            super.error(message);
        }
    };

    datepicker.add(dateField);
    datepicker.add(new WebMarkupContainer("icon") {
        private static final long serialVersionUID = -4412622222987841668L;

        @Override
        protected void onConfigure() {
            super.onConfigure();
            //don't display icon if it is disabled
            setVisible(dateField.isEnabledInHierarchy());
        }
    });
    add(new BootstrapControlGroupFeedback("controlGroup").add(datepicker));

}

From source file:com.premiumminds.wicket.crudifier.form.elements.JodaInstantControlGroup.java

License:Open Source License

public JodaInstantControlGroup(String id, IModel<DateTime> model) {
    super(id, model);

    BootstrapJodaDatepicker<DateTime> datepicker = new BootstrapJodaDatepicker<DateTime>("datepicker") {
        private static final long serialVersionUID = -1294334224980199521L;

        @Override/*from  www. j a  va 2  s. c om*/
        protected void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            if (isEnabledInHierarchy())
                tag.append("class", "input-append", " ");
        }
    };

    dateField = new JodaInstantTextField<DateTime>("input", getModel(), DateTime.class) {
        private static final long serialVersionUID = 4925601760084153117L;

        @Override
        public void error(IValidationError error) {
            MessageSource source = new MessageSource();
            Serializable message = error.getErrorMessage(source);

            super.error(message);
        }
    };

    datepicker.add(dateField);
    datepicker.add(new WebMarkupContainer("icon") {
        private static final long serialVersionUID = -4412622222987841668L;

        @Override
        protected void onConfigure() {
            super.onConfigure();
            //don't display icon if it is disabled
            setVisible(dateField.isEnabledInHierarchy());
        }
    });
    add(new BootstrapControlGroupFeedback("controlGroup").add(datepicker));

}

From source file:com.przemo.projectmanagementweb.controls.EditableDeletableItemControl.java

@Override
protected void onComponentTag(ComponentTag tag) {
    super.onComponentTag(tag);
    if (className != null) {
        tag.append("class", className, " ");
    }//from  w w w.j a  v  a2 s . c  om
}