12 Replies Latest reply on Aug 5, 2010 6:44 PM by 588124

    Document Viewer region


      I’m currently having a few issues integrating the XML Publisher Document Viewer region into an OAF page. I’m able to run and display reports with the correct data however I encounter some bizarre behaviour when it come to exporting a report.

      After successfully running a report I select an output type e.g. PDF and click the Export button. The underlying controller then fires the DocumentHelper.exportDocument method as mentioned in the XML Publisher guide. This then displays the explorer File Download prompt asking me whether I would like to open/save/cancel the file download. Selecting either the open or save options produces the correct report in the correct format, and selecting cancel returns me to the page. In all cases on returning to the OAF page the mouse icon is permanently a sand timer. There is nothing displayed in the status bar at the bottom of the page and I’m allowed to update items on the page but the events I’ve attached to those item are not fired i.e. a PPR event on messageChoice items.

      The bizarre behaviour occurs when I debug the pages controller. Running the debugger without putting break points around the point where the DocumentHelper.exportDocument method is called causes the same error to occur, however when I place break point around the call the page works as expected.

      If anyones got any ideas on how to solve this problem it would be greatly appreciated.

        • 1. Re: Document Viewer region
          I think this was an issue with IE, Can you confirm the browser in which you are seeing this issue ? Does it happen with FireFox or Mozilla ?

          PPR events in general gets fired when there is a change in value. If PPR has already fired after a change, it will not fire again from the same field. Thats the technical shortcoming. I m just interested to know if IE and the PPR idiosynchrasy is mixed up here.

          • 2. Re: Document Viewer region

            Can u give me some idea about how to integrating the XML Publisher Document Viewer region into an OAF page. I am facing some issue in getting the ouput using documenthelper.getOutputURL(....)..
            Can u please help me out.
            • 3. Re: Document Viewer region
              Thanks for your help - I've managed to solve the problem now. I've updated the submit event to fire action rather than partial action. I've only tried it in IE so that could explain why it only worked with the debug on.

              user541906 if you let me know what issues you're having I'll try to help.

              • 4. Re: Document Viewer region
                Hi all.

                How can I integrate the Document Viewer onto an OA Framework page please ?



                It's OK; I have found the file to extend my new region.

                Message was edited by:
                • 5. Re: Document Viewer region
                  Check the XML Publisher user guide ... Chapter 12

                  But you know . you need to have the right class files (versions i mean) so if it dosent work as per the document .. you need to be patient enough to raise an SR and follow it ...

                  • 6. Re: Document Viewer region

                    I tried the DocumentViewer and it worked for me the key is the using correct versions of java files

                    here are the details

                    Apps Version 115.10.2 RUP 5
                    Jdev version (build 1437) downloaded from the patch 4573517

                    Once you download and unzip it do the following

                    Copy all the files from (server) $JAVA_TOP/oracle/apps/xdo to your myclasses/oracle/apps/xdo
                    and $JAVA_TOP/oracle/apps/fnd to myclasses/oracle/apps/fnd

                    go to jdevbin/jdev/appslibrt there you wil find aolj.jar open it with winrar and navigate to
                    oracle/apps/fnd and delete the i18n folder

                    fireup you jdev create a page and a region under it and extend that region from /oracle/apps/xdo/oa/common/webui/DocumentViewerRn.MainRegion

                    add another submit button to that .. set a controller and write the following code

                    make sure u have defined the DataDefinition and corresponding Template in ur XML publisher .

                    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
                    super.processRequest(pageContext, webBean);
                    pageContext.putParameter("p_Locale","English:United States");


                    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
                    super.processFormRequest(pageContext, webBean);
                    OAApplicationModule am = pageContext.getApplicationModule(webBean);
                    if(pageContext.getParameter("Go")!= null)
                    BlobDomain result = (BlobDomain) am.invokeMethod("getXMLData");
                    pageContext.putSessionValueDirect("XML_DATA_BLOB", result);

                    and in the AM

                    public BlobDomain getXMLData()
                    BlobDomain blobDomain = new BlobDomain();
                    OADBTransaction oadbtransaction = getOADBTransaction();
                    String dataDefCode = "EMPDT" ;
                    String dataDefApp = "CIE";
                    DataTemplate datatemplate = new DataTemplate(((OADBTransactionImpl)getOADBTransaction()).getAppsContext(), dataDefApp,dataDefCode );
                    catch(SQLException e)
                    throw new OAException("SQL Error=" + e.getMessage(),OAException.ERROR);
                    catch (XDOException e)
                    throw new OAException("XDOException" + e.getMessage(),OAException.ERROR);
                    catch(Exception e)
                    throw new OAException("Exception" + e.getMessage(),OAException.ERROR);
                    return blobDomain;

                    This should work .... no issues ...

                    I gathered the information from different threads all i did was put all those together ... so credit goes to all of those who really gave the info ..

                    • 7. Re: Document Viewer region
                      Good going Tom :)

                      • 8. Re: Document Viewer region
                        Amit Goyal
                        Hi Tom,

                        I tried all the steps exactly as you mentioned.
                        I have worked for long with OAF now.
                        I tried the steps instructed by you and also deleted the i18n folder as mentioned.
                        However I am working with R12 and JDev

                        I got the following exception:

                        Exception Details.
                        oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg=

                             Missing class: oracle.apps.fnd.i18n.util.NLSMapper

                             Dependent class: oracle.apps.fnd.framework.OANLSServices
                             Loader: default.root:0.0.0
                             Code-Source: /C:/JDeveloper/jdevbin/jdev/appslibrt/fwk.zip
                             Configuration: <library> in /C:/JDeveloper/jdevhome/jdev/system/oracle.j2ee.
                        • 9. Re: Document Viewer region
                          Well did you download the i18n folder from ... the server and put it back in the jar file ???

                          • 10. Re: Document Viewer region

                            this is quite an old thread but I believe it's better to post my doubts here than opening a new thread.

                            I'm trying to create a simple OAF page in which I want to display xml publisher outputs via the Document Viewer region.

                            Regarding Tom's previous post, I don't understand what does he mean when he says the next sentence: "add another submit button to that .. set a controller and write the following code"

                            Where should I add the mentioned "submit button" ? When I create the doc viewer region I already can see a "Run" button. Where should I attach the new controller? The doc viewer region already has a controller, should I create a new one extending that one (oracle.apps.xdo.oa.common.webui.DocumentViewerCO)?

                            Thank you in advance


                            • 11. Re: Document Viewer region
                              Hi All,
                              I am doing the same process as described by Tom in this blog.
                              Now i dont get the error messages.
                              But whenever i click on submit button, its doing nothing, the page is just refreshed and it shown neither any error nor the report.

                              But when i try the traditional approach of exporting the document using "DocumentHelper.exportDocument", its giving me the report output.

                              Does it mean, document Viewer region is not set properly or there is any other problem?

                              Do we need to do some specific setting for document viewer? I have just pasted the value "/oracle/apps/xdo/oa/common/webui/DocumentViewerRn.MainRegion" in the extends property and did nothig else.

                              Can anyone please help?

                              • 12. Re: Document Viewer region
                                Hi All,
                                Can anyone please help?
                                I am trying out different things, but it is not working.