use of org.eclipse.scout.rt.ui.html.json.form.fixtures.FormMenu in project scout.rt by eclipse.
the class JsonFormMenuTest method testPreventFormDisposal.
/**
* Form disposal is controlled by the model and must not be triggered by the parent
*/
@Test
public void testPreventFormDisposal() {
FormMenu button = new FormMenu();
FormWithOneField form = new FormWithOneField();
form.start();
button.setForm(form);
JsonFormMenu<IFormMenu<IForm>> jsonFormMenu = m_uiSession.createJsonAdapter(button, null);
assertNotNull(jsonFormMenu.getAdapter(form));
jsonFormMenu.dispose();
// Form has not been closed yet -> must still be registered
assertNotNull(jsonFormMenu.getAdapter(form));
form.doClose();
assertNull(jsonFormMenu.getAdapter(form));
}
Aggregations