<w:ToggleImage>

Provides a way to easily control the visibility of a block of html. 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.

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 represet true/false.

Bindings
state *

For each phase of the request-response loop, this component pushes its internal state (either true or false) into the referring component. This may then be used to control an AWConditional or other values. Note that, to initalizae the state, you must use initState. Once the state has been initialized, the only way to change it is for the end-user to click on the image and, thus, toggle the value.

boolean
(either)
initState

When the component is first created, this value is used to initalize the internal state of the component. This is only evaluated one time in the life of the component.

boolean
(get)
submitForm

Allows for submitting the form in which the tag is defined. If specified and evaluates to true, javascript will be used to submit the enclosing form.

boolean
(get)
align

Allows for specifying the "align" attribute of the image used to indicate the state. This does not apply for submitForm="$true".

String
(get)
scrollToVisible

If true, upon returning the response page, will attempt to position the page back to the location where the toggle image was clicked. This has been deprecated in favor of the new page scroll maintenance capability of aribaweb. [Note: we can remove this attribute entirely once that feature is fully functional]

boolean
(get)
isExternal

If true, reverses the functionality of this component so that, rather than maintaining its own state, it merely reflects the state of some external object. It will still toggle the state of that object when clicked, but it will not set the state on each phase.

boolean
(get)
useCheckboxIcon

Uses a checked checkbox for true and unchecked checkbox for false.

boolean
(get)
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)
title

Tooltip for the toggle control.

String
(get)

ariba.ui.widgets
Class ToggleImage

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

public class ToggleImage
extends AWComponent


Nested Class Summary
 
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
ToggleImage()
           
 
Method Summary
 java.lang.String currentImageFilename()
           
 void init()
           
 boolean isStateless()
          Overridden by AWComponent subclasses to indicate whether component instances should be preserved with the page/session (i.e.
 void pullToggleValue()
           
 void pushToggleValue()
           
 void resetToggleValue()
           
 AWResponseGenerating toggleImageClicked()
           
 
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, 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, renderResponse, 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
 

Field Detail

_isExternalState

public boolean _isExternalState
Constructor Detail

ToggleImage

public ToggleImage()
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

init

public void init()
Specified by:
init in interface AWObject
Overrides:
init in class AWComponent

currentImageFilename

public java.lang.String currentImageFilename()

resetToggleValue

public void resetToggleValue()

pushToggleValue

public void pushToggleValue()

pullToggleValue

public void pullToggleValue()

toggleImageClicked

public AWResponseGenerating toggleImageClicked()


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