Skip to content

Commit

Permalink
fixing NPE for account lists (pending operation panel)
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Sep 11, 2018
1 parent 2802d7a commit fa6df17
Showing 1 changed file with 3 additions and 10 deletions.
Expand Up @@ -25,6 +25,7 @@
import com.evolveum.midpoint.gui.api.component.PendingOperationPanel;
import com.evolveum.midpoint.web.component.menu.cog.ButtonInlineMenuItem;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;

import org.apache.commons.lang.StringUtils;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
Expand All @@ -39,6 +40,7 @@
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.StringResourceModel;
import org.apache.wicket.model.util.ListModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
Expand Down Expand Up @@ -689,16 +691,7 @@ public void onClick(AjaxRequestTarget target, IModel<SelectableBean<ShadowType>>
@Override
public void populateItem(Item<ICellPopulator<SelectableBean<ShadowType>>> cellItem,
String componentId, IModel<SelectableBean<ShadowType>> rowModel) {
cellItem.add(new PendingOperationPanel(componentId, new AbstractReadOnlyModel<List<PendingOperationType>>() {

private static final long serialVersionUID = 1L;

@Override
public List<PendingOperationType> getObject() {
SelectableBean<ShadowType> bean = rowModel.getObject();
return bean.getValue().getPendingOperation();
}
}));
cellItem.add(new PendingOperationPanel(componentId, new PropertyModel<List<PendingOperationType>>(rowModel, SelectableBean.F_VALUE + "." + ShadowType.F_PENDING_OPERATION.getLocalPart())));
}
});
return columns;
Expand Down

0 comments on commit fa6df17

Please sign in to comment.