Not all components in ADF UIX support client actions. Client actions are events that are triggered in response to user actions (such as clicking a link or a button) and sent to the server or middle tier for further processing.
The ClientAction API enable supported components to send arbitrary events and parameters that can be acted upon by the server or middle tier. The events can be partial page events or full page events.
Client action enabled components wrap client actions in a
primaryClientAction
element, as shown in the following UIX XML
example:
...
<button text="Client action enabled button">
<primaryClientAction>
...
<!-- client actions here -->
...
</primaryClientAction>
</button>
...
Most UIX form components can use the primaryClientAction
element to wrap client actions:
There are two basic client actions:
firePartialAction
- Delivers the event as a partial page
event. Use this client action to fire partial page updates of
arbitrary contents. Any client action enabled component can use
firePartialAction. If the client browser and platform does not support
partial page rendering, then a trigger button or link will be rendered
to allow the user to send the event to the server.
fireAction
- Delivers the event as a full page event.
You can set the following attributes for firePartialAction
and fireAction
:
event
- Specifies the name of the event to generate.
Default is update.
formSubmitted
- Specifies whether to use form submission
or GET to fire the event.
targets
- (firePartialAction
only).
Specifies a whitespace separated set of partial targets to update. The
list cannot be databound.
triggerText
- (firePartialAction
only).
Specifies the text to render in a trigger button or link when partial
page rendering is not supported on the target browser. If no text is
specified, then a localized version of the 'Go' button will be
rendered.
unvalidated
-Specifies whether client side validation is
performed when the action is invoked. By default validation is
performed. Note that the formSubmitted
attribute takes
precedence over this attribute.
source
- (fireAction
only). Specifies the
name to send as the source parameter when the event is delivered. If
this attribute is not set, the ID of the component to which the action
is attached will be sent. If the ID is not set, the value of the name
attribute of the parent component will be sent.
For form submitted events, you can also set arbitrary event parameters
to send with the form in a partial page update event. Note that a
formValue
element must also be specified for each additional
event parameter that you send.
Note: The Client Action is extended to allow rendering actions with a link instead of using JavaScript events. The getParameters method returns all the query parameters that are needed on the link. If the renderAsEvent method returns true, the renderer should render the script on one of the events (e.g. onClick, onChange etc.). If renderAsEvent returns false, the renderer has the option of rendering directly as a link.
About Partial Page Rendering
About LovOpenWindowAction Client Action
Editing the
PrimaryClientAction Attribute
Working with Form Components
Copyright © 1997, 2004, Oracle. All rights reserved.