List of usage examples for org.apache.wicket.extensions.ajax.markup.html.modal ModalWindow ModalWindow
public ModalWindow(final String id)
From source file:org.devgateway.eudevfin.projects.module.components.panels.TransactionTableListPanel.java
private ModalWindow AddModalWindow(PageParameters parameters) { if (parameters == null) { parameters = new PageParameters(); }/*w ww . ja v a 2 s . co m*/ final ModalWindow modal = new ModalWindow("modal"); modal.setCookieName("modal-1"); modal.setPageCreator(new ModalWindow.PageCreator() { @Override public org.apache.wicket.Page createPage() { return new TransactionsTableModal(getParameters(), TransactionTableListPanel.this.getPage().getPageReference(), modal); } }); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { TransactionTableListPanel newComp = new TransactionTableListPanel(WICKETID_LIST_PANEL, new ProjectTransactionsListGenerator(NewProjectPage.project.getProjectTransactions())); newComp.add(new AttributeAppender("class", "budget-table")); getParent().replace(newComp); target.add(newComp); } }); modal.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { public boolean onCloseButtonClicked(AjaxRequestTarget target) { return true; } }); return modal; }
From source file:org.devgateway.eudevfin.projects.module.components.tabs.ReportingTab.java
private ModalWindow AddModalWindow(PageParameters parameters) { final ModalWindow modal = new ModalWindow("modal"); modal.setCookieName("modal-1"); final PageParameters myParams = parameters; modal.setPageCreator(new ModalWindow.PageCreator() { @Override/*from www. j av a2s . c o m*/ public org.apache.wicket.Page createPage() { return new ReportsTableModal(myParams, ReportingTab.this.getPage().getPageReference(), modal); } }); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { ReportsTableListPanel newComp = new ReportsTableListPanel(WICKETID_LIST_PANEL, new ProjectReportsListGenerator(NewProjectPage.project.getProjectReports())); replace(newComp); target.add(newComp); } }); modal.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { public boolean onCloseButtonClicked(AjaxRequestTarget target) { // Change the passValue variable when modal window is closed. //setPassValue("Modal window is closed by user."); return true; } }); return modal; }
From source file:org.devgateway.eudevfin.projects.module.components.tabs.ResultsTab.java
private ModalWindow AddModalWindow(PageParameters parameters) { final ModalWindow modal = new ModalWindow("modal"); modal.setCookieName("modal-1"); final PageParameters myParams = parameters; modal.setPageCreator(new ModalWindow.PageCreator() { @Override//from www . j a v a2 s . c o m public org.apache.wicket.Page createPage() { return new ResultsTableModal(myParams, ResultsTab.this.getPage().getPageReference(), modal); } }); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { ResultsTableListPanel newComp = new ResultsTableListPanel(WICKETID_LIST_PANEL, new ProjectResultsListGenerator(NewProjectPage.project.getProjectResults())); replace(newComp); target.add(newComp); } }); modal.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { public boolean onCloseButtonClicked(AjaxRequestTarget target) { // Change the passValue variable when modal window is closed. //setPassValue("Modal window is closed by user."); return true; } }); return modal; }
From source file:org.devgateway.eudevfin.projects.module.components.tabs.TransactionsTab.java
private ModalWindow AddModalWindow(PageParameters parameters) { final ModalWindow modal = new ModalWindow("modal"); modal.setCookieName("modal-1"); final PageParameters myParams = parameters; modal.setPageCreator(new ModalWindow.PageCreator() { @Override// w ww .j a v a 2 s .c o m public org.apache.wicket.Page createPage() { //ResultsTab.this.getPage().getPageReference() return new TransactionsTableModal(myParams, TransactionsTab.this.getPage().getPageReference(), modal); } }); modal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { TransactionTableListPanel newComp = new TransactionTableListPanel(WICKETID_LIST_PANEL, new ProjectTransactionsListGenerator(NewProjectPage.project.getProjectTransactions())); newComp.add(new AttributeAppender("class", "budget-table")); replace(newComp); target.add(newComp); } }); modal.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() { public boolean onCloseButtonClicked(AjaxRequestTarget target) { // Change the passValue variable when modal window is closed. //setPassValue("Modal window is closed by user."); return true; } }); return modal; }
From source file:org.geogig.geoserver.web.data.store.geogig.GeoGigDataStoreEditPanel.java
License:Open Source License
/** * @param componentId the wicket component id * @param storeEditForm the data store edit form, as provided by {@link DataAccessEditPage} and * {@link DataAccessNewPage}/*from w w w .j a v a 2s . c o m*/ */ @SuppressWarnings("unchecked") public GeoGigDataStoreEditPanel(final String componentId, final Form<DataStoreInfo> storeEditForm) { super(componentId, storeEditForm); final IModel<DataStoreInfo> model = storeEditForm.getModel(); setDefaultModel(model); final IModel<Map<String, Serializable>> paramsModel = new PropertyModel<>(model, "connectionParameters"); this.repositoryUriModel = new MapModel(paramsModel, REPOSITORY.key); this.branchNameModel = new MapModel(paramsModel, BRANCH.key); this.originalRepo = repositoryUriModel.getObject(); this.originalBranch = branchNameModel.getObject(); add(repository = createRepositoryPanel()); add(importExistingLink(storeEditForm)); add(addNewLink(storeEditForm)); add(branch = createBranchNameComponent(storeEditForm)); add(modalWindow = new ModalWindow("modalWindow")); }
From source file:org.geogig.geoserver.web.RemotesPage.java
License:Open Source License
public RemotesPage() { add(new SecurityLogsPanel("securityLogsPanel")); window = new ModalWindow("popup"); add(window);/* ww w . j av a 2s . c o m*/ final WhitelistRulePanel whitelistRulePanel = new WhitelistRulePanel("whitelist.rules", window); whitelistRulePanel.setOutputMarkupId(true); add(whitelistRulePanel); add(new AjaxLink<Void>("whitelist.add") { private static final long serialVersionUID = 5869313981483016964L; @Override public void onClick(AjaxRequestTarget target) { // window.setInitialHeight(300); // window.setInitialWidth(300); window.setTitle(new Model<String>("Edit whitelist rule")); IModel<WhitelistRule> model = new Model<>(new WhitelistRule(null, null, false)); window.setContent( new WhitelistRuleEditor(window.getContentId(), model, window, whitelistRulePanel, true)); window.show(target); }; }); }
From source file:org.geogig.geoserver.web.repository.ConfigListPanel.java
License:Open Source License
public ConfigListPanel(final String id, final Map<String, String> config) { super(id, new ConfigProvider(config), false); super.setFilterable(false); this.provider = (ConfigProvider) super.getDataProvider(); this.setOutputMarkupId(true); // set the reuse strategy, otherwise the list does not get updated when the popup window // closes/*from www .j a v a 2s. c om*/ this.setItemReuseStrategy(DefaultItemReuseStrategy.getInstance()); // the popup window for messages popupWindow = new ModalWindow("popupWindow"); add(popupWindow); add(dialog = new GeoServerDialog("dialog")); add(pingFeedbackPanel = new FeedbackPanel("feedback")); pingFeedbackPanel.setOutputMarkupId(true); }
From source file:org.geogig.geoserver.web.repository.GeoGigDirectoryFormComponent.java
License:Open Source License
/** * * @param validators any extra validator that should be added to the input field, or * {@code null}//from w w w. ja v a 2 s. co m */ GeoGigDirectoryFormComponent(final String id, final IModel<String> valueModel) { // make the value of the text field the model of this panel, for easy value retrieval super(id, valueModel); // add the dialog for the file chooser add(dialog = new ModalWindow("dialog")); // the text field, with a decorator for validations directory = new TextField<>("value", valueModel); directory.setRequired(true); directory.setOutputMarkupId(true); IModel<String> labelModel = new ResourceModel("GeoGigDirectoryFormComponent.directory", "Parent directory") { private static final long serialVersionUID = 1L; @Override public String getObject() { String value = super.getObject(); return value + " *"; } }; final Label directoryLabel = new Label("directoryLabel", labelModel.getObject()); add(directoryLabel); directory.setLabel(labelModel); FormComponentFeedbackBorder feedback = new FormComponentFeedbackBorder("wrapper"); feedback.add(directory); feedback.add(chooserButton()); add(feedback); }
From source file:org.geogig.geoserver.web.repository.RemotesListPanel.java
License:Open Source License
public RemotesListPanel(final String id, final List<RemoteInfo> remotes) { super(id, new RemotesProvider(remotes), false); super.setFilterable(false); this.provider = (RemotesProvider) super.getDataProvider(); this.setOutputMarkupId(true); // set the reuse strategy, otherwise the list does not get updated when the popup window // closes/*www. j a v a2s. c o m*/ this.setItemReuseStrategy(DefaultItemReuseStrategy.getInstance()); // the popup window for messages popupWindow = new ModalWindow("popupWindow"); add(popupWindow); add(dialog = new GeoServerDialog("dialog")); add(pingFeedbackPanel = new FeedbackPanel("feedback")); pingFeedbackPanel.setOutputMarkupId(true); }
From source file:org.geogig.geoserver.web.repository.RepositoriesListPanel.java
License:Open Source License
public RepositoriesListPanel(final String id) { super(id, new RepositoryProvider(), false); // the popup window for messages popupWindow = new ModalWindow("popupWindow"); add(popupWindow);/*from w w w .j av a 2 s .c o m*/ add(dialog = new GeoServerDialog("dialog")); }