AIMMD.070APPLICATIONEXTENSIONTECHNICALDESIGNHelpdesk公告用户显示开发实例Author:Peng.YangCreationDate:January28,2010LastUpdated:June26,2010DocumentRef:Version:1.0Approvals:Approver1Peng.YangApprover2CopyNo._____MD.070ApplicationExtensionTechnicalDesignii/26DocRef:June26,2010DocumentControlChangeRecord3DateAuthorVersionChangeReference28-Jan-2010Peng.Yang1.0NoPreviousDocumentReviewersNamePositionDistributionCopyNo.NameLocation1LibraryMasterProjectLibrary2ProjectManager34NoteToHolders:Ifyoureceiveanelectroniccopyofthisdocumentandprintitout,pleasewriteyournameontheequivalentofthecoverpage,fordocumentcontrolpurposes.Ifyoureceiveahardcopyofthisdocument,pleasewriteyournameonthefrontcover,fordocumentcontrolpurposes.MD.070ApplicationExtensionTechnicalDesigniii/26DocRef:June26,2010ContentsDocumentControl..................................................................................................................ii 开发介绍...................................................................................................................................1 概述....................................................................................................................................1 完成的目标........................................................................................................................2 步骤1:创建页面模型组件..............................................................................................3 步骤2:创建初始页..........................................................................................................4 步骤3:自动客户化查询..................................................................................................6 步骤4:创建公告明细页面UI.......................................................................................10 步骤5:实现试图对象查询............................................................................................14 步骤6:实现下钻到NotifyShowDetailsPG................................................................15 步骤7:程序部署到EBS应用服务器中.........................................................................18 步骤8:OAF控制器中的日志查看................................................................................21 步骤9:如何找到页面所对应的源文件........................................................................21 OpenandClosedIssuesforthisDeliverable....................................................................23 OpenIssues.....................................................................................................................23 ClosedIssues..................................................................................................................23 MD.070ApplicationExtensionTechnicalDesign1/26DocRef:June26,2010开发介绍概述本文当讲述了如何实现OAF公告页面显示功能。MD.070ApplicationExtensionTechnicalDesign2/26DocRef:June26,2010完成的目标完成此开发之后,需要掌握如下的课题:zOAF开发环境搭建了解zOAF框架的了解zOAF开发规范遵循zOAF页面的基本布局z通过编写必要的程序实现页面直接的JSPForwardz启用WarnAboutChanges功能,帮助用户减少不必要的数据丢失工作z实现实体对象、实体属性和行级的业务逻辑(包括抛出属性和行级的验证异常)z在业务逻辑中使用视图对象验证和应用模块验证z在基于实体对象的视图对象中添加一个新的行z处理按钮的动作z确保应用程序在使用浏览器中的Back按钮是安全的MD.070ApplicationExtensionTechnicalDesign3/26DocRef:June26,2010步骤1:创建页面模型组件任务1.1:创建视图对象(VO)NotifyShowVO,主要用于直接查询,不对数据进行任何操作为了满足搜索结果表的要求,需要创建一个包括了搜索所需要的所有属性的汇总视图。z从导航栏中选择oracle.apps.cux.helpdesk.serverBC4J包,右键从上下文菜单中选择NewViewObject...进入NewViewObject...向导z跳过欢迎页z在Name页中,指定连接视图对象的Name为NotifyShowVO,并保证Package的值为oracle.apps.cux.helpdesk.serverz下一步直到第5步,直接输入以下SQL语句SELECTROWNUMline_no,NOTIFY_ID,SUBJECT,NOTICE_DATE,Content,NOTICE_USER_TYPE_DESC,NOTICE_USER_DESCFROM(SELECTNotifyEO.NOTIFY_ID,NotifyEO.SUBJECT,NotifyEO.NOTICE_DATE,NotifyEO.Content,fl.MEANINGNOTICE_USER_TYPE_DESC,decode(NotifyEO.NOTICE_USER_TYPE,'C',cux_helpdesk_oaf_pkg.get_segment_desc(NotifyEO.NOTICE_USER_CODE,'segment1'),'D',cux_helpdesk_oaf_pkg.get_segment_desc(NotifyEO.NOTICE_USER_CODE,'segment2'),cux_helpdesk_oaf_pkg.get_segment_desc(NotifyEO.NOTICE_USER_CODE,'segment3'))NOTICE_USER_DESCFROMCUX_HELPDESK_NOTIFICATIONSNotifyEO,Fnd_LookupsflWHERENotifyEO.notice_user_type=fl.LOOKUP_CODEANDfl.lookup_type='CUX_NOTICE_USER_TYPE'ANDtrunc(nvl(NotifyEO.End_Date,SYSDATE+1))=trunc(SYSDATE+1)MD.070ApplicationExtensionTechnicalDesign4/26DocRef:June26,2010ORDERBYtrunc(NotifyEO.NOTICE_DATE)DESC,NotifyEO.Exigence_TypeDESC,NotifyEO.Notify_IdDESC)zselecttheGenerateJavaFileforViewObjectClass:NotifyShowVOImplandViewRowClass:NotifyShowVORowImplz完成修改后选择Test按钮进行验证测试z选择下一步按钮两次z完成任务1.2:添加视图对象到UI应用模块根节点实体对象只能够在包含它的应用模块的上下文中使用,在你页面中使用NotifyVO之前必须先将它加入到页面的UI应用模块根节点中。z从导航栏中选择NotifyAM,右键从上下文菜单中选择EditNotifyAM...进入DATAModule...向导z选择DataModel页,将AvailableViewObjects列表中的NotifyShowVO实体对象移到两次到DataModel列表中确定完成,即DataModel中分别为NotifyShowVO1和NotifyShowVO2步骤2:创建初始页此步骤的任务是创建一个页标题为Notify的页面,并带有提示文本信息。任务2.1:创建NotifyShowPG页在包oracle.apps.cux.helpdesk.webui中创建一个新的UI页z从导航栏中选择CUX_Helpdesk_OAProject.jpr项目,右键从上下文菜单中选择New…MD.070ApplicationExtensionTechnicalDesign5/26DocRef:June26,2010z在New窗口中,展开WebTier层次选择OAComponentsz在OAComponentsItems列表中选择Pagez选择确定继续z在NewPage对话框中,输入Name的值为NotifyShowPG;Package的值为oracle.apps.cux.helpdesk.webui(此目录存页面)z选择确定创建页面任务2.2:更改页面布局