<@doc hierarchy="GMLDOM"> The Action class represents an action driven control. This class is in preliminary design stage, and is subject to change. (c) SAP AG 2003-2006. All rights reserved. /////////////////////////////////////////////////////////////////////// // CLASS HEADER abstract Class Action inherit Element; implement dev:IAction, dev:IDESupport; metadata title = '#TEXT[XTIT_ACTION]'; metadata descr = '#TEXT[XTOL_ACTION]'; metadata icon16 = '#URL[~res:skins.neutral.symbols.action16.gif]'; /////////////////////////////////////////////////////////////////////// // PROPERTIES /*<@doc scope="private"> Collection of parameters contained in this parameters strong property params = ^ActionParameter[name]; */ <@doc> The order of this action in an action-group property order = 0; metadata for order = { editor: 'int' , group: 'General', label: '#TEXT[XTIT_ORDER]', visible: 'ISA(data,"core.gml:Action") && ISA(data.parent,"core.gml:ActionGroup")' } <@doc > Condition to execute this action expression condition = true; metadata for condition = { editor: 'expr', group: 'General', label: '#TEXT[XTIT_CONDITION]', visible: 'ISA(data,"core.gml:Action")', sideEffects: true } <@doc>This property is a collection of an additional properties for the Action like confirmation dialog strong property additionalProps = ^ConfigurationItem[id]; ///////////////////////////////// // Implementing IAction prototype: <@doc> Gets the action's friendly name (alias) The actions's friendly name override method getAlias() return this.name; end /*<@doc> Gets the string representation of the application-specific technical action type The application-specific technical action type override method getParams() return this.params; end <@doc> Create a new Action parameter and insert it to this Action The parameter class name to be created A collection of property values for initializing the new ActionParameter The ActionParameter that was addded to the Action, or ~null on failure. method createParameter(paramClass, values) if (null == paramClass) return null; return this.createElement(paramClass, 'params', values); end*/ override method getDynExpContext(propId) var ctx = this.dynExpContext; if (null == ctx) { // First time per Class: ctx = $ENV.createObject('core.dev:DynExpContext'); if(ctx) { //get the infoshape for this action (the interactor which it belongs to) var parent = this; while(parent && !ISA(parent, 'gml:Interactor')) parent = parent.parent; if(!parent) parent = $ENV.context.object; if(!parent) return null; if(false == ctx.setContext(parent.unit, parent)) { // Non valid arguments: return null; } } else { return null; } this.dynExpContext = ctx; } //check if the property exists in the class properties var exprType = this.Class.properties[propId] && this.Class.properties[propId].exprType; //check if the property exists in the class additional properties - collection of more properties added dynamically to the class if(!exprType) { var props = this.additionalProps; for(var k in props){ exprType = props[k].Class.properties[propId] && props[k].Class.properties[propId].exprType; if(exprType) break; } } if (false == ctx.setExprType(exprType)) { // Non valid type: return null; } var transType = null; if(#SYS[SUPPORT_TRANSLATION]){ if(this.Class.properties[propId] && this.Class.properties[propId].metadata.translation && this.Class.properties[propId].metadata.translation.translate && this.Class.properties[propId].metadata.translation.type) { transType = this.Class.properties[propId].metadata.translation.type; } ctx.setTranslation(this, propId, transType); } //ctx.setDescription('#TEXT[XMSG_EDIT_DE_TYPE] '+ exprType +''); return ctx; end /////////////////////////////////////////////////////////////////////// // PROPERTIES // The following properties are not relevant for Action. //Therefore the editor for them will not be shown. override metadata for name = { editor: false }