Example usage for org.apache.wicket Component setOutputMarkupId

List of usage examples for org.apache.wicket Component setOutputMarkupId

Introduction

In this page you can find the example usage for org.apache.wicket Component setOutputMarkupId.

Prototype

public final Component setOutputMarkupId(final boolean output) 

Source Link

Document

Sets whether or not component will output id attribute into the markup.

Usage

From source file:com.pushinginertia.wicket.core.form.behavior.InputDecorator.java

License:Open Source License

@Override
public void bind(final Component component) {
    component.setOutputMarkupId(true);
}

From source file:com.romeikat.datamessie.core.base.ui.behavior.FocusBehavior.java

License:Open Source License

@Override
public void bind(final Component component) {
    if (component == null || !FormComponent.class.isAssignableFrom(component.getClass())) {
        throw new IllegalArgumentException("FocusBehavior must be bound to a FormComponent");
    }/*from   w w  w  .j a  v a 2s  .  co m*/
    component.setOutputMarkupId(true);
}

From source file:com.userweave.application.ModuleConfigurationContainer.java

License:Open Source License

private Component getUI(int configurationIndex) {

    Component ui = null;
    if (!configurationAvailable()) {
        ui = getNoConfigurationAvailableUI();
    } else {//from   w w w.  j av a 2s  .  c o  m
        SurveyUI testUI = getActiveConfigurationTestUI(configurationIndex, surveyExecutionId,
                new OnFinishCallback() {
                    public void onFinish() {
                        next();
                    }
                });
        if (testUI != null) {
            testUI.setColorNextButton(nextButtonColor);
            ui = testUI;
        } else {
            ui = new Label(idTestUI,
                    "getTestUI on module " + configurations.get(configurationIndex).getModule().getModuleId()
                            + " delivered a null Component. You want to correct this :-)");
        }
    }
    ui.setOutputMarkupId(true);
    return ui;
}

From source file:com.userweave.module.methoden.questionnaire.page.conf.question.multiplerating.MultipleRatingConfigurationPanel.java

License:Open Source License

private Component createAntipode(String componentId, final String antipodeName, IModel antipodeModel,
        Locale locale) {//from w  w w  .j  a  v  a  2s. c o m
    Component antipode;

    if (studyIsInState(StudyState.INIT)) {
        antipode = new AuthOnlyTextField(componentId,
                new LocalizedPropertyModel(antipodeModel, antipodeName, locale),
                AjaxBehaviorFactory.getUpdateBehavior("onblur", MultipleRatingConfigurationPanel.this));

        ((AuthOnlyTextField) antipode).setRequired(true);

        antipode.setOutputMarkupId(true);
    } else {
        antipode = new Label(componentId, new LocalizedPropertyModel(antipodeModel, antipodeName, locale));
    }

    return antipode;
}

From source file:com.userweave.module.methoden.questionnaire.page.grouping.QuestionnaireGroupingPanel.java

License:Open Source License

private void replaceGroupingPanel(AjaxRequestTarget target, Component replacement) {
    replacement.setOutputMarkupId(true);
    addGroupPanel.replaceWith(replacement);
    addGroupPanel = replacement;/*from  w w w  . ja  v  a 2s.  c  om*/
    target.addComponent(addGroupPanel);
}

From source file:com.userweave.pages.administration.AdministrationPanel.java

License:Open Source License

private void replaceContent(Component replacement, AjaxRequestTarget target) {
    replacement.setOutputMarkupId(true);
    if (content == null) {
        add(replacement);//from   w  ww . ja  va 2  s  .c  om
    } else {
        content.replaceWith(replacement);
    }
    content = replacement;

    if (target != null) {
        //target.addComponent(this.setOutputMarkupId(true));
        target.addComponent(content);
    }

}

From source file:com.userweave.pages.administration.SimpleAdministrationPanel.java

License:Open Source License

private void replaceContent(Component replacement, AjaxRequestTarget target) {
    replacement.setOutputMarkupId(true);

    if (content == null) {
        add(replacement);/* www .  j a  v a 2s  .  com*/
    } else {
        content.replaceWith(replacement);
    }
    content = replacement;

    if (target != null) {
        target.add(content);
    }

}

From source file:com.userweave.pages.configuration.base.ConfigurationReportPanel.java

License:Open Source License

@Override
public void onStateChange(UiState state, AjaxRequestTarget target, EventHandler callback,
        StateChangeTrigger trigger) {//from ww  w.jav a2s .c  om
    BaseFunctionEditEntityPanel<T> actionComponentReplacement = getActionComponent("actions", state, callback);

    Component stateDependReplacement;

    if (state == UiState.CONFIG) {
        stateDependReplacement = getConfigurationComponent(STATE_DEPEND_COMPONENT_ID);
    } else {
        stateDependReplacement = getReportComponent(STATE_DEPEND_COMPONENT_ID, trigger);
    }

    actionComponentReplacement.setOutputMarkupId(true);
    stateDependReplacement.setOutputMarkupId(true);

    actionComponent.replaceWith(actionComponentReplacement);
    actionComponent = actionComponentReplacement;

    stateDependComponent.replaceWith(stateDependReplacement);
    stateDependComponent = stateDependReplacement;

    target.add(actionComponent);
    target.add(stateDependComponent);
}

From source file:com.userweave.pages.configuration.question.QuestionConfigurationPanel.java

License:Open Source License

public void onFilter(AjaxRequestTarget target, StateChangeTrigger trigger) {
    if (content instanceof QuestionReportPanel) {
        Component replacement = createDefaultModuleConfigurationPanel(moduleConfigurationId, studyId, null,
                changeTabsCallback, moduleIndex, trigger.getState(), trigger);

        replacement.setOutputMarkupId(true);

        content.replaceWith(replacement);
        content = replacement;/*from   ww w.  j  a va 2s.  co m*/

        target.addComponent(content);
    }
}

From source file:com.userweave.pages.configuration.report.FilteredReportPanel.java

License:Open Source License

protected void replaceReportContainer(Component replacement) {
    if (replacement == null) {
        return;/*from  w  ww. j  a v a  2 s.c  om*/
    }

    replacement.setOutputMarkupId(true);

    if (reportContainer != null) {
        if (reportContainer instanceof AjaxTabbedPanel && replacement instanceof AjaxTabbedPanel) {
            // keep selected tab of tabbed panel
            int selectedTab = ((AjaxTabbedPanel) reportContainer).getSelectedTab();

            ((AjaxTabbedPanel) replacement).setSelectedTab(selectedTab);
        }

        reportContainer.replaceWith(replacement);
    } else {
        add(replacement);
    }

    this.reportContainer = replacement;

}