| |||||||
FRAMES NO FRAMES |
webuijsf:body
tag to contain the JSP tags for the body of the JSP page.
page. The webuijsf:body
tag must be placed after the
webuijsf:html
and
webuijsf:head
tags. Tags for page content
must be nested inside the webuijsf:body
tag to ensure that the
HTML elements are rendered in the necessary order.
If you are using frames in your page, use
the webuijsf:frameSet
tag instead of the webuijsf:body
tag.
The focus can be maintained with the body
tag's
focus
and preserveFocus
attributes.
The preserveFocus
attribute's default value is true
.
This means that after the first display, the focus, will be returned
to the element that had the focus when the request was made. Setting
preserveFocus
to false
inhibits that behavior.
The focus
attribute allows the developer to specify the
element that should receive the focus on first display.
If preserveFocus
is set to false the focus
attribute can control which element receives the focus on every
request/response cycle.
The body component
creates an HTML <body>
element in the rendered HTML
page. Attributes that you specify with the webuijsf:body
tag are used to specify the corresponding attributes in the rendered <body>
element.
None.
This example shows a simple webuijsf:body
tag.
<webuijsf:page>
<webuijsf:head title="body test" >
<webuijsf:meta httpHead="refresh"
content="5" />
</webuijsf:head>
<webuijsf:body id="bodytest">
....your body content
...
</webuijsf:body id="bodytest">
</webuijsf:page>
This example demonstrates how to set the focus in the
webuijsf:body
tag for a particular
component in the page. When the page is first loaded, the third text
field has focus.
Since preserveFocus
has not been specified, if the same page is
redisplayed in the response, then the focus will
be set in one of two ways.
<webuijsf:page>
<webuijsf:head title="Body tests" />
<webuijsf:body focus="form1:textTest3">
<webuijsf:form id="form1">
<webuijsf:textField id="textTest"
label="Text Field 1:" required="true"
text="#{FieldTest.test1}"/>
<webuijsf:textField id="textTest2"
label="Text Field 2:" required="true"
text="#{FieldTest.test2}"/>
<webuijsf:textField id="textTest3"
label="Text Field 3:" required="true"
text="#{FieldTest.test3}"/>
<webuijsf:button primary="true"
id="fieldButton2" text="Submit"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:page>
Tag Information | |
Tag Class | com.sun.webui.jsf.component.BodyTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
binding | false | false | java.lang.String | A ValueExpression that resolves to the UIComponent that corresponds to this tag. This binding allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children. |
onMouseDown | false | false | java.lang.String | Scripting code that executes when the user presses a mouse button while the mouse pointer is on the component. |
imageURL | false | false | java.lang.String | The path to an image to be used as a background for the page. |
onDblClick | false | false | java.lang.String | Scripting code that executes when a mouse double click occurs over this component. |
onLoad | false | false | java.lang.String | Scripting code that executes when when this page is loaded in a browser. |
onKeyPress | false | false | java.lang.String | Scripting code that executes when the user presses and releases a key while the component has focus. |
onUnload | false | false | java.lang.String | Scripting code that executes when this page is unloaded from a browser as a user exits the page. |
onFocus | false | false | java.lang.String | Scripting code that executes when this component receives focus. An element receives focus when the user selects the element by pressing the tab key or clicking the mouse. |
onMouseOut | false | false | java.lang.String | Scripting code that executes when a mouse out movement occurs over this component. |
rendered | false | false | java.lang.String | Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission. |
preserveFocus | false | false | java.lang.String | Indicates whether the last
element to have the focus, receives the focus the
next time the page is rendered. If this is set to |
focus | false | false | java.lang.String | Specify the ID of the component that should receive focus when the page is loaded. If the focus attribute is not set, or if the value is null, no component has focus when the page is initially rendered. If the page is submitted and reloaded, the component that submitted the page receives focus. By setting the focus attribute, you can ensure that a particular component receives focus each time. |
id | false | true | java.lang.String | No Description |
onMouseOver | false | false | java.lang.String | Scripting code that executes when the user moves the mouse pointer into the boundary of this component. |
onKeyUp | false | false | java.lang.String | Scripting code that executes when the user releases a key while the component has focus. |
onMouseMove | false | false | java.lang.String | Scripting code that executes when the user moves the mouse pointer while over the component. |
onMouseUp | false | false | java.lang.String | Scripting code that executes when the user releases a mouse button while the mouse pointer is on the component. |
styleClass | false | false | java.lang.String | CSS style class or classes to be applied to the outermost HTML element when the body component is rendered. |
preserveScroll | false | false | java.lang.String | Use the preserveScroll attribute to indicate whether the page
should remember the scroll position when navigating to and from
the page. The default value is |
visible | false | false | java.lang.String | Indicates whether the component should be viewable by the user in the rendered HTML page. If this is set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present. |
style | false | false | java.lang.String | CSS style or styles to be applied to the outermost HTML element when this component is rendered. |
onKeyDown | false | false | java.lang.String | Scripting code that executes when the user presses down on a key while the component has focus. |
onClick | false | false | java.lang.String | Scripting code executed when a mouse click occurs over this component. |
onBlur | false | false | java.lang.String | Scripting code executed when this element loses focus. |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |