Skip to content

Commit

Permalink
MID-5991 OrgTree approver/owner relation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Jan 22, 2020
1 parent cc8fd64 commit 538fc89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Expand Up @@ -736,7 +736,7 @@ private void searchPerformed(ObjectQuery query, AjaxRequestTarget target) {

public void refreshTable(Class<O> newTypeClass, AjaxRequestTarget target) {
BoxedTablePanel<SelectableBean<O>> table = getTable();
if (!getType().equals(newTypeClass)) {
if (isTypeChanged(newTypeClass)) {
ObjectTypes newType = newTypeClass != null ? ObjectTypes.getObjectType(newTypeClass) : null;

BaseSortableDataProvider<SelectableBean<O>> provider = getDataProvider();
Expand All @@ -760,6 +760,10 @@ public void refreshTable(Class<O> newTypeClass, AjaxRequestTarget target) {

}

protected boolean isTypeChanged(Class<O> newTypeClass){
return !getType().equals(newTypeClass);
}

public void resetSearchModel(){
String storageKey = getStorageKey();
if (StringUtils.isNotEmpty(storageKey)) {
Expand Down
Expand Up @@ -299,6 +299,10 @@ protected GuiObjectListPanelConfigurationType getAdditionalPanelConfig(){
protected boolean isAdditionalPanel(){
return true;
}

protected boolean isTypeChanged(Class<ObjectType> newTypeClass){
return true;
}
};
childrenListPanel.setOutputMarkupId(true);
memberContainer.add(childrenListPanel);
Expand Down
Expand Up @@ -118,11 +118,6 @@ protected QName getObjectTypesListParentType(){
return AssignmentHolderType.COMPLEX_TYPE;
}

@Override
protected List<ObjectReferenceType> getMembershipReferenceList(FocusType focusObject){
return focusObject.getParentOrgRef();
}

@Override
protected <O extends ObjectType> Class<O> getDefaultObjectType() {
return getMemberPanelStorage().getType() != null ? (Class) WebComponentUtil.qnameToClass(getPageBase().getPrismContext(),
Expand Down

0 comments on commit 538fc89

Please sign in to comment.