Each application has a number (called an application ID) that uniquely identifies it. Similarly, each page also has a unique number (called a page ID). Applications and pages may also have alphanumeric aliases. Application aliases are unique within the workspace and page aliases are unique within each application. When you run an application, the HTML DB engine generates a session number that serves as a key to the user's session state.
Topics:
The URL that displays for each page indicates the location of Oracle HTML DB and identifies the application ID, page ID, and session ID. For example:
http://htmldb.oracle.com/pls/otn/f?p=4350:1:220883407765693447
This example indicates:
The address of Oracle HTML DB is:
http://htmldb.oracle.com/pls/otn/
The application ID is 4350
.
The page ID is 1
.
The session ID is 220883407765693447
.
You can create links between pages in your application using the following syntax:
f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly
Table 4-3 describes the arguments you can pass when using f?p
syntax.
Table 4-3 f?p Syntax Arguments
Syntax | Description |
---|---|
|
Indicates an application ID or alphanumeric alias. |
|
Indicates a page ID or alphanumeric alias. |
|
Identifies a session ID. You can reference a session ID to create hypertext links to other pages that maintain the same session state by passing the session number. You can reference the session ID using the syntax:
|
|
Sets the value of
|
|
Displays application processing details. Valid values for the DEBUG flag are
|
|
Clears the cache. Clearing the cache for a single item simply sets the value of the list of names to null. To clear cached items, use a comma-delimited list of page IDs. Comma-delimited lists can also contain collections to be reset or the keyword |
|
Comma-delimited list of item names used to set session state with a URL. |
|
List of item values used to set session state within a URL. Item values cannot include colons, but can contain commas if enclosed with backslashes. To pass a comma in an item value, enclose the characters with backslashes. For example: \123,45\ |
|
Determines if the page is being rendered in printer friendly mode. If PrinterFriendly is set to Yes, then the page is rendered in printer friendly mode. The value of PrinterFriendly can be used in rendering conditions to remove elements such as regions from the page to optimize printed output.You can reference the printer friendly preference by using the following syntax: V('PRINTER_FRIENDLY') When referenced, the HTML DB engine will not display tabs or navigation bars, and all items will be displayed as text and not as form elements. |
Although it is important to understand how f?p
syntax works, you rarely have to construct this syntax yourself. Oracle HTML DB includes many wizards that automatically create these references for you. The following sections describe specific instances that utilize f?p
syntax to link pages.
Application and page aliases must consist of valid Oracle identifiers, cannot contain any whitespace, and are not case-sensitive. The following example calls a page using an application and a page alias from within an Oracle HTML DB application. It runs the page home
of the application myapp
and uses the current session ID.
f?p=myapp:home:&SESSION.
Application aliases must be unique within a workspace. If applications in different workspaces within the same Oracle HTML DB instance have the same application alias, use the &c
argument to specify the workspace name. For example:
f?p=common_alias:home:&session.&c=WORKSPACE_A
When you create a button, you can specify a URL to redirect to when the user clicks the button. This example runs page 6001 of application 6000 and uses the current session ID.
f?p=6000:6001:&SESSION.
Note that this is only one approach to using a button in Oracle HTML DB. This method bypasses page submission and acts as a hyperlink on the page. Another method is to submit the page first. In that approach, clicking the button submits the page for processing, allowing forms to be submitted and session state to be saved.