<w:ToggleBox>

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)

ariba.ui.widgets
Class ToggleBox

java.lang.Object
  extended by ariba.ui.aribaweb.util.AWBaseObject
      extended by ariba.ui.aribaweb.core.AWComponent
          extended by ariba.ui.widgets.ToggleBox
All Implemented Interfaces:
AWCycleable, AWCycleableReference, AWResponseGenerating, AWResponseGenerating.ResponseSubstitution, AWObject

public class ToggleBox
extends AWComponent


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.core.AWComponent
_topLevelApplyValues, _topLevelInvokeAction, _topLevelRenderResponse, allowEmbeddedKeyPaths, allowsWhitespaceCompression, application, applyValues, awcyclePageAndLog, bindingForName, bindingForName, bindings, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, browserMaxWidth, browserMinWidth, characterEncoding, clearValidationError, clientTimeZone, componentConfiguration, componentDefinition, componentPath, componentReference, createPageWithName, defaultTemplateParser, determineInstance, determineInstance, dict, dict, dict, doubleValueForBinding, doubleValueForBinding, doubleValueForBinding, encodedStringValueForBinding, encodedStringValueForBinding, ensureAwake, ensureFieldValuesClear, env, errorManager, escapeAttribute, escapeString, escapeUnsafeString, extendedFields, formValueManager, generateResponse, generateResponse, generateResponse, generateStringContents, getAWParameter, getDrivingBusinessObject, getFoldInSituOnWindowSizeParam, getPageRenderVersion, getThis, hasBinding, hasBinding, hasContentForTagName, hasContentNamed, hasMultipleTemplates, hasSubTemplateNamed, httpSession, init, init, initTemplateResourceManager, intValueForBinding, intValueForBinding, intValueForBinding, invokeAction, isBidirectional, isBrowserMicrosoft, isClientPanel, isMacintosh, isRenderAW5, isStrictTagNaming, isUserCommunityEnabled, isValidationEnabled, languageDirection, languageLeft, languageRight, loadTemplate, localizedJavaString, markBacktrackState, name, namePath, notifyChange, otherBindings, otherBindingsValues, page, pageComponent, pageWithClass, pageWithClass, pageWithName, pageWithName, parent, postTakeValueActions, preferredLocale, recordBacktrackState, recordBacktrackState, recordValidationError, recordValidationError, recordValidationError, recordValidationErrors, recordValidationWarning, redirectToPage, registerRenderingListener, registerXmlNodeWithName, removeBacktrackState, replacementResponse, request, requestContext, requiresPreGlidCompatibility, resourceClassName, resourceManager, response, restoreFromBacktrackState, session, session, setCharacterEncoding, setClientPanel, setClientTimeZone, setComponentConfiguration, setDefaultTemplateParser, setEnv, setPerfDestinationInfo, setPreferredLocale, setResourceManager, setTemplateParser, setupForNextCycle, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, shouldCachePage, shouldCloseElements, strings, stringValueForBinding, stringValueForBinding, stringValueForBinding, supportedBindingNames, template, templateName, templateParser, templateResource, templateResourceManager, truncateBacktrackState, truncateBacktrackState, urlForResourceNamed, urlForResourceNamed, urlForResourceNamed, useXmlEscaping, valueForBinding, valueForBinding, valueForBinding, xml
 
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

ToggleBox

public ToggleBox()
Method Detail

isStateless

public boolean isStateless()
Description copied from class: AWComponent
Overridden by AWComponent subclasses to indicate whether component instances should be preserved with the page/session (i.e. are "stateful") or can be pooled and reused for each phase of request processing (i.e. are stateless) Default is to be stateless unless the component is used as the top-level (page) component.

Overrides:
isStateless in class AWComponent

setHeadingContentElement

public void setHeadingContentElement(AWElement headingContentElement)

headingContentElement

public AWElement headingContentElement()

setBodyContentElement

public void setBodyContentElement(AWElement bodyContentElement)

bodyContentElement

public AWElement bodyContentElement()

renderResponse

public void renderResponse(AWRequestContext requestContext,
                           AWComponent component)
Description copied from interface: AWCycleable
The receiver should render its content to the AWRequestContext.response()

Specified by:
renderResponse in interface AWCycleable
Overrides:
renderResponse in class AWComponent
Parameters:
requestContext - the context for the current request.
component - the current parent component


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.