本文整理汇总了Java中org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow类的典型用法代码示例。如果您正苦于以下问题:Java ModalWindow类的具体用法?Java ModalWindow怎么用?Java ModalWindow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ModalWindow类属于org.apache.wicket.extensions.ajax.markup.html.modal包,在下文中一共展示了ModalWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDeleteProjectionPopupContent
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
private Popupable getDeleteProjectionPopupContent() {
ConfirmationPanel dialog = new ConfirmationPanel(getPageBase().getMainPopupBodyId(),
new AbstractReadOnlyModel<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
return createStringResource("pageAdminFocus.message.deleteAccountConfirm",
getSelectedProjections(projectionModel).size()).getString();
}
}) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
ModalWindow modalWindow = findParent(ModalWindow.class);
if (modalWindow != null) {
modalWindow.close(target);
deleteAccountConfirmedPerformed(target, getSelectedProjections(projectionModel));
}
}
};
return dialog;
}
示例2: addSelectedAssignablePerformed
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
protected void addSelectedAssignablePerformed(AjaxRequestTarget target, List<ObjectType> newAssignments,
String popupId) {
ModalWindow window = (ModalWindow) get(popupId);
if (window != null) {
window.close(target);
}
getPageBase().hideMainPopup(target);
if (newAssignments.isEmpty()) {
warn(getNoAssignmentsSelectedMessage());
target.add(getPageBase().getFeedbackPanel());
return;
}
List<AssignmentEditorDto> assignments = getAssignmentModel().getObject();
for (ObjectType object : newAssignments) {
assignments.add(createAssignmentFromSelectedObjects(object, RelationTypes.MEMBER));
}
reloadAssignmentsPanel(target);
}
示例3: LimitationsEditorDialog
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
public LimitationsEditorDialog(String id, final IModel<List<PropertyLimitationsType>> limitation, NonEmptyModel<Boolean> readOnlyModel) {
super(id);
this.readOnlyModel = readOnlyModel;
inputModel = limitation;
model = new LoadableModel<List<PropertyLimitationsTypeDto>>(false) {
@Override
protected List<PropertyLimitationsTypeDto> load() {
return loadLimitationsModel(limitation);
}
};
setOutputMarkupId(true);
setTitle(createStringResource("LimitationsEditorDialog.label"));
showUnloadConfirmation(false);
setCssClassName(ModalWindow.CSS_CLASS_GRAY);
setCookieName(LimitationsEditorDialog.class.getSimpleName() + ((int) (Math.random() * 100)));
setInitialWidth(600);
setInitialHeight(700);
setWidthUnit("px");
WebMarkupContainer content = new WebMarkupContainer(getContentId());
content.setOutputMarkupId(true);
setContent(content);
}
示例4: AddCapabilityDialog
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
protected AddCapabilityDialog(String id, final IModel<CapabilityStepDto> capabilityModel) {
super(id);
model = new LoadableModel<List<CapabilityDto<CapabilityType>>>() {
@Override
protected List<CapabilityDto<CapabilityType>> load() {
return loadModel(capabilityModel);
}
};
setTitle(createStringResource("addCapabilityDialog.title"));
showUnloadConfirmation(false);
setCssClassName(ModalWindow.CSS_CLASS_GRAY);
setCookieName(AddCapabilityDialog.class.getSimpleName() + ((int) (Math.random() * 100)));
setResizable(false);
setInitialWidth(500);
setInitialHeight(500);
setWidthUnit("px");
WebMarkupContainer content = new WebMarkupContainer(getContentId());
content.setOutputMarkupId(true);
setContent(content);
}
示例5: WizardHelpDialog
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
public WizardHelpDialog(String id, final IWizardStep step){
super(id);
this.step = step;
setOutputMarkupId(true);
setTitle(createStringResource("WizardHelpDialog.label"));
showUnloadConfirmation(false);
setCssClassName(ModalWindow.CSS_CLASS_GRAY);
setCookieName(WizardHelpDialog.class.getSimpleName() + ((int) (Math.random() * 100)));
setInitialWidth(450);
setInitialHeight(500);
setWidthUnit("px");
WebMarkupContainer content = new WebMarkupContainer(getContentId());
content.setOutputMarkupId(true);
setContent(content);
}
示例6: getCloseSelectedCampaignsConfirmationPanel
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
private Popupable getCloseSelectedCampaignsConfirmationPanel() {
return new ConfirmationPanel(getMainPopupBodyId(), createCloseSelectedCampaignsConfirmString()) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
ModalWindow modalWindow = findParent(ModalWindow.class);
if (modalWindow != null) {
modalWindow.close(target);
closeSelectedCampaignsConfirmedPerformed(target);
}
}
@Override
public StringResourceModel getTitle() {
return createStringResource("PageCertCampaigns.dialog.title.confirmCloseCampaign");
}
};
}
示例7: getDeleteSelectedCampaignsConfirmationPanel
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
private Popupable getDeleteSelectedCampaignsConfirmationPanel() {
return new ConfirmationPanel(getMainPopupBodyId(), createDeleteSelectedCampaignsConfirmString()) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
ModalWindow modalWindow = findParent(ModalWindow.class);
if (modalWindow != null) {
modalWindow.close(target);
deleteSelectedCampaignsConfirmedPerformed(target);
}
}
@Override
public StringResourceModel getTitle() {
return createStringResource("PageCertCampaigns.dialog.title.confirmDeleteCampaign");
}
};
}
示例8: getCloseStageConfirmationPanel
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
private Popupable getCloseStageConfirmationPanel() {
return new ConfirmationPanel(getMainPopupBodyId(), createCloseStageConfirmString()) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
ModalWindow modalWindow = findParent(ModalWindow.class);
if (modalWindow != null) {
modalWindow.close(target);
closeStageConfirmedPerformed(target, relevantCampaign);
}
}
@Override
public StringResourceModel getTitle() {
return createStringResource("PageCertCampaigns.dialog.title.confirmCloseStage");
}
};
}
示例9: getCloseCampaignConfirmationPanel
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
private Popupable getCloseCampaignConfirmationPanel() {
return new ConfirmationPanel(getMainPopupBodyId(), createCloseCampaignConfirmString()) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
ModalWindow modalWindow = findParent(ModalWindow.class);
if (modalWindow != null) {
modalWindow.close(target);
closeCampaignConfirmedPerformed(target, relevantCampaign);
}
}
@Override
public StringResourceModel getTitle() {
return createStringResource("PageCertCampaigns.dialog.title.confirmCloseCampaign");
}
};
}
示例10: getDeleteCampaignConfirmationPanel
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
private Popupable getDeleteCampaignConfirmationPanel() {
return new ConfirmationPanel(getMainPopupBodyId(), createDeleteCampaignConfirmString()) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
ModalWindow modalWindow = findParent(ModalWindow.class);
if (modalWindow != null) {
modalWindow.close(target);
deleteCampaignConfirmedPerformed(target);
}
}
@Override
public StringResourceModel getTitle() {
return createStringResource("PageCertCampaigns.dialog.title.confirmDeleteCampaign");
}
};
}
示例11: showShadowResult
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
private void showShadowResult(AjaxRequestTarget target, IModel<SelectableBean> rowModel){
OperationResultType result = getResult(rowModel);
String xml;
ModalWindow aceDialog = (ModalWindow) get(createComponentPath(ID_RESULT_DIALOG));
AceEditorDialog aceEditor = (AceEditorDialog) aceDialog.get(aceDialog.getContentId());
try {
xml = getPrismContext().xmlSerializer().serializeRealValue(result, ShadowType.F_RESULT);
aceEditor.updateModel(new Model<String>(xml));
} catch (SchemaException e) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't parse result", e);
aceEditor.updateModel(new Model<String>("Unable to show result. For more information see logs."));
}
aceDialog.show(target);
target.add(getFeedbackPanel());
}
示例12: ObjectSelectionPanel
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
public ObjectSelectionPanel(String id, Class<? extends ObjectType> type, ModalWindow modalWindow, Context context) {
super(id);
this.modalWindow = modalWindow;
this.context = context;
searchModel = new LoadableModel<ObjectSearchDto>(false) {
@Override
protected ObjectSearchDto load() {
return new ObjectSearchDto();
}
};
objectType = type;
initLayout(context.getCallingPage());
initialized = true;
}
示例13: RichHyperlinkConfigDialog
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
public RichHyperlinkConfigDialog(String id, final RichHyperlinkType link, boolean isMenuItem, String titleKey){
super(id);
this.isMenuItem = isMenuItem;
model = new LoadableModel<RichHyperlinkType>(false) {
@Override
protected RichHyperlinkType load() {
return loadModel(link);
}
};
setOutputMarkupId(true);
setTitle(createStringResource(titleKey));
showUnloadConfirmation(false);
setCssClassName(ModalWindow.CSS_CLASS_GRAY);
setCookieName(RichHyperlinkConfigDialog.class.getSimpleName() + ((int) (Math.random() * 100)));
setInitialWidth(625);
setInitialHeight(400);
setWidthUnit("px");
WebMarkupContainer content = new WebMarkupContainer(getContentId());
content.setOutputMarkupId(true);
setContent(content);
}
示例14: prepareDialog
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
public static <T extends ObjectType> void prepareDialog(ModalWindow dialog, ObjectSelectionPanel.Context context,
final Component callingComponent, String titleResourceKey, final String idToRefresh) {
dialog.setPageCreator(new ObjectSelectionPage.PageCreator(dialog, context));
dialog.setInitialWidth(800);
dialog.setInitialHeight(500);
dialog.setTitle(PageBase.createStringResourceStatic(callingComponent, titleResourceKey));
dialog.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
// We are not able to refresh targets residing in the parent page
// from inside the modal window -> so we have to do it in this
// context, when the modal window is being closed.
public void onClose(AjaxRequestTarget target) {
target.add(callingComponent.get(idToRefresh));
}
});
dialog.showUnloadConfirmation(false);
dialog.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
dialog.setCookieName(ObjectSelectionPanel.class.getSimpleName() + ((int) (Math.random() * 100)));
dialog.setWidthUnit("px");
}
示例15: Resources
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; //导入依赖的package包/类
public Resources(final PageParameters parameters) {
super(parameters);
add(createResourceWin = new ModalWindow("createResourceWin"));
add(editResourceWin = new ModalWindow("editResourceWin"));
add(createConnectorWin = new ModalWindow("createConnectorWin"));
add(editConnectorWin = new ModalWindow("editConnectorWin"));
add(feedbackPanel);
resourcePaginatorRows = prefMan.getPaginatorRows(getRequest(),
Constants.PREF_RESOURCES_PAGINATOR_ROWS);
connectorPaginatorRows = prefMan.getPaginatorRows(
getRequest(),
Constants.PREF_CONNECTORS_PAGINATOR_ROWS);
setupResources();
setupConnectors();
}