Java Code Examples for org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow#show()

The following examples show how to use org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow#show() . 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: WidgetPopupMenuModel.java    From nextreports-server with Apache License 2.0 6 votes vote down vote up
private AjaxLink createEmbedCodeLink(final IModel<Widget> model) {
	AjaxLink<Void> link = new AjaxLink<Void>(MenuPanel.LINK_ID) {

		private static final long serialVersionUID = 1L;

		@Override
		public void onClick(AjaxRequestTarget target) {
			final Widget widget = model.getObject();
			ModalWindow dialog = findParent(BasePage.class).getDialog();

			dialog.setTitle(new StringResourceModel("WidgetPopupMenu.embeddedCode", null).getString());
			dialog.setInitialWidth(550);
			dialog.setUseInitialHeight(false);

			dialog.setContent(new WidgetEmbedCodePanel(dialog.getContentId(), widget.getId()));
			dialog.show(target);
		}
	};
	return link;
}
 
Example 2
Source File: AnalysisPanel.java    From nextreports-server with Apache License 2.0 5 votes vote down vote up
@Override
public void onClick(AjaxRequestTarget target) {
	ModalWindow dialog = findParent(BasePage.class).getDialog();
	dialog.setTitle(getString(title));
	dialog.setInitialWidth(dialogWidth);
	dialog.setUseInitialHeight(false);
	FormContentPanel<Analysis> panel = createPanel();
	FormPanel<Analysis> formPanel = new FormPanel<Analysis>(dialog.getContentId(), panel, true);
	formPanel.add(AttributeModifier.append("class", "analysisForm"));
	dialog.setContent(formPanel);
	dialog.show(target);
}
 
Example 3
Source File: EmbedCodeActionLink.java    From nextreports-server with Apache License 2.0 5 votes vote down vote up
public void executeAction(AjaxRequestTarget target) {
	Entity entity = getActionContext().getEntity();
	ModalWindow dialog = findParent(BasePage.class).getDialog();

	dialog.setTitle(new StringResourceModel("WidgetPopupMenu.embeddedCode", null).getString());
	dialog.setInitialWidth(550);
	dialog.setUseInitialHeight(false);

	dialog.setContent(new DashboardEmbedCodePanel(dialog.getContentId(), entity.getId()));
	dialog.show(target);
}
 
Example 4
Source File: ElasticConfigurationPanel.java    From elasticgeo with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected void respond(AjaxRequestTarget target) {
    ModalWindow window = (ModalWindow) getComponent();
    window.show(target);
}
 
Example 5
Source File: OpenModalWindowEvent.java    From Orienteer with Apache License 2.0 4 votes vote down vote up
@Override
public void execute(ModalWindow modalWindow) {
    modalWindow.setContent(contentGenerator.apply(modalWindow.getContentId()));
    modalWindow.setTitle(titleModel);
    modalWindow.show(target);
}
 
Example 6
Source File: InnerReportsPanel.java    From nextreports-server with Apache License 2.0 4 votes vote down vote up
private void click(InnerReport ir, AjaxRequestTarget target) {
	final ModalWindow dialog = findParent(BasePage.class).getDialog();
       dialog.setTitle(getString("Section.Audit.innerReports." + ir.toString()));
       int width = 500;                       
       
       FormContentPanel panel;
       if (ir.toString().equals(InnerReport.RIGHTS.toString())) {
		panel = new RightsPanel() {
			@Override
			public void onOk(AjaxRequestTarget target) {											
				TableData data = getResults(getAuditRights());					
				displayResults(dialog, InnerReport.RIGHTS.toString(), data, getLinkColumns(), getTitle(), target);
			}
		};
       } else if (ir.toString().equals(InnerReport.RUN.toString())) {
       		width = 350;
			panel = new RunPanel() {
				@Override
				public void onOk(AjaxRequestTarget target) {												
					TableData data = getResults(getAuditRun());							
					displayResults(dialog, InnerReport.RUN.toString(), data, getLinkColumns(), getTitle(), target);
				}
			};	
       } else if (ir.toString().equals(InnerReport.LIST.toString())) {
       	width = 250;
		panel = new ListPanel() {
			@Override
			public void onOk(AjaxRequestTarget target) {											
				TableData data = getResults(getAuditList());						
				displayResults(dialog, InnerReport.LIST.toString(), data, null, getTitle(), target);
			}
		};			
       } else {
       	panel = new FormContentPanel(FormPanel.CONTENT_ID);
       }
       dialog.setInitialWidth(width);
       dialog.setUseInitialHeight(false);
       dialog.setContent(new FormPanel(dialog.getContentId(), panel, true));        
       dialog.show(target);

}