Posts tagged javascript
ADF 11g – Extend and Override standard client side behavior by manipulating the Javascript prototype
Dec 8th
This article describes a way to extend and override the standard behavior of ADF client side JavaScript libraries. In this particular case we needed to learn about the client side validation errors in order to feed our expertise manager: when the user submits the form, client side validations are performed and when errors are found, these are presented to the end user. We would like to intercept this standard flow and also listen in to the list of validation error messages that will be shown to the end user.
A little debugging using Firefox quickly made it clear that the submitForm() method is invoked when a command button is activated and that it in turn (indirectly) makes use of the function processValidators() on the AdfHtmlPage object. This function will return true or false, depending on whether any validation error messages were produced by the collected validators that fire.
We can extend this function – without having to change any of the source code. The standard JavaScript way of overriding a method on an object is through the prototype of that object – and a reference to the original function.
The steps are:
Using asynchronous mechanisms in Java and JavaScript for improving the user experience
Feb 23rd
In this article, we will continue a discussion on asynchronous processing started in a previous article that introduced asynchronous and parallel processing Java using Executors, Futures, Callable Objects and the underlying thread model in Java 5 and 6.
While a stand alone Java application – without UI – is a rare thing in my world, a Java Web application certainly is not. And performance, especially perceived performance, is pretty important in that world. The first page load is the most important measure I suppose for what the user feels is the performance of the web application. The fact that after the initial load, additional elements can be loaded into the page – asynchronously – is fine. The intial page load and the browser’s indication that the load is done (and the hourglass disappears) is what is most important for the happiness of the user.
We will see three stages in this article, of a very simple web page. It is a JSF (JavaServer Faces) page, that contains some very simple elements of which one displays an ‘expensive’ value – a value that takes some time to get hold of. Maybe because a database query is involved or web service is called. Whatever the cause, this one element is expensive. Read the rest of this entry »
ADF 11g – reducing the price of richness or how to streamline downloading Javascript Resources for ADF 11g Rich Client components
Jan 7th
When you run a ADF Faces 11g Rich Client components application, you (or rather your users) are hit with a substantial JavaScript download overhead. It is not surprising, given the richness of the component library. However, especially for internet applications targeted at external users – consumers, customers – it may be very undesirable to have them wait up to several seconds for this download to complete.
The default splash-page that displays during the load of the Javascript surely looks familiar. (note: the resources section of this article has a reference to an article by Frank Nimphius that explains how to get rid of the splash-page -or modify it-; however, that does not take away the download overhead itself unfortunately).
Especially if the first page in the web application does not really use all that much richness to begin with. It is not uncommon to have a homepage that is largely static, pretty and heavily styled through CSS with perhaps a global search item, a couple of navigation links or buttons and maybe some newsfeeds or special offers. Or to start the application with a fairly simple login page.
This article describes how to reduce the (initial) download size to have the first page in an ADF 11g Rich Client Faces application display much more rapidly.


