Search in sources :

Example 26 with MainObjectListPanel

use of com.evolveum.midpoint.gui.api.component.MainObjectListPanel in project midpoint by Evolveum.

the class PageUsers method initLayout.

protected void initLayout() {
    Form mainForm = new MidpointForm(ID_MAIN_FORM);
    add(mainForm);
    MainObjectListPanel<UserType> table = new MainObjectListPanel<>(ID_TABLE, UserType.class) {

        // @Override
        // protected void objectDetailsPerformed(AjaxRequestTarget target, UserType user) {
        // WebComponentUtil.dispatchToObjectDetailsPage(UserType.class, user.getOid(), this, false);
        // PageParameters parameters = new PageParameters();
        // parameters.add(OnePageParameterEncoder.PARAMETER, user.getOid());
        // navigateToNext(PageUser.class, parameters);
        // }
        @Override
        protected UserProfileStorage.TableId getTableId() {
            return TableId.TABLE_USERS;
        }

        @Override
        protected List<InlineMenuItem> createInlineMenu() {
            return createRowActions();
        }

        @Override
        protected List<ItemPath> getFixedSearchItems() {
            List<ItemPath> fixedSearchItems = new ArrayList<>();
            fixedSearchItems.add(UserType.F_NAME);
            fixedSearchItems.add(UserType.F_GIVEN_NAME);
            fixedSearchItems.add(UserType.F_FAMILY_NAME);
            return fixedSearchItems;
        }

        @Override
        protected String getNothingSelectedMessage() {
            return getString("pageUsers.message.nothingSelected");
        }

        @Override
        protected String getConfirmMessageKeyForSingleObject() {
            return "pageUsers.message.confirmationMessageForMultipleObject";
        }

        @Override
        protected String getConfirmMessageKeyForMultiObject() {
            return "pageUsers.message.confirmationMessageForSingleObject";
        }
    };
    table.setOutputMarkupId(true);
    mainForm.add(table);
}
Also used : UserProfileStorage(com.evolveum.midpoint.web.session.UserProfileStorage) MainObjectListPanel(com.evolveum.midpoint.gui.api.component.MainObjectListPanel) Form(org.apache.wicket.markup.html.form.Form) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) ArrayList(java.util.ArrayList) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) InlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem) ButtonInlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.ButtonInlineMenuItem) ItemPath(com.evolveum.midpoint.prism.path.ItemPath)

Aggregations

MainObjectListPanel (com.evolveum.midpoint.gui.api.component.MainObjectListPanel)26 InlineMenuItem (com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)24 UserProfileStorage (com.evolveum.midpoint.web.session.UserProfileStorage)22 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)18 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)15 MidpointForm (com.evolveum.midpoint.web.component.form.MidpointForm)14 SelectableBean (com.evolveum.midpoint.web.component.util.SelectableBean)14 ArrayList (java.util.ArrayList)14 Form (org.apache.wicket.markup.html.form.Form)14 ButtonInlineMenuItem (com.evolveum.midpoint.web.component.menu.cog.ButtonInlineMenuItem)12 IModel (org.apache.wicket.model.IModel)9 AssignmentObjectRelation (com.evolveum.midpoint.model.api.AssignmentObjectRelation)5 CompiledObjectCollectionView (com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView)5 SelectableBeanImpl (com.evolveum.midpoint.web.component.util.SelectableBeanImpl)5 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)4 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)4 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)3 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)3 ColumnMenuAction (com.evolveum.midpoint.web.component.data.column.ColumnMenuAction)3 FocusListInlineMenuHelper (com.evolveum.midpoint.web.component.util.FocusListInlineMenuHelper)3