Search in sources :

Example 31 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project wicket-dashboard by decebals.

the class DetachWidgetAction method getLink.

@Override
public AbstractLink getLink(String id) {
    PageParameters parameters = new PageParameters();
    parameters.add("id", widget.getId());
    BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>(id, WidgetPage.class, parameters);
    PopupSettings popupSettings = new PopupSettings(widget.getTitle()).setHeight(320).setWidth(550);
    link.setPopupSettings(popupSettings);
    return link;
}
Also used : BookmarkablePageLink(org.apache.wicket.markup.html.link.BookmarkablePageLink) PopupSettings(org.apache.wicket.markup.html.link.PopupSettings) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 32 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class PageCertCampaigns method campaignDetailsPerformed.

private void campaignDetailsPerformed(AjaxRequestTarget target, String oid) {
    PageParameters parameters = new PageParameters();
    parameters.add(OnePageParameterEncoder.PARAMETER, oid);
    navigateToNext(PageCertCampaign.class, parameters);
}
Also used : PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 33 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class PageCertDefinitions method showCampaignsPerformed.

private void showCampaignsPerformed(AjaxRequestTarget target, AccessCertificationDefinitionType definition) {
    PageParameters parameters = new PageParameters();
    parameters.add(OnePageParameterEncoder.PARAMETER, definition.getOid());
    navigateToNext(PageCertCampaigns.class, parameters);
}
Also used : PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 34 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class PageTasks method createTaskNameColumn.

// used in SubtasksPanel as well
public static IColumn createTaskNameColumn(final Component component, String label) {
    LinkColumn<TaskDto> column = new LinkColumn<TaskDto>(createStringResourceStatic(component, label), TaskDto.F_NAME, TaskDto.F_NAME) {

        @Override
        public void onClick(AjaxRequestTarget target, IModel<TaskDto> rowModel) {
            TaskDto task = rowModel.getObject();
            taskDetailsPerformed(target, task.getOid());
        }

        private void taskDetailsPerformed(AjaxRequestTarget target, String oid) {
            PageParameters parameters = new PageParameters();
            parameters.add(OnePageParameterEncoder.PARAMETER, oid);
            PageBase page = (PageBase) component.getPage();
            page.navigateToNext(PageTaskEdit.class, parameters);
        }

        @Override
        public boolean isEnabled(IModel<TaskDto> rowModel) {
            return super.isEnabled(rowModel) && rowModel.getObject().getOid() != null;
        }
    };
    return column;
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) IModel(org.apache.wicket.model.IModel) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters) PageBase(com.evolveum.midpoint.gui.api.page.PageBase)

Example 35 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class ResourceContentPanel method shadowDetailsPerformed.

private void shadowDetailsPerformed(AjaxRequestTarget target, String accountName, String accountOid) {
    if (StringUtils.isEmpty(accountOid)) {
        error(pageBase.getString("pageContentAccounts.message.cantShowAccountDetails", accountName, accountOid));
        target.add(pageBase.getFeedbackPanel());
        return;
    }
    PageParameters parameters = new PageParameters();
    parameters.add(OnePageParameterEncoder.PARAMETER, accountOid);
    getPageBase().navigateToNext(PageAccount.class, parameters);
}
Also used : PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

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