design studio api
DESCRIPTION
Design Studio API callTRANSCRIPT
-
17/6/2015 DesignStudioInnovationSeriesTopic3:Maki...|SCN
http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/03/19/designstudioinnovationseriestopic3makingacaseforbialapicallsfr 1/3
GettingStarted Newsletters Store
Products Services&Support AboutSCN Downloads
Industries Training&Education Partnership DeveloperCenter
LinesofBusiness UniversityAlliances Events&Webinars Innovation
LogOn JoinUsHi,Guest SearchtheCommunity
Activity Communications Actions
Browse
SAPBusinessObjectsDesignStudio
Tweet
UPDATE12May2015:ThefeaturedescribedinthisblogwillbeavailableintheDesignStudio1.5SDK.
IntroductionDesignStudio1.4hasintroducedaverypowerfulnewfeatureintheSDKthatallowseventstobeboundtoscriptmethods,asdescribedinthe What'sCominginDesignStudio1.4SDKblogpostby ReinerHilleDoering,withfurtherexamplesin DesignStudioSDK:ExamplesforBindingEventstoZTLScriptsby
KarolKalisz.Thesignificanceofthisfeatureisthatithasthepotentialtoallowthedevelopmentofcomponentsthatrequireverylittleornoscriptingonthepartoftheapplicationdesigner,akeyissueraisedin
Topic2ofthisblogserieswithrespecttotheneedforlesscodinginDesignStudiotoencourageadoptionacrossawideraudience.WhilethisnewfeatureisagreatstepforwardinenhancinginnovationopportunitieswiththeSDK,itcurrentlycomeswithamajorlimitation(inmyopinion)ofnotbeingaccessiblefromtheAdditionalPropertiesSheet,therebyrestrictingthefullpotentialofinnovationthatcouldotherwisebeachieved.Theintentionofthiseditionofthe DesignStudioInnovationSeriesistoemphasisetheneedandhighlighttheusecasesforaccessingscriptAPIsfromtheAdditionalPropertiesSheet.BackgroundInbrief,theneweventbindingfeatureallowsareferencetoaprivateZTLscriptcontributionmethodtobepredefinedasthedefaultscriptforanevent.Thismethodcanthenbeinvokedbytriggeringtheeventthatitisboundtofromwithinthecomponentcode.TheZTLmethodcancallanyAPImethodtocauseaninteraction,getinformationorsetproperties,therebyallowingmoredynamicSDKcomponentstobedeveloped.However,therearesituationswhereitwouldbeadvantageoustoalsohaveaccesstothescriptAPIfromtheAdditionalPropertiesSheet,whichI'llnowprovideexamplesof.UseCasesforScriptAPICallsfromtheAdditionalPropertiesSheetThemainadvantageofscriptAPIaccessfromanAdditionalPropertiesSheetistoimprovetheapplicationdesignerexperiencebyallowingfullconfigurationofanSDKcomponentatdesigntime,withouttheneedfortheapplicationdesignertomanuallycodescriptorlookuptechnicalnamesofdimensions.TheexamplesbelowarerelatedtodatasourcesanddemonstratewhyscriptAPIaccessisnecessarybecausetheinformationrequiredfortheseusecasesisnotavailablefromtheDataRuntimeJSONorMetadataRuntimeJSONprovidedbytheSDKframework.OfcourseIexpecttheremayalsobenondatasourcerelatedusecasesaswell.1)SelectionofDimensionsnotincludedintheInitialViewofaDataSourceAtdesigntime,theinitialviewofadatasourceisusuallydefinedtoreturnaresultsetwhichisasubsetofwhatisavailableinthedatasource.Acommonrequirementistosubsequentlybeabletoswapdimensionsinandoutorfilterbasedondifferentdimensionsatruntime.Anexampleinitialviewscreenshotinthiscontextisshownbelow:
DesignStudioInnovationSeriesTopic3:MakingaCaseforScriptAPICallsfromanSDKComponentAdditionalPropertiesSheetPostedbyMustafaBensaninSAPBusinessObjectsDesignStudioonMar19,20151:31:00PM
0Like
-
17/6/2015 DesignStudioInnovationSeriesTopic3:Maki...|SCN
http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/03/19/designstudioinnovationseriestopic3makingacaseforbialapicallsfr 2/3
Here,theinitialviewisdefinedwithonlyonedimension,AirlineIDbutthereareadditionaldimensionsavailableashighlightedintheleftpanelabove.However,intheAdditionalPropertiesSheetitmaybedesirabletolistalloftheavailabledimensions(viathegetDimensions()scriptAPImethod)sothattheapplicationdesignercanselectandconfigurewhichofthesedimensionsshouldbemadeavailabletotheenduseratruntimeforthepurposesofswappingorfilteringdimensions.2)SelectionofMeasuresnotincludedintheInitialViewofaDataSourceAnothercommonrequirementistobeabletoswapmeasuresinandout.Anexampleinitialviewscreenshotinthiscontextisshownbelow:
Here,onlyfiveoftheavailablemeasuresaredefinedintheinitialview.IntheAdditionalPropertiesSheetitmaybedesirabletolistallpossiblemeasures(viathegetMeasuresDimension()andgetMembers()scriptAPImethods)toallowtheapplicationdesignerto(forinstance)selectwhichsetsofmeasurescanbeswappedandconfigureinteractionsassociatedwiththem,tobemadeavailabletotheenduseratruntime.3)SelectionofVariablesinaDataSourceWhenvariablesaredefinedforadatasource,itmaybedesirabletoallowtheapplicationdesignertoselectthesefromalist(viathegetVariables()scriptAPImethod)intheAdditionalPropertiesSheetforthepurposesofconfiguringdynamiccalculationofvaluesatinitialisationordefinitionofacustomvariableinputform.ImplementationNormally,IwouldhaveexpectedtobeabletoimplementtheabovescenariosbycallingthecallRuntimeHandlerfunctionfromtheAdditionalPropertiesSheettoexecuteafunctionintheComponentJavaScriptfilethattriggerstheeventboundtotheZTLmethod.However,itturnsoutthatraisingeventsatdesigntimeisnotsupported,sothenewEventBoundScriptMethodsfeatureisnotavailabletotheAdditionalPropertiesSheet.Theremaywellbetechnicalreasonswhyraisingeventsatdesigntimeisnotfeasible.Ifthat'sthecase,allIamsuggestingisthatanalternativeapproach/featureisdevelopedforaccessingscriptAPImethodsviatheAdditionalPropertiesSheet.Conclusion
-
17/6/2015 DesignStudioInnovationSeriesTopic3:Maki...|SCN
http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/03/19/designstudioinnovationseriestopic3makingacaseforbialapicallsfr 3/3
FollowSCNSiteIndex ContactUs SAPHelpPortalPrivacy TermsofUse LegalDisclosure Copyright
AverageUserRating
(3ratings)
Tweet
HopefullyI'vemadeagoodcaseforwhythere'salegitimateneedtoenhancetheEventBoundScriptMethodsfeatureintroducedinDesignStudio1.4,sothatitisalsoavailablefromtheAdditionalPropertiesSheet.IthinkthiswouldallowthedevelopmentofSDKcomponentswithsignificantlyimprovedusabilitybothfromtheperspectiveoftheapplicationdesignerandenduser.IhavealsoraisedthisintheDesignStudioIdeaPlaceforthoseofyouthatmaywishtovoteandexpressyoursupportifyouthinktheenhancementwouldbeofbenefit:IdeaAllowScriptAPICallsfromtheAdditionalPropertiesSheetofanSDKComponentCommentsandsuggestionsarewelcomeandencouraged.
BlogSeriesIndex: DesignStudioInnovationSeriesWelcome
837Views Categories:SDK Tags:sapzen,business_objects_design_studio,design_studio,design_studio_sdk
0Like
Therearenocommentsonthispost
0Comments