use of org.apache.wicket.model.ResourceModel in project sandbox by irof.
the class ResourcePage method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
add(new Label("resource.static", new ResourceModel("simple")));
Object[] args = { "Dynamic", "Args" };
add(new Label("resource.dynamic1", new StringResourceModel("dynamic1", Model.of(), args)));
Map<String, String> valueMap = new HashMap<>();
valueMap.put("arg1", "Argument1");
valueMap.put("arg3", "Argument3");
add(new Label("resource.dynamic2", new StringResourceModel("dynamic2", Model.ofMap(valueMap))));
add(new Label("markup.label.pattern1", new ResourceModel("markup.pattern1")));
add(new Label("markup.label.pattern2", new ResourceModel("markup.pattern2")));
add(new Label("markup.label.pattern3", new ResourceModel("markup.pattern3")));
add(new Label("markup.label.pattern1.unescape", new ResourceModel("markup.pattern1")).setEscapeModelStrings(false));
add(new Label("markup.label.pattern2.unescape", new ResourceModel("markup.pattern2")).setEscapeModelStrings(false));
add(new Label("markup.label.pattern3.unescape", new ResourceModel("markup.pattern3")).setEscapeModelStrings(false));
}
use of org.apache.wicket.model.ResourceModel in project syncope by apache.
the class SAML2SP method buildTabList.
private List<ITab> buildTabList() {
final List<ITab> tabs = new ArrayList<>(2);
tabs.add(new AbstractTab(new ResourceModel("idps")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new SAML2IdPsDirectoryPanel(panelId, getPageReference());
}
});
tabs.add(new AbstractTab(new ResourceModel("sp")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new SAML2SPPanel(panelId);
}
});
return tabs;
}
use of org.apache.wicket.model.ResourceModel in project syncope by apache.
the class AnyObjectDirectoryPanel method getHeader.
@Override
public ActionsPanel<Serializable> getHeader(final String componentId) {
final ActionsPanel<Serializable> panel = super.getHeader(componentId);
panel.add(new ActionLink<Serializable>() {
private static final long serialVersionUID = -7978723352517770644L;
@Override
public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
target.add(displayAttributeModal.setContent(new AnyObjectDisplayAttributesModalPanel<>(displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames, type)));
displayAttributeModal.addSubmitButton();
displayAttributeModal.header(new ResourceModel("any.attr.display"));
displayAttributeModal.show(true);
}
@Override
protected boolean statusCondition(final Serializable modelObject) {
return wizardInModal;
}
}, ActionType.CHANGE_VIEW, AnyEntitlement.READ.getFor(type)).hideLabel();
return panel;
}
use of org.apache.wicket.model.ResourceModel in project syncope by apache.
the class Notifications method buildTabList.
private List<ITab> buildTabList() {
final List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(new ResourceModel("notifications")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new NotificationDirectoryPanel(panelId, getPageReference());
}
});
tabs.add(new AbstractTab(new ResourceModel("notification.templates")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new MailTemplateDirectoryPanel(panelId, getPageReference());
}
});
return tabs;
}
use of org.apache.wicket.model.ResourceModel in project syncope by apache.
the class Dashboard method buildTabList.
private List<ITab> buildTabList() {
final List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(new ResourceModel("overview")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new DashboardOverviewPanel(panelId);
}
});
tabs.add(new AbstractTab(new ResourceModel("accessTokens")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new DashboardAccessTokensPanel(panelId, getPageReference());
}
});
tabs.add(new AbstractTab(new ResourceModel("control")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new DashboardControlPanel(panelId, getPageReference());
}
});
ClassPathScanImplementationLookup classPathScanImplementationLookup = (ClassPathScanImplementationLookup) SyncopeConsoleApplication.get().getServletContext().getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP);
final List<Class<? extends BaseExtWidget>> extWidgetClasses = classPathScanImplementationLookup.getExtWidgetClasses();
if (!extWidgetClasses.isEmpty()) {
tabs.add(new AbstractTab(new ResourceModel("extensions")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new DashboardExtensionsPanel(panelId, extWidgetClasses, getPageReference());
}
});
}
return tabs;
}
Aggregations