To set attributes for a body element:
<accessibility-mode>
element in the
UIX configuration file (uix-config.xml
) must be set to
inaccessible
for this feature to be on.
To insert a body element:
To insert preferred components for a body element:
...
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:data="http://xmlns.oracle.com/uix/ui" expressionLanguage="el">
<content>
<dataScope xmlns="http://xmlns.oracle.com/uix/ui">
<provider>
<data name="data:Nodes">
<inline>
<nodes text="Shop"
destination="http://www.oracle.com"
expandable="expanded"
icon="/docs/devguide/images/data_trees/info.gif">
<nodes text="Books"
destination="http://www.oracle.com"
expandable="expanded"
icon="/docs/devguide/images/data_trees/info.gif">
<nodes text="Sale"
destination="http://www.oracle.com"
expandable="expanded"
icon="/docs/devguide/images/data_trees/info.gif">
<nodes text="Millennium Madness"
destination="http://www.oracle.com"/>
</nodes>
<nodes text="Fiction" destination="http://www.oracle.com"/>
<nodes text="Non-Fiction" destination="http://www.oracle.com"/>
</nodes>
<nodes text="Hardware"
expandable="expanded"
icon="/docs/devguide/images/data_trees/info.gif">
<nodes text="Desktops" destination="http://www.oracle.com"/>
<nodes text="Notebooks" destination="http://www.oracle.com"/>
</nodes>
</nodes>
</inline>
</data>
</provider>
<contents>
<document>
<metaContainer>
<!-- Set the page title -->
<head title="body test"/>
</metaContainer>
<contents>
<body initialFocusId="${uix.pageProp.initialFocusId}" >
<contents>
<stackLayout>
<contents>
<pageLayout title="body's initialFocusId test">
<pageButtons>
<pageButtonBar>
<contents>
<button text="ID=Home1" id="Home1"
destination="http://www.oracle.com"/>
</contents>
</pageButtonBar>
</pageButtons>
<pageStatus>
<stackLayout>
<contents>
<formattedText styleUsage="instruction"
text="This is a demo of body and its <b>initialFocusId</b> attribute." />
<spacer height="20"/>
<formattedText styleUsage="instruction"
text = "The initial focus feature does nothing unless the accessibility mode is set to <b>inaccessible</b>.
Make sure that in the WEB-INF/uix-config.xml file you have default-configuration's
accessibility-mode set to inaccessible." />
<spacer height="20"/>
<formattedText styleUsage="instruction"
text = "Set the initialFocusId to be the id of the component you wish to have the initial focus
when the page first loads. See the BLAF Guidelines called Default Cursor/Focus Placement
in the Keyboard Shortcuts document for details of what component should have the initial
focus under what conditions."/>
<spacer height="20"/>
<formattedText styleUsage="instruction"
text="The demo lets you play with setting the initial focus.
It uses body's initialFocusId attribute, and databinds it to
the id that you enter in the text input field below.
Type in the id of the component you want to see the focus set to, then press
the 'Refresh Page with New Focus' button. Notice where the focus is."/>
</contents>
</stackLayout>
</pageStatus>
<contents>
<!-- Define the content of the page here -->
<form name="form0">
<contents>
<stackLayout>
<contents>
<separator/>
<messageTextInput name="setFocus"
prompt="Enter the ID to set focus">
<end>
<submitButton text="Refresh Page with New Focus"
event="changeFocus"/>
</end>
</messageTextInput>
<separator/>
<button text="ID=Button1" id="Button1"
destination="http://www.oracle.com"/>
<button text="ID=Button2" id="Button2"
destination="http://www.oracle.com"/>
<button text="ID=Button3" id="Button3"
destination="http://www.oracle.com"/>
<messageTextInput id="TextInput1"
prompt="ID = TextInput1"
text="Hello"/>
<formattedText styleUsage="instruction"
text="ID in tree is the name of the node + ID. e.g, ShopID"/>
<tree id="treeID" formSubmitted="true"
nodes="${data:data().Nodes.nodes}"
proxy="${uix.data.TreeProxy.proxy}">
<nodeStamp>
<flowLayout>
<contents>
O
<link id="${uix.current.text}ID"
destination="${uix.current.destination}"
text="${uix.current.text}"/>
</contents>
</flowLayout>
</nodeStamp>
</tree>
<tableLayout>
<contents>
<rowLayout>
<contents>
<formattedText text="ID = NavigationBar1"
styleUsage="instruction"/>
<navigationBar id="NavigationBar1"
blockSize="5"
minValue="1"
maxValue="25" value="6"/>
</contents>
</rowLayout>
</contents>
</tableLayout>
<formattedText styleUsage="pageStamp"
text="Current focus is on the component with id: ${uix.pageProp.initialFocusId}"/>
<separator/>
</contents>
</stackLayout>
</contents>
</form>
</contents>
</pageLayout>
</contents>
</stackLayout>
</contents>
</body>
</contents>
</document>
</contents>
</dataScope>
</content>
<handlers>
<!-- Add EventHandlers (<event> elements) here -->
<ctrl:event name="null">
<!-- The page property called initialFocusId is set to ButtonID -->
<set property="initialFocusId" value="Button1" target="${uix.pageProp}"/>
</ctrl:event>
<ctrl:event name="changeFocus">
<!-- The page property called initialFocusId is set to ButtonID -->
<set property="initialFocusId" value="${param.setFocus}"
target="${uix.pageProp}"/>
</ctrl:event>
<ctrl:event name="goto">
<null/>
</ctrl:event>
</handlers>
</page>
Using the Document Element and
MetaContainer Named Child
Working with Simple and Miscellaneous Components
Copyright © 1997, 2004, Oracle. All rights reserved.