Search in sources :

Example 1 with PageContributor

use of com.servoy.j2db.server.headlessclient.PageContributor in project servoy-client by Servoy.

the class WebSplitPane method setRuntimeDividerLocation.

public void setRuntimeDividerLocation(double locationPos) {
    if (locationPos < 0)
        return;
    setDividerLocationInternal(locationPos);
    IRequestTarget requestTarget = RequestCycle.get().getRequestTarget();
    MainPage page = (MainPage) findPage();
    if (requestTarget instanceof AjaxRequestTarget && page != null) {
        ((PageContributor) page.getPageContributor()).addSplitPaneToUpdatedDivider(this);
        if (// $NON-NLS-1$
        page.getController() != null && Utils.getAsBoolean(page.getController().getApplication().getRuntimeProperties().get("enableAnchors"))) {
            // $NON-NLS-1$
            ((AjaxRequestTarget) requestTarget).appendJavascript("layoutEntirePage();");
        }
        // $NON-NLS-1$
        ((AjaxRequestTarget) requestTarget).appendJavascript("Servoy.Resize.onWindowResize();");
    } else
        sizeChanged = true;
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) PageContributor(com.servoy.j2db.server.headlessclient.PageContributor) IRequestTarget(org.apache.wicket.IRequestTarget) MainPage(com.servoy.j2db.server.headlessclient.MainPage)

Aggregations

MainPage (com.servoy.j2db.server.headlessclient.MainPage)1 PageContributor (com.servoy.j2db.server.headlessclient.PageContributor)1 IRequestTarget (org.apache.wicket.IRequestTarget)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1