Skip to content

Commit

Permalink
fix MID-5185 search parameters are inherited between pages
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Mar 12, 2019
1 parent 6654ad2 commit 4e6acc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -103,7 +103,6 @@ public class SearchFactory {
ItemPath.create(UserType.F_EMPLOYEE_NUMBER),
ItemPath.create(UserType.F_EMPLOYEE_TYPE),
ItemPath.create(UserType.F_ORGANIZATIONAL_UNIT),
ItemPath.create(UserType.F_COST_CENTER),
ItemPath.create(UserType.F_LOCALITY)));
SEARCHABLE_OBJECTS.put(RoleType.class, Arrays.asList(
ItemPath.create(RoleType.F_NAME),
Expand Down
Expand Up @@ -165,7 +165,7 @@ protected String getTableIdKeyValue(){
@Override
protected String getStorageKey() {
StringValue collectionName = getCollectionNameParameterValue();
String key = !isCollectionViewPage() ?
String key = isCollectionViewPage() ?
SessionStorage.KEY_OBJECT_LIST + "." + collectionName : SessionStorage.KEY_OBJECT_LIST + "." + getType().getSimpleName();
return key;
}
Expand Down Expand Up @@ -246,7 +246,7 @@ public MainObjectListPanel<O, CompiledObjectCollectionView> getObjectListPanel()

private boolean isCollectionViewPage(){
StringValue collectionNameParam = getCollectionNameParameterValue();
return collectionNameParam != null && !collectionNameParam.isEmpty();
return collectionNameParam != null && !collectionNameParam.isEmpty() && !collectionNameParam.toString().equals("null");
}

private DisplayType getCollectionViewDisplayType(CompiledObjectCollectionView view){
Expand Down

0 comments on commit 4e6acc0

Please sign in to comment.