|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides a way to easily control the visibility of a block of html within a boxed container. This component is in one of two states: true or false. By default, a triangle image indicates these states is displayed and, when clicked, will toggle to the other state. For each phase of the request-response loop, this component pushes its current state into the referring component so it may be used downstream in, for example, an AWConditional to control the visibility of of a block of html.
Use ToggleBoxBody to provide the main content.
By default the images used for true/false is the toggle arrow. If the useCheckboxIcon binding is used, then a checkbox image will be used to represent true (checked) and false (unchecked). You may also provide your own images to represent true/false.
By default, a h2
is used around the title in the heading. To provide a custom heading, use ToggleBoxHeading:
Example:
<w:ToggleBox state="$state">
<w:ToggleBoxHeading>
<w:TextButton>Custom Heading</w:TextButton>
</w:ToggleBoxHeading>
<w:ToggleBoxBody>
...
</w:ToggleBoxBody>
</w:ToggleBox>
Bindings | |||
---|---|---|---|
title
|
Title |
String (get) |
|
state
*
|
For each phase of the request-response loop, this component pushes and pull its internal state (either true or false) into and from the referring component. This may then be used to control an AWConditional or other values. |
boolean (either) |
|
trueImageName
|
The name of the image to be displayed when the state is true. This uses AWImage internally, so the same rules apply to this binding as for AWImage's filename binding. |
String (get) |
|
falseImageName
|
The name of the image to be displayed when the state is false. This uses AWImage internally, so the same rules apply to this binding as for AWImage's filename binding. |
String (get) |
|
useCheckboxIcon
|
Uses a checked checkbox for true and unchecked checkbox for false. |
boolean (get) |
|
controlTitle
|
Tooltip for the toggle control. |
String (get) |
|
class
|
Overrides the default class. |
String (get) |
|
style
|
Style |
String (get) |
java.lang.Objectariba.ui.aribaweb.util.AWBaseObject
ariba.ui.aribaweb.core.AWComponent
ariba.ui.widgets.ToggleBox
public class ToggleBox
Nested Class Summary | |
---|---|
static class |
ToggleBox.ToggleBoxElement
|
Nested classes/interfaces inherited from class ariba.ui.aribaweb.core.AWComponent |
---|
AWComponent.RenderingFilter, AWComponent.RenderingListener |
Nested classes/interfaces inherited from interface ariba.ui.aribaweb.core.AWResponseGenerating |
---|
AWResponseGenerating.ResponseSubstitution |
Constructor Summary | |
---|---|
ToggleBox()
|
Method Summary | |
---|---|
AWElement |
bodyContentElement()
|
AWElement |
headingContentElement()
|
boolean |
isStateless()
Overridden by AWComponent subclasses to indicate whether component instances should be preserved with the page/session (i.e. |
void |
renderResponse(AWRequestContext requestContext,
AWComponent component)
The receiver should render its content to the AWRequestContext.response() |
void |
setBodyContentElement(AWElement bodyContentElement)
|
void |
setHeadingContentElement(AWElement headingContentElement)
|
Methods inherited from class ariba.ui.aribaweb.util.AWBaseObject |
---|
debugString, getFieldValue, isKindOfClass, localizedJavaString, logString, logWarning, setFieldValue |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ariba.ui.aribaweb.util.AWObject |
---|
getFieldValue, isKindOfClass, setFieldValue |
Constructor Detail |
---|
public ToggleBox()
Method Detail |
---|
public boolean isStateless()
AWComponent
isStateless
in class AWComponent
public void setHeadingContentElement(AWElement headingContentElement)
public AWElement headingContentElement()
public void setBodyContentElement(AWElement bodyContentElement)
public AWElement bodyContentElement()
public void renderResponse(AWRequestContext requestContext, AWComponent component)
AWCycleable
AWRequestContext.response()
renderResponse
in interface AWCycleable
renderResponse
in class AWComponent
requestContext
- the context for the current request.component
- the current parent component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |