Not working across managed code - PDPageDrawContentsToWindow - HDC

PageDLL - a Com Dll contains the following:
struct GRect_tag
    long lLeft;
    long lBottom;
    long lTop;
    long lRight;
    }  GRect;
BOOL CMyDrawMC::SetDrawPageToWindow(int hdc, GRect WinRect)
PDDoc objPDDoc;
PDPage objPDPage;
objPDDoc = PDDocOpen("D:\temp\firstfile.pdf", objASFileSys, NULL, true);
objPDPage = PDDocAcquirePage(objPDDoc, 2);
ASFixedMatrix matrix;
ASFixedRect WindowRect;
WindowRect.left    = WinRect.lLeft;
WindowRect.right   = WinRect.lRight;
WindowRect.top     = WinRect.lTop;
WindowRect.bottom  = WinRect.lBottom;
PDPageGetFlippedMatrix(objPDPage, &matrix);
PDPageDrawContentsToWindow(objPDPage, NULL, (void*) hdc, FALSE,
  &matrix,
  &WindowRect, NULL, NULL);
return TRUE;
Managed code written in C# has the following:
protected IntPtr DrawToOffScreenWnd(IntPtr hWnd, int iMsg, IntPtr wParam,
            IntPtr lParam, ref bool bHandled)
            bHandled = false;
            switch (iMsg)
                case WM_PAINT:
                    if (_cobj.GetTotalPagesInDoc() >= 1)
                        // Use Win32 to get a Graphics object.
                        PAINTSTRUCT objPaintStruct = new PAINTSTRUCT();
                        IntPtr hSrcDC = BeginPaint(hWnd, ref objPaintStruct);
                         DrawPage(hwnd, hsrcDC);
                        EndPaint(hWnd, ref objPaintStruct);
                        bHandled = true;
                    break;
            return IntPtr.Zero;
Class MainPanel
public void DrawPage((IntPtr hWnd, IntPtr hSrcDC)
  GRect objWindowRect;
  IntPtr memDC = CreateCompatibleDC(hSrcDC);
  IntPtr memBM = CreateCompatibleBitmap(memDC, objWindowRect.right, objWindowRect.bottom); /* objWindowRect.right is width and objWindowRect.bottom is height values */
  SelectObject(memDC, memBM);
  PageDLL.SetDrawPageToWindow(memDC.ToInt32(), objWindowRect); /* PageDLL is the COM DLL stated in start of this discussion */
  const int SRCCOPY = 13369376;
  bool x = BitBlt(hSrcDC, 0, 0, objWindowRect.right, objWindowRect.bottom, memDC, 0, 0, SRCCOPY);
Question: The window is not getting refreshed with the Page Content of the PDF file.  So, whether the HDC can be passed from Managed code (C#) to Un-managed code (VC++ COM DLL) and return back the HDC content (including HBITMAP of the HDC) to the window created in C#?

thanks for reply.
Jdeveloper version is 11.1.1.4.0.
Actually the vo on which I am trying to set set where is used as source to act as cursor  to get values from filtered rows using set where and copy the this cursor values to another target vo. I am not showing these source values just getting values.
DCIteratorBinding dcIter2 =
ADFUtils.findIterator("PlotDtl2Iterator");     
ViewObject dvo = dcIter2.getViewObject();
// colors to copy 
DCIteratorBinding dcIter3 =
ADFUtils.findIterator("PlanColorsIterator");    
ViewObject cvo = dcIter3.getViewObject();
cvo.setNamedWhereClauseParam("Plno","4000");
cvo.applyViewCriteria(cvo.getViewCriteriaManager().getViewCriteria("PlanColorsCriteria"));
cvo.ensureVariableManager().setVariableValue("Plno", "4000");
cvo.executeQuery();
cvo.setWhereClause("plan_no = :ThePlanType");
cvo.defineNamedWhereClauseParam("ThePlanType", null, null);
cvo.setNamedWhereClauseParam("ThePlanType", "4000");
cvo.executeQuery();
int totalCount=cvo.getRowCount();
cvo.setRangeSize(totalCount);
Row[] rArray=cvo.getAllRowsInRange();
for (Row r:rArray){
NameValuePairs nvp = new NameValuePairs();      
nvp.setAttribute("Description",r.getAttribute("Description"));
nvp.setAttribute("PlanNo",r.getAttribute("PlanNo"));
nvp.setAttribute("MainAcc",r.getAttribute("MainAcc"));
nvp.setAttribute("Plqty",r.getAttribute("Qty"));
nvp.setAttribute("Cdkid",r.getAttribute("CdkId"));
nvp.setAttribute("FabricCode",r.getAttribute("FabricCode"));
nvp.setAttribute("DyeWash",r.getAttribute("DyeWash"));
//  nvp.setAttribute("Description","test");
Row drow = dvo.createAndInitRow(nvp);      
dvo.insertRow(drow); 

Similar Messages

  • Layout Mode not working in T-Code SQVI for some GUI

    Dear Experts,
    It has been found that the Layout mode is not working in T-code SQVI in some of our users Systems . The Layout Mode is working perfectly fine in some system though. If we select Layout mode in some system it is showing screens the same as in Basis Mode.
    The GUI version is same in both the machines and both are having the same OS.
    GUI Version : 710
    OS : XP
    Kindly suggest if any settings needs to be done in System or GUI so that all the systems get the same interface of Layout Mode as required.
    - Jitesh

    Hi experts,
    Just wished to post the solution of the Issue raised by me...
    I just needed to update my GUI Patch level available at market Place.
    Thanks.
    Jitesh

  • Undo Shortcut not working across CC

    I have a fully updated version of CC running on Mountain Lion and today the Undo shortcut (Command + Z) doesn't want to work. I can go up to the menu and go Edit > Undo, but I'd rather not!
    Does anyone know what the issue might be? It's not working across all my Adobe CC applications (Ps, Ai, Id, Dw, etc).
    I have refreshed the settings on Photoshop (Command + Option + Control + Shift) on startup and that didn't help.
    I appreciate any assistance.

    Incase this helps someone, somewhere, it ended up being that my keyboard wasn't working.
    I tested it in MS Word, and it didn't work there.
    Reset the RAM on my iMac, didn't help.
    Ended up being that the z key worked fine and the command key worked fine, but the combination of the two at once didn't work.
    Solution was by trying another keyboard.
    6 hours I'll never see again.

  • Touchscreen not working: error message code 45, says "device is not connected to the computer"

    My subject message basically says it all.  My touchschreen is not working at all.  I went into device manager and found error message code 45, which states that the "device is not connected to the computer."
    I have tried updating drivers, uninstalling and reinstalling the device, and other things, but nothing working.
    All advice appreciated.

    Hi @Jim9 ,
    Welcome to the HP Forums!
    I saw your post regarding the error code 45. From what you have described this sounds like it is a hardware issue. The only real troubleshooting I can recommend (that you haven't already done), is going a full System Recovery to restore it back to factory defaults. If the issue still occurs then we know it is a hardware problem.
    Please click “Accept as Solution ” if you feel my post solved your issue.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Thank you,
    BHK6
    I work on behalf of HP

  • Programatically set where clause or view criteria not working in managed bean

    I get a view using finditerator then then apply setwhere or view criteria but it does not filter the original rows. code is as follows
    DCIteratorBinding dcIter3 =
    ADFUtils.findIterator("PlanColorsIterator");    
    ViewObject cvo = dcIter3.getViewObject();
    cvo.setNamedWhereClauseParam("Plno","4000");  // not working
       /*   // not working
    cvo.applyViewCriteria(cvo.getViewCriteriaManager().getViewCriteria("PlanColorsCriteria"));
    cvo.ensureVariableManager().setVariableValue("Plno", "4000");
    cvo.executeQuery();
    /* not working
    cvo.setWhereClause("plan_no = :ThePlanType");
    cvo.defineNamedWhereClauseParam("ThePlanType", null, null);
    cvo.setNamedWhereClauseParam("ThePlanType", "4000");
    cvo.executeQuery();

    thanks for reply.
    Jdeveloper version is 11.1.1.4.0.
    Actually the vo on which I am trying to set set where is used as source to act as cursor  to get values from filtered rows using set where and copy the this cursor values to another target vo. I am not showing these source values just getting values.
    DCIteratorBinding dcIter2 =
    ADFUtils.findIterator("PlotDtl2Iterator");     
    ViewObject dvo = dcIter2.getViewObject();
    // colors to copy 
    DCIteratorBinding dcIter3 =
    ADFUtils.findIterator("PlanColorsIterator");    
    ViewObject cvo = dcIter3.getViewObject();
    cvo.setNamedWhereClauseParam("Plno","4000");
    cvo.applyViewCriteria(cvo.getViewCriteriaManager().getViewCriteria("PlanColorsCriteria"));
    cvo.ensureVariableManager().setVariableValue("Plno", "4000");
    cvo.executeQuery();
    cvo.setWhereClause("plan_no = :ThePlanType");
    cvo.defineNamedWhereClauseParam("ThePlanType", null, null);
    cvo.setNamedWhereClauseParam("ThePlanType", "4000");
    cvo.executeQuery();
    int totalCount=cvo.getRowCount();
    cvo.setRangeSize(totalCount);
    Row[] rArray=cvo.getAllRowsInRange();
    for (Row r:rArray){
    NameValuePairs nvp = new NameValuePairs();      
    nvp.setAttribute("Description",r.getAttribute("Description"));
    nvp.setAttribute("PlanNo",r.getAttribute("PlanNo"));
    nvp.setAttribute("MainAcc",r.getAttribute("MainAcc"));
    nvp.setAttribute("Plqty",r.getAttribute("Qty"));
    nvp.setAttribute("Cdkid",r.getAttribute("CdkId"));
    nvp.setAttribute("FabricCode",r.getAttribute("FabricCode"));
    nvp.setAttribute("DyeWash",r.getAttribute("DyeWash"));
    //  nvp.setAttribute("Description","test");
    Row drow = dvo.createAndInitRow(nvp);      
    dvo.insertRow(drow); 

  • @EJB not working for managed beans in adfc-config

    using adf 11.1.1.3
    We have an application that uses EJB (deployed on the same WLS as our application). We notice that when we create managed beans in the adfc-config and use the @EJB annotation to get an instance of the sessionbean, it is not working.
    The error we get is a simple nullPointerexception pointing to the EJB.
    When we register the bean in faces-config.xml instead of adfc-config.xml, we do get an instance of the EJB.
    I also get a nullpointerException when i add the managed bean to a taskflow instead of the adfc-config.
    This is an example of the bean:
    public class HomeTest {
        @EJB
        MyService service;
        public HomeTest() {
        public List getData(){
          return service.getSomedata();
    }When i register this bean in adfc-config i get a nullpointer on service.
    When i register the same bean in the faces-config, it is working.

    Frank,
    Thanks! I think i managed to implement the workaround:
    This is my bean that has been registered in the faces-config:
    public class BeanHelper {
        @EJB
        private MyEJB myEjB;
        public BeanHelper() {
            super();
        public MyEJB getMyEJB()
              return myEJB;
    }In my adfc managed bean i use
    MyEJB myEJB = (MyEJB)JSFUtils.get("#{BeanHelper.myEJB}");This is working fine.
    This way i no longer need to use a direct lookup and i don't need to know the exact path and so on for the EJB.
    Thanks Frank!
    Is there a way to let Oracle update the bug with this workaround so if other people find the bug, they know how to implement a workaround?

  • Copy and Paste not working across apps - 3.0 software

    I can't seeem to make the copy and paste work across applications. works fine in e-mail from notes but won't paste in text. anyone else having this kind of issue?

    The app you are trying to use probably hasn't been updated for iPhone 3.0. Check that all of your app are upto date and if you still have an app that doesn't allow copy and paste check the version number in the app store to see if it has been iPhone 3.0 tested. I have copy and paste fail to work in one app (sorry can't remember which) and after an update to the new version it worked fine.

  • Home sharing is not working across my network since ios 6 and iTunes upgrades. Any ideas?

    I have updated my IPhone 4, ipad 2, and atv2 to ios6 and my win7 pc to the latest iTunes. I have just noticed homesharing is not working on any devices. I have tried the usual disable re enable etc to no avail. Any help is appreciated.

    Hi Alan.
    You're not alone; it's happening to others too. There's a thread about it here.

  • Iweb image hyperlinks not working across pages

    I KNOW there are many other threads on this topic, but I can't figure it out!
    I am using images as my website navigation and they have stopped working on some pages when I updated it (and won't work no matter how many times I replace them or send them forward/back and republish). I have read some other threads that say it may be hidden objects blocking the links or that the images are in the navigation layer, but I don't think that's the problem (correct me if I'm wrong). I've also disabled the navigation menu since the problem happened, but that was not the cause.
    Here is my website home page (all the links are working on this page): http://melissabloom.com/mb/Home.html
    but then on this page, for instance, none of them work: http://melissabloom.com/mb/Portfolio.html
    To specify I am talking about the "home, about, contact, portfolio and reel" images/links. They are not working on the "portfolio" and "reel" pages and also, the four pages "portfolio" takes you to.
    Let me know if you need more info. I appreciate any advice, thanks!

    Ok, bear with me here, I need some clarification. How do I change the z index of those images and get them out of the nav layer WITHOUT changing their position on the page?
    I see that they are in the header layer. I had gone into the layout section and changed the height of of the header layer to make it fit the links too. Assuming that was a bad idea? Should I make the header layer smaller, so it doesn't reach the links?
    And WHERE is the nav layer? I don't understand how to pull objects out of it because I don't see it.
    Thank you so much for your help!

  • LSMW Recording method is not working for transaction code FBL5N

    Hi Experts,
    I am trying to prepare LSMW to create dispute cases for customer line items through LSMW Recording method. When i was trying to do through SHDB Recording its working properly through Program. But its not working through LSMW Recording method means its not executing to next screen, immediately its displaying session completed screen.
    Please do let me know any soution for this.
    thanks,
    Sriram.

    Hi Sriram,
    If my memory serves me correctly, a BDC will not work correctly with a list. This is mentioned somewhere in the SAP help pages.
    Now I am not familiar on how to create dispute cases but using FBL5N does not sound to me the way to go.  I assume that you use FBL5N in order to determine to which documents to link the dispute to, however you should be able to get the requested info from the BSID/BSAD tables.
    Also in case you want to change the customer line item in the accounting document, check the data transfer workbench (SXDA) as SAP delivers a standard program for this.
    Kind regards,
    Robert
    Edited by: RJ. Schamhart on Jan 14, 2011 12:35 AM
    Edited by: RJ. Schamhart on Jan 14, 2011 12:43 AM

  • Copy and paste not working across all apps in lion

    Copy and paste stops working across all apps in lion.  It maybe some compatibility issue.  After a reboot I am able to copy and paste but at some point it stops functioning.

    I am also having this problem.  After running for a while copy/paste stops working, whether from menus or using the keyboard equivalents.

  • Auto-Detect Screen Resolution Does Not Work Across Multiple Monitors With Different Resolutions

    Hi,
    The Acrobat Pro DC (15.007.20033.2203) auto-detect screen resolution feature does not work with multiple monitors at different resolutions.  Acrobat looks fine on my hidpi primary laptop display (Razr 14" 2014) but is completely unusable if I drag or extend the application to a standard HD resolution secondary monitor. Dragging Acrobat from my primary desktop display to the secondary display causes the UI elements to become 2x as large as they should be and makes Acrobat unusable. 
    Is there a way to make Acrobat auto-detect the display that it is currently on? 
    Thanks!
    -Donald

    To prevent it from happing again, you can
    1. go to the Mouse preference and turn off the scroll zoom feature.
    2. go to the Universal Access preference and disable the zoom features.

  • ALL_CAPITAL is not working RSKC T -CODE

    Hi Experts,
    Iam facing an error which says INVALID CHARACTERS for one of the field.
    the field data type is CHAR(60) in both R/3 & BW.
    There is no error  in data packets when this field contains only numeric.
    for example of values -  021,  035, 458634,  ....
    The data packets are showing error when the value of this field is a combination of numeric(0,1,2..) & Character (a,b,c...).
    We tried RSKC also with value ALL_CAPITAL also but its not working.
    Can anybody help .

    Hi Paolo,
    Thanks for the reply iam loading inthe quality instance, i think the invalid character contains "^" and "@" as well.
    How to allow or remove this?
    The volume of record is high..
    Regards
    Ganesh

  • Links not working when clicking (code included)

    Ok im totally new to AS so i will do best to describe issue i am running into.....
    Have a cover photo created in PS,and on photo, there is text, which when click should open pdf file specified.....well when i hover over, and click....it doesnt go anywhere....(example below)  THX for any responses and assistance.
        EX:        this would be the cover photo
                      REPORT
      Analysis  (this should have a sub menu of PDF's which it does, but when click on the pdf's refrenced, it doesnt go anywhere)
      Link 2     (PDF)
      Link 3     (PDF)
      Link 4     (PDF)
      Link 5     (same as Analysis)
      Link 6     (PDF)
       ect ect...
    CODE BELOW....
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    import flash.events.Event;
    //init menu links
    var link_1:Object = this.getChildByName( 'MenuLinkMC_1' );
    var link_2:Object = this.getChildByName( 'MenuLinkMC_2' );
    var link_3:Object = this.getChildByName( 'MenuLinkMC_3' );
    var link_4:Object = this.getChildByName( 'MenuLinkMC_4' );
    var link_5:Object = this.getChildByName( 'MenuLinkMC_5' );
    var link_6:Object = this.getChildByName( 'MenuLinkMC_6' );
    var link_7:Object = this.getChildByName( 'MenuLinkMC_7' );
    var link_8:Object = this.getChildByName( 'MenuLinkMC_8' );
    var link_9:Object = this.getChildByName( 'MenuLinkMC_9' );
    var _close:Object = this.getChildByName( 'closeMC' );
    this._close.addEventListener( MouseEvent.CLICK, quit );
    var sub_menu_notes_slide:Object = this.getChildByName( 'SubMenu_NotesSlideMC' );
    var sub_menu_discussion_slide:Object = this.getChildByName( 'SubMenu_DiscussionSlideMC' );
    //set url addresses
    var url_link_1:URLRequest = new URLRequest( 'PDF_FILES/1.  MD&A Introduction.pdf' );
    var url_link_2:URLRequest = new URLRequest( 'PDF_FILES/9.  Independent Auditors\' Report.pdf' );
    var url_link_3:URLRequest = new URLRequest( 'PDF_FILES/10.  Balance Sheets.pdf' );
    var url_link_4:URLRequest = new URLRequest( 'PDF_FILES/11.  Statements of Revenues, Expenses and Changes in Fund Net Assets.pdf' );
    var url_link_5:URLRequest = new URLRequest( 'PDF_FILES/12.  Statements of Cash Flows.pdf' );
    var url_link_6:URLRequest = new URLRequest( 'PDF_FILES/13.  Note 1 - Summary of Significant Accounting Policies.pdf' );
    var url_link_7:URLRequest = new URLRequest( 'PDF_FILES/31.  Glossary of Terms.pdf' );
    var url_link_8:URLRequest = new URLRequest( 'PDF_FILES/EOY Audited Financials - FY2011 with blue links.pdf' );
    var url_link_9:URLRequest = new URLRequest( 'http://www.cpsenergy.com' );
    //run subroutines
    noMenu();
    set_link( link_1, url_link_1, sub_menu_discussion_slide );
    set_link( link_2, url_link_2, null );
    set_link( link_3, url_link_3, null );
    set_link( link_4, url_link_4, null );
    set_link( link_5, url_link_5, null );
    set_link( link_6, url_link_6, sub_menu_notes_slide );
    set_link( link_7, url_link_7, null );
    set_link( link_8, url_link_8, null );
    set_link( link_9, url_link_9, null );
    //subroutines
    function set_link( linkObject:Object, linkURL:URLRequest, optMenu:Object ):void {
        linkObject.addEventListener( MouseEvent.CLICK, click_link );
        linkObject.addEventListener( MouseEvent.MOUSE_OVER, mouse_over_link );
        if ( optMenu != null ){
            this.setChildIndex( MovieClip( optMenu ), 9 );
            linkObject.addEventListener( Event.ENTER_FRAME, slide_sub_menu );
        function click_link( evt:MouseEvent):void {
            navigateToURL( linkURL, 'File.browseForOpen()' );    <-----(note: should this be set to "_blank"  ?)
        function mouse_over_link( evt:MouseEvent ):void {
            linkObject.mouseChildren = false;
            linkObject.buttonMode = true;
            linkObject.useHandCursor = true;
        function slide_sub_menu( evt:Event ):void {
            if ( optMenu.hitTestPoint( mouseX, mouseY, true )) {
                optMenu.nextFrame();
            } else {
                optMenu.prevFrame();
    function quit( evt:MouseEvent ):void {
        fscommand("quit", "");
    function noMenu():void {
        var NoMenu:ContextMenu = new ContextMenu();
        NoMenu.hideBuiltInItems();
        this.contextMenu = NoMenu;
    ------------------------------------------------------------------------------------------ -------------------------------AND
    import flash.events.MouseEvent;
    //init sublinks
    var sublink_1:Object = this.getChildByName( 'SublinkMC_1' );
    var sublink_2:Object = this.getChildByName( 'SublinkMC_2' );
    var sublink_3:Object = this.getChildByName( 'SublinkMC_3' );
    var sublink_4:Object = this.getChildByName( 'SublinkMC_4' );
    var sublink_5:Object = this.getChildByName( 'SublinkMC_5' );
    var sublink_6:Object = this.getChildByName( 'SublinkMC_6' );
    var sublink_7:Object = this.getChildByName( 'SublinkMC_7' );
    var sublink_8:Object = this.getChildByName( 'SublinkMC_8' );
    var sublink_9:Object = this.getChildByName( 'SublinkMC_9' );
    var sublink_10:Object = this.getChildByName( 'SublinkMC_10' );
    var sublink_11:Object = this.getChildByName( 'SublinkMC_11' );
    var sublink_12:Object = this.getChildByName( 'SublinkMC_12' );
    var sublink_13:Object = this.getChildByName( 'SublinkMC_13' );
    var sublink_14:Object = this.getChildByName( 'SublinkMC_14' );
    var sublink_15:Object = this.getChildByName( 'SublinkMC_15' );
    var sublink_16:Object = this.getChildByName( 'SublinkMC_16' );
    var sublink_17:Object = this.getChildByName( 'SublinkMC_17' );
    var sublink_18:Object = this.getChildByName( 'SublinkMC_18' );
    //set link names dynamic text
    sublink_1.SublinkNameDT.text = 'Note 1 - Summary of Significant Accounting Policies';
    sublink_2.SublinkNameDT.text = 'Note 2 - Cash, Cash Equivalents and Investments';
    sublink_3.SublinkNameDT.text = 'Note 3 - Disaggregation of Current Receivables and Payables';
    sublink_4.SublinkNameDT.text = 'Note 4 - Capital Assets';
    sublink_5.SublinkNameDT.text = 'Note 5 - Revenue Bond and Commercial Paper Ordinances Requirements';
    sublink_6.SublinkNameDT.text = 'Note 6 - Revenue Bonds';
    sublink_7.SublinkNameDT.text = 'Note 7 - Commercial Paper and Related Revolving Credit Agreement';
    sublink_8.SublinkNameDT.text = 'Note 8 - Flexible Rate Revolving Note';
    sublink_9.SublinkNameDT.text = 'Note 9 - Employee Pension Plan';
    sublink_10.SublinkNameDT.text = 'Note 10 - Other Postemployment Benefits';
    sublink_11.SublinkNameDT.text = 'Note 11 - Other Obligations and Risk Management';
    sublink_12.SublinkNameDT.text = 'Note 12 - Other Financial Instruments';
    sublink_13.SublinkNameDT.text = 'Note 13 - Lease-Leaseback';
    sublink_14.SublinkNameDT.text = 'Note 14 - South Texas Project';
    sublink_15.SublinkNameDT.text = 'Note 15 - Commitments and Contingencies';
    sublink_16.SublinkNameDT.text = 'Note 16 - Leases';
    sublink_17.SublinkNameDT.text = 'Note 17 - Pollution Remediation Obligation';
    sublink_18.SublinkNameDT.text = 'Note 18 - Subsequent Events';
    //set url addresses
    var url_sublink_1:URLRequest = new URLRequest( 'PDF_FILES/13.  Note 1 - Summary of Significant Accounting Policies.pdf' );
    var url_sublink_2:URLRequest = new URLRequest( 'PDF_FILES/14.  Note 2 - Cash, Cash Equivalents and Investments.pdf' );
    var url_sublink_3:URLRequest = new URLRequest( 'PDF_FILES/15.  Note 3 - Disaggregation of Current Receivables and Payables.pdf' );
    var url_sublink_4:URLRequest = new URLRequest( 'PDF_FILES/16.  Note 4 - Capital Assets.pdf' );
    var url_sublink_5:URLRequest = new URLRequest( 'PDF_FILES/17.  Note 5 - Revenue Bond and Commercial Paper Ordinances Requirements.pdf' );
    var url_sublink_6:URLRequest = new URLRequest( 'PDF_FILES/18.  Note 6 - Revenue Bonds.pdf' );
    var url_sublink_7:URLRequest = new URLRequest( 'PDF_FILES/19.  Note 7 - Commercial Paper.pdf' );
    var url_sublink_8:URLRequest = new URLRequest( 'PDF_FILES/20.  Note 8 - Flexible Rate Revolving Note.pdf' );
    var url_sublink_9:URLRequest = new URLRequest( 'PDF_FILES/21.  Note 9 - Employee Pension Plan.pdf' );
    var url_sublink_10:URLRequest = new URLRequest( 'PDF_FILES/22.  Note 10 - Other Postemployment Benefits.pdf' );
    var url_sublink_11:URLRequest = new URLRequest( 'PDF_FILES/23.  Note 11 - Other Obligations and Risk Management.pdf' );
    var url_sublink_12:URLRequest = new URLRequest( 'PDF_FILES/24.  Note 12 - Other Financial Instruments.pdf' );
    var url_sublink_13:URLRequest = new URLRequest( 'PDF_FILES/25.  Note 13 - Lease-Leaseback.pdf' );
    var url_sublink_14:URLRequest = new URLRequest( 'PDF_FILES/26.  Note 14 - South Texas Project.pdf' );
    var url_sublink_15:URLRequest = new URLRequest( 'PDF_FILES/27.  Note 15 - Commitments and Contingencies.pdf' );
    var url_sublink_16:URLRequest = new URLRequest( 'PDF_FILES/28.  Note 16 - Leases.pdf' );
    var url_sublink_17:URLRequest = new URLRequest( 'PDF_FILES/29.  Note 17 - Pollution Remediation Obligation.pdf' );
    var url_sublink_18:URLRequest = new URLRequest( 'PDF_FILES/30.  Note 18 - Subsequent Events.pdf' );
    //run subroutines
    set_sublink( sublink_1, url_sublink_1 );
    set_sublink( sublink_2, url_sublink_2 );
    set_sublink( sublink_3, url_sublink_3 );
    set_sublink( sublink_4, url_sublink_4 );
    set_sublink( sublink_5, url_sublink_5 );
    set_sublink( sublink_6, url_sublink_6 );
    set_sublink( sublink_7, url_sublink_7 );
    set_sublink( sublink_8, url_sublink_8 );
    set_sublink( sublink_9, url_sublink_9 );
    set_sublink( sublink_10, url_sublink_10 );
    set_sublink( sublink_11, url_sublink_11 );
    set_sublink( sublink_12, url_sublink_12 );
    set_sublink( sublink_13, url_sublink_13 );
    set_sublink( sublink_14, url_sublink_14 );
    set_sublink( sublink_15, url_sublink_15 );
    set_sublink( sublink_16, url_sublink_16 );
    set_sublink( sublink_17, url_sublink_17 );
    set_sublink( sublink_18, url_sublink_18 );
    //subroutines
    function set_sublink( sublinkObject:Object, sublinkURL ):void {
        sublinkObject.addEventListener( MouseEvent.CLICK, click_sublink );
        sublinkObject.addEventListener( MouseEvent.MOUSE_OVER, mouse_over_sublink );
        sublinkObject.addEventListener( MouseEvent.MOUSE_OUT, mouse_out_sublink );
        function click_sublink( evt:MouseEvent):void {
            navigateToURL( sublinkURL, '_blank' );
        function mouse_over_sublink( evt:MouseEvent ):void {
            sublinkObject.mouseChildren = false;
            sublinkObject.buttonMode = true;
            sublinkObject.useHandCursor = true;
            sublinkObject.gotoAndStop( 'On' );
        function mouse_out_sublink( evt:MouseEvent ):void {
            sublinkObject.gotoAndStop( 'Off' );

    I think you need double quotes rather than single.. as in
    new URLRequest( 'PDF_FILES/1.  MD&A Introduction.pdf' );
    try
    new URLRequest( "PDF_FILES/1.  MD&A Introduction.pdf" );
    also the file names are a little odd.... there is a space after the period 1. (space here) MD...this will present problems once on server.
    And then you have an ampersand in the file name..... while that may work, sometimes servers are much more particular.... things like spaces and special characters in file names can cause problems.
    One recommended method of naming files and folders is:
    All lower case (no caps)
    No_spaces_use_underscore_instead
    No special characters
    Best wishes,
    Adninjastrator

  • APEX_UTIL.PREPARE_URL does not work across workspaces?

    We are running ApEx 4.1.1 on Oracle 11g.
    I am trying to call an application in another workspace and am using APEX_UTIL.PREPARE_URL in a hidden item and then a button with REDIRECT TO URL using javascript:popUp2 which uses the hidden item (the returned value of the PREPARE_URL. The code works fine if I am in the same workspace and a checksum is returned:
    APEX_UTIL.PREPARE_URL('f?p=9002:2:&SESSION.::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:&APP_ID.,&G_APP_NAME.&c=STU_WS','SESSION');
    returns:
    f?p=9002:2:1400894538262901::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:9001,FRD_MASTER_BANSECR&c=STU_WS&cs=3190FB9A8CC967E5B3CED03460DF6F291
    I can press the button and app 9002 opens in a new window.
    When I try the same code in an application in another workspace, no checksum is returned:
    APEX_UTIL.PREPARE_URL('f?p=9002:2:&SESSION.::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:&APP_ID.,&G_APP_NAME.&c=STU_WS','SESSION');
    returns:
    f?p=9002:2:8288147979401::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:112,Testing_Template&c=STU_WS
    and I get the error:
    Error     Session state protection violation: This may be caused by manual alteration of a URL containing a checksum or by using a link with an incorrect or missing checksum.
    I have also tried it without the workspace '&c=STU_WS' and explicitly passing the parameters, but no checksum is returned.
    APEX_UTIL.PREPARE_URL(p_url => 'f?p=9002:2:&SESSION.::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:&APP_ID.,&G_APP_NAME.',p_checksum_type => 'SESSION')
    If I do not try to pass any parameters, no checksum is produced, but the button successfully opens app 9002 in a new window:
    APEX_UTIL.PREPARE_URL('f?p=9002:4:&SESSION.::NO::&c=STU_WS','SESSION');
    returns:
    f?p=9002:4:8288147979401::NO:::&c=STU_WS
    Again, the above code successfully opens app 9002 in a new window. In fact, when not passing parameters to app 9002, I would not seem to need to use PREPARE_URL.
    BUT. I do need to pass the calling app id and the calling app name to app 9002, because 9002 looks up information about the calling app. Since, I must pass parameters, I must use PREPARE_URL, and it does not seem to work when you call it for an app in a different workspace.
    Given all of the above, I have found a kludge. I call PREPARE_URL using the APP_ID of the current app and then replace that APP_ID with 9002.
    replace(APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:2:&SESSION.::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:&APP_ID.,&G_APP_NAME.&c=STU_WS','SESSION'),
    'f?p=&APP_ID.:2','f?p=9002:2')
    returns:
    f?p=9002:2:8288147979401::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:112,Testing_Template&c=STU_WS&cs=33B2BB2ECFE3555198CE3325CCF9F67B8
    And the button opens app 9002 just fine.
    Is there anyway to get PREPARE_URL to work with apps in another workspace? What am I missing? Is there a better way than the kludge I came up with?
    A little more information: my app 9002 is a help & info for ApEx DBAs and Developers. It is my attempt at code reuse. Calls to 9002 are in a master template. I can continually update and change the help in 9002 without having to update the apps that call it.
    Thanks for your help,
    Chris

    lewisc3 wrote:
    We are running ApEx 4.1.1 on Oracle 11g.
    I am trying to call an application in another workspace and am using APEX_UTIL.PREPARE_URL in a hidden item and then a button with REDIRECT TO URL using javascript:popUp2 which uses the hidden item (the returned value of the PREPARE_URL. The code works fine if I am in the same workspace and a checksum is returned:
    APEX_UTIL.PREPARE_URL('f?p=9002:2:&SESSION.::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:&APP_ID.,&G_APP_NAME.&c=STU_WS','SESSION');
    returns:
    f?p=9002:2:1400894538262901::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:9001,FRD_MASTER_BANSECR&c=STU_WS&cs=3190FB9A8CC967E5B3CED03460DF6F291
    I can press the button and app 9002 opens in a new window.
    When I try the same code in an application in another workspace, no checksum is returned:
    APEX_UTIL.PREPARE_URL('f?p=9002:2:&SESSION.::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:&APP_ID.,&G_APP_NAME.&c=STU_WS','SESSION');
    returns:
    f?p=9002:2:8288147979401::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:112,Testing_Template&c=STU_WS
    and I get the error:
    Error     Session state protection violation: This may be caused by manual alteration of a URL containing a checksum or by using a link with an incorrect or missing checksum.
    I have also tried it without the workspace '&c=STU_WS' and explicitly passing the parameters, but no checksum is returned.
    APEX_UTIL.PREPARE_URL(p_url => 'f?p=9002:2:&SESSION.::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:&APP_ID.,&G_APP_NAME.',p_checksum_type => 'SESSION')
    If I do not try to pass any parameters, no checksum is produced, but the button successfully opens app 9002 in a new window:
    APEX_UTIL.PREPARE_URL('f?p=9002:4:&SESSION.::NO::&c=STU_WS','SESSION');This is wrong because you are passing string SESSION for url_charset parameter, that's why id is not adding any checksum
    See this http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#AEAPI160
    returns:
    f?p=9002:4:8288147979401::NO:::&c=STU_WS
    Again, the above code successfully opens app 9002 in a new window. In fact, when not passing parameters to app 9002, I would not seem to need to use PREPARE_URL.
    BUT. I do need to pass the calling app id and the calling app name to app 9002, because 9002 looks up information about the calling app. Since, I must pass parameters, I must use PREPARE_URL, and it does not seem to work when you call it for an app in a different workspace.
    Given all of the above, I have found a kludge. I call PREPARE_URL using the APP_ID of the current app and then replace that APP_ID with 9002.
    replace(APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:2:&SESSION.::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:&APP_ID.,&G_APP_NAME.&c=STU_WS','SESSION'),
    'f?p=&APP_ID.:2','f?p=9002:2')
    returns:
    f?p=9002:2:8288147979401::NO::P2_CALLING_APP_ID,P2_CALLING_APP_NAME:112,Testing_Template&c=STU_WS&cs=33B2BB2ECFE3555198CE3325CCF9F67B8
    And the button opens app 9002 just fine.
    Is there anyway to get PREPARE_URL to work with apps in another workspace? What am I missing? Is there a better way than the kludge I came up with?
    A little more information: my app 9002 is a help & info for ApEx DBAs and Developers. It is my attempt at code reuse. Calls to 9002 are in a master template. I can continually update and change the help in 9002 without having to update the apps that call it.
    Review all above API calls and make sure you pass right parameters

Maybe you are looking for

  • Problems with iTunes installation

    Hello, I am having problems with installing iTunes 10.4. I am running an Acer Aspire M1640 running Windows Vista (32) v 6.0.6002 SP2 and updated. When trying to update my old version of iTunes I got the following error "Bonjour: The feature that you

  • Returns to AR integration

    My ct's requirement is to create AR Invoice for Purchase Returns. I don't think this integration is provided out of the box. Has anyone else faced this requirement before and what solution did you implement? If you had to customize, how hard was it t

  • How to use tomahawk panelTab's  visibleOnUserRole attribute.

    Can u explain me with an simple example to use tomahawk panelTab's visibleOnUserRole attribute. also explain where this attribute will use. any real time example...... where i can get Tomahawk tutorials with examples and explanations for each tag....

  • LOV on Grid

    I need to use a LOV on a Grid Control. I did all the tutorial indicate (for a standard field, not in grid) but it didn't work : it simply doesn't fire. Does anyone know how can be done ? TIA Tullio

  • Table Display

    Hi I have a requirement to create a table with multiple colums and multiple rows. Now, at the click of every row, the description about the product must be displayed below that row, but shouldn't hide the next row. Ex: Say I have 5 columns (Col1 to C