Databases Reference
In-Depth Information
FUNCTION password 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
Next, local variables are declared. Some of the local variables are used simply to provide better
names for the attribute values that are passed into the function. Many of these values will simply be
mapped through to the jQuery UI widget created later.
IS
l retval APEX PLUGIN.T PAGE ITEM RENDER RESULT;
l name VARCHAR2(30);
l submit on enter VARCHAR2(1) := NVL(p item.attribute 01, 'Y');
l message icon VARCHAR2(20) := NVL(p item.attribute 02, 'ui-icon-alert');
l message text VARCHAR2(500) := NVL(p item.attribute 03, 'Caps Lock is enabled.');
l message width PLS INTEGER := NVL(p item.attribute 04, 150);
l message alignment VARCHAR2(20) := NVL(p item.attribute 05, 'center bottom');
l password alignment VARCHAR2(20) := NVL(p item.attribute 06, 'center top');
l offset VARCHAR2(20) := NVL(p item.attribute 07, '0');
l jqueryui theme VARCHAR2(30) := p plugin.attribute 01;
l onload code VARCHAR2(32767);
l crlf CHAR(2) := CHR(13)||CHR(10);
The following lines begin the execution section of the function. If the application is running in
debug mode then a call to APEX PLUGIN UTIL.DEBUG PROCESS is made to log debug information.
BEGIN
IF apex application.g debug
THEN
apex plugin util.debug page item (
p plugin => p plugin,
p page item => p item
);
END IF;
Unlike most items, the value of a password item should not be displayed if the item is running as
read only or the page is running in printer friendly mode.
IF p is readonly OR p is printer friendly
THEN
NULL;--Password should not be displayed
If the item is not running as read only and printer friendly mode is not on, then the main plug-in
logic is executed. The first step is to include a JavaScript file that will later be stored as part of the plug-in.
Search WWH ::




Custom Search