Quantcast
Channel: OmniFaces & JSF Fans
Viewing all articles
Browse latest Browse all 74

[OmniFaces utilities 2.3] Load given script resource on complete of the current ajax response

$
0
0

[OmniFaces utilities] The load() method loads the given script resource on complete of the current ajax response. Basically, it loads the script resource as String and then delegates it to #oncomplete(String...).

Method:
Usage:

Let's suppose that we have a script file named foo.js in the default library. Now, programmatically we can load this file at the end of the current AJAX request (at on complete) as below:

import org.omnifaces.util.Ajax;
...
Ajax.load("default","foo.js");


Viewing all articles
Browse latest Browse all 74

Trending Articles