extensions.XMAPage.ext Maven / Gradle / Ivy
import guidesign;
import pom;
import dom;
extension extensions::XMAComponent;
extension extensions::Field;
extension extensions::EntityExtension;
//XMAPage getPageForName(XMAComponent c, String name):
// c.eAllContents.typeSelect(XMAPage).select(e|e.namInstance == name).first();
XMAWidget getWidgetForName(XMAPage p, String name):
JAVA org.openxma.dsl.generator.helper.Util.getWidgetForName(at.spardat.xma.guidesign.XMAPage, java.lang.String);
// Get a list of all BusinessData which are can be accessed from the XMAPage
List getAccessibleBusinessData(XMAPage page):
JAVA org.openxma.dsl.generator.helper.Util.getAccessibleBusinessData(at.spardat.xma.guidesign.XMAPage);/* {
/*
* Various ways to find aBDAttribute
*/
BDAttribute findBDAttributeForAttribute(XMAPage xmaPage, PresentableFeature attr, DataObjectVariable dataObject):
JAVA org.openxma.dsl.generator.helper.Util.findBDAttributeForAttribute(at.spardat.xma.guidesign.XMAPage, org.openxma.dsl.dom.model.PresentableFeature, org.openxma.dsl.pom.model.DataObjectVariable);
BDAttribute findBDAttributeForAttribute(XMAComponent xmaComp,List businessDataList, PresentableFeature attr, DataObjectVariable dataObject):
JAVA org.openxma.dsl.generator.helper.Util.findBDAttributeForAttribute(at.spardat.xma.guidesign.XMAComponent, java.util.List, org.openxma.dsl.dom.model.PresentableFeature, org.openxma.dsl.pom.model.DataObjectVariable);
BDAttribute findBDAttribute(XMAPage xmaPage, Attribute attribute, FieldFeature fieldFeature, DataObjectVariable dataObject):
JAVA org.openxma.dsl.generator.helper.Util.findBDAttributeForFeature(at.spardat.xma.guidesign.XMAPage, org.openxma.dsl.pom.model.FieldFeature, org.openxma.dsl.pom.model.DataObjectVariable);
BDAttribute findBDAttribute(XMAComponent xmaComp,List businessDataList, FieldFeature fieldFeature, DataObjectVariable dataObject):
JAVA org.openxma.dsl.generator.helper.Util.findBDAttributeForFeature(at.spardat.xma.guidesign.XMAComponent, java.util.List, org.openxma.dsl.pom.model.FieldFeature, org.openxma.dsl.pom.model.DataObjectVariable);
/**
* Create a hidden IExpVariable for an Attribute of a dataObject
*/
flex::IExpVariable createHiddenIExpVariable(XMAPage xmaPage, PresentableFeature feature, DataObjectVariable dataObject):
let hiddenWidget = new HiddenWidget:
let attribute = feature.getAttributeOfAttributeHolder():
let bdAttribute = findBDAttributeForAttribute(xmaPage,feature,dataObject):
let hiddenWidgetName = composeDefaultWidgetNameForAttribute(dataObject,feature):
hiddenWidget.setNamInstance(hiddenWidgetName)->
hiddenWidget.setDataAttribute(bdAttribute)->
hiddenWidget.setYnGenerated(true)->
xmaPage.composite.controls.add(hiddenWidget) ->
createAndAttachCompoundValidatorForAttribute(hiddenWidget,attribute,xmaPage.component,xmaPage)->
hiddenWidget;
// Get the super-XMAPage for a XMAPage
guidesign::XMAPage getSuperPage(guidesign::XMAPage page):
JAVA org.openxma.dsl.generator.helper.Util.getSuperPage(at.spardat.xma.guidesign.XMAPage);