Search in sources :

Example 11 with IMainContainer

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

the class WebDataRadioChoice method fireOnRender.

public void fireOnRender(boolean force) {
    if (scriptable != null) {
        boolean isFocused = false;
        IMainContainer currentContainer = ((FormManager) application.getFormManager()).getCurrentContainer();
        if (currentContainer instanceof MainPage) {
            isFocused = this.equals(((MainPage) currentContainer).getFocusedComponent());
        }
        if (force)
            scriptable.getRenderEventExecutor().setRenderStateChanged();
        scriptable.getRenderEventExecutor().fireOnRender(isFocused);
    }
}
Also used : FormManager(com.servoy.j2db.FormManager) IMainContainer(com.servoy.j2db.IMainContainer) MainPage(com.servoy.j2db.server.headlessclient.MainPage)

Example 12 with IMainContainer

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

the class WebDataListBox method fireOnRender.

public void fireOnRender(boolean force) {
    if (scriptable != null) {
        boolean isFocused = false;
        IMainContainer currentContainer = ((FormManager) application.getFormManager()).getCurrentContainer();
        if (currentContainer instanceof MainPage) {
            isFocused = this.equals(((MainPage) currentContainer).getFocusedComponent());
        }
        if (force)
            scriptable.getRenderEventExecutor().setRenderStateChanged();
        scriptable.getRenderEventExecutor().fireOnRender(isFocused);
    }
}
Also used : FormManager(com.servoy.j2db.FormManager) IMainContainer(com.servoy.j2db.IMainContainer) MainPage(com.servoy.j2db.server.headlessclient.MainPage)

Example 13 with IMainContainer

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

the class WebFormManager method getOrCreateMainContainer.

/**
 * @see com.servoy.j2db.FormManager#getOrCreateMainContainer(java.lang.String)
 */
@Override
public IMainContainer getOrCreateMainContainer(String nm) {
    String name = nm;
    if (name != null && name.trim().length() == 0) {
        // blank names would make PageMap throw an exception or generate JS errors
        // $NON-NLS-1$
        name = "blank_name";
    }
    IMainContainer container = getMainContainer(name);
    if (container == null) {
        WebClient wc = (WebClient) getApplication();
        IPageMap pageMap = PageMap.forName(name);
        container = new MainPage(wc, pageMap);
        containers.put(name, container);
    }
    return container;
}
Also used : IMainContainer(com.servoy.j2db.IMainContainer) IPageMap(org.apache.wicket.IPageMap)

Example 14 with IMainContainer

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

the class WebRuntimeWindow method doOldShow.

@Override
protected void doOldShow(String formName, boolean closeAll, boolean legacyV3Behavior) {
    FormManager fm = (FormManager) getApplication().getFormManager();
    IMainContainer parentContainer = getParentContainerForShow(fm);
    IMainContainer dialogContainer = fm.getOrCreateMainContainer(windowName);
    // calling container can be set just after the creation of the container (needed for browser back button (wicket undo))
    ((MainPage) dialogContainer).setCallingContainerIfNull((MainPage) parentContainer);
    if (formName != null) {
        final FormController fp = fm.showFormInMainPanel(formName, dialogContainer, title, closeAll || !legacyV3Behavior, windowName);
        if (fp != null && fp.getName().equals(formName) && dialogContainer != parentContainer) {
            Rectangle r2;
            if (FormManager.FULL_SCREEN.equals(initialBounds)) {
                r2 = initialBounds;
            } else {
                r2 = getSizeAndLocation(initialBounds, dialogContainer, fp);
                if (Application.get().getDebugSettings().isAjaxDebugModeEnabled()) {
                    r2.height += 40;
                }
            }
            if (windowType == JSWindow.WINDOW) {
                ((MainPage) parentContainer).showPopupWindow((MainPage) dialogContainer, title, r2, resizable, closeAll || !legacyV3Behavior);
            } else {
                ((MainPage) parentContainer).showPopupDiv((MainPage) dialogContainer, title, r2, isUndecorated() ? false : resizable, closeAll || !legacyV3Behavior, (windowType == JSWindow.MODAL_DIALOG), isUndecorated(), storeBounds, getOpacity(), getTransparent());
            }
        }
    }
    if (getTitle() != null)
        setTitle(getTitle());
    if (windowType == JSWindow.MODAL_DIALOG && ((WebClient) getApplication()).getEventDispatcher() != null) {
        ((WebClient) getApplication()).getEventDispatcher().suspend(this);
    }
}
Also used : FormController(com.servoy.j2db.FormController) FormManager(com.servoy.j2db.FormManager) Rectangle(java.awt.Rectangle) IMainContainer(com.servoy.j2db.IMainContainer)

Example 15 with IMainContainer

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

the class WebDataCompositeTextField method fireOnRender.

public void fireOnRender(boolean force) {
    if (scriptable != null) {
        boolean isFocused = false;
        IMainContainer currentContainer = ((FormManager) application.getFormManager()).getCurrentContainer();
        if (currentContainer instanceof MainPage) {
            isFocused = field.equals(((MainPage) currentContainer).getFocusedComponent());
        }
        if (force)
            scriptable.getRenderEventExecutor().setRenderStateChanged();
        scriptable.getRenderEventExecutor().fireOnRender(isFocused);
    }
}
Also used : FormManager(com.servoy.j2db.FormManager) IMainContainer(com.servoy.j2db.IMainContainer) MainPage(com.servoy.j2db.server.headlessclient.MainPage)

Aggregations

IMainContainer (com.servoy.j2db.IMainContainer)25 FormManager (com.servoy.j2db.FormManager)20 MainPage (com.servoy.j2db.server.headlessclient.MainPage)13 FormController (com.servoy.j2db.FormController)3 FormWindow (com.servoy.j2db.FormWindow)3 FormDialog (com.servoy.j2db.gui.FormDialog)3 ISmartRuntimeWindow (com.servoy.j2db.plugins.ISmartRuntimeWindow)3 JSWindow (com.servoy.j2db.scripting.JSWindow)3 RuntimeWindow (com.servoy.j2db.scripting.RuntimeWindow)3 Window (java.awt.Window)3 IBasicFormManager (com.servoy.j2db.IBasicFormManager)2 IComponent (com.servoy.j2db.ui.IComponent)2 IFieldComponent (com.servoy.j2db.ui.IFieldComponent)2 ISupportOnRenderCallback (com.servoy.j2db.ui.ISupportOnRenderCallback)2 Container (java.awt.Container)2 Component (org.apache.wicket.Component)2 IApplication (com.servoy.j2db.IApplication)1 IBasicMainContainer (com.servoy.j2db.IBasicMainContainer)1 IFoundSetInternal (com.servoy.j2db.dataprocessing.IFoundSetInternal)1 BaseComponent (com.servoy.j2db.persistence.BaseComponent)1