Hi,
With RAP 1.5 M4 (full implementation of JSON), I cant figure out how to rewrite my existing redirect code for logging out
(with help from Stefan http://www.eclipse.org/forums/index.php/mv/msg/34206/110934/)
final String browserText =
MessageFormat.format("parent.window.location.href = \"{0}\";", urlToLoginPage);
final JavaScriptResponseWriter writer =
ContextProvider.getStateInfo().getResponseWriter();
writer.write(browserText);
The problem is JavaScriptResponseWriter has now been replaced with ProtocolMessageWriter and the code should be
final ProtocolMessageWriter writer =
ContextProvider.getStateInfo().getProtocolWriter();
writer.appendExecuteScript(String target, String scriptType, String code);
I'm looking for what to pass as target and scriptType. The ProtocolMessageWriter also has other methods which can be used but I guess this one should work.