/** Creates a new entity and opens edit form to edit new entity. */ public void create() { getEntityForm().setViewMode(false); getEntityForm().syncCrudActions(); getEntityForm().create(); EntityFormWindow entityFormWindow = EntityFormWindow.open(getEntityForm()); entityFormWindow.addCloseListener(this, "search"); }
private void editOrView(Object itemId) { loadItem(itemId); ResultsConnectedEntityForm resultsConnectedEntityForm = new ResultsConnectedEntityForm(getEntityForm(), this); EntityFormWindow entityFormWindow = EntityFormWindow.open(resultsConnectedEntityForm); entityFormWindow.addCloseListener(this, "search"); if (getEntityForm().isPopupWindowHeightFull() == null) { if (!getEntityForm().getViewableToManyRelationships().isEmpty()) { entityFormWindow.setHeight(100, Sizeable.UNITS_PERCENTAGE); } } else { if (getEntityForm().isPopupWindowHeightFull()) { entityFormWindow.setHeight(100, Sizeable.UNITS_PERCENTAGE); } } }