Databases Reference
In-Depth Information
l result APEX PLUGIN.T DYNAMIC ACTION RENDER RESULT;
BEGIN
IF apex application.g debug
THEN
apex plugin util.debug dynamic action(
p plugin => p plugin,
p dynamic action => p dynamic action
);
END IF;
apex javascript.add library(
p name => 'com pluggen save value on cascade',
p directory => p plugin.file prefix,
p version => NULL
);
apex javascript.add onload code(
p code => 'apex.jQuery(document).save value on casdade();'
);
l result.javascript function :=
'function(){' ||
' if (this.browserEvent === ''load''){' ||
' apex.jQuery(document).save value on casdade(''initItem'', this);' ||
' }' ||
'}';
RETURN l result;
END save value render;
Listing 11-3. jQuery UI Widget for the Save Value on Cascade Plug-in
(function($){
$.widget("ui.save value on casdade", {
initItem: function(apexThis) {
var uiw = this;
apexThis.affectedElements.each(function() {
var $this = $(this);
$this
.data('value-saved', $v($this.attr('id')))
.bind('change', function() {
$this.data('value-saved', $v($this.attr('id')));
})
.bind('apexafterrefresh', function() {
uiw. restoreValue($this);
});
});
Search WWH ::




Custom Search