APEXblog.nl - Tips and Tricks

About This Blog:
I (Richard Weug) started this blog primary for myself to save all kinds of Apex tips and tricks in one place. To use it as a place to write down how I used some coding in my own projects, but also to copy and paste all kinds of articles I find on the Internet. (So I never have to wonder on what website did I read about??? When I see something interesting I collect the content so I have my own archive/knowlegde base.

View my profile on LinkedIn


Tips & Tricks


Save before Exit and Tabular Forms

Written by Richard Weug on Friday, 21 January 2011 10:47. Posted in Tips and Tricks

The SkillBuilders Save Before Exit plug-in is designed to make it very easy for developers to help prevent end users from loosing changes to work they’ve done on a page. When a user leaves a page it runs some checks to find out if changes have been made but not saved. If it finds any, it prompts the user before allowing them to go to the next page. If you’re not familiar with the plug-in, you can find it here along with the rest of our plug-in offerings.

Tabular Forms now have a similar technology built in – which is very clever. It’s needed in Tabular Forms because there are some built in controls, such as header sorting links and pagination links, that  when used could result in end users losing their work. The built in functionality that helps prevent this works great, it even highlights the cells that have changed (perhaps I’ll add that to the plug-in).

Recently, two separate users of the SkillBuilders Save Before Exit plug-in let me know of some problems they encountered while integrating the plug-in with the built in Tabular Form functionality. After having been a little confused myself at first, I was delighted to learn that both can coexist quite nicely – even compliment each other.

Here are some guidelines to properly integrate the two:

  1. Enable Partial Page Rendering (PPR) for the Tabular Form. This setting can be found under Layout and Pagination in the Report Attributes. PPR allows the tabular form to sort and paginate without causing the entire page to refresh. This prevents the plug-in from doing anything in these cases. The built in functionality will continue to work with PPR enabled.
  2. Make sure that the sorting links, pagination links, as well as the “Add” button of the Tabular Form are NOT selected in the No Warning Selector attribute of the plug-in. Again, since PPR is preventing the page from reloading it is not necessary to include these elements. In fact, including them can even cause an issue that prevents the plug-in from working when it should.

    Warning: the default No Warning Selector will include the Add button so make sure to change this. You’ll need to explicitly select the buttons and/or other elements that should allow a user to leave without being warned of unsaved changes.

So how do these two compliment each other? The warning functionality built into Tabular Forms only works when sorting or paginating through the report. But if the user clicks a breadcrumb or closes the browser, then changes will be lost. The plug-in can be used to give the user one last chance to save their changes.

Original Source: http://www.danielmcghan.us/2011/01/working-together-save-before-exit-and.html


Basic Apex scripting - show/hide & labels

Written by Richard Weug on Thursday, 20 January 2011 10:42. Posted in Tips and Tricks

Sometimes the scripting requirements for an Oracle Apex page are fairly simple, yet determining the required modifications can be frustrating, particularly for a beginner in either Apex or HTML behaviours.
Recently I had the requirement of showing or hiding both the label and input item, depending on the selection within a select list.


Adding Tooltips to Report

Written by Richard Weug on Tuesday, 18 January 2011 13:13. Posted in Tips and Tricks

There are a number of ways to publish tooltips in your application, many of them much more verbose than they need to be. Some of them implement fairly fancy JavaScript and CSS, but there is a simple way to plug in the default tooltip behaviour into your Apex reports. When you edit your report column attributes, add the following code into the HTML expression.


Create a favicon

Written by Richard Weug on Monday, 17 January 2011 12:49. Posted in Tips and Tricks

Probably totally superfluous, but a "favicon" is the little picture that shows up in your browser tab or bookmark list - like the example above. The APEX Page Templates support this nice feature by these two lines in the Header property: