fixed PageState bug for pop-up dialogs
This commit is contained in:
parent
96cad3155a
commit
3a0ac74bb9
3 changed files with 14 additions and 4 deletions
|
@ -351,7 +351,7 @@ public class ActivitiesPane implements TemplateComposer {
|
|||
} else {
|
||||
final TreeItem item = findItemByActionDefinition(
|
||||
navigation.getItems(),
|
||||
state.definition.activityAnchor());
|
||||
state.activityAnchor());
|
||||
if (item != null) {
|
||||
final PageAction action = getActivitySelection(item);
|
||||
this.pageService.executePageAction(action, result -> {
|
||||
|
|
|
@ -185,9 +185,11 @@ public class PageServiceImpl implements PageService {
|
|||
.getUISession()
|
||||
.getHttpSession();
|
||||
|
||||
final PageState pageState = new PageState(action.definition.targetState, action);
|
||||
log.debug("Set session PageState: {} : {}", pageState, httpSession.getId());
|
||||
httpSession.setAttribute(ATTR_PAGE_STATE, pageState);
|
||||
if (action != null && action.definition != null && action.definition.targetState != null) {
|
||||
final PageState pageState = new PageState(action.definition.targetState, action);
|
||||
log.debug("Set session PageState: {} : {}", pageState, httpSession.getId());
|
||||
httpSession.setAttribute(ATTR_PAGE_STATE, pageState);
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
log.error("Failed to set current PageState: ", e);
|
||||
}
|
||||
|
|
|
@ -32,10 +32,18 @@ public final class PageState {
|
|||
}
|
||||
|
||||
public Type type() {
|
||||
if (this.definition == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.definition.type();
|
||||
}
|
||||
|
||||
public Activity activityAnchor() {
|
||||
if (this.definition == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.definition.activityAnchor();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue