<a:TextField>

Renders an <input type="text" .../> tag, which is a standard html text field input form element. As with other aribaweb form elements, also provides for mapping the input from the request back into the object from which it came. In addition, formatting support is provided to both render and re-map the users String values into proper objects suitable for putting back into the source object.

Bindings
value *

The value attribute is used to both get and set the value from/to the source object. During renderResponse, the value is used to render a String into the outgoing response (via an optional formatter). During applyValues, the value is used to put the user's input back into the source object (after the optional formatter parses the input String into the appropriate object class). Note that, if the user dowsn't type anything into a blank field, this will put an empty string into the destination and not $null.

Object
(both)
formatter

The formatter is used to convert the user's value Object into a String during renderResponse and back into an object of the appropriate subclass during applyValues. Many different types of formatters are acceptable. Implementations of AWFormatting have been done for java.text.Format, ariba.util.Formatter, and AWFormatter.

AWFormatting
(get)
autoselect

By default, the first TextField in the page will autoselect itself using a small amount of Javascript. You can disable that via this binding, hwever if someone later places a TextField somewhere earlier in the page, then it will grab the autoselect and this attribute will not apply.

boolean
(get)
onChange

Allows for providing your own onChange handler in JavaScript. As with all event handlers for AribaWeb based components, it is strongly recommended that you not use them as their use may conflict with internal implementation.

String
(get)
action

Allows for enabling to submit the form with the indicated action.

AWResponseGenerating
(get)
isRefresh

If set to true, Javascript onKeyDown handler is set to submit the enclosing form. If set to true then the onChange binding is ignored.

boolean
(get)
name

The name attribute allows for providing your own name for the TextField. As with other AribaWeb based components in the system, it is strongly recommended that you not provide your own name as the system cannot guarantee that the name is unique across the page.

String
(get)
emptyStringValue

The emptyStringValue attribute allows for providing a default value in the event the user doesn't enter anything in the TextField. For example, since an empty TextField will push an empty String into the object, you may want to treat this as $null. You could do this with a formatter as well, but this provides an alternative to a custom formatter.

Object
(get)
id

An alternative to the 'name' binding.

String
(get)
onKeyDown

Do not use this binding. This is documented here to prevent onKeyDown from being available in "otherBindings".

String
(get)
errorKey

If you have a formatter binding, then the String value typed in by the user will be parsed through that formatter. Should a parse exception occur, this error key will be used to record the error, along with the errantValue, into the AWErrorManager on the AWPage. If you do not provide an errorKey, the elementId of this textfield will be used.

Object
(get)
disabled

Disables the text field if true.

boolean
(get)
behavior

For internal use: Allow for override of text field behavior.

String
(get)
class

CSS class

String
(get)
size

INPUT size (if not specified tfW class applied, resulting in 156px wide field)

int
(get)

ariba.ui.aribaweb.html
Class AWTextField

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

public class AWTextField
extends AWComponent


Nested Class Summary
 
Nested classes/interfaces inherited from interface ariba.ui.aribaweb.core.AWResponseGenerating
AWResponseGenerating.ResponseSubstitution
 
Constructor Summary
AWTextField()
           
 
Method Summary
 String allowAutoFocus()
           
 String cssClass()
           
 String formattedString()
           
 String formattedValue()
           
 AWResponseGenerating invokeAction()
           
 String isDisabled()
           
 boolean isEditable()
           
 boolean isInHighLightedErrorScope()
           
 boolean isSender()
           
 AWEncodedString onChangeString()
           
 void setFormValue(String formValueString)
           
 String[] supportedBindingNames()
           
 AWEncodedString textFieldId()
           
 AWEncodedString textFieldName()
           
 String tfActionType()
           
 
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, getThis, hasBinding, hasBinding, hasContentNamed, hasMultipleTemplates, hasSubTemplateNamed, httpSession, init, init, intValueForBinding, intValueForBinding, intValueForBinding, invokeAction, isBidirectional, isBrowserMicrosoft, isClientPanel, isMacintosh, isStateless, isStrictTagNaming, 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, registerXmlNodeWithName, removeBacktrackState, renderResponse, replacementResponse, request, requestContext, requiresPreGlidCompatibility, resourceClassName, resourceManager, response, restoreFromBacktrackState, session, session, setCharacterEncoding, setClientPanel, setClientTimeZone, setComponentConfiguration, setDefaultTemplateParser, setEnv, setPreferredLocale, setResourceManager, setTemplateParser, setupForNextCycle, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, setValueForBinding, shouldCachePage, shouldCloseElements, strings, stringValueForBinding, stringValueForBinding, stringValueForBinding, 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
 
Methods inherited from interface ariba.ui.aribaweb.util.AWObject
getFieldValue, isKindOfClass, setFieldValue
 

Field Detail

SupportedBindingNames

public static final String[] SupportedBindingNames

_elementId

public AWEncodedString _elementId

_isRefresh

public boolean _isRefresh
Constructor Detail

AWTextField

public AWTextField()
Method Detail

supportedBindingNames

public String[] supportedBindingNames()
Overrides:
supportedBindingNames in class AWComponent

formattedString

public String formattedString()

setFormValue

public void setFormValue(String formValueString)

textFieldName

public AWEncodedString textFieldName()

textFieldId

public AWEncodedString textFieldId()

tfActionType

public String tfActionType()

isSender

public boolean isSender()

invokeAction

public AWResponseGenerating invokeAction()

onChangeString

public AWEncodedString onChangeString()

allowAutoFocus

public String allowAutoFocus()

formattedValue

public String formattedValue()

isDisabled

public String isDisabled()

isEditable

public boolean isEditable()

cssClass

public String cssClass()

isInHighLightedErrorScope

public boolean isInHighLightedErrorScope()


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