资源预览内容
第1页 / 共9页
第2页 / 共9页
第3页 / 共9页
第4页 / 共9页
第5页 / 共9页
第6页 / 共9页
第7页 / 共9页
第8页 / 共9页
第9页 / 共9页
亲,该文档总共9页全部预览完了,如果喜欢就下载吧!
资源描述
July 15, 2008AIMMD070 Programer TrainingeGrid ConsultingOAF与XML Publisher集成Author:梁贤院Creation Date:December 1, 2012Last Updated:December 11, 2012Document Ref: Version:V1.0Note: Title, Subject, Last Updated Date, Reference Number, and Version are marked by a Word Bookmark so that they can be easily reproduced in the header and footer of documents. When you change any of these values, be careful not to accidentally delete the bookmark. You can make bookmarks visible by selecting Tools-OptionsView and checking the Bookmarks option in the Show region.Approvals:Note: To add additional approval lines, press Tab from the last cell in the table above.Copy Number_Note: You can delete any elements of this cover page that you do not need for your document. For example, Copy Number is only required if this is a controlled document and you need to track each copy that you distribute.Document ControlChange Record5DateAuthorVersionChange Reference1-Dec-12SandyLiang1.0No Previous DocumentReviewersNamePositionDistributionCopy No.NameLocation1234Note: The copy numbers referenced above should be written into the Copy Number space on the cover of each distributed copy. If the document is not controlled, you can delete this table, the Note To Holders, and the Copy Number label from the cover page.Note To Holders:If you receive an electronic copy of this document and print it out, please write your name on the equivalent of the cover page, for document control purposes.If you receive a hard copy of this document, please write your name on the front cover, for document control purposes.ContentsDocument Controlii环境ivEBS 环境iv本地环境iv用VO与XML Publisher集成5用VO生成数据.AM里调用5用CO调用方法5用PL/SQL与XML Publisher集成7用PL/SQL方法实例7AM调用方法7CO调用方法7Open and Closed Issues for this Deliverable9Open Issues9Closed Issues9环境EBS 环境Operating system platform:UNIXOracle RDBMS Version: 9.2.0.7.0Oracle Applications Version:11.5.10.2Oracle Forms Version:6.0.8.25.2本地环境Jdeveloper安装在 D:Jdeveloper用PL/SQL与XML Publisher集成 OAF多语言实现 File Ref: OAF多语言实现.doc (V1.0 )Company Confidential - For internal use only用VO与XML Publisher集成用VO生成数据.AM里调用在application module调用方法:import oracle.jbo.XMLInterface;import oracle.xml.parser.v2.XMLNode;public XMLNode getReportXMLNode(String keyId) ChgDisPrintTmpVOImpl vo = getChgDisPrintTmpVO1(); vo.executeQuery(); XMLNode xmlNode = (XMLNode) vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS); return xmlNode;用CO调用方法增加一个funciton public void PrintPDF(OAPageContext pageContext, OAWebBean webBean, XMLNode xmlNode, String keyId) HttpServletResponse response = (HttpServletResponse) pageContext.getRenderingContext().getServletResponse(); String changeOrderType = pageContext.getParameter(ChangeOrderType); / Set the Output Report File Name and Content Type String contentDisposition = attachment;filename=Distribution + keyId + .pdf; response.setHeader(Content-Disposition, contentDisposition); response.setContentType(application/pdf); try ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); xmlNode.print(outputStream); /xmlNode.print(System.out); ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray(); OADBTransactionImpl oaTrans = (OADBTransactionImpl) pageContext.getApplicationModule(webBean).getOADBTransaction(); String templateName = XVK_CHANGEMEMO_TEMPLATE_ENG; TemplateHelper.processTemplate(oaTrans.getAppsContext(), XVK, templateName, zh, CN, inputStream, TemplateHelper.OUTPUT_TYPE_PDF, null, response.getOutputStream(); response.getOutputStream().flush(); response.getOutputStream().close(); catch (Exception e) response.setContentType(text/html); throw new OAException(e.getMessage(), OAException.ERROR); pageContext.setDocumentRendered(false); 修改CO processFormRequest事件public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) String event = pageContext.getParameter(EVENT_PARAM);if(print.equals(event) String KeyId = pageContext.getParameter(KeyId); parameters = new Serializable KeyId ; XMLNode xmlNode = (XMLNode) am.invokeMethod(getReportXMLNode , parameters); PrintDisPDF(pageContext, webBean, xmlNode, KeyId); 用PL/SQL与XML Publisher集成用PL/SQL方法实例PROCEDURE print_payment_request ( p_payment_request_id IN NUMBER ,x_out_xml OUT CLOB ) ISBEGINdbms_lob.createtemporary(x_out_xml, TRUE);l_temp_str := ?xml vers
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号