 |
|
Oracle Tips by Burleson |
User
Interface
Template
This defines the template that will be used to
determine the look of the region.
Display Point
Display points are explained in more detail in a
later chapter of this book.
Region HTML table cell attributes
This attribute is only used when there are
multiple regions displayed side by side. For example, if there are
three regions lined up from left to right instead of top to bottom,
regions are across multiple columns. In that case, this attribute can
be used to add additional attributes to the region, such as aligning
them vertically to the top of the row. This would be accomplished by
entering valign=”top” for this attribute. To have them display right
next to each other, a width would have to be entered on the region to
the left that is small enough to allow the region on the right room to
move over. To accomplish this, enter width=”200” for this attribute.
Source
This is the source code used to populate the
region. Depending on whether the user is viewing a report based on a
Structured Query, an SQL Query, a Chart, a Calendar, etc. this region
will display differently. For example, a Structured Query is not
editable except by using the Query Definition tab. If the report is
based on an SQL Query, the source region will provide a text area for
editing the SQL statement for the report. This is assuming the region
type is SQL Query or a similar type as explained above in the Name
section. For charts, a Build Query button is provided to guide users
through building the SQL statement used to populate the chart.
Conditional Display
The tutorials in this book will provide ample
exposure to the user of this attribute, so there will be plenty of
opportunities to gain experience with it. There are far too many
condition types to explain in detail, but some of the more commonly
used conditions are explained in order to provide an understanding of
when and where it might be desirable to use them.
The conditional display is used to prevent the
rendering of a particular region or page item. Conditions are meant
to return a TRUE or FALSE value. TRUE is the default and if returned,
the region or page item is rendered. A return value of FALSE will
prevent the rendering. Table 6.4 shows the most popular condition
types for the conditional display.
|
CONDITION TYPE |
DESCRIPTION |
|
-No Condition - |
The Default. This will cause the component
to always be rendered. |
|
Exists (SQL query returns at least one row. |
This is very common for use when it is
desirable to only display a component if a record exists in the
database. A common use would be for verifying the user is an
administrator. |
|
NOT Exists (SQL query returns no rows) |
This is the reverse of the previous item. If
a row were to be returned by the query, it would result in a FALSE
answer and the component would not be rendered. |
|
SQL Expression |
This is similar
to the WHERE clause in an SQL statement.
A good use for
this is when none of the other condition types meets your need.
For example: you may want to have a condition that the page must
be equal to 101 and it is not in print friendly mode. This is
similar to having two conditions work together to return a true of
false value. |
|
Request = Expression1 |
This condition type is mostly used during
page processing on conditions, validations, and processes. For
example, a computation does not have a condition where you can
specify the button from a select list. So, for computations you
would have to use this type of a condition. |
|
Value of Item in expression 1 Is NULL |
This type of condition is commonly used on
buttons such as a Create or Insert. Let’s say you have a page
item on a form named P100_CUSTOMER_ID. If that page item is NULL
then it would indicate this is a new customer and you would want
the Create or Insert buttons to be rendered. This is exactly how
the HTML DB wizards setup a form created by a wizard. |
|
Value of Item in expression 1 Is NOT NULL |
This type of condition is commonly used on
buttons such as a Update or Delete. Let’s say you have a page
item on a form named P100_CUSTOMER_ID. If the page item has a
value then the customer already exists and you would want the
Update and Delete buttons to be rendered. This is exactly how the
HTML DB wizards setup a form created by a wizard. |
|
Current Page Is Contained Within Expression 1 |
For this condition you provide a comma
delimited list of application page IDs. This type of condition
would be used to display Lists or Tabs only for a select list of
pages. |
|
Current page is NOT in Printer Friendly Mode |
This condition type is often used on the
application page referred to as Page 0 (zero). It is common to
display a banner at the top of the page using an after header
region. You would use this condition to prevent the region from
being rendered when the user put it into the Printer Friendly
mode. |
|
User is Authenticated |
In the event there is a page that is public
and does not require authentication. However, that page is also
used by authenticated users. You have one region on the page that
you only want to be displayed if the user is authenticated while
the rest of the regions can display in either condition. For that
one region you could use this type of condition. I’ve used this
type of region on a page so I could see auditing information, but
it would not be displayed to the public. |
|
Never |
This will prevent the component from being
rendered. It’s also used to prevent a branch, computation,
validation, or process from being executed. I’ve most often used
this computation to prevent certain processes from running while I
test an application page. |
Table 6.4:
Conditional display types
The above book excerpt is from:
Easy HTML-DB
Oracle Application Express
Create Dynamic
Web Pages with OAE
ISBN 0-9761573-1-4
Michael Cunningham & Kent
Crotty
http://www.rampant-books.com/book_2005_2_html_db.htm
|