<a:Local>

AWLocal is used to mark content that should be localized.

Content is usually initially authored without a key. E.g.

<a:Local>No items match your query</a:Local>

Then a script is run that assigns a key to the item, and externalizes tag content as the default translation is a message string file. The tag would then read:

<a:Local key="a001">No items match your query</a:Local>

AWLocal supports more advanced substitutions where the message contains embedded dynamic content. E.g.:

<a:Local key="a001">
    Click <a:Hyperlink action="$reviewItem">here</a:Hyperlink> to review
    or <a:Hyperlink action="$cancelItem">cancel</a:Hyperlink>.
</a:Local>

In this case the string written to the localization file would have the dynamic content replaced with positional placeholders. E.g.

"Click {0}here{/0} to review or {1}cancel{/1}."

Wrapping longer bits of content containing dynamic elements gives the localizer the flexibility to reorder elements as necessary to meet this needs of the translation.

Bindings
key *

This list (java.util.List, native Array, etc) containing the items being unrolled.

String
(get)

ariba.ui.aribaweb.core
Class AWLocal

java.lang.Object
  extended by ariba.ui.aribaweb.util.AWBaseObject
      extended by ariba.ui.aribaweb.core.AWBaseElement
          extended by ariba.ui.aribaweb.core.AWBindableElement
              extended by ariba.ui.aribaweb.core.AWContainerElement
                  extended by ariba.ui.aribaweb.core.AWLocal
All Implemented Interfaces:
AWBindable, AWCycleable, AWCycleableReference, AWElement, AWElementContaining, AWVisitable, AWObject, java.lang.Cloneable

public final class AWLocal
extends AWContainerElement


Constructor Summary
AWLocal()
           
 
Method Summary
 void applyValues(AWRequestContext requestContext, AWComponent component)
          The receiver should take any form values (or query string parameters) that it owns from the AWRequestContext.request().
 void init(java.lang.String tagName, java.util.Map bindingsHashtable)
           
 AWResponseGenerating invokeAction(AWRequestContext requestContext, AWComponent component)
          The receiver should determine if it is the intended recipient of the current action (by checking the AWRequestContext.request() AWRequest.senderId()) and, if so, handle the action and return the result.
static java.lang.String localizedJavaString(int key, java.lang.String originalString, java.lang.Class cls, AWRequestContext requestContext)
           
 void renderResponse(AWRequestContext requestContext, AWComponent component)
          The receiver should render its content to the AWRequestContext.response()
static AWSingleLocaleResourceManager resourceManager(AWRequestContext requestContext)
           
 
Methods inherited from class ariba.ui.aribaweb.core.AWContainerElement
add, appendTo, contentElement, continueVisit, setContentElement, validate
 
Methods inherited from class ariba.ui.aribaweb.core.AWBindableElement
allBindings, determineInstance, tagName
 
Methods inherited from class ariba.ui.aribaweb.core.AWBaseElement
bareStringContent, clone, determineInstance, lineNumber, setLineNumber, setTemplateName, startVisit, templateName, toString
 
Methods inherited from class ariba.ui.aribaweb.util.AWBaseObject
debugString, ensureFieldValuesClear, getFieldValue, init, isKindOfClass, localizedJavaString, logString, logWarning, setFieldValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ariba.ui.aribaweb.core.AWElement
clone
 
Methods inherited from interface ariba.ui.aribaweb.core.AWCycleableReference
determineInstance
 
Methods inherited from interface ariba.ui.aribaweb.util.AWObject
getFieldValue, init, isKindOfClass, setFieldValue
 
Methods inherited from interface ariba.ui.aribaweb.core.AWVisitable
startVisit
 

Field Detail

IsDebuggingEnabled

public static boolean IsDebuggingEnabled
Constructor Detail

AWLocal

public AWLocal()
Method Detail

init

public void init(java.lang.String tagName,
                 java.util.Map bindingsHashtable)
Specified by:
init in interface AWBindable
Overrides:
init in class AWBindableElement

resourceManager

public static AWSingleLocaleResourceManager resourceManager(AWRequestContext requestContext)

localizedJavaString

public static java.lang.String localizedJavaString(int key,
                                                   java.lang.String originalString,
                                                   java.lang.Class cls,
                                                   AWRequestContext requestContext)

applyValues

public void applyValues(AWRequestContext requestContext,
                        AWComponent component)
Description copied from interface: AWCycleable
The receiver should take any form values (or query string parameters) that it owns from the AWRequestContext.request().

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

invokeAction

public AWResponseGenerating invokeAction(AWRequestContext requestContext,
                                         AWComponent component)
Description copied from interface: AWCycleable
The receiver should determine if it is the intended recipient of the current action (by checking the AWRequestContext.request() AWRequest.senderId()) and, if so, handle the action and return the result.

Specified by:
invokeAction in interface AWCycleable
Overrides:
invokeAction in class AWContainerElement
Parameters:
requestContext - the context for the current request.
component - the current parent component
Returns:
the response for the action

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 AWContainerElement
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.