Focus cursor on first column of the new row

Dear Readers,

The below information is very useful while you are adding master detail in apex page.

How to focus the cursor to the first input field of a newly added row using the ADD button in a standard APEX Tabular Form. Actually, I would expect APEX to do this automatically. But it doesn’t. To implement this behavior is actually really simple.

For this example I create a simple tabular form based on the demo_customers table:


This is what the form looks like when you click the “Add Row” button. As you can see, none of the input field has focus at this time. To focus the cursor on the first field of the new row (Cust First Name), I somehow have to change the behavior of the “Add Row” button. Let’s have a look at it’s definition:


The click-action of the button is actually a JavaScript call: addRow();. Naturally I want to keep this action, but after this, I want to start an additional action that should set the focus to the input field. To be able to have multiple actions performed when the button is clicked, I will change the Action definition to “Defined by Dynamic Action”:


Now I’m going to add a Dynamic Action to the “Add Row” button. First action will be the original JavaScript call to add the row, second action will be setting the focus. This is how the definition will look like after I added the actions:


Creating the Dynamic Action and the first True Action I will do with the Create Dynamic Action Wizard for the button:





Now I have implemented the original behavior.

Next I want to focus the cursor on the first text-field of the added row, once I click the button. I know there is a build-in Dynamic Action to set the focus on an element. I just need to know which element. Let’s have a look at the HTML code of the generated APEX page, especially the the text-field element we wish to target (I used the Chrome Developer Tool here):


As you can see, the name of this element is f02 and the id f02_0008. Because the ID can change depending on the number of rows displayed, I choose to work with the name attribute, which stays the same. The problem is, all “Cust First Name” fields do have the same name. Luckily jQuery offers a way to select the last element in an array of element with the same name and luckily, APEX Dynamic Actions support jQuery selector syntax. So here is, how I define the focus action for my “Add Row” button:



As you can see, I select all elements having the name attribute equal to f02 and :last allows me to select the last element of these. Here is a screenshot from the result (after clicking the “Add Row” button) with focus on the first text element of the last, newly added row:



Thanks to Christian Rokitta

How to fine-tune your PC

Thanks to Javed Anwer and Time of India

You sought advice from those who know, went to the store, browsed through the festive bargains and finally bought that new computer. Congratulations! But before you start using that spanking piece of hardware, you’ll need to get your system upto-date. Yes, even new PCs need an overhauling.

Get rid of junk:
When you switch on your new computer, you are likely to find junk software preinstalled by the vendor. These could be trial versions of antivirus software, browser toolbars, desktop shortcuts to websites, programs that promise free downloads, etc – and are likely to slow down your computer, especially if they are configured to load at boot-up.
The best way to deal with such junk is to uninstall it. Now, if you’re not comfortable with what to uninstall and what needs to be kept, ask a techie friend to help. Alternatively, you could usePC Decrapifier – a free program that cleans junk software from PCs. Just install this program, run it and follow the instructions. Download from

Get a proper antivirus:
Unless you have paid for your antivirus software, what comes preinstalled on a PC is a limited-period trial version. In which case, uninstalling it was the right thing to do. But the fact remains that you do need antivirus software.
We suggest you download the free Microsoft Security Essentials (MSE) suite for Windows. For whatever reason, if this doesn’t work on your PC, you could try either Avira or AVG. Both these antivirus are free for home use. Download MSE from Download Avira from Download AVG from /homepage

Use just one antivirus on your PC. Never run multiple antivirus programs as this could cause operational conflicts.

Partition your drive:
If your computer has only one hard drive (C drive), it is advisable to split it and create a new partition. The new drive can keep your data safe in case something goes wrong with Windows 7. To partition a hard drive, open Control Panel from the Start Menu. In the Control Panel, click on ‘System and Security’ . In the window that opens, look for ‘Administrative Tools’ . In this category, click the option titled ‘Create and Format Partitions’ to open the Disk Management utility.
In Disk Management, right-click the C Drive and select ‘Shrink Volume’ . When prompted, allocate around 100GB space and click OK. This 100GB will be used as the system drive. Once the volume is shrunk, you will have lots of ‘Unallocated Space’ . Right-click on it and select ‘Create New Partition’ . Once the partition has been created, give the drive a letter, such as D. Voila, you have two drives!

Update drivers:
Having the latest drivers means that your hardware is running at its optimum settings. Your new PC might be preloaded with older drivers, but you can update them easily. Download the program Device Doctor, install it and click on Scan.
Device Doctor will tell you how many drivers in your computer are outdated. The free version doesn’t allow you to download the new drivers automatically. But armed with the information provided by the program, you can always visit the official website of the hardware maker, download the latest driver and install it by just double-clicking the file.
Download from

Clean your Startup:
Tuning up startup services improves the boot time of your PC, as well as its performance. Click the Start button and in the search bar, type msconfig. Go to the Startup tab. Disable any service here that you don’t use or need on a daily basis. However, if you have a doubt about an item or don’t know what it is, leave it running.
For example, you might use iTunes but don’t run it everyday. You can disable it. It won’t run in the background and slow down your computer. When you need it (for example, when you plug in your iPod), you will have to double-click its icon to run it.

Setup Windows Update:
By default, Windows Update is set to download and install updates automatically. But if you want more control on the stuff that Windows installs, go to the Control Panel and select ‘icon view’ by using ‘View’ option on the top right. Click on Windows Update and, from the panel on the left, select ‘Change settings’ . Change the setting to ‘Check for updates but let me choose whether to download and install them’ .

Create a Recovery disk:
It is possible that your computer hasn’t come with a recovery disk. But don’t worry. If the system has Windows 7 installed, you can create a recovery disk yourself. All you need is a blank DVD disk. Pop it into your DVD writer, click on the Start button, go to Programs and select Maintenance. From the options, choose ‘System Repair Disk’ and follow the on-screen instructions.


  1. Chrome and Firefox: For a better web browsing experience.
  2. JAVA Runtime, Flash: Essential plug-ins for some websites.
  3. FoxIT Reader: A fast and lightweight PDF reader. Reader
  4. Picasa: Manages your photo collection, and packs basic image editing.
  5. KMPlayer: Extensive support for video codecs and has a pleasing interface.
  6. 7ZIP: Takes care of all your archiving needs, including ZIP and RAR. http://www.7-zip .org
  7. CCleaner: Keeps your PC clean and in top shape.
  8. Skype: For all your video calling needs.
  9. InfraRecorder: Powerful but simple CD/DVD burning tool. infrarecorder .org