Overriding a javascript delivered function but then calling the original

I have a tabular form (updateable report) and am on Apex 3.2.
On this particular form, I have the updateable report set to "partial page refresh = yes". When doing so, it appears to want to call a javascript function called $a_report to paginate from one set of rows to another. I have my pagination set to select-list with row ranges.
Before repagination continues, I would like to do some validation (specifically, see if the user selected any of the checkbox row selectors) and warn them via Javascript's "confirm" box that continuing will make them lose their selections.
I have no issue so far in determining if at least one checkbox is checked and no problem popping up the confirmation box. However, the real issue is that I want to pop up the confirm box and then continue only if the user says they want to continue.
Apex generates this report with the select-list and links to paginate by calling a function in Javascript called "$a_report". Since this is in the library, I cannot really get to it; it's a "black box" to me at runtime. So ideally what I'd like to do is create a local (on my page) javascript function of the same name (since I can't change what the select-list for pagination calls) accepting the same four parameters, do my checkbox validation and warning, and then effectively call the $a_report in the library to do the pagination if the user wants to continue.
As it is right now I got a copy of the code for the function and put it local on my page and then added in my own logic, but of course this means that if $a_report changes in future versions, my local copy might break and would have to be updated. Ideally, I would like to somehow create a locally-named function called $a_report, do my validation and ask for confirmation, and if the user chooses "OK" to continue, call the library one in sort of a "super" or "parent" way to do the pagination.
Is this possible with javascript to create some sort of OOP-like inheritance or some sort of sense of scope so that I can have a local copy and then call the one in the library?
Thanks!

Hi Kramis,
Let's start with a simple example
class OriginalClass
  public void doSomething( )
  System.out.println("This is the Original class's doSomething( ) ");
class InheritedClass extends OriginalClass
  public void doSomething( )
  super.doSonething( );//Watch here you are calling the original method that was declared in OriginalClass
  //Now you are adding some codes of your choice
  System.out.println("This is Inherited class's doSomething( ) ");
Explanation :
When you create an object of type InheritedClass and you call the method doSomething( ) then the original method gets executed first and later the rest of the code written in the InheritedClass 's doSomething( ) method gets executed.I hope this works for you. If you do not want the original to be executed just remove the super.doSomething( ) call.

Similar Messages

  • Cs6: Masking mode doesn't function - can paint the selection correctly - but then clicking the masking tool icon - nor selection ist made. Can I repair that?

    Cs6: Masking mode doesn't function - can paint the selection correctly - but then clicking the masking tool icon - nor selection ist made. Can I repair that?

    Can I repair that?
    Repair what? Your description seems a bit unclear, maybe posting a few screenshots can help clarify the issue.
    Are you talking about Quick Mask Mode?

  • Calling the original overridden function

    I want to override a function in a class, but I just want to add something to the original implementation, so I would first like to call the original, and then add my code afterwards. Something analogous to user super() in constructors. How would I do this? It is not a static function.

    Hi Kramis,
    Let's start with a simple example
    class OriginalClass
      public void doSomething( )
      System.out.println("This is the Original class's doSomething( ) ");
    class InheritedClass extends OriginalClass
      public void doSomething( )
      super.doSonething( );//Watch here you are calling the original method that was declared in OriginalClass
      //Now you are adding some codes of your choice
      System.out.println("This is Inherited class's doSomething( ) ");
    Explanation :
    When you create an object of type InheritedClass and you call the method doSomething( ) then the original method gets executed first and later the rest of the code written in the InheritedClass 's doSomething( ) method gets executed.I hope this works for you. If you do not want the original to be executed just remove the super.doSomething( ) call.

  • I have created a site with iWeb. I have replaced the iWeb Nav bar with a vertical one I made myself. Problem is, my top button disables itself if it overlaps into the "hidden" nav bar area. I can cmd click and drag it into this area, but then all the rest

    I have created a site with iWeb. I have replaced the iWeb Nav bar with a vertical one I made myself. Problem is, my top button disables itself (and the animation doesn't work) if it overlaps into the "hidden" nav bar area (indicated by a blue rectangle). I can cmd click and drag it into this area, but then all the rest of my site is pushed down the page. Don't know what to do about this. I don't know how to bring the rest of the page up without dragging it also into the designated nav bar area. Also, by doing this, is it affecting my site in ant way? see my site here at www.steveburrowsimages.com
    The home page is with it all draged into the nav bar area and the about page is with is outside the nav bar area (notice that the top button does not animate or work as a button.
    Getting confused here. Anyone got any ideas?

    Well, you made a good start with SEO by getting rid of the iWeb default navigation since it doesn't help the spiders and, out there in the real world, there are more people than you would think with javascript turned off in their browsers.
    One of the downsides of iWeb is that it doesn't allow for the alt attribute in the img tag. Its well worth adding these to give you extra keywords even if you have captioned all your images. Use iWeb SEO Tool for this...
    http://www.iwebformusicians.com/Search-Engine-Optimization/Tags.html
    iWeb, just like most drag and drop software, creates a huge amount of code which causes the pages to load slowly in the browser. Running you files through an optimizer will help to reduce this problem and further reduce the size of image files even beyond the initial optimization you do before loading them into iWeb...
    http://www.iwebformusicians.com/Search-Engine-Optimization/Optimize.html

  • My CS2 Illustrator goes through all the motions to open but then at the end, nothing happens. It has

    My CS2 Illustrator goes through all the motions to open but then at the end, nothing happens. It has been working well for years, but then out of the blue it just won't open. I reinstalled it and the it still won't open. HELP! I'm under a big art deadline and this is ridiculous. Thanks.

    Or you may try to Move the folder or the Other options
    In the old days, deadlines were dead serious.

  • Just wondering is it possible that someone could send them self a MSG but then change the senders number on the MSG??

    Just wondering is it possible that someone could send them self a MSG but then change the senders number on the MSG??

    Partipie88 wrote:
    Although could anyone do it if they knew or found out how??
    Yep, but again, not as easily done as it once was. Since it's illegal in most of the world & most carriers have provisions in place to stop such, you really need to know what you're doing to do such.

  • I just bought an iPod touch 4th generation 8GB for $199.99 but then when the iPod touch 5th generation came out, the 4th generation was still $199.99, but for a whole 16GB. Is there a way I can get some sort of free space?

    I just bought an iPod touch 4th generation 8GB for $199.99 but then when the iPod touch 5th generation came out, the 4th generation was still $199.99, but for a whole 16GB. Is there a way I can get some sort of free space?

    If "just" is less than 14 days, you can return your iPod to Apple for a full refund.

  • How can I find movies created in past versions of iMovie?  They are still on you tube but I want the original higher quality versions and I can't find them anymore.

    How can I find movies created in past versions of iMovie?  They are still on you tube but I want the original higher quality versions and I can't find them anymore.

    Paul -
    I'm sorry you've lost files, but when you set up an account as Guest, there's a message that clearly states "When a guest user logs out, all information and files in the guest account's home folder are deleted". If you want an account where files are retained, you should create an Admin or Standard type.
    You will need to use data recovery techniques to see if your file can be recovered. The more that you use your computer, the greater the risk that the file will be overwritten. You can contact a professional data recovery service such as DriveSavers (which will be expensive, but you can judge the value of the file) or try something like Data Rescue. The latter has a demo which you can install to determine if your file can be recovered, and then, on purchase, you can actually recover the file.
    Good luck!
    Matt

  • When i open an mp3 file from a source other than apple, does itunes create it's own file and can I then delete the original mp3?

    when I open a music file from a source other than apple, does itunes create it's own file and can I then delete the original mp3?

    If you use iTunes' default settings then when you add a file to iTunes it places a copy of the file in the iTunes media folder and it leaves the original in place.  The exception is when you drag it to the Automatically Add To iTunes folder.
    It does not convert the file.  You can delete the original if you wish.

  • How do I revert to original footage in Final Cut Pro X version 10.0.9, for some reason I have lost some audio in my timeline and would like to start again but cannot get the original footage?

    How do I revert to original footage in Final Cut Pro X version 10.0.9?
    For some reason I have lost some audio in my timeline and would like to start again but cannot get the original footage?
    Only the edited version which is no good without the audio?
    Please  Help

    What format is your problem clip? Are there wave forms visible in the section without sound?
    Right click on the clip in the event broswer and choose Reveal in Finder; open the clip in Quick Time to confirm that there is sound throughout at that stage of your workflow.
    Russ

  • After my friend locked me out of my iPhone with too many wrong passwords I restored my iPhone and now it is showing that picture of a cable leading towards itunes and itunes says the sim is not supported but it is the original sim. How do I fix this?

    After my friend locked me out of my iPhone with too many wrong password attempts I restored my iPhone via recovery mode and now it is showing that picture of a cable leading towards itunes, and itunes says the sim is not supported but it is the original sim. How do I fix this?

    Something went wrong with the update, this can and does happen with every version of iOS.
    There is nothing wrong with the update.
    Simply restore the device via iTunes on the computer.
    If iTunes is stating it will take hours to update, that indicates an extremely slow Internet connection and is likely the reason the OTA update failed.

  • HELP! I want to reinstall my iMacG5, but I lost the original OS disc, how can i do? pls Help!!!

    I want to reinstall my iMacG5,
    but I lost the original OS disc,
    how can i do? pls He!!!

    With the kernel panic your Mac is suffering I would suggest that once you get the DVD for your Mac that you boot with the first one in the set in your Mac with the D key depressed. This will start AHT. It will test your hardware. Kernel panic are generally caused by hardware problems.
    Allan

  • My HP officejet 6210 no longer prints documents from my Mac ibook G4 running 10.4.11; starts to process the document, but then stops the print,if I restart print same thing happens

    My ibookG4, running 10.4.11 suddenly decided it no longer wants to print documents thru my HP officejet 6210 all-in-one printer.  So far I've tried emails, excel and word all with the same result.  The computer will start to process the print request (processing seems to take longer than previously) and then suddenly the processing stops and a red exclamation mark appears next to the printer image at the bottom of screen.  When I pull up the printer utility it tells me the printer is "stopped".  If I restart it, the process begins all over again until once again it stops.  I have already deleted the printer completely from my computer and reinstalled the software fom the HP site.  For some reason had a really tough time finding the correct print drivers on the HP site, but did finally locate them.  I have not even attempted scanning during this (I see lots of people reported issues with that for the 6210), I would be happy if I could at least print again.  I am connecting via USB.  Is there some way to fix this?

    Hi Evelyn,
    Mac OS X: About the Reset Printing System feature ...
    http://support.apple.com/kb/HT1341?viewlocale=en_US

  • I am trying to reset my 4th generation ipod touch via itunes (as I cannot remember parental controls code). In itunes it does a download but then says the software was corrupted during download. Itunes is up to date. Operating system is vista. Any ideas?

    I have given my 4th generation ipod touch to my husband and he wants to download some in app purchases, so I am trying to reset it via itunes. I dont remember setting parental controls but I must have at some point, maybe when I lent it to the kids. But I cannot remember the password and nothing I have tried works. So I have backed the ipod up and am trying to reset it but after speding 10 minutes doing a download I get a message that says:
    "The softwaar for the iPod was corrupted during download. Disconnect and reconnect, then try again. Make sure your network settings are correct and your network connection is active, or try again later"
    I have tried many times. All the settings are correct, and the network seems to be working fine in all respects.
    Any advice very much appreciated.
    Thank you
    UPDATE - decided to try one more time after trying for hours and it has worked! I now suspect it may have been because my son was playing an online game. Though we have plenty of bandwidth. But in case, I guess it could be a bandwidth problem.

    A Complete Guide to Restore or Recover Your iDevice (or if you forgot your passcode)
    iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    iOS- Understanding passcodes
         If you have forgotten your Restrictions code, then follow the instructions
         below but DO NOT restore any previous backup. If you do then you will
         simply be restoring the old Restrictions code you have forgotten. This
         same warning applies if you need to restore a clean system.
    If you need to restore your device or if you cannot remember the passcode, then you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and re-sync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone, iPad and iPod touch software.
    Try restoring the iOS device if backing up and erasing all content and settings doesn't resolve the issue. Using iTunes to restore iOS devices is part of standard isolation troubleshooting. Restoring your device will delete all data and content, including songs, videos, contacts, photos, and calendar information, and will restore all settings to their factory condition.
    Before restoring your iOS device, Apple recommends that you either sync with iTunes to transfer any purchases you have made, or back up new data (data acquired after your last sync). If you have movie rentals on the device, see iTunes Store movie rental usage rights in the United States before restoring.
    Follow these steps to restore your device:
         1. Verify that you are using the latest version of iTunes before attempting to
             update.
         2. Connect your device to your computer.
         3. Select your iPhone, iPad, or iPod touch when it appears in iTunes under Devices.
         4. Select the Summary tab.
         5. Select the Restore option.
         6. When prompted to back up your settings before restoring, select the Back Up
             option (see in the image below). If you have just backed up the device, it is not
             necessary to create another.
         7. Select the Restore option when iTunes prompts you (as long as you've backed up,
             you should not have to worry about restoring your iOS device).
         8. When the restore process has completed, the device restarts and displays the Apple
             logo while starting up:
               After a restore, the iOS device displays the "Connect to iTunes" screen. For updating
              to iOS 5 or later, follow the steps in the iOS Setup Assistant. For earlier versions of
              iOS, keep your device connected until the "Connect to iTunes" screen goes away or
              you see "iPhone is activated."
         9. The final step is to restore your device from a previous backup.
    If you can not restore your device then you will need to go to recovery mode.
    Placing your device into recovery mode:
    Follow these steps to place your iOS device into recovery mode. If your iOS device is already in recovery mode, you can proceed immediately to step 6.
         1. Disconnect the USB cable from the iPhone, iPad, or iPod touch, but leave the other end
             of the cable connected to your computer's USB port.
         2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the
             red slider appears, then slide the slider. Wait for the device to turn off.
              If you cannot turn off the device using the slider, press and hold the Sleep/Wake
              and Home buttons at the same time. When the device turns off, release the Sleep/Wake
              and Home buttons.
         3. While pressing and holding the Home button, reconnect the USB cable to the device.
             The device should turn on. Note: If you see the screen pictured below, let the device
             charge for at least ten minutes to ensure that the battery has some charge, and then
             start with step 2 again.
         4. Continue holding the Home button until you see the "Connect to iTunes" screen.
             When this screen appears you can release the Home button.
         5. If necessary, open iTunes. You should see the following "recovery mode" alert:
         6. Use iTunes to restore the device.
    If you don't see the "Connect to iTunes" screen, try these steps again. If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.
    Additional Information:
    Note: When using recovery mode, you can only restore the device. All user content on the device will be erased, but if you had previously synced with iTunes on this computer, you can restore from a previous backup. See this article for more information.

  • Adobe Reader 11.0.03 starts up but then crashes (the screen disappears)

    I have windows 8 OS. After downloading the free version of the Reader and trying to read a PDF document, the Reader window temporarily opens up but then a few seconds later it disappears. I also tried disabling McAfee, but the problem did not go away. Any ideas what the problem is??

    Hi,
    Please check this: http://helpx.adobe.com/acrobat/kb/troubleshoot-errors-freezes-reader-windows.html
    Regards
    Aditya

Maybe you are looking for

  • Stop times not working in latest update

    I updated my iTunes a few days ago. Today I discovered that my stop and start times I had placed on some of my tunes have been reset to the original times. I can adjust them (the changes show in the Info panel) but that does not affect playback: the

  • Unable to load ADF Mobile for Android deployment profile.

    Hello, I'm trying to implement a simple application on an android platform using this: [http://docs.oracle.com/cd/E18941_01/tutorials/MobileTutorial/jdtut_11r2_54_2.html] I already downloaded the updates needed as extensions and started the emulator

  • Adobe Audition CC has stopped working. Constantly crashing.

    Hi, I am constantly receiving an error 'Adobe Audition CC has stopped working.' This usually occurs after an event whilst the sound is playing. ie change the playback location or edit an effect's parameter. I am lucky to get a couple of minutes with

  • How do I detect a User interaction?

    This question arises more out of curiosity than necessity. Let's say I wanted to create a Java version of the board game Risk. Let's also say I have an image of the board (a map of the world). How would I be able to tell in which terrritory (country)

  • HT5704 please help me why i cant continue updating my iphone?

    Hi, I try to upgrade my iphone 3GS version 4.1 to become 6.1, I download the itunes then now why its cannot continue updating my iphone? always says that we are sorry, we are unable to continue activation of this time. Please try again later or conta