Search in sources :

Example 1 with IScriptSupport

use of com.servoy.j2db.scripting.IScriptSupport in project servoy-client by Servoy.

the class WebClient method onBeginRequest.

public void onBeginRequest(WebClientSession webClientSession) {
    Solution solution = getSolution();
    if (solution != null) {
        synchronized (onBeginRequestLock) {
            long solutionLastModifiedTime = webClientSession.getSolutionLastModifiedTime(solution);
            if (solutionLastModifiedTime != -1 && solutionLastModifiedTime != solution.getLastModifiedTime()) {
                if (isClosing() || isShutDown()) {
                    if (((WebRequest) RequestCycle.get().getRequest()).isAjax())
                        throw new AbortException();
                    else
                        throw new RestartResponseException(Application.get().getHomePage());
                }
                refreshI18NMessages(true);
                ((IScriptSupport) getScriptEngine()).reload();
                ((WebFormManager) getFormManager()).reload();
                MainPage page = (MainPage) ((WebFormManager) getFormManager()).getMainContainer(null);
                throw new RestartResponseException(page);
            }
            executeEvents();
        }
    }
}
Also used : WebRequest(org.apache.wicket.protocol.http.WebRequest) RestartResponseException(org.apache.wicket.RestartResponseException) IScriptSupport(com.servoy.j2db.scripting.IScriptSupport) Solution(com.servoy.j2db.persistence.Solution) AbortException(org.apache.wicket.AbortException)

Aggregations

Solution (com.servoy.j2db.persistence.Solution)1 IScriptSupport (com.servoy.j2db.scripting.IScriptSupport)1 AbortException (org.apache.wicket.AbortException)1 RestartResponseException (org.apache.wicket.RestartResponseException)1 WebRequest (org.apache.wicket.protocol.http.WebRequest)1