@Override protected void onInstantiation() { super.onInstantiation(); setBootstrapType(BootstrapType.PRIMARY); }
@Override protected void onSubmit(AjaxRequestTarget target) { AjaxFormCommand.this.onSubmit(target); trySendActionPerformed(); }
@Override public void detachModels() { super.detachModels(); if(displayModeModel!=null) displayModeModel.detach(); }
@Override public void onSubmit(AjaxRequestTarget target) { super.onSubmit(target); loginConsumer.accept(target); } };
@Override @SuppressWarnings("unchecked") protected void populateItem(final ListItem<T> item) { Component component = visualizer.createComponent("item", DisplayMode.EDIT, documentModel, propertyModel, oType, item.getModel()); if (embeddedView == null && component != null) embeddedView = (Class<FormComponent>) component.getClass(); item.add(component); item.add(new AjaxFormCommand<T>("remove", "command.remove") { @Override public void onClick(Optional<AjaxRequestTarget> targetOptional) { convertToData(); getData().remove(item.getIndex()); targetOptional.ifPresent(target ->target.add(EmbeddedCollectionEditPanel.this)); listView.removeAll(); } }.setDefaultFormProcessing(false) .setAutoNotify(false) .setBootstrapSize(BootstrapSize.EXTRA_SMALL) .setBootstrapType(BootstrapType.DANGER) .setIcon((String)null)); }
@Override protected void onConfigure() { super.onConfigure(); setVisibilityAllowed(modeModel.getObject().equals(DisplayMode.EDIT)); }
public void onSubmit(AjaxRequestTarget target) { onClick(Optional.of(target)); }
@Override protected void onInitialize() { super.onInitialize(); modal = new ModalWindow("modal"); modal.setAutoSize(true); add(modal); initializeContent(modal); setAutoNotify(false); }
@Override public void onSubmit(AjaxRequestTarget target) { super.onSubmit(target); IModel<OrienteerUser> model = DefaultRestorePasswordPanel.this.getModel(); DBClosure.sudoConsumer(db -> { OrienteerUser user = model.getObject(); String password = passwordModel.getObject(); user.setPassword(password); user.save(); userService.clearRestoring(user); }); onRestore(target, model); } };
@Override protected void populateItem(final ListItem<Pair<V>> item) { item.add(getKeyEditComponent(item)); item.add(visualizer.createComponent("item", DisplayMode.EDIT, documentModel, propertyModel, oType, new PropertyModel<V>(item.getModel(), "value"))); item.add(new AjaxFormCommand<Object>("remove", "command.remove") { @Override public void onClick(Optional<AjaxRequestTarget> targetOptional) { convertToData(); getData().remove(item.getIndex()); targetOptional.ifPresent(target -> target.add(EmbeddedMapEditPanel.this)); listView.removeAll(); } }.setDefaultFormProcessing(false) .setAutoNotify(false) .setBootstrapSize(BootstrapSize.EXTRA_SMALL) .setBootstrapType(BootstrapType.DANGER) .setIcon((String)null)); }
@Override protected void onConfigure() { super.onConfigure(); if(displayModeModel!=null) setVisible(DisplayMode.EDIT.equals(displayModeModel.getObject())); }
@Override public void onClick(Optional<AjaxRequestTarget> targetOptional) { super.onClick(targetOptional); rowModel.getObject().delete(); DataTable<?, ?> table = findParent(DataTable.class); if(table!=null && targetOptional.isPresent()) targetOptional.get().add(table); }
@Override protected void onInstantiation() { super.onInstantiation(); setBootstrapType(BootstrapType.PRIMARY); }
@Override public void onSubmit(AjaxRequestTarget target) { super.onSubmit(target); OrienteerUser user = DefaultRegistrationPanel.this.getModelObject(); user.setName(user.getEmail()); user.setPassword(passwordModel.getObject()); user.setAccountStatus(OSecurityUser.STATUSES.SUSPENDED); onRegister(target, DefaultRegistrationPanel.this.getModel()); } };
.setAutoNotify(false) .setBootstrapSize(BootstrapSize.EXTRA_SMALL) .setBootstrapType(BootstrapType.PRIMARY)
@SuppressWarnings("unchecked") @Override protected void onConfigure() { super.onConfigure(); if(checkboxColumn==null) { for (IColumn<T, ?> column : table.getColumns()) { if(column instanceof CheckBoxColumn) { checkboxColumn=(CheckBoxColumn<T, ?, ?>) column; break; } } } setVisible(checkboxColumn!=null); }
@Override protected void onInstantiation() { super.onInstantiation(); setBootstrapType(BootstrapType.DANGER); setIcon(FAIconType.times); }
.setAutoNotify(false) .setBootstrapSize(BootstrapSize.EXTRA_SMALL) .setBootstrapType(BootstrapType.PRIMARY)
@Override protected void onInstantiation() { super.onInstantiation(); setBootstrapType(BootstrapType.PRIMARY); add(AttributeModifier.append("class", "mx-auto")); }