Skip to content
Snippets Groups Projects
Commit cfceca19 authored by gnaegi's avatar gnaegi
Browse files

OO-317 add new window cycle event to notify a render-only situation, use in...

OO-317 add new window cycle event to notify a render-only situation, use in SCORM to fix jump in issue
parent 4a347c54
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,12 @@ public class Window extends Container {
*/
public static final Event END_OF_DISPATCH_CYCLE = new Event("eodc");
/**
* fired before render-only call is rendered (e.g. after reload, redirect).
* In this case normally no dispatch is fired. No dispatch will be done
*/
public static final Event BEFORE_RENDER_ONLY = new Event("before_render_only");
/**
* fired before inline (text/html computed response) takes place
*/
......@@ -521,6 +527,7 @@ public class Window extends Container {
if (renderOnly || timestampID == null) {
inline = true;
validate = true;
wbackofficeImpl.fireCycleEvent(BEFORE_RENDER_ONLY);
} else if (validatingCausedRerendering && timestampID.equals("-1")) {
// the first request after the 302 redirect cause by a component validation
// -> just rerender, but clear the flag for further async media requests
......
......@@ -432,7 +432,12 @@ public class ScormRunController extends BasicController implements ScormAPICallb
@Override
public void event(Event event) {
if (event == Window.END_OF_DISPATCH_CYCLE) {
if (event == Window.END_OF_DISPATCH_CYCLE || event == Window.BEFORE_RENDER_ONLY) {
// do initial modal dialog activation
// a) just after the dispatching of the event which is before
// rendering after a normal click
// b) just before a render-only operation which happens when using a
// jump-in URL followed by a redirect without dispatching
scormDispC.activate();
getWindowControl().getWindowBackOffice().removeCycleListener(this);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment