@Override public boolean isModified() { return getDsContext() != null && getDsContext().isModified(); }
private DataSupplier getDataService() { DsContext context = getDsContext(); if (context == null) { throw new UnsupportedOperationException(); } else { return context.getDataSupplier(); } }
/** * Called after "postInit" in "Apply" action processing. */ protected void afterWindowApplyPostInit() { if (!WindowParams.DISABLE_RESUME_SUSPENDED.getBool(getContext())) { ((DsContextImplementation) getDsContext()).resumeSuspended(); } }
protected Datasource getDatasourceInternal() { Datasource ds = null; Element element = ((Component.HasXmlDescriptor) getFrame()).getXmlDescriptor(); String datasourceName = element.attributeValue("datasource"); if (!StringUtils.isEmpty(datasourceName)) { DsContext context = getDsContext(); if (context != null) { ds = context.get(datasourceName); } } if (ds == null) { throw new GuiDevelopmentException("Can't find main datasource", getFrame().getId()); } return ds; }
protected boolean commitInternal(boolean close) { if (!preCommit()) return false; boolean committed; DsContext context = getDsContext(); if (context != null) { committed = context.commit(); } else { DataSupplier supplier = getDataService(); supplier.commit(getItem()); committed = true; } return postCommit(committed, close); }