use of org.apache.wicket.IPageMap 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 org.apache.wicket.IPageMap in project servoy-client by Servoy.
the class MainPage method onNewBrowserWindow.
@Override
public void onNewBrowserWindow() {
minimumVersionNumber = getCurrentVersionNumber() + 1;
storeMinVersion();
final IPageMap map = getSession().createAutoPageMap();
FormManager fm = (FormManager) client.getFormManager();
MainPage page = (MainPage) fm.getOrCreateMainContainer(map.getName());
if (fm.getMainContainer(null) == this) {
fm.setMainContainer(page);
}
fm.setCurrentContainer(page, map.getName());
fm.showFormInCurrentContainer(getController().getName());
if (page.getController() == null) {
// form switch did not happen, login form?
page.add(getController().getFormUI(), getController().getName());
}
page.setNavigator(getNavigator());
setResponsePage(page);
}
Aggregations