private void setupEditor(Component newEditor) { editor.replaceWith(newEditor); editor = newEditor; }
@Override protected void respond(AjaxRequestTarget target) { Component old = firstComponent; firstComponent = createFirstComponent(); old.replaceWith(firstComponent); target.addComponent(firstComponent); }
/** * Replaces the loading panel's placeholder component (indicator) by the lazy-loaded component. * Warning, should be called only once! * * @return the lazy-loaded component */ private Component replaceComponent() { return this.panel.getPlaceholderComponent().replaceWith(this.getLazyPanel()); //warning, inner panel is detached here. }
private void actionCancelExistingStatement(AjaxRequestTarget aTarget) { content = content.replaceWith(new ViewMode(CONTENT_MARKUP_ID, statement)); aTarget.add(this); }
/** * Replaces the loading panel's placeholder component (indicator) by the lazy-loaded component.<br> * <br> * <b>Warning: </b> should be called only once! * * @return the lazy-loaded component */ private Component replaceComponent() { return this.panel.getPlaceholderComponent().replaceWith(this.getLazyPanel()); // warning, inner panel is detached here. }
/** * Replaces the loading panel's placeholder component (indicator) by the lazy-loaded component.<br> * <br> * <b>Warning: </b> should be called only once! * * @return the lazy-loaded component */ private Component replaceComponent() { return this.panel.getPlaceholderComponent().replaceWith(this.getLazyPanel()); // warning, inner panel is detached here. }
private void actionCancelExistingStatement(AjaxRequestTarget aTarget) { content = content.replaceWith(new ViewMode(CONTENT_MARKUP_ID, statement)); aTarget.add(this); }
/** * Replaces the loading panel's placeholder component (indicator) by the lazy-loaded component.<br> * <br> * <b>Warning: </b> should be called only once! * * @return the lazy-loaded component */ private Component replaceComponent() { return this.panel.getPlaceholderComponent().replaceWith(this.getLazyPanel()); // warning, inner panel is detached here. }
private void actionCancelExistingStatement(AjaxRequestTarget aTarget) { content = content.replaceWith(new ViewMode(CONTENT_MARKUP_ID, statement)); aTarget.add(this); }
private void actionCancelExistingQualifier(AjaxRequestTarget aTarget) { content = content.replaceWith(new ViewMode(CONTENT_MARKUP_ID, qualifier)); aTarget.add(this); }
private void actionCancelExistingStatement(AjaxRequestTarget aTarget) { content = content.replaceWith(new ViewMode(CONTENT_MARKUP_ID, statement)); aTarget.add(this); }
@Override public void onClick(Optional<AjaxRequestTarget> targetOptional) { targetOptional.ifPresent(target -> { Component componentToBeReplaced = target.getPage().get(PATH_TO_MONITOR_DETAILS); JamonMonitorDetailsPanel replacement = new JamonMonitorDetailsPanel( PATH_TO_MONITOR_DETAILS, monitorLabel); componentToBeReplaced.replaceWith(replacement); target.add(replacement); }); } }
@SuppressWarnings("deprecation") private Component replaceItem(AjaxRequestTarget target, int index) { Component item = commitsView.get(index); Component newItem = newCommitItem(item.getId(), index); item.replaceWith(newItem); target.add(newItem); return newItem; }
private void replaceMonitorDetailsPanel(AjaxRequestTarget target) { EmptyMarkupContainer emptyMarkupContainer = new EmptyMarkupContainer( PATH_TO_MONITOR_DETAILS); target.getPage().get(PATH_TO_MONITOR_DETAILS).replaceWith(emptyMarkupContainer); target.add(emptyMarkupContainer); } }
private void setupEditor() { Component editor = new EditorPanel("editor", new PropertyModel<Menu>(this, "currentMenu")); if (this.editor == null) { add(editor); } else { this.editor.replaceWith(editor); } this.editor = editor; }
private void actionEdit(AjaxRequestTarget aTarget) { KBQualifier shallowCopy = new KBQualifier(qualifier.getObject()); IModel<KBQualifier> shallowCopyModel = Model.of(shallowCopy); EditMode editMode = new EditMode(CONTENT_MARKUP_ID, shallowCopyModel, false); content = content.replaceWith(editMode); aTarget.focusComponent(editMode.getFocusComponent()); aTarget.add(this); }
private void actionEdit(AjaxRequestTarget aTarget) { KBQualifier shallowCopy = new KBQualifier(qualifier.getObject()); IModel<KBQualifier> shallowCopyModel = Model.of(shallowCopy); EditMode editMode = new EditMode(CONTENT_MARKUP_ID, shallowCopyModel, false); content = content.replaceWith(editMode); aTarget.focusComponent(editMode.getFocusComponent()); aTarget.add(this); }
private void actionNewProperty(AjaxRequestTarget target, Form<KBHandle> form) { groupModel.getObject().setProperty(form.getModelObject()); // replace content to show existing statement group with a new, empty statement ExistingStatementGroupFragment fragment = new ExistingStatementGroupFragment( CONTENT_MARKUP_ID); addStatementProto(groupModel.getObject()); content = content.replaceWith(fragment); target.add(StatementGroupPanel.this); }
private void actionNewProperty(AjaxRequestTarget target, Form<KBHandle> form) { groupModel.getObject().setProperty(form.getModelObject()); // replace content to show existing statement group with a new, empty statement ExistingStatementGroupFragment fragment = new ExistingStatementGroupFragment( CONTENT_MARKUP_ID); addStatementProto(groupModel.getObject()); content = content.replaceWith(fragment); target.add(StatementGroupPanel.this); }
@Override protected void onBeforeRender() { boolean isInvalidWorkspace = !getModelObject().getSession().getWorkspace().getName().equals(workspaceModel.getObject().getId()); if (!hasBeenRendered()) { add(newManagePanel(PANEL_ID, getModel())); } else if (isInvalidWorkspace) { setModelObject(getContainerNode(workspaceModel.getObject())); get(PANEL_ID).replaceWith(newManagePanel(PANEL_ID, getModel())); } super.onBeforeRender(); }