Search in sources :

Example 51 with PageParameters

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;
}
Also used : PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters) Url(org.apache.wicket.request.Url)

Example 52 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project ocvn by devgateway.

the class BasePage method newLanguageMenu.

public NavbarDropDownButton newLanguageMenu() {
    final NavbarDropDownButton languageDropDown = new NavbarDropDownButton(new StringResourceModel("navbar.lang", this, null)) {

        private static final long serialVersionUID = 319842753824102674L;

        @Override
        protected List<AbstractLink> newSubMenuButtons(final String buttonMarkupId) {
            final List<AbstractLink> list = new ArrayList<>();
            for (final Locale l : WebConstants.AVAILABLE_LOCALES) {
                final PageParameters params = new PageParameters(BasePage.this.getPageParameters());
                params.set(WebConstants.LANGUAGE_PARAM, l.getLanguage());
                list.add(new MenuBookmarkablePageLink<Page>(BasePage.this.getPageClass(), params, Model.of(l.getDisplayName())));
            }
            return list;
        }
    };
    languageDropDown.setIconType(GlyphIconType.flag);
    return languageDropDown;
}
Also used : NavbarDropDownButton(de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarDropDownButton) Locale(java.util.Locale) ArrayList(java.util.ArrayList) Page(org.apache.wicket.Page) EditUserPage(org.devgateway.toolkit.forms.wicket.page.user.EditUserPage) VietnamImportPage(org.devgateway.ocvn.forms.wicket.page.VietnamImportPage) ListGroupPage(org.devgateway.toolkit.forms.wicket.page.lists.ListGroupPage) RedirectPage(org.apache.wicket.markup.html.pages.RedirectPage) GenericWebPage(org.apache.wicket.markup.html.GenericWebPage) ListAllDashboardsPage(org.devgateway.ocds.forms.wicket.page.list.ListAllDashboardsPage) LogoutPage(org.devgateway.toolkit.forms.wicket.page.user.LogoutPage) ListMyDashboardsPage(org.devgateway.ocds.forms.wicket.page.list.ListMyDashboardsPage) ListUserPage(org.devgateway.toolkit.forms.wicket.page.lists.ListUserPage) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters) AbstractLink(org.apache.wicket.markup.html.link.AbstractLink) StringResourceModel(org.apache.wicket.model.StringResourceModel)

Aggregations

PageParameters (org.apache.wicket.request.mapper.parameter.PageParameters)52 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)7 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)7 ArrayList (java.util.ArrayList)5 StringValue (org.apache.wicket.util.string.StringValue)5 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)4 UserType (com.evolveum.midpoint.xml.ns._public.common.common_3.UserType)4 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)4 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)3 ObjectAlreadyExistsException (com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException)3 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)3 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)3 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)3 Label (org.apache.wicket.markup.html.basic.Label)3 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)3 PropertyModel (org.apache.wicket.model.PropertyModel)3 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)2 ListDataProvider (com.evolveum.midpoint.web.component.util.ListDataProvider)2 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)2 WorkItemsPanel (com.evolveum.midpoint.web.component.wf.WorkItemsPanel)2