apex5 plugins for everyone - kscope16
TRANSCRIPT
![Page 1: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/1.jpg)
![Page 2: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/2.jpg)
APEX 5 plugins for everyone
Alan Arentsen�
![Page 3: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/3.jpg)
@alanarentsen
alanarentsen.blogspot.com
![Page 4: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/4.jpg)
![Page 5: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/5.jpg)
![Page 6: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/6.jpg)
![Page 7: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/7.jpg)
![Page 8: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/8.jpg)
![Page 9: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/9.jpg)
![Page 10: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/10.jpg)
![Page 11: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/11.jpg)
Authentication Scheme Type
Authorization Scheme Type
Dynamic Action
Item
Process
Region
![Page 12: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/12.jpg)
� Plug-in Repository
� Create from scratch
� Copy of existing Plug-in
![Page 13: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/13.jpg)
Plug-in Repository
![Page 14: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/14.jpg)
![Page 15: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/15.jpg)
![Page 16: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/16.jpg)
![Page 17: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/17.jpg)
� � �
![Page 18: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/18.jpg)
![Page 19: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/19.jpg)
![Page 20: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/20.jpg)
![Page 21: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/21.jpg)
![Page 22: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/22.jpg)
![Page 23: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/23.jpg)
![Page 24: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/24.jpg)
![Page 25: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/25.jpg)
![Page 26: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/26.jpg)
![Page 27: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/27.jpg)
![Page 28: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/28.jpg)
![Page 29: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/29.jpg)
![Page 30: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/30.jpg)
![Page 31: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/31.jpg)
![Page 32: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/32.jpg)
![Page 33: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/33.jpg)
�
DEMDEMDEMDEM�
![Page 34: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/34.jpg)
� Plug-in Repository
� Create from scratch
� Copy of existing Plug-in
![Page 35: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/35.jpg)
Create from scratch
![Page 36: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/36.jpg)
apex.item("P1_STANDARD_CHECK").getValue()
'On'
![Page 37: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/37.jpg)
apex.item("P1_STANDARD_CHECK").getValue()
null
![Page 38: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/38.jpg)
apex.item("P1_STANDARD_CHECK").getValue()
null
![Page 39: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/39.jpg)
apex.item("P1_STANDARD_CHECK").getValue()
'Off'
![Page 40: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/40.jpg)
<input type="checkbox"
id="P1_PLUGIN_CHECK"
class="custom_checkbox"
value="" />
<input type="hidden"
id="P1_PLUGIN_CHECK_HIDDEN"
name="p_t01"
value="Off" />
<label for="P1_PLUGIN_CHECK">Does this work?</label>
![Page 41: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/41.jpg)
<input type="checkbox"
id="P1_PLUGIN_CHECK"
class="custom_checkbox"
value="" />
<input type="hidden"
id="P1_PLUGIN_CHECK_HIDDEN"
name="p_t01"
value="Off" />
<label for="P1_PLUGIN_CHECK">Does this work?</label>
![Page 42: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/42.jpg)
<input type="checkbox"
id="P1_PLUGIN_CHECK"
class="custom_checkbox"
value="" />
<input type="hidden"
id="P1_PLUGIN_CHECK_HIDDEN"
name="p_t01"
value="Off" />
<label for="P1_PLUGIN_CHECK">Does this work?</label>
![Page 43: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/43.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
var g$Checkbox = $('#' + pPageItemName),
g$Hidden = $('#' + pPageItemName + '_HIDDEN');
function syncHiddenField() {
g$Hidden.val((g$Checkbox.is(':checked') === true) ?
pOptions.checked :
pOptions.unchecked);
};
...
};
![Page 44: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/44.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
var g$Checkbox = $('#' + pPageItemName),
g$Hidden = $('#' + pPageItemName + '_HIDDEN');
function syncHiddenField() {
g$Hidden.val((g$Checkbox.is(':checked') === true) ?
pOptions.checked :
pOptions.unchecked);
};
...
};
![Page 45: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/45.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
var g$Checkbox = $('#' + pPageItemName),
g$Hidden = $('#' + pPageItemName + '_HIDDEN');
function syncHiddenField() {
g$Hidden.val((g$Checkbox.is(':checked') === true) ?
pOptions.checked :
pOptions.unchecked);
};
...
};
![Page 46: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/46.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
var g$Checkbox = $('#' + pPageItemName),
g$Hidden = $('#' + pPageItemName + '_HIDDEN');
function syncHiddenField() {
g$Hidden.val((g$Checkbox.is(':checked') === true) ?
pOptions.checked :
pOptions.unchecked);
};
...
};
![Page 47: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/47.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
...
$('#' + pPageItemName).change(syncHiddenField);
...
};
![Page 48: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/48.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
...
$('#' + pPageItemName).change(syncHiddenField);
$(document).bind('apexbeforepagesubmit', syncHiddenField);
...
};
![Page 49: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/49.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
...
apex.widget.initPageItem(pPageItemName, {
setValue: function(pValue) {
g$Checkbox.attr('checked'
,(pValue === pOptions.checked));
syncHiddenField();
},
getValue:function() {
return g$Hidden.val();
}
});
};
![Page 50: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/50.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
...
apex.widget.initPageItem(pPageItemName, {
setValue: function(pValue) {
g$Checkbox.attr('checked'
,(pValue === pOptions.checked));
syncHiddenField();
},
getValue:function() {
return g$Hidden.val();
}
});
};
![Page 51: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/51.jpg)
function custom_checkbox (pPageItemName, pOptions)
{
...
apex.widget.initPageItem(pPageItemName, {
setValue: function(pValue) {
g$Checkbox.attr('checked'
,(pValue === pOptions.checked));
syncHiddenField();
},
getValue:function() {
return g$Hidden.val();
}
});
};
![Page 52: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/52.jpg)
![Page 53: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/53.jpg)
![Page 54: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/54.jpg)
![Page 55: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/55.jpg)
![Page 56: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/56.jpg)
![Page 57: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/57.jpg)
![Page 58: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/58.jpg)
![Page 59: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/59.jpg)
![Page 60: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/60.jpg)
![Page 61: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/61.jpg)
![Page 62: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/62.jpg)
![Page 63: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/63.jpg)
![Page 64: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/64.jpg)
![Page 65: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/65.jpg)
![Page 66: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/66.jpg)
function <name of function> (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean
) return apex_plugin.t_page_item_render_result
![Page 67: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/67.jpg)
function <name of function> (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean
) return apex_plugin.t_page_item_render_result
![Page 68: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/68.jpg)
function <name of function> (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean
) return apex_plugin.t_page_item_render_result
![Page 69: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/69.jpg)
function <name of function> (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean
) return apex_plugin.t_page_item_render_result
![Page 70: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/70.jpg)
function <name of function> (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean
) return apex_plugin.t_page_item_render_result
![Page 71: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/71.jpg)
function <name of function> (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean
) return apex_plugin.t_page_item_render_result
![Page 72: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/72.jpg)
function <name of function> (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean
) return apex_plugin.t_page_item_render_result
![Page 73: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/73.jpg)
function render (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean)
return apex_plugin.t_page_item_render_result is
begin
...
end render;
![Page 74: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/74.jpg)
function render (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean)
return apex_plugin.t_page_item_render_result is
--Use named variables
--instead of the generic attribute variables
l_checked_value varchar2(255) := nvl(p_item.attribute_01
,'On');
l_unchecked_value varchar2(255) := p_item.attribute_02;
l_checked_label varchar2(4000) := p_item.attribute_03;
begin
...
end render;
![Page 75: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/75.jpg)
function render (
p_item in apex_plugin.t_page_item,
p_plugin in apex_plugin.t_plugin,
p_value in varchar2,
p_is_readonly in boolean,
p_is_printer_friendly in boolean)
return apex_plugin.t_page_item_render_result is
--Use named variables
--instead of the generic attribute variables
l_checked_value varchar2(255) := nvl(p_item.attribute_01
,'On');
l_unchecked_value varchar2(255) := p_item.attribute_02;
l_checked_label varchar2(4000) := p_item.attribute_03;
begin
...
end render;
![Page 76: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/76.jpg)
![Page 77: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/77.jpg)
![Page 78: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/78.jpg)
custom_checkbox.js
![Page 79: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/79.jpg)
begin
...
-- Add the JavaScript library
apex_javascript.add_library(
p_name => 'custom_checkbox'
,p_directory => p_plugin.file_prefix ||
'javascript/'
,p_version => null
);
...
end render;
![Page 80: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/80.jpg)
-- Add the JavaScript library
apex_javascript.add_library(
p_name => 'custom_checkbox'
,p_directory => p_plugin.file_prefix ||
'javascript/'
,p_version => null
);
![Page 81: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/81.jpg)
custom_checkbox ('P1_PLUGIN_CHECK'
,{'unchecked':'Off','checked':'On'});
function custom_checkbox (pPageItemName, pOptions){...};
![Page 82: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/82.jpg)
pPageItemName
apex_javascript.add_value(p_item.name)
'P1_PLUGIN_CHECK',
![Page 83: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/83.jpg)
pOptions
apex_javascript.add_attribute('unchecked'
,l_unchecked_value
,false)
'unchecked':'Off',
![Page 84: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/84.jpg)
begin
...
-- Add the call to initialize the widget
l_code := 'custom_checkbox(' ||
apex_javascript.add_value(p_item.name) || '{' ||
apex_javascript.add_attribute('unchecked'
,l_unchecked_value
,false) ||
apex_javascript.add_attribute('checked'
,l_checked_value
,false
,false) || '});';
apex_javascript.add_onload_code(p_code => l_code);
...
end render;
![Page 85: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/85.jpg)
begin
...
-- Add the call to initialize the widget
l_code := 'custom_checkbox(' ||
apex_javascript.add_value(p_item.name) || '{' ||
apex_javascript.add_attribute('unchecked'
,l_unchecked_value
,false) ||
apex_javascript.add_attribute('checked'
,l_checked_value
,false
,false) || '});';
apex_javascript.add_onload_code(p_code => l_code);
...
end render;
![Page 86: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/86.jpg)
begin
...
-- Add the call to initialize the widget
l_code := 'custom_checkbox(' ||
apex_javascript.add_value(p_item.name) || '{' ||
apex_javascript.add_attribute('unchecked'
,l_unchecked_value
,false) ||
apex_javascript.add_attribute('checked'
,l_checked_value
,false
,false) || '});';
apex_javascript.add_onload_code(p_code => l_code);
...
end render;
![Page 87: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/87.jpg)
begin
...
-- Add the call to initialize the widget
l_code := 'custom_checkbox(' ||
apex_javascript.add_value(p_item.name) || '{' ||
apex_javascript.add_attribute('unchecked'
,l_unchecked_value
,false) ||
apex_javascript.add_attribute('checked'
,l_checked_value
,false
,false) || '});';
apex_javascript.add_onload_code(p_code => l_code);
...
end render;
![Page 88: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/88.jpg)
begin
...
-- Add the call to initialize the widget
l_code := 'custom_checkbox(' ||
apex_javascript.add_value(p_item.name) || '{' ||
apex_javascript.add_attribute('unchecked'
,l_unchecked_value
,false) ||
apex_javascript.add_attribute('checked'
,l_checked_value
,false
,false) || '});';
apex_javascript.add_onload_code(p_code => l_code);
...
end render;
![Page 89: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/89.jpg)
begin
...
-- Add the call to initialize the widget
l_code := 'custom_checkbox(' ||
apex_javascript.add_value(p_item.name) || '{' ||
apex_javascript.add_attribute('unchecked'
,l_unchecked_value
,false) ||
apex_javascript.add_attribute('checked'
,l_checked_value
,false
,false) || '});';
apex_javascript.add_onload_code(p_code => l_code);
...
end render;
![Page 90: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/90.jpg)
![Page 91: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/91.jpg)
<input type="hidden"
id="P1_PLUGIN_CHECK_HIDDEN"
name="p_t01"
value="Off" />
<input type="checkbox"
id="P1_PLUGIN_CHECK"
class="custom_checkbox"
value="" />
<label for="P1_PLUGIN_CHECK">Does this work?</label>
![Page 92: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/92.jpg)
sys.htp.prn()
<input type="hidden"
id="P1_PLUGIN_CHECK_HIDDEN"
name="p_t01"
value="Off" />
![Page 93: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/93.jpg)
begin
...
-- Get the name of the page item
l_name := apex_plugin.get_input_name_for_page_item(false);
-- Render the hidden field
-- which actually stores the checkbox value
sys.htp.prn('<input type="hidden" ' ||
'id="' || p_item.name || '_HIDDEN" ' ||
'name="' || l_name || '" ' ||
'value="' || p_value || '" />');
...
end render;
![Page 94: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/94.jpg)
begin
...
-- Get the name of the page item
l_name := apex_plugin.get_input_name_for_page_item(false);
-- Render the hidden field
-- which actually stores the checkbox value
sys.htp.prn('<input type="hidden" ' ||
'id="' || p_item.name || '_HIDDEN" ' ||
'name="' || l_name || '" ' ||
'value="' || p_value || '" />');
...
end render;
![Page 95: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/95.jpg)
begin
...
-- Get the name of the page item
l_name := apex_plugin.get_input_name_for_page_item(false);
-- Render the hidden field
-- which actually stores the checkbox value
sys.htp.prn('<input type="hidden" ' ||
'id="' || p_item.name || '_HIDDEN" ' ||
'name="' || l_name || '" ' ||
'value="' || p_value || '" />');
...
end render;
![Page 96: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/96.jpg)
begin
...
-- Get the name of the page item
l_name := apex_plugin.get_input_name_for_page_item(false);
-- Render the hidden field
-- which actually stores the checkbox value
sys.htp.prn('<input type="hidden" ' ||
'id="' || p_item.name || '_HIDDEN" ' ||
'name="' || l_name || '" ' ||
'value="' || p_value || '" />');
...
end render;
![Page 97: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/97.jpg)
begin
...
-- Get the name of the page item
l_name := apex_plugin.get_input_name_for_page_item(false);
-- Render the hidden field
-- which actually stores the checkbox value
sys.htp.prn('<input type="hidden" ' ||
'id="' || p_item.name || '_HIDDEN" ' ||
'name="' || l_name || '" ' ||
'value="' || p_value || '" />');
...
end render;
![Page 98: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/98.jpg)
sys.htp.prn()
<input type="checkbox"
id="P1_PLUGIN_CHECK"
class="custom_checkbox"
value="" />
![Page 99: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/99.jpg)
begin
...
-- render the checkbox widget
sys.htp.prn('<input type="checkbox" ' ||
'id="' || p_item.name || '" ' ||
'value="' || p_value || '" ' ||
case
when p_value = l_checked_value
then 'checked="checked" '
end ||
coalesce(p_item.element_attributes
,'class="simple_checkbox"') || ' />');
...
end render;
![Page 100: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/100.jpg)
begin
...
-- render the checkbox widget
sys.htp.prn('<input type="checkbox" ' ||
'id="' || p_item.name || '" ' ||
'value="' || p_value || '" ' ||
case
when p_value = l_checked_value
then 'checked="checked" '
end ||
coalesce(p_item.element_attributes
,'class="simple_checkbox"') || ' />');
...
end render;
![Page 101: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/101.jpg)
begin
...
-- render the checkbox widget
sys.htp.prn('<input type="checkbox" ' ||
'id="' || p_item.name || '" ' ||
'value="' || p_value || '" ' ||
case
when p_value = l_checked_value
then 'checked="checked" '
end ||
coalesce(p_item.element_attributes
,'class="simple_checkbox"') || ' />');
...
end render;
![Page 102: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/102.jpg)
begin
...
-- render the checkbox widget
sys.htp.prn('<input type="checkbox" ' ||
'id="' || p_item.name || '" ' ||
'value="' || p_value || '" ' ||
case
when p_value = l_checked_value
then 'checked="checked" '
end ||
coalesce(p_item.element_attributes
,'class="simple_checkbox"') || ' />');
...
end render;
![Page 103: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/103.jpg)
begin
...
-- render the checkbox widget
sys.htp.prn('<input type="checkbox" ' ||
'id="' || p_item.name || '" ' ||
'value="' || p_value || '" ' ||
case
when p_value = l_checked_value
then 'checked="checked" '
end ||
coalesce(p_item.element_attributes
,'class="simple_checkbox"') || ' />');
...
end render;
![Page 104: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/104.jpg)
sys.htp.prn()
<label for="P1_PLUGIN_CHECK">Does this work?</label>
![Page 105: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/105.jpg)
begin
...
-- print label after checkbox
if l_checked_label is not null
then
sys.htp.prn('<label for="' || p_item.name || '">' ||
l_checked_label || '</label>');
end if;
...
end render;
![Page 106: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/106.jpg)
begin
...
-- print label after checkbox
if l_checked_label is not null
then
sys.htp.prn('<label for="' || p_item.name || '">' ||
l_checked_label || '</label>');
end if;
...
end render;
![Page 107: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/107.jpg)
begin
...
-- print label after checkbox
if l_checked_label is not null
then
sys.htp.prn('<label for="' || p_item.name || '">' ||
l_checked_label || '</label>');
end if;
...
end render;
![Page 108: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/108.jpg)
function render (...)
return apex_plugin.t_page_item_render_result is
l_result apex_plugin.t_page_item_render_result;
begin
...
return l_result;
end render;
![Page 109: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/109.jpg)
![Page 110: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/110.jpg)
![Page 111: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/111.jpg)
![Page 112: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/112.jpg)
![Page 113: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/113.jpg)
![Page 114: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/114.jpg)
DEMDEMDEMDEM��
![Page 115: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/115.jpg)
� Plug-in Repository
� Create from scratch
� Copy of existing Plug-in
![Page 116: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/116.jpg)
Copy of existing Plug-in
![Page 117: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/117.jpg)
on off
![Page 118: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/118.jpg)
on off
![Page 119: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/119.jpg)
.fancy_checkbox {
width: 80px;
height: 26px;
background: #333;
margin: 20px auto;
position: relative;
border-radius: 50px;
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 0.2);
}
![Page 120: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/120.jpg)
.fancy_checkbox:after {
content: 'OFF';
color: #000;
position: absolute;
right: 10px;
z-index: 0;
font: 12px/26px Arial, sans-serif;
font-weight: bold;
text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.15);
}
![Page 121: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/121.jpg)
.fancy_checkbox:before {
content: 'ON';
color: #27ae60;
position: absolute;
left: 10px;
z-index: 0;
font: 12px/26px Arial, sans-serif;
font-weight: bold;
}
![Page 122: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/122.jpg)
.fancy_checkbox label {
display: block;
width: 34px;
height: 20px;
cursor: pointer;
position: absolute;
top: 3px;
left: 3px;
z-index: 1;
background: #fcfff4;
background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
border-radius: 50px;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.3);
}
![Page 123: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/123.jpg)
.fancy_checkbox input[type=checkbox] {
visibility: hidden;
}
.fancy_checkbox input[type=checkbox]:checked + label {
left: 43px;
}
![Page 124: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/124.jpg)
<input type="checkbox"
id="P1_PLUGIN_CHECK"
class="custom_checkbox"
value="" />
<label for="P1_PLUGIN_CHECK">Does this work?</label>
![Page 125: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/125.jpg)
<div class="fancy_checkbox">
<input type="checkbox"
id="P1_PLUGIN_CHECK"
class="custom_checkbox"
value="" />
<label for="P1_PLUGIN_CHECK">Does this work?</label>
</div>
![Page 126: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/126.jpg)
![Page 127: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/127.jpg)
![Page 128: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/128.jpg)
![Page 129: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/129.jpg)
![Page 130: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/130.jpg)
begin
...
-- render the checkbox widget
sys.htp.prn('<div class="fancy_checkbox"> ' ||
'<input type="checkbox" ' ||
'id="' || p_item.name || '" ' ||
'value="' || p_value || '" ' ||
case
when p_value = l_checked_value
then 'checked="checked" '
end ||
coalesce(p_item.element_attributes
,'class="simple_checkbox"') || ' />');
...
end render;
![Page 131: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/131.jpg)
begin
...
-- print label after checkbox
sys.htp.prn('<label for="' || p_item.name || '">' ||
l_checked_label || '</label>');
sys.htp.prn('</div>');
...
end render;
![Page 132: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/132.jpg)
![Page 133: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/133.jpg)
fancy_checkbox.css
![Page 134: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/134.jpg)
![Page 135: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/135.jpg)
![Page 136: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/136.jpg)
begin
...
-- Add the css file
apex_css.add_file(
p_name => 'fancy_checkbox'
,p_directory => p_plugin.file_prefix ||
'css/'
);
...
end render;
![Page 137: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/137.jpg)
-- Add the css file
apex_css.add_file(
p_name => 'fancy_checkbox'
,p_directory => p_plugin.file_prefix ||
'css/'
);
![Page 138: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/138.jpg)
![Page 139: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/139.jpg)
DEMDEMDEMDEM��
![Page 140: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/140.jpg)
-- Add the JavaScript library
apex_javascript.add_library(
p_name => 'custom_checkbox'
,p_directory => p_plugin.file_prefix ||
'javascript/'
,p_version => null
);
-- Add the css file
apex_css.add_file(
p_name => 'fancy_checkbox'
,p_directory => p_plugin.file_prefix ||
'css/'
);
![Page 141: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/141.jpg)
� Plug-in Repository
� Create from scratch
� Copy of existing Plug-in
![Page 142: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/142.jpg)
![Page 143: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/143.jpg)
![Page 144: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/144.jpg)
�
https://apex.world
http://apex-plugin.com
![Page 145: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/145.jpg)
�https://docs.oracle.com/
cd/E59726_01/index.htm
http://www.oracle.com/technetwork/
developer-tools/apex/application-
express/apex-plug-ins-182042.html
![Page 147: APEX5 plugins for everyone - KScope16](https://reader034.vdocument.in/reader034/viewer/2022052705/58e686781a28ab6a5b8b58d3/html5/thumbnails/147.jpg)
Join Your Community!Tonight from 8:00 – 10:00 in Sheraton III
APEX Open Mic NightOften described as “APEX meets improv,” the APEX Open Mic Night
combines the elements of your favorite bar and comedy club with a
Kscope flair, all while you spend time with your favorite colleagues
from the APEX Community. The event gives participants 15 minutes
each to present ideas and discoveries that can make life easier for
others.