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 {
|
} else {
|
||||||
final TreeItem item = findItemByActionDefinition(
|
final TreeItem item = findItemByActionDefinition(
|
||||||
navigation.getItems(),
|
navigation.getItems(),
|
||||||
state.definition.activityAnchor());
|
state.activityAnchor());
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
final PageAction action = getActivitySelection(item);
|
final PageAction action = getActivitySelection(item);
|
||||||
this.pageService.executePageAction(action, result -> {
|
this.pageService.executePageAction(action, result -> {
|
||||||
|
|
|
@ -185,9 +185,11 @@ public class PageServiceImpl implements PageService {
|
||||||
.getUISession()
|
.getUISession()
|
||||||
.getHttpSession();
|
.getHttpSession();
|
||||||
|
|
||||||
final PageState pageState = new PageState(action.definition.targetState, action);
|
if (action != null && action.definition != null && action.definition.targetState != null) {
|
||||||
log.debug("Set session PageState: {} : {}", pageState, httpSession.getId());
|
final PageState pageState = new PageState(action.definition.targetState, action);
|
||||||
httpSession.setAttribute(ATTR_PAGE_STATE, pageState);
|
log.debug("Set session PageState: {} : {}", pageState, httpSession.getId());
|
||||||
|
httpSession.setAttribute(ATTR_PAGE_STATE, pageState);
|
||||||
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
log.error("Failed to set current PageState: ", e);
|
log.error("Failed to set current PageState: ", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,18 @@ public final class PageState {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type type() {
|
public Type type() {
|
||||||
|
if (this.definition == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return this.definition.type();
|
return this.definition.type();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Activity activityAnchor() {
|
public Activity activityAnchor() {
|
||||||
|
if (this.definition == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return this.definition.activityAnchor();
|
return this.definition.activityAnchor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue