Databases Reference
In-Depth Information
browserEvent.currentTarget : This represents the target element to listen
onthat was defined by the APEX developer. browserEvent.target (not shown in
Figure 4-17) represents the exact object that triggered the event. The difference
between the two is subtle, and in this example they appear to be the same, but
there is a difference. Suppose you change the driver for the dynamic action
from a click of the button to a click of the region, as shown in Figure 4-18. Run
the page, and click the Trigger Dynamic Action button. The
browserEvent.currentTarget would be the div element (representing the
region), and the browserEvent.target would be the button element
(representing the exact object that was clicked).
Figure 4-18. Modifying the dynamic action driver
browserEvent.type (not shown in Figure 4-17) :This highlights that it was a click
event that triggered this dynamic action.
data : The data attribute contains additional data that can be passed by the
event handler. An example of this was covered in the previous chapter in the
“Events” section.
triggeringElement : triggeringElement is the DOM object that the dynamic
action listener was applied to. This is the same thing as
browserEvent.currentTarget .
The dynamic action this object is a very important object since the entire JavaScript portion of the
dynamic action relies on its information. In the following example, you'll use some of the elements
discussed earlier in your dynamic action. If you get confused with some of the JavaScript code, you
should come back to review this section.
Example Business Problem
When creating an application, developers need to create pop-up windows for users to view and modify
data. Since some browsers prevent web pages from using traditional pop-up windows (and they're
annoying), you need to create a dialog/modal pop-up window. An example of such a window is the label
help dialog window in APEX, as shown in Figure 4-19.
 
Search WWH ::




Custom Search