Search in sources :

Example 11 with FormManager

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

the class ScrollResponseHeaderContainer method setColumnThatRequestsFocus.

/**
 * Requests focus for the cell in the web cell view corresponding to the selected record and to the given column identifier component.
 *
 * @param columnIdentifierComponent the Component that identifies a column for java script.
 */
public void setColumnThatRequestsFocus(final Component columnIdentifierComponent) {
    focusRequestingColIdentComponent = null;
    if (currentData == null)
        return;
    Component cell = getCellToFocus(columnIdentifierComponent);
    if (cell != null) {
        IMainContainer currentContainer = ((FormManager) application.getFormManager()).getCurrentContainer();
        if (currentContainer instanceof MainPage) {
            ((MainPage) currentContainer).componentToFocus(cell);
        } else {
            // $NON-NLS-1$
            Debug.trace("focus couldnt be set on component " + cell);
        }
    } else {
        focusRequestingColIdentComponent = columnIdentifierComponent;
    }
}
Also used : FormManager(com.servoy.j2db.FormManager) IMainContainer(com.servoy.j2db.IMainContainer) IComponent(com.servoy.j2db.ui.IComponent) AbstractRuntimeBaseComponent(com.servoy.j2db.ui.scripting.AbstractRuntimeBaseComponent) BaseComponent(com.servoy.j2db.persistence.BaseComponent) GraphicalComponent(com.servoy.j2db.persistence.GraphicalComponent) IFieldComponent(com.servoy.j2db.ui.IFieldComponent) Component(org.apache.wicket.Component) IPortalComponent(com.servoy.j2db.ui.IPortalComponent) IRuntimeComponent(com.servoy.j2db.ui.runtime.IRuntimeComponent) MainPage(com.servoy.j2db.server.headlessclient.MainPage)

Example 12 with FormManager

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

the class WebRuntimeWindowManager method getOrderedContainers.

@Override
protected List<String> getOrderedContainers() {
    FormManager fm = ((FormManager) application.getFormManager());
    List<String> all = fm.getCreatedMainContainerKeys();
    int size = all.size();
    ArrayList<String> al = new ArrayList<String>(size);
    HashSet<String> visited = new HashSet<String>();
    ArrayList<String> result = new ArrayList<String>(size);
    for (String key : all) {
        ((MainPage) fm.getMainContainer(key)).getMainPageReversedCloseSeq(al, visited);
    }
    for (int i = al.size() - 1; i >= 0; i--) {
        result.add(al.get(i));
    }
    return result;
}
Also used : FormManager(com.servoy.j2db.FormManager) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet)

Example 13 with FormManager

use of com.servoy.j2db.FormManager 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 14 with FormManager

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

the class WebDataField method fireOnRender.

public void fireOnRender(boolean force) {
    if (!isIgnoreOnRender && 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 15 with FormManager

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

the class WebDataHtmlArea 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)

Aggregations

FormManager (com.servoy.j2db.FormManager)49 IMainContainer (com.servoy.j2db.IMainContainer)21 FormController (com.servoy.j2db.FormController)15 MainPage (com.servoy.j2db.server.headlessclient.MainPage)13 IForm (com.servoy.j2db.IForm)7 Form (com.servoy.j2db.persistence.Form)5 IFoundSetInternal (com.servoy.j2db.dataprocessing.IFoundSetInternal)4 RepositoryException (com.servoy.j2db.persistence.RepositoryException)4 IComponent (com.servoy.j2db.ui.IComponent)4 Component (java.awt.Component)4 ArrayList (java.util.ArrayList)4 FlattenedSolution (com.servoy.j2db.FlattenedSolution)3 FormWindow (com.servoy.j2db.FormWindow)3 IBasicFormManager (com.servoy.j2db.IBasicFormManager)3 IFormController (com.servoy.j2db.IFormController)3 IFormManager (com.servoy.j2db.IFormManager)3 ITable (com.servoy.j2db.persistence.ITable)3 SwingFormManager (com.servoy.j2db.smart.SwingFormManager)3 IFieldComponent (com.servoy.j2db.ui.IFieldComponent)3 ServoyException (com.servoy.j2db.util.ServoyException)3