Professional Documents
Culture Documents
Query Zones
15 - 2
15
Query Zone
Info Zone
15 - 4
15
Portal
15 - 6
User Group
Application
Service/
User Group
User
User Group
/ User
Menu
Navigation
Option
Portal
Menu Line
Menu Item
15
15 - 10
Zone
Zone
15 - 11
Zone Type
Parameter
Type
These are a sample
of the parameters
required to render an
info zone
Zone
Zone
Parameter
Parameter
A zones parameters
control what data is
retrieved and how it is
displayed
name=ACCT_ID datasource=G
name=PER_ID datasource=G
24
24
200
200
C1 C2
C1 C2
SQL 1
Column 1
source=SQLCOL sqlcol=1
source=SQLCOL sqlcol=1
Column 2
source=FKREF fkref=BILL
source=FKREF fkref=CC ID
Filter 1
Filter 2
Filter
Hidden Filter 1
Hidden Filter 2
Hidden Filter
Column 3
15 - 12
For example, when you populate the zone parameter to define a column on a query zone, youll specify
several mnemonics
15 - 13
15 - 14
Configuration Mode
In an earlier section, you learned how debug mode is
used when you want logs of script steps to be recorded
for debugging purposes
You can use this same mode to facilitate zone set up
15 - 15
Special options appear in each zone's tool bar to help you debug
your zone configuration (youll see these in the next walk thru)
Copyright 2009, Oracle. All rights reserved.
Add a very simple query zone to your portal to look for persons with
an input name
Note, you should be familiar with the person data model before doing
this exercise (we'll just be using CI_PER_NAME table)
Again, your workbook has the answer, but we'd recommend trying to
work it out on your own before peeking
15 - 16
15
Dynamic SQL
To support this type of zone, the SQL's WHERE clause can be authored to
include additional criteria if a given filter value is non-blank
Our scenario's SQL could now be authored as follows:
SELECT CLAIM_ID
FROM C1_CLAIM
WHERE CLAIM_DT >= :F1
[(F2) AND CLAIM_DT <= :F2]
For example, what if a user can search for claims with a claim date between a date
range and the end date is optional
The SELECT clause (to include mutually exclusive columns based on filter values)
the FROM clause (to include additional join criteria based on optional filter values)
See the SQL zone parameter's adjacent help info for the exact syntax
15 - 19
15
15 - 21
15
source=
You used a value
of source=FKREF
when you set up
your query zone
There are many
other values
The tips are
always up-to-date
with the supported
functions
15 - 23
15 - 24
15
15 - 26
The multi-query zone contains a drop down that lists each of the
simple query zone
This multi-query zone references 7
simple query zones
15 - 27
15 - 28
15
Portal Preferences
15 - 30
15 - 32
Zone Type
Zone
User
Portal
Portal /
Zone /
User
Portal /
Zone
A zone can be referenced on any
number of portals
15 - 33
15
For query zones, the number of columns (and their headings) is dependent
on the SQL statement that is executed. This means that the columns can
be radically different depending on the SQL that is executed
This is why drag and drop isn't available on query zones (the fields can be
completely different on the different SQL statements)
Info zones are triggered when a portal first opens and whenever
broadcasting occurs; query zones are not triggered when a portal first
opens (the user has to press Refresh after entering search criteria)
15 - 35
15
Zone Security
If your implementation gives all users access to all zones, simply set
up a single "dummy" application service and define it on all of your
zones
This way, you only have to grant security rights to this dummy
application service once
Application
Service
Zone
15 - 37
User Group
Application
Service/
User Group
User
User Group
/ User
15 - 38
15 - 39
15
Note, you can also use this technique for info zones with
filters
15 - 41
Schema
The scripts
schema defines its
input and output
<name/>
<driversLicense/>
Step
15 - 42
Again, the answers are in your workbook, but you should try to work it out
before peeking
Note, you should be familiar with the CI_PER_ID table
15 - 43
15
15
Configurable Info Zones
Case Study
Our case study - if the user is considered "restricted" (e.g., has some
type of char that indicates they don't have complete access), only
customer names are shown as the search results
15 - 47
15 - 48
15 - 49
15
Business Services
However, there are many reasons why you'll want to execute your
own SQL, for example,
When a tax form is added, you might need to find the person ID
associated with the tax identifier on the form
You might want to validate that an existing customer doesn't already exist
with the driver's license number entered for a new customer
You might want to check if an account's service agreements are all in
"good standing" before allowing the customer to sign up for autopay
15 - 51
We want to make it easy to test the SQL that's going to be used at run time
Testing inline SQL means that you have to execute the business process and this
can sometime be rather time-consuming
15 - 52
1
Info / Query
Zones
The Explorer
Service
Database
Zone Parm
3
When info and query zones build, they invoke a service that:
1. Reads the supplied zone's parameters (this is cached for performance
reasons)
2. Splices in the supplied filter values and column order
3. Executes the zone's SQL
4. Appends any derived columns (e.g., it appends icons, FK references, business
service elements, business object elements, formula results, etc.)
5. Returns the rows and columns back to the client for display in the zone
In other words, there's a single, sophisticated Java service that interprets
zone parameters and performs the processing for all info and query zones
15 - 53
2
3
Account
=123212
1 Business
Service
Database
Zone: SQL-FindAccount
Filter1: Account=123212
The
Explorer
Service
Zone:
SQL-FindAccount
Filter 1:
Account ID
SQL Parm: SELECT ACCT_ID
FROM CI_ACCT
WHERE ACCT_ID = :F1
You can invoke this business service from any script (BPA or service)
15 - 54
15 - 55
15 - 56
15
Business Services
15 - 58
15
Business Services
15 - 60
Review Questions
Please take the time to go through the review questions
15 - 61
15 - 62