Databases Reference
In-Depth Information
050-077 : Display the dialog window; stores the visible state of the object before
it is converted to a dialog window. This is necessary to restore the window as
defined by one of the plug-in's custom attributes.
This code also supports custom event binding. For example, line 057 will trigger
a custom event, which other APEX dynamic actions can leverage. This is
defined in the Events region in the plug-in.
On line 080, the element is moved into a wrapper. This is to ensure that the
page items remain in the same order that they were loaded on the page. For
more information, see the forum posting at the beginning of the file.
085-103 : Set private variables for the widget; note that, though they appear to
be private variables, if end users really wanted to modify them, they could.
105-140 : Create function that creates a wrapper for the affected element; the
_init functionrequires the wrapper to protect the order of the object in the
DOM.
142-170 : This is static code that acts as the middle man between the call from
APEX and the UI Widget. daDialog does not require any parameters since it
obtains all the necessary information from the this object.
The variable daThis refers to the dynamic action this variable, which contains
everything about the dynamic action.
Lines 156-159 reference the dynamic action attributes. Again, these are not the
same as the plug-in's custom attributes. They are defined in the returned
PL/SQL object.
Since the dynamic actions attributes are passed as strings, they need to be
explicitly converted to JavaScript objects (when applicable). Lines 156-157
convert attributes from strings to JavaScript Booleans.
Line 162 references the affectedElements to apply the JavaScript code to. The
JavaScript code does not necessarily care if the affected element(s) is a region or
a jQuery Selector, etc. APEX gives it an array of objects to work with.
Testing It Out
Since you have completed all the code and configuration, and built a good test page, it's time to test your
plug-in. To start, refresh Page 20. It should look like Figure 4-33. The most noticeable difference is that
the Employee report is hidden since it was one of the plug-in's configuration options.
 
Search WWH ::




Custom Search