Inserting a MessageChoice
To insert a messageChoice component:
-
In the Design Structure Window of the desired file, locate the node in
which you wish to insert a messageChoice component.
-
In the Component Palette, select Form Components
from the dropdown list, and then drag and drop the
messageChoice component to the parent node of your choice.
The messageChoice node is inserted and
highlighted under the expanded parent node.
-
In the Property Inspector, set the following attributes for the
messageChoice component:
-
prompt - Enter the prompt text that displays before the
component.
-
name - (Required) Enter a name for the component.
-
primaryClientAction - Enter the client action to fire on
the client. In the right column, click the
icon to enter a ClientAction. See
Editing the PrimaryClientAction Attribute for details. Alternatively, use
the Advanced tab to enter an EL syntax
data binding expression or use the Bind to Data dialog to select a
data source for this complex attribute.
-
selectedIndex - Enter the index of the globally selected
option. Use one of the following values:
-
0 - make the first option selected
-
1 - make the second option selected
-
2 - make the third option selected, and so on
-
selectedValue - Enter the value of the globally selected
option.
-
selection - Enter the selection information for this option
container.
-
In the Design Structure Window, right-click the
messageChoice node and choose Insert
inside messageChoice | option.
The option node is inserted and
highlighted under the expanded messageChoice
node.
-
In the Property Inspector, set the following attributes for the option
component:
-
text - Enter the item text to display in the dropdown box.
-
selected - Default is false. Select true to display this
option in the dropdown box when the page is first viewed in a
browser. This also specifies that this option is selected. This
attribute takes precedence over the selectedIndex attribute of
messageChoice.
-
value - Enter the value that identifies this item when the
parent component is submitted to the server.
-
Repeat steps 4 and 5 to add the desired number of options.
Note: To use data binding, see
Data Binding a Component Attribute.
Tip: For an option to be rendered as selected, ADF UIX
uses these attributes in this order of precedence: selection attribute
on the option container, selected attribute on the option component,
selectedValue attribute on the option container, selectedIndex on the
option container.
For information about message attributes, see
Setting the Message Attributes for a Message Form Component. For
information about other general attributes of message form components,
see Setting the General
Attributes for a Message Form Component.
Example (UIX XML)
...
<messageChoice prompt="State"
messageType="info"
message="California is the sunny state."
selectedValue="CA"
name="mcho1">
<contents>
<option text="Alabama" value="AL" />
<option text="Alaska" value="AK" />
<option text="Arizona" value="AZ" />
<option text="Arkansas" value="AR" />
<option text="California" value="CA" />
<option text="Colorado" value="CO" />
...
</contents>
</messageChoice>
...
Related topics
About MessageChoice
About Message Form Components and Attributes
Inserting an End Named Child for a
Message Form Component
Working with Form Components
Copyright © 1997, 2004, Oracle.
All rights reserved.