Other ways for getting a reference to the current page [ID5, JS]

To get a reference to the page you're working on (or that holds an object you want to manipulate), you could use app.activeWindow.activePage.id or app.layoutWindows[0].activePage.id.
But when you're working on a spread and this spread fills your application window, you seldomly get the correct page reference. You could have a selection on the right page, but when you run a script with the active/layoutWindow approach, you could easily get a (wrong) reference to the left page, if that one is more 'dominant' in your program window.
I work around this by using activeSpread and getting the Y-coordinate of a frame or insertionPoint on the page I'm working on. When you set the ruler origin to spread, you can determine the left or right page by looking at the Y-coordinate. If it's higher than the page width (or spine position) you're on the right hand page. You could than use if...then to assign 0 or 1 a to a variable. Finally, you can get the ID of that page: app.activeSpread.pages.item(variable).id.
Perhaps this approach is helpfull for others who struggle with page references.
My question is: are there other reliable (perhaps more simple) ways to get a reference to the page?

Right. I should have posted the question sooner, because shortly after I found the answer I've been looking for quite long. And once again it's so simple. Nevertheless it might be usefull to share.
For most page items like textframes and rectangles you can simpy use the property parentPage. For instance, if you have selected a rectangle you get a reference to the page with code like:
page = doc.selection[0].parentPage.id.
This might be usefull if you dragged a rectangle holding an image to another page and want to run a script that re-attaches the caption frame. 

Similar Messages

  • Getting a reference to the current Transaction

    In a session bean, I need to call enlistResource(XAResource), an instance method in interface javax.transaction.Transaction, in order to enlist my XAResource object with the current transaction (whether it's a bean-managed or container-managed transaction).
    In order to accomplish this, my code therefore needs to be able to obtain a reference to the current transaction, or to the transaction manager (since I could then call TransactionManager's getTransaction() method to obtain the transaction).
    Is there a way to do this in IPlanet? (I have found techniques that work for JBoss and BEA, but not IBM.)
    [Please note that a reference to a UserTransaction object is of no use, as it provides no enlistResource() method, nor any way to obtain the corresponding Transaction object or the TransactionManager.]

    Try
    InputStream is =
    ThisClass.class.getClassLoader().getResourceAsStream(resourceName);
    Note this will get a different classloader which uses
    the whole class-path.Just as an FYI, class.getResourceAsStream() delegates to the object's ClassLoader, so you can save some typing by omitting the call to getClassLoader(). :o)

  • How i can get a array in the current page?

    Can i send a array parameters from previous page to current page?
    the coding like below:
    // the coding in the previous page
    String[] strSend = {"a", "b", "c"};
    HashMap map = new HashMap(2);
    map.put("array", strSend);
    pageContext.setForwardURL(
    "OA.jsp?OAFunc=XXFMSRHISQF",
    null,
    KEEP_MENU_CONTEXT,
    null,
    map,
    true,
    ADD_BREAD_CRUMB_NO,
    IGNORE_MESSAGES );
    //the coding in the processRequest of the current pageCO.
    String strParam = pageContext.getParameter("array");
    the problem is that the type of "strParam" is a String.
    it's not a array of String. So it is not the parameter what i need.
    can u tell me how to get the array parameter from previous page. thanks.

    This cannot be achieved directly while using the setForwardURL method, all values that are there in the Hashmap will be appended when the redirection is done, so you cannot get the values that are there in the array object directly.
    Workaround that I can think of, put all the array values in a String object, appended by a delimiter, in the second page, after you do a getParameter(String), recover the values using a StringTokenizer and the delimiter that you used while appending the string values and store the values in a Array.
    Thanks
    Tapash

  • When I do a Google search Firefox will not connect me to the links. The only way for me to connect to the listed pages is to right click on the link and open in a new tab or window. I have reinstalled Firefox and the issue still remains.

    I run windows 7 on a Gateway FX6000 series computer. This issue has been going on for some time. I have uninstalled and reinstalled Firefox. There are not any malware programs on my machine according to the scans I have run using Ad-Aware. If I use another browser I can connect to Google search links with no problems.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • How to get functionID/Name of the current page

    Hi guys,
    I have two EBS standard forms "Supplier Entry" and "Supplier View Only" defined as two separate functions in the menu. Depending on which function was launched by the user I have to do some extension.
    I found that following code can be used to know whether function is available in the menu or not. But the problem occurs in situation where both functions are available to the user and since the logic fail.
    FunctionSecurity funcSecurity = pageContext.getFunctionSecurity();
    boolean isFunc1 = funcSecurity.testFunction(funcSecurity.getFunction("YOUR_FUNCTION_SHORT_NAME1"));
    I need to know specifically which function was used to launch the form.
    On the following post https://forums.oracle.com/message/10468620#10468620 Parag tell something like this
    ( "IMC_NG_ORG_CONTACTS".equals(pageContext.getParameter("ImcLandingFunction"))
    but I don't know what  "ImcLandingFunction" equates to in my scenario. I don't see AOL functions passing any parameters to forms.
    or is there any other method to know?
    Can anyone help?

    did you try these ones ? :
       pageContext.getFormSubmitName();
       pageContext.getFunctionId();

  • Western Digital My Book World EditionI have bought a WD My Book World Edition to use for back-up of my iMac, but when I try and log onto the drive with Apple time Machine (back-up software) or connect in any other way i get the message 'There was a proble

    I have bought a WD My Book World Edition to use for back-up of my iMac, but when I try and log onto the drive with Apple time Machine (back-up software) or connect in any other way I get the message 'There was a problem connecting to the server "MybookWorld.local" The version of the server you are trying to connect to is not supported. Please contact your system administrator to resolve the problem'
    It is a brand new iMac and running Lion OSX
    Any ideas on how to solve would be gratefully received?

    Followed the directions on this page and it worked!
    http://forums.macrumors.com/showthread.php?t=1102423
    Part One - Turn on SSH (in the admin panel)
    [1] Go to to http://mybookworld.local
    [2] login: username will be admin, password will be whatever you have setup. If you can't remember it should be in your Mac OS X keychain (Utilities > Keychain Access, search for "mybookworld"). If you have not changed if from the default the password will be admin as well.
    [3] Switch to advanced mode.
    [4] From the System tab, pick Advanced.
    [5] Enable SSH Access, and click submit.
    [6] Click on the network tab and then the LAN button
    [7] Make a note of the IP address
    Small, maybe obvious, but nevertheless important point: For the install to work, your NAS needs to be connected to a router with internet access.
    Part Two - Install netatalk2.2
    [8] Open Terminal.app (Utilities > Terminal)
    [9] Enter the following command (substitute in 127.0.0.1 for the actual IP address you noted down in step 7), then hit return:
    Code: 
    ssh [email protected]
    [10] When prompted, enter the ssh password (will be welc0me).
    [11] You are now going to download the installer. Enter the following command, then hit return:
    Code: 
    wget http://mybookworld.wikidot.com/local--files/netatalk2-2-on-whitelight/install_netatalk.sh -O install_netatalk.sh
    [12] Once completed, you will need to run the installer. Type:
    Code: 
    sh install_netatalk.sh
    [13] You will be asked a number of question during install, answer yes to all. When asked about the "DHX2 login process", I opted to install the modified version, so I can confirm it works.
    [14] Once the box has restarted, you should be able to connect to your afp shares and continue to use Time Machine.

  • This will be my first time buying a laptop and I was thinking about the macbook pro with retina display but the price is a little to high I was wondering for any suggestions?  Like other ways to get it cheaper?

    This will be my first time buying a laptop and I was thinking about the macbook pro with retina display but the price is a little to high I was wondering for any suggestions?  Like other ways to get it cheaper?

    Actually you could get student discount from apple and a 10% dicksmith with limited time and I think jb hi fi gives even better discount. But lets see what other people think?

  • I have an 06' macbook and I just bought an 07' macbook.. The 06' has os x 10.6 but the 07' has 10.5.. I no longer have the disk for snow leopard. Is there ANY way to get snow leopard from the old computer to the other without having to buy it again?

    I have an 06' macbook and I just bought an 07' macbook.. The 06' has os x 10.6 but the 07' has 10.5.. I no longer have the disk for snow leopard. Is there ANY way to get snow leopard from the old computer to the other without having to buy it again?

    Technical issues aside, there's still a legal issue.
    Neither 2006 nor 2007 MacBooks shipped with Snow Leopard 'factory' installed. OS X 10.6 Snow Leopard became available in September 2009. So you purchased and installed a Snow Leopard upgrade disc on the 2007 system at some point.
    If your Snow Leopard upgrade was a single-user copy, then legally, you need to purchase another one for the second computer. If your Snow Leopard upgrade was a Family Pack 5-user license, then you're good to go.
    http://store.apple.com/us/question/answers/product/MC574Z/A?pqid=QTUXD7AF4YU9FJD YUTDPCKYKUDDDXKHTK
    If you have an active MobileMe account, Apple was giving away a single-user upgrade copy of Snow Leopard for a limited time, and you should have received an email with a link, or been offered the opportunity when you signed in to your MobileMe account on the web:
    http://www.macrumors.com/2012/04/24/free-snow-leopard-discs-for-mobileme-users-n ow-arriving/
    Worst case, single-user Snow Leopard upgrade discs are $29 retail, direct from Apple. I'd hate to have two computers and no OS installation CD's for whatever version I'm currently using.

  • Adobe's website broken - Any other ways to get the serial number?

    Hello.
    I bought the student's version of Adobe's Creative Suit.
    Now I need to get the serial number from a link which doesn't exist. It says that it is broken.
    Is there any other Way to get the Serial Number because without it I can not activate the product.
    Can somebody help me please?
    Greetings.

    Hi Dendylein2,
    One  tip to get you up and running quickly: You can use Creative Suite before getting your serial number, by selecting the installation option that allows you to install the product as a trial. You can then use the serial number to convert it to the non-trial version later.
    Did you purchase your Creative Suite in North America or elsewhere (the  correct solution can vary, depending on where you purchased the Creative Suite from).
    If you purchased in North America, have a look at the options in the table and choose the link that matches your situation:
    I have a Student and Teacher edition product
    If you purchased outside of North America, and from a reseller, the website is down and I apologize for that. This is known and Adobe is working on a fix.
    Thank you for posting.

  • Is there a way to get lightroom to search the computer for catalogs like aperture does?

    Is there a way to get lightroom to search the computer for catalogs like aperture does? I've switched over from Aperture to Lightroom, and i liked how in Aperture when i went to open "other library" it would basically scan all connected drives for them, and show me when last opened and what version. Is there a way to do this with Lightroom, either in program or by a third party app?

    The user interface is on a level of elementary PC software
    something I have deteced till now
    no free moving workspace windows
    no search function for the whole catalog
    no support of mpg files in the archive
    no chromatic appararture correction
    second screen sometimes gets lost, when moving between screens
    no automatic creation of collection ( very risky direct interfacing with the original file system )
    wrong counting of objects in catalog folder when creating virtuel copies
    What worked good is the import of the APERTURE Archive ( 40000 objects ) took me one night and its there with the above obsticles!!! I am using just three days and I have to say
    not user friendly
    not workflow supporting
    risky user interfacing with masters
    As JimHess stated, there is no risk working with the masters.
    Chromatic aberation correction is available in Lightroom, searching the entire catalog is available in Lightroom.
    With regards to your other comments, the idea that Lightroom should work the same (or very similar) to Aperture is one that you should remove from your thoughts. It will only get you into trouble. Lightroom is not Aperture and will not work the same, and has different underlying principles, and so its pointless to think you will be able to do everything the same way you did it in Aperture. You need to be open to Lightroom's features, and Lightroom's way of doing things. I agree with JimHess that it takes most people a while to learn Lightroom's way of doing things, but your patience will be rewarded.

  • Is the other way to get the downloads from the support section

    Is there any other way to get the downloads from the support section?
    Because the download speed is very slow. For example in need the new version from the Value Added Package, and its 116 MB big. A normal download time would be about 5 - 10 minutes. But when i download it from Toshiba I need 2 - 6 hours. Not good for a company that makes high performance computers and notebooks.
    And the worst thing is that the connection is reseted after some hours...so I'll never get the update.
    Does anyone know help?
    Gruss
    Thomas

    Hello Thmas
    I can understand you very well because few days ago i have installed Vista Ultimate on my brand new Satellite A200. Unfortunately I am afraid there is no much to do. You know very well that since Vista OS is on the market, thousands of people want to downgrade OS to WXP or update to Vista ultimate.
    I am really not wondering that download is so slow. I have noticed that download speed is much better early morning and maybe you should download all stuff you need at this time. Save all this stuff for further handling.
    Bye and good luck

  • Help, I have forgotten my Apple ID security questions and when i send it to my email address to reset the questions nothing shows up in inbox. Any other way to get past this?

    Help, I have forgotten my Apple ID security questions and when i send it to my email address to reset the questions nothing shows up in inbox. Any other way to get past this?

    Security questions:
    https://discussions.apple.com/docs/DOC-4551
    http://support.apple.com/kb/HT5312
    This is also useful:
    http://www.macworld.co.uk/ipad-iphone/news/?newsid=3463233&olo=email
    If you don’t know your security questions, phone Apple (using the number listed here:  http://support.apple.com/kb/HE57  ) and ask for the Account Security Team.

  • Is there any way to get my reminders (from the new iPhone app) to sync with something on my laptop (Mail, iCal, some other desktop app)?

    Is there any way to get my reminders (from the new iPhone app) to sync with something on my laptop (Mail, iCal, some other desktop app)?

    Yes, if you have iCloud set up on your phone and computer, then reminders will be synced through iCal.

  • Photoshop elements quit working, I uninstalled it, tried to re-install using the cd, but getting errorPhotoshop elements quit working, I uninstalled it, tried to re-install using the cd, but getting error, any other way to re-install it without the disk ?

    Photoshop elements quit working, I uninstalled it, tried to re-install using the cd, but getting error, any other way to re-install it without the disk ?

    Yes.
    Download Photoshop Elements products | 13, 12, 11, 10
    However, the real issue is why the program is not working. Did you install anything recently?
    When you tried to re-install from the disk, did you shut off the antivirus program temporarily?
    Have you tried a system restore to a point in time when the program was working properly?

  • I upgraded to Ios5 and have lost my contacts and other app profiles - is there any way to get them back from the backup taken before the IOS5 process started?

    I upgraded to IOS5 and have lost my contacts and other app profiles - is there any way to get them back from the backup taken before the IOS5 process started?

    Thanks but have tried that - When I try to restore I get a -50 error and into a loop of taking another back up.  I took a copy of the back up before the IOS upgrade and have it stored on my desk top but I cannot get Itunes to restore to that back up
    Any ideas how I can do this?

Maybe you are looking for