Search in sources :

Example 56 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project oc-explorer by devgateway.

the class BasePage method newAccountMenu.

protected NavbarButton<EditUserPage> newAccountMenu() {
    PageParameters pageParametersForAccountPage = new PageParameters();
    Person person = SecurityUtil.getCurrentAuthenticatedPerson();
    // account menu
    Model<String> account = null;
    if (person != null) {
        account = Model.of(person.getFirstName());
        pageParametersForAccountPage.add(WebConstants.PARAM_ID, person.getId());
    }
    NavbarButton<EditUserPage> accountMenu = new NavbarButton<>(EditUserPage.class, pageParametersForAccountPage, account);
    accountMenu.setIconType(GlyphIconType.user);
    MetaDataRoleAuthorizationStrategy.authorize(accountMenu, Component.RENDER, SecurityConstants.Roles.ROLE_USER);
    return accountMenu;
}
Also used : NavbarButton(de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarButton) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters) EditUserPage(org.devgateway.toolkit.forms.wicket.page.user.EditUserPage) Person(org.devgateway.toolkit.persistence.dao.Person)

Aggregations

PageParameters (org.apache.wicket.request.mapper.parameter.PageParameters)56 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)7 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)7 ArrayList (java.util.ArrayList)6 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 StringResourceModel (org.apache.wicket.model.StringResourceModel)4 EditUserPage (org.devgateway.toolkit.forms.wicket.page.user.EditUserPage)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 ICellPopulator (org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator)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