Database Reference
In-Depth Information
P2_SUBJECT,P2_DESCR,P2_CREATED_BY
5.
Set
Condition
to
is null
, and click
Next
.
6.
Set
Action
to
Set Style
, and deselect
Fire On Page Load
.
7.
In the
Settings
region, enter
background
for
Style Name
and
pink
for
Value
, and click
Next
.
8.
Set
False Action
to
Set Style
, and deselect
Fire On Page Load
.
9.
In the
Settings
region, enter
background
for
Style Name
and
white
for
Value
, and click
Next
.
10.
Set
Selection Type
to
Triggering Element
, and click
Create Dynamic Ac-
tion
.
By entering a comma-separated list of page items, you indicate that the Lose Focus
event should fire when the user navigates away from any of these items. When the dy-
namic action fires, it checks to see if that item is null and sets it to the appropriate col-
or. The dynamic action knows which item's background color to set by referencing the
triggering element for the affected element.
Run page 2 of the Help Desk application, and tab through each field, leaving them
all blank. You should notice that as you leave a blank field, it immediately turns pink.
If you go back and enter text into a pink field and then navigate away, the background
is set to white.
Note
Depending on the browser you're using, you may see that after the pop-up
message is dismissed, the Subject field turns pink. This has to do with the order of pre-
cedence some browsers give to JavaScript events. Certain browsers place the cursor in
the initial page item prior to raising the
PageLoad
event. Once the
PageLoad
event
fires, the Subject field loses focus, and the
LoseFocus
event fires. When you have
multiple dynamic actions on a page, which you often will, you need to make sure they
don't adversely affect one another.
Dynamic Actions Using PL/SQL
Dynamic actions are architected to be an extensible framework, giving the developer
full control over coding complex actions that might not be available in a purely declar-
ative environment. In the spirit of UI usability, you should help the user adhere to the