design studio api

3
Getting Started Newsletters Store Products Services & Support About SCN Downloads Industries Training & Education Partnership Developer Center Lines of Business University Alliances Events & Webinars Innovation Log On Join Us Hi, Guest Search the Community Activity Communications Actions Browse SAP BusinessObjects Design Studio Tweet UPDATE 12 May 2015: The feature described in this blog will be available in the Design Studio 1.5 SDK. Introduction Design Studio 1.4 has introduced a very powerful new feature in the SDK that allows events to be bound to script methods, as described in the What's Coming in Design Studio 1.4 SDK blog post by Reiner Hille Doering, with further examples in Design Studio SDK: Examples for Binding Events to ZTL Scripts by Karol Kalisz. The significance of this feature is that it has the potential to allow the development of components that require very little or no scripting on the part of the application designer, a key issue raised in Topic 2 of this blog series with respect to the need for less coding in Design Studio to encourage adoption across a wider audience. While this new feature is a great step forward in enhancing innovation opportunities with the SDK, it currently comes with a major limitation (in my opinion) of not being accessible from the Additional Properties Sheet, thereby restricting the full potential of innovation that could otherwise be achieved. The intention of this edition of the Design Studio Innovation Series is to emphasise the need and highlight the use cases for accessing script APIs from the Additional Properties Sheet. Background In brief, the new event binding feature allows a reference to a private ZTL script contribution method to be pre defined as the default script for an event. This method can then be invoked by triggering the event that it is bound to from within the component code. The ZTL method can call any API method to cause an interaction, get information or set properties, thereby allowing more dynamic SDK components to be developed. However, there are situations where it would be advantageous to also have access to the script API from the Additional Properties Sheet, which I'll now provide examples of. Use Cases for Script API Calls from the Additional Properties Sheet The main advantage of script API access from an Additional Properties Sheet is to improve the application designer experience by allowing full configuration of an SDK component at designtime, without the need for the application designer to manually code script or lookup technical names of dimensions. The examples below are related to data sources and demonstrate why script API access is necessary because the information required for these use cases is not available from the Data Runtime JSON or Metadata Runtime JSON provided by the SDK framework. Of course I expect there may also be nondata source related use cases as well. 1) Selection of Dimensions not included in the Initial View of a Data Source At designtime, the initial view of a data source is usually defined to return a result set which is a subset of what is available in the data source. A common requirement is to subsequently be able to swap dimensions in and out or filter based on different dimensions at runtime. An example initial view screenshot in this context is shown below: Design Studio Innovation Series Topic 3: Making a Case for Script API Calls from an SDK Component Additional Properties Sheet Posted by Mustafa Bensan in SAP BusinessObjects Design Studio on Mar 19, 2015 1:31:00 PM 0 Like

Upload: dong-hai-nguyen

Post on 15-Sep-2015

3 views

Category:

Documents


0 download

DESCRIPTION

Design Studio API call

TRANSCRIPT

  • 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