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:org.alienlabs.hatchetharry.view.page.HomePage.java

License:Open Source License

private void buildHandMarkup() {
    final Component galleryToUpdate;
    final Boolean isHandDisplayed = this.persistenceService.getPlayer(this.session.getPlayer().getId())
            .isHandDisplayed();//w w  w .j av  a  2s . c  o m
    galleryToUpdate = isHandDisplayed.booleanValue() ? new HandComponent("gallery")
            : new WebMarkupContainer("gallery");

    galleryToUpdate.setOutputMarkupId(true);
    this.galleryParent.add(galleryToUpdate);
}

From source file:org.alienlabs.hatchetharry.view.page.HomePage.java

License:Open Source License

private void buildGraveyardMarkup() {
    final Component graveyardToUpdate;
    final Boolean isGraveyardDisplayed = this.persistenceService.getPlayer(this.session.getPlayer().getId())
            .isGraveyardDisplayed();/* w w w .java2 s  .c  om*/
    graveyardToUpdate = ((isGraveyardDisplayed != null) && isGraveyardDisplayed.booleanValue())
            ? new GraveyardComponent("graveyard")
            : new WebMarkupContainer("graveyard");

    graveyardToUpdate.setOutputMarkupId(true);
    this.graveyardParent.add(graveyardToUpdate);
}

From source file:org.alienlabs.hatchetharry.view.page.HomePage.java

License:Open Source License

private void buildExileMarkup() {
    final Component exileToUpdate;
    final Boolean isExileDisplayed = this.persistenceService.getPlayer(this.session.getPlayer().getId())
            .isExileDisplayed();/*from  w ww. j av a2s  .co m*/
    exileToUpdate = ((isExileDisplayed != null) && isExileDisplayed.booleanValue())
            ? new ExileComponent("exile")
            : new WebMarkupContainer("exile");

    exileToUpdate.setOutputMarkupId(true);
    this.exileParent.add(exileToUpdate);
}

From source file:org.alienlabs.hatchetharry.view.page.HomePage.java

License:Open Source License

private void restoreBattlefieldState() {
    // Sessions must be cleaned up between server restarts, as it's too much
    // difficult// w ww .j a v a2  s  .  com
    // to manage a state recovery
    final Player player1 = this.persistenceService.getPlayer(this.session.getPlayer().getId());
    final Boolean isHandDisplayed = player1.isHandDisplayed();
    final Component galleryToUpdate = isHandDisplayed.booleanValue() ? new HandComponent("gallery")
            : new WebMarkupContainer("gallery");

    galleryToUpdate.setOutputMarkupId(true);
    this.galleryParent.addOrReplace(galleryToUpdate);

    LOGGER.info("this.session.getGameId(): " + this.session.getGameId());
    this.generateCardPanels();

    this.add(new Behavior() {
        private static final long serialVersionUID = 1L;

        @Override
        public void renderHead(final Component component, final IHeaderResponse response) {
            super.renderHead(component, response);
            HomePage.this.restoreStateOfAllCardsInBattlefield(response);
        }

    });
}

From source file:org.apache.solomax.AjaxDownload.java

License:Apache License

@Override
public void bind(Component component) {
    this.component = component;
    if (!(component instanceof Page)) {
        component.setOutputMarkupId(true);
    }//from  w w  w. j a v  a  2 s. c om
}

From source file:org.artifactory.addon.wicket.disabledaddon.AddonNeededBehavior.java

License:Open Source License

@Override
public void bind(Component component) {
    super.bind(component);
    component.setOutputMarkupId(true);
    if (targetId == null) {
        targetId = component.getMarkupId();
    }//from   ww w. ja  v a  2s  . co m
}

From source file:org.artifactory.common.wicket.application.SetPathMarkupIdOnBeforeRenderListener.java

License:Open Source License

@Override
public void onBeforeRender(Component component) {
    String markupId = component.getMarkupId(false);
    if (markupId == null) {
        String id = getPath(component);
        if (id != null) {
            component.setMarkupId(id);/*from  ww w .ja va2  s  .c om*/
            component.setOutputMarkupId(true);
        }
    }
}

From source file:org.artifactory.common.wicket.behavior.DelegateEventBehavior.java

License:Open Source License

public DelegateEventBehavior(final String event, final Component delegate) {
    super(event, new AbstractReadOnlyModel() {
        @Override/*from w w  w.j a v a2  s  . c  o m*/
        public Object getObject() {
            return "dojo.byId('" + delegate.getMarkupId() + "')." + event + "(event);";
        }
    });
    delegate.setOutputMarkupId(true);
}

From source file:org.artifactory.common.wicket.component.checkbox.styled.StyledCheckbox.java

License:Open Source License

public void setSubmitButton(Component submitButton) {
    this.submitButton = submitButton;
    submitButton.setOutputMarkupId(true);
}

From source file:org.artifactory.common.wicket.component.modal.panel.BaseModalPanel.java

License:Open Source License

/**
 * Bind modal panel height to a given component.
 *
 * @param component//ww w  .j  ava  2s .  c om
 */
public void bindHeightTo(Component component) {
    component.setOutputMarkupId(true);
    bindHeightTo(component.getMarkupId());
}