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);
}
}
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);
}
}
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;
}
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);
}
}
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);
}
}
Aggregations