use of org.apache.ofbiz.widget.artifact.ArtifactInfoGatherer in project ofbiz-framework by apache.
the class FormWidgetArtifactInfo method populateAll.
/**
* note this is mean to be called after the object is created and added to the ArtifactInfoFactory.allFormInfos in ArtifactInfoFactory.getFormWidgetArtifactInfo
*/
public void populateAll() throws GeneralException {
ArtifactInfoContext infoContext = new ArtifactInfoContext();
ArtifactInfoGatherer infoGatherer = new ArtifactInfoGatherer(infoContext);
try {
if (this.modelForm instanceof ModelSingleForm) {
infoGatherer.visit((ModelSingleForm) this.modelForm);
} else {
infoGatherer.visit((ModelGrid) this.modelForm);
}
} catch (Exception e) {
throw new GeneralException(e);
}
populateEntitiesFromNameSet(infoContext.getEntityNames());
populateServicesFromNameSet(infoContext.getServiceNames());
this.populateFormExtended();
this.populateLinkedRequests(infoContext.getRequestLocations());
this.populateTargetedRequests(infoContext.getTargetLocations());
}
use of org.apache.ofbiz.widget.artifact.ArtifactInfoGatherer in project ofbiz-framework by apache.
the class ScreenWidgetArtifactInfo method populateAll.
public void populateAll() throws GeneralException {
ArtifactInfoContext infoContext = new ArtifactInfoContext();
ArtifactInfoGatherer infoGatherer = new ArtifactInfoGatherer(infoContext);
try {
infoGatherer.visit(this.modelScreen);
} catch (Exception e) {
throw new GeneralException(e);
}
populateServicesFromNameSet(infoContext.getServiceNames());
populateEntitiesFromNameSet(infoContext.getEntityNames());
populateFormsFromNameSet(infoContext.getFormLocations());
populateLinkedRequests(infoContext.getRequestLocations());
}
Aggregations