BSP-GaiNian

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

SAPAG2001BusinessServerPagesDevelopmentofWebApplicationswiththeSAPWebApplicationServer6.20SAPAG2001TopicBusinessServerPagesUserInteractionStateinWebApplicationsDatabaseAccessBSPExtensionsModelViewControllerSAPAG2001InternetCommunicationFramework(ICF)ServermethodIF_HTTP_EXTENSION~HANDLE_REQUEST.data:datatypestring.*createsomeresponsedataserver-response-set_header_field(name='Content-Type'value='text/html').server-response-set_header_field(name='Expires'value='0').concatenate'html''body''Serversuccessfullyreached.''/body''/html'intodata.server-response-set_cdata(data=data).endmethod.HTTPRequestICFHTTPExtObjectCallmethodhandle_requestResponseLowLevelHTTPCommunicationABAPObjectsclasses,whichimplementIF_HTTP_EXTENSIONinterfaceObjectsSERVER,REQUESTandRESPONSEdirectlyavailableassigningURLtoHTTP-extensioninTASICFHTTPserverandclientfunctionalitySAPAG2001AttributesBSPApplicationStructureApplicationClassMethodsBSPApplicationBSPApplication•BusinessServerPageswhichdefinetheWebUIandcontainserversidescripting•Arbitraryadditionalfiles(Images,backgroundpics,buttonGIFs,...),Style-Sheets,etc.•Applicationclass,thatcontainstheapplicationlogic•AccessesbackendfunctionalitySeparationofpresentationandbusinesslogicBSPPageBSPBSPBSPPagehtml...%loopatitab....%AttributesBusinessObjectClassMethodsAttributesBusinessObjectClassMethodsAttributesBusinessObjectClassMethodsSAPAG2001BusinessServerPages-HelloWorldasimpleBSPpagethat...showsserversidescriptingwithABAPorJavaScriptcontainsstaticHTML(orXML,or...)partsmixedwithserversidescriptingissimilartoActiveServerPages(Microsoft)orJavaServerPagesisaccessibleviaURLlikecommonpagesofawebserver%@pagelanguage=abap%htmlbodycenter%do5times.%fontsize=%=sy-index%HelloWorld!br/font%enddo.%/center/body/htmlLayout%@pagelanguage=javascript%htmlbodycenter%for(i=0;i5;i++){%fontsize=%=i%HelloWorld!br/font%}%/center/body/htmlLayoutSAPAG2001ICFServicesTransactionSICFservicesdefinesURLforHTTPhandlersDefaultusersettingsforpublicsitesDefaultclient,languagedefinitionofAliasesIndividualICFServicesforBSPApplicationsSAPAG2001TopicBusinessServerPagesUserInteractionStateinWebApplicationsDatabaseAccessBSPExtensionsModelViewControllerSAPAG2001BSP–InitializationandLayoutselect*fromsflightintotableflights.InitializationLayoutTheLayoutpartcontainsscriptcodemixedwithstaticformattingdirectives(e.g.HTML).ThedatasourcesdeclaredaspageattributesaredirectlyaccessibleintheInitializationandLayoutstep.BusinessServerPageAttributeTyp.Ass.TypeFLIGHTSTYPEFLIGHTTABPageAttributes%@pagelanguage=abap%htmlbodytableborder=1trthCarrier/ththConnection/ththDate/th/tr%data:walikelineofflights.loopatflightsintowa.%trtd%=wa-carrid%/tdtd%=wa-connid%/tdtd%=wa-fldate%/td/tr%endloop.%/table/body/htmlEverypagehasadefinedstepfordataretrievalthatisusedintheLayoutstep.SAPAG2001EventHandlerEventsthatarecalledduringtheprocessingoftherequestofthepageOnInitializationcalledbeforethepageisrenderedfordataretrievelOnInputProcessinghandlingoftheuserinputOnCreateatfirstcreationofthepage...SAPAG2001PageAttributesObjectsthatareaccessibleinallpageeventsandtheLayoutsectionexample:tablesthatarefilledintheInitializationstepandusedintheLayoutstepSAPAG2001ApplicationClassAttributesApplicationClassMethodsBSPApplicationBSPPageBSPBSPBSPPagehtml...%application-...%AnInstanceoftheApplicationClassiscreatedateveryRequesttothepage(stateless)andisavailableinalleventsandintheLayoutSAPAG2001TopicBusinessServerPagesUserInteractionStateinWebApplicationsDatabaseAccessBSPExtensionsModelViewControllerSAPAG2001HTMLFormsUsedforuserInputtextslistboxescheckboxesfileupload...InputistransferredviaGETorPOSTrequesttotheserveraspartoftheURLaspartoftherequestbodyformaction=/cgi-bin/proc.plmethod=getyourNickname:inputtype=textname=nicknameinputtype=submitname=Submit/formformmethod=getinputtype=checkboxname=selvalue=appleAppleinputtype=checkboxname=selvalue=orangeOrangeinputtype=checkboxname=selvalue=cherryCherryinputtype=submitname=Submit/formformaction=/cgi-bin/procxls.plmethod=postUploadTextFile:inputtype=filename=dataaccept=*/textinputtype=submitvalue=Upload/formformaction=output.htmmethod=postselectname=sel_categoryoptionvalue=appleApplesoptionvalue=orangeOranges/selectinputtype=textname=searchvalue=inputtype=submitvalue=Select/formSAPAG2001FlowwithinsimpleBSPpagesInitializationDataretrievaldependingoninputparametersLayoutrenderingofthepageprocessingthescriptingcodeInitializationDataretrievaldependingoninputparametersLayoutrenderingofthepageprocessingthescriptingcodeBSPRuntimeResponseHTTPPOSTHTTPGETInitializationDataretrievaldependingoninputparametersLayoutrenderingofthepageprocessingthescriptingcodeUserentersdataandclicksabuttonselect*from...intotableit.callfunction...HTMLBODY%do...enddo.%bsp:button...formResponseRuntimedeterminesBSPAppandPageThatPOSTrequestse.g.anotherpageFirstPag

1 / 38
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功