use of org.apache.wicket.RequestCycle in project servoy-client by Servoy.
the class WebClientSession method logout.
/**
* Logout is being called by:
*
* 1> 2 javascript methods: js_logout and js_exit
*
* 2> 2 UserClient methods: closeSolution and shutDown
*
* 3> 1 ValueUnbound of the session a> Session time out b> Remove attribute when loading new Solution
*
* With 1 and 2 the session can be invalidated. With 3a the session is already invalidating.
*
* 3b the session shouldn't be invalidated.
*
* If logout calls invalidate then the value unbound will be called again that will call logout again.
*/
public void logout() {
credentials.clear();
RequestCycle rc = RequestCycle.get();
if (rc != null) {
rc.setRedirect(false);
invalidate();
} else if (httpSession != null) {
try {
httpSession.invalidate();
} catch (RuntimeException ex) {
// ignore can be that it is already (being) invalidated.
}
}
httpSession = null;
}
use of org.apache.wicket.RequestCycle in project servoy-client by Servoy.
the class ScrollResponseHeaderContainer method setScrollMode.
/**
* scroll mode is not supported in Internet Explorer 7 and will always set scroll mode to false in this case
* @param scrollMode
*/
public void setScrollMode(boolean scrollMode) {
this.isScrollMode = scrollMode;
RequestCycle requestCycle = RequestCycle.get();
if (requestCycle != null) {
ClientProperties cp = ((WebClientInfo) WebClientSession.get().getClientInfo()).getProperties();
if (cp.isBrowserInternetExplorer() && cp.getBrowserVersionMajor() != -1 && cp.getBrowserVersionMajor() < 8) {
// $NON-NLS-1$ //$NON-NLS-2$
Debug.warn("Cannot set tableview to scroll mode for IE version " + cp.getBrowserVersionMajor() + ", UA : " + cp.getNavigatorUserAgent());
this.isScrollMode = false;
}
}
}
Aggregations