use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class OnePageParameterEncoder method decodePageParameters.
@Override
public PageParameters decodePageParameters(Url url) {
PageParameters parameters = new PageParameters();
List<String> segments = url.getSegments();
if (!segments.isEmpty()) {
String value = segments.get(0);
parameters.add(PARAMETER, value);
}
if (url.getQueryParameters() != null) {
for (Url.QueryParameter qp : url.getQueryParameters()) {
parameters.add(qp.getName(), qp.getValue());
}
}
return parameters.isEmpty() ? null : parameters;
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class PageSystemConfiguration method onBeforeRender.
@Override
protected void onBeforeRender() {
super.onBeforeRender();
if (!initialized) {
PageParameters params = getPageParameters();
StringValue val = params.get(SELECTED_TAB_INDEX);
String value = null;
if (val != null && !val.isNull()) {
value = val.toString();
}
int index = StringUtils.isNumeric(value) ? Integer.parseInt(value) : CONFIGURATION_TAB_BASIC;
getTabPanel().setSelectedTab(index);
initialized = true;
}
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class PageSystemConfiguration method initLayout.
private void initLayout() {
Form mainForm = new Form(ID_MAIN_FORM, true);
add(mainForm);
List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.system.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
systemConfigPanel = new SystemConfigPanel(panelId, model);
return systemConfigPanel;
}
});
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.notifications.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
notificationConfigPanel = new NotificationConfigPanel(panelId, new PropertyModel<NotificationConfigurationDto>(model, "notificationConfig"));
return notificationConfigPanel;
}
});
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.logging.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
loggingConfigPanel = new LoggingConfigPanel(panelId, new PropertyModel<LoggingDto>(model, "loggingConfig"));
return loggingConfigPanel;
}
});
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.profiling.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
profilingConfigPanel = new ProfilingConfigPanel(panelId, new PropertyModel<ProfilingDto>(model, "profilingDto"), PageSystemConfiguration.this);
return profilingConfigPanel;
}
});
tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.adminGui.title")) {
@Override
public WebMarkupContainer getPanel(String panelId) {
adminGuiConfigPanel = new AdminGuiConfigPanel(panelId, model);
return adminGuiConfigPanel;
}
});
TabbedPanel tabPanel = new TabbedPanel(ID_TAB_PANEL, tabs) {
@Override
protected void onTabChange(int index) {
PageParameters params = getPageParameters();
params.set(SELECTED_TAB_INDEX, index);
}
};
tabPanel.setOutputMarkupId(true);
mainForm.add(tabPanel);
initButtons(mainForm);
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class PageDebugList method objectEditPerformed.
private void objectEditPerformed(AjaxRequestTarget target, String oid, Class<? extends ObjectType> type) {
PageParameters parameters = new PageParameters();
parameters.add(PageDebugView.PARAM_OBJECT_ID, oid);
parameters.add(PageDebugView.PARAM_OBJECT_TYPE, type.getSimpleName());
navigateToNext(PageDebugView.class, parameters);
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class PageSystemConfiguration method resetPerformed.
private void resetPerformed(AjaxRequestTarget target) {
int index = getTabPanel().getSelectedTab();
PageParameters params = new PageParameters();
params.add(SELECTED_TAB_INDEX, index);
PageSystemConfiguration page = new PageSystemConfiguration(params);
setResponsePage(page);
}
Aggregations