use of org.uberfire.client.views.pfly.multipage.PageImpl in project drools-wb by kiegroup.
the class GuidedRuleTemplateEditorPresenter method getModelSuccessCallback.
private RemoteCallback<GuidedTemplateEditorContent> getModelSuccessCallback() {
return new RemoteCallback<GuidedTemplateEditorContent>() {
@Override
public void callback(final GuidedTemplateEditorContent content) {
// Path is set to null when the Editor is closed (which can happen before async calls complete).
if (versionRecordManager.getCurrentPath() == null) {
return;
}
resetEditorPages(content.getOverview());
addSourcePage();
addPage(new PageImpl(dataView, GuidedTemplateEditorConstants.INSTANCE.Data()) {
@Override
public void onFocus() {
dataView.setContent(model, oracle, eventBus, isReadOnly);
}
@Override
public void onLostFocus() {
// Nothing to do here
}
});
addImportsTab(importsWidget);
model = content.getModel();
final PackageDataModelOracleBaselinePayload dataModel = content.getDataModel();
oracle = oracleFactory.makeAsyncPackageDataModelOracle(versionRecordManager.getCurrentPath(), model, dataModel);
view.setContent(model, oracle, ruleNamesService, eventBus, isReadOnly);
importsWidget.setContent(oracle, model.getImports(), isReadOnly);
createOriginalHash(model);
view.hideBusyIndicator();
}
};
}
Aggregations