de.agilecoders.wicket.core.markup.html.bootstrap.button.Buttons Java Examples
The following examples show how to use
de.agilecoders.wicket.core.markup.html.bootstrap.button.Buttons.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StatementsPanel.java From inception with Apache License 2.0 | 6 votes |
private void setUpDetailPreference(StatementDetailPreference aDetailPreference) { StatementDetailPreference defaultPreference = StatementDetailPreference.BASIC; boolean isDetailPreferenceUserDefinable = aDetailPreference == null; detailPreference = Model.of(isDetailPreferenceUserDefinable ? defaultPreference : aDetailPreference); // the form for setting the detail preference (and its radio group) is only shown if the // detail preference is user-definable Form<StatementDetailPreference> form = new Form<StatementDetailPreference>( "detailPreferenceForm"); form.add(LambdaBehavior .onConfigure(_this -> _this.setVisible(isDetailPreferenceUserDefinable))); add(form); // radio choice for statement detail preference BootstrapRadioGroup<StatementDetailPreference> choice = new BootstrapRadioGroup<>( "detailPreferenceChoice", Arrays.asList(StatementDetailPreference.values())); choice.setModel(detailPreference); choice.setChoiceRenderer(new EnumRadioChoiceRenderer<>(Buttons.Type.Default, this)); choice.add(new LambdaAjaxFormSubmittingBehavior("change", this::actionStatementDetailPreferencesChanged)); form.add(choice); }
Example #2
Source File: RoomForm.java From openmeetings with Apache License 2.0 | 6 votes |
@Override protected void populateItem(final ListItem<Client> item) { Client c = item.getModelObject(); BootstrapAjaxLink<String> del = new BootstrapAjaxLink<>("clientDelete", Buttons.Type.Outline_Danger) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { kickUser(item.getModelObject()); updateClients(target); } }; del.setIconType(FontAwesome5IconType.times_s) .add(newOkCancelDangerConfirm(this, getString("833"))); item.add(new Label("clientId", "" + c.getUserId())) .add(new Label("clientLogin", "" + c.getUser().getLogin())) .add(del); }
Example #3
Source File: OAuthForm.java From openmeetings with Apache License 2.0 | 6 votes |
@Override protected void populateItem(final ListItem<Map.Entry<String, String>> item) { final Map.Entry<String, String> entry = item.getModelObject(); BootstrapAjaxLink<String> del = new BootstrapAjaxLink<>("delete", Buttons.Type.Outline_Danger) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { OAuthServer s = OAuthForm.this.getModelObject(); s.getMapping().remove(entry.getKey()); updateMapping(); target.add(attrsContainer); } }; del.setIconType(FontAwesome5IconType.times_s) .add(newOkCancelDangerConfirm(this, getString("833"))); item.add(new Label("key", Model.of(entry.getKey()))) .add(new Label("value", Model.of(entry.getValue()))) .add(del); }
Example #4
Source File: SignInDialog.java From openmeetings with Apache License 2.0 | 6 votes |
@Override protected void onInitialize() { add(form = new SignInForm("signin")); header(new ResourceModel("108")); show(true); setCloseOnEscapeKey(false); setBackdrop(Backdrop.STATIC); addButton(new SpinnerAjaxButton("button", new ResourceModel("112"), form, Buttons.Type.Outline_Primary)); // Login addButton(new BootstrapAjaxLink<>("button", Model.of(""), Buttons.Type.Outline_Secondary, new ResourceModel("123")) { private static final long serialVersionUID = 1L; public void onClick(AjaxRequestTarget target) { SignInDialog.this.close(target); register.setClientTimeZone(); register.show(target); } }.setVisible(OpenmeetingsVariables.isAllowRegisterFrontend())); super.onInitialize(); }
Example #5
Source File: StartWidgetView.java From openmeetings with Apache License 2.0 | 6 votes |
@Override protected void onInitialize() { add(new WebMarkupContainer("step1").add(new PublicRoomsEventBehavior())); add(new WebMarkupContainer("step2").add(new PublicRoomsEventBehavior())); add(new WebMarkupContainer("step3").add(new WebMarkupContainer("avTest").add(AttributeModifier.append("href" , RequestCycle.get().urlFor(HashPage.class, new PageParameters().add(APP, APP_TYPE_SETTINGS)).toString())))); add(new WebMarkupContainer("step4").add(new PublicRoomsEventBehavior())); add(new Label("123msg", Application.getString("widget.start.desc")) //Application here is used to substitute {0} .setEscapeModelStrings(false)); add(new BootstrapButton("start", new ResourceModel("788"), Buttons.Type.Outline_Primary).add(new PublicRoomsEventBehavior())); add(new BootstrapButton("calendar", new ResourceModel("291"), Buttons.Type.Outline_Primary).add(new AjaxEventBehavior(EVT_CLICK) { private static final long serialVersionUID = 1L; @Override protected void onEvent(AjaxRequestTarget target) { ((MainPage)getPage()).updateContents(CALENDAR, target); } })); super.onInitialize(); }
Example #6
Source File: EmailForm.java From openmeetings with Apache License 2.0 | 5 votes |
@Override protected void onInitialize() { super.onInitialize(); add(status); add(new Label("subject")); add(new Label("recipients")); add(new Label("body").setEscapeModelStrings(false)); add(new DateLabel("inserted")); add(new DateLabel("updated")); add(new Label("errorCount")); add(new Label("lastError")); add(reset = new BootstrapAjaxButton("reset", new ResourceModel("admin.email.reset.status"), Buttons.Type.Outline_Primary) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { emailDao.resetSendingStatus(EmailForm.this.getModelObject().getId()); target.add(list); } }); reset.setEnabled(false); // add a cancel button that can be used to submit the form via ajax delBtn = new AjaxLink<>("btn-delete") { private static final long serialVersionUID = 1L; public void onClick(AjaxRequestTarget target) { emailDao.delete(EmailForm.this.getModelObject().getId()); EmailForm.this.setModelObject(new MailMessage()); target.add(list, EmailForm.this); } }; delBtn.add(newOkCancelDangerConfirm(this, getString("833"))); add(delBtn.setOutputMarkupPlaceholderTag(true).setOutputMarkupId(true).setVisible(false)); }
Example #7
Source File: OAuthForm.java From openmeetings with Apache License 2.0 | 5 votes |
@Override protected void onInitialize() { add(new CheckBox("isEnabled")); add(new RequiredTextField<String>("name").setLabel(new ResourceModel("165"))); add(new TextField<String>("iconUrl").setLabel(new ResourceModel("1575"))); add(new RequiredTextField<String>("clientId").setLabel(Model.of("client_id"))); add(new RequiredTextField<String>("clientSecret").setLabel(Model.of("client_secret"))); add(redirectUriText = (TextField<String>) new TextField<>("redirectUri", Model.of("")).setLabel(new ResourceModel("1587"))); add(new RequiredTextField<String>("requestKeyUrl").setLabel(new ResourceModel("1578"))); add(new DropDownChoice<>("requestTokenMethod", List.of(RequestTokenMethod.values()), new ChoiceRenderer<RequestTokenMethod>("name", "name"))); add(new RequiredTextField<String>("requestTokenUrl").setLabel(new ResourceModel("1579"))); add(new RequiredTextField<String>("requestTokenAttributes").setLabel(new ResourceModel("1586"))); add(new RequiredTextField<String>("requestInfoUrl").setLabel(new ResourceModel("1580"))); add(new DropDownChoice<>("requestInfoMethod", List.of(RequestInfoMethod.values()), new ChoiceRenderer<RequestInfoMethod>("name", "name"))); Form<Void> mappingForm = new Form<>("mappingForm"); final TextField<String> omAttr = new TextField<>("omAttr", Model.of("")); final TextField<String> oauthAttr = new TextField<>("oauthAttr", Model.of("")); add(mappingForm.add(omAttr, oauthAttr , new BootstrapAjaxButton("addMapping", new ResourceModel("1261"), mappingForm, Buttons.Type.Outline_Primary) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { if (Strings.isEmpty(omAttr.getModelObject()) || Strings.isEmpty(oauthAttr.getModelObject())) { return; } OAuthServer s = OAuthForm.this.getModelObject(); s.addMapping(omAttr.getModelObject(), oauthAttr.getModelObject()); updateMapping(); target.add(attrsContainer, mappingForm); } }).setOutputMarkupId(true)); add(attrsContainer.add(updateMapping()).setOutputMarkupId(true)); super.onInitialize(); }
Example #8
Source File: AccessDeniedPage.java From openmeetings with Apache License 2.0 | 5 votes |
@Override protected void onInitialize() { super.onInitialize(); add(new Form<Void>("form").add( new BootstrapButton("home", new ResourceModel("124"), Buttons.Type.Outline_Primary) { private static final long serialVersionUID = 1L; @Override public void onSubmit() { setResponsePage(Application.get().getHomePage()); } } , new BootstrapButton("logout", new ResourceModel("310"), Buttons.Type.Outline_Danger) { private static final long serialVersionUID = 1L; @Override public boolean isVisible() { return WebSession.get().isSignedIn(); } @Override public void onSubmit() { getSession().invalidate(); setResponsePage(Application.get().getSignInPageClass()); } }) ); }
Example #9
Source File: RegisterDialog.java From openmeetings with Apache License 2.0 | 5 votes |
@Override protected void onInitialize() { header(new ResourceModel("113")); setUseCloseHandler(true); addButton(new SpinnerAjaxButton("button", new ResourceModel("121"), form, Buttons.Type.Outline_Primary)); // register addButton(OmModalCloseButton.of()); add(form); add(new Label("register", getString("121")).setRenderBodyOnly(true), new BookmarkablePageLink<>("link", PrivacyPage.class)); reset(null); super.onInitialize(); }
Example #10
Source File: ResetPasswordDialog.java From openmeetings with Apache License 2.0 | 5 votes |
@Override protected void onInitialize() { header(new ResourceModel("325")); setCloseOnEscapeKey(false); setBackdrop(Backdrop.STATIC); show(true); add(form); addButton(new BootstrapAjaxButton("button", new ResourceModel("327"), form, Buttons.Type.Outline_Primary) { private static final long serialVersionUID = 1L; }); // Reset super.onInitialize(); }
Example #11
Source File: ForgetPasswordDialog.java From openmeetings with Apache License 2.0 | 5 votes |
@Override protected void onInitialize() { header(new ResourceModel("312")); setUseCloseHandler(true); addButton(new BootstrapAjaxButton("button", new ResourceModel("317"), form, Buttons.Type.Outline_Primary) { private static final long serialVersionUID = 1L; }); // Send addButton(OmModalCloseButton.of()); add(form); super.onInitialize(); }
Example #12
Source File: AdminWidgetView.java From openmeetings with Apache License 2.0 | 5 votes |
@Override protected void onInitialize() { super.onInitialize(); add(form); form.add(cleanupDialog = new AdminCleanupInfoDialog("cleanup-dialog")); form.add(new SpinnerAjaxButton("show-cleanup-dialog", new ResourceModel("dashboard.widget.admin.cleanup.show"), form, Buttons.Type.Outline_Primary) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target) { cleanupDialog.show(target); } }); }
Example #13
Source File: Captcha.java From openmeetings with Apache License 2.0 | 5 votes |
@Override protected void onInitialize() { super.onInitialize(); add(captchaText.setLabel(new ResourceModel("captcha.text")).add(new IValidator<String>() { private static final long serialVersionUID = 1L; @Override public void validate(IValidatable<String> validatable) { if (!randomText.equals(validatable.getValue())) { validatable.error(new ValidationError(getString("bad.captcha.text"))); } } }).setOutputMarkupId(true)); add(new BootstrapAjaxLink<>("refresh", Model.of(""), Buttons.Type.Outline_Info, new ResourceModel("lbl.refresh")) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { captchaImageResource.invalidate(); target.add(captcha); } @Override protected Icon newIcon(String markupId) { return new Icon(markupId, FontAwesome5IconType.sync_s); } }); }
Example #14
Source File: ConfirmationDialog.java From openmeetings with Apache License 2.0 | 5 votes |
private BootstrapAjaxLink<String> getOkButton() { if (okButton == null) { okButton = new BootstrapAjaxLink<>("button", null, Buttons.Type.Outline_Danger, new ResourceModel("54")) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { close(target); onConfirm(target); } }; okButton.setIconType(FontAwesome5IconType.exclamation_triangle_s); } return okButton; }
Example #15
Source File: ConfirmationDialog.java From openmeetings with Apache License 2.0 | 4 votes |
public ConfirmationDialog withOkType(Buttons.Type type) { getOkButton().setType(type); return this; }
Example #16
Source File: OmModalCloseButton.java From openmeetings with Apache License 2.0 | 4 votes |
public static ModalCloseButton of(String lblKey) { ModalCloseButton btn = new ModalCloseButton(new ResourceModel(lblKey)).type(Buttons.Type.Outline_Secondary); btn.setOutputMarkupId(false); return btn; }