org.trails.component
Class InsertI18N

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.components.Insert
              extended by org.trails.component.InsertI18N
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, org.apache.tapestry.IComponent, org.apache.tapestry.IDirectEvent, org.apache.tapestry.internal.Component, org.apache.tapestry.IRender

@ComponentClass(allowBody=false)
public abstract class InsertI18N
extends org.apache.tapestry.components.Insert

Used to insert some text (from a parameter) into the HTML. Emits a value into the response page.


Field Summary
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
InsertI18N()
           
 
Method Summary
static java.lang.Object[] constructServiceParameters(java.lang.Object parameterValue)
          Converts a parameter value to an array of objects.
abstract  java.lang.String getBundleKey()
           
abstract  java.lang.String getDefaultMessage()
           
abstract  java.text.Format getFormat()
          A Format object used to convert the value to a string.
abstract  java.util.Locale getLocale()
           
abstract  org.apache.tapestry.components.InsertMode getMode()
          Determines which mode to use: breaks after each line, or wrap each line as a paragraph.
abstract  java.lang.Object getParams()
           
abstract  boolean getRaw()
          If false (the default), then HTML characters in the value are escaped.
abstract  boolean getRenderTag()
          If true, causes the tag used to define the insert to be used, as well as any informal parameters bound.
abstract  TrailsMessageSource getResourceBundleMessageSource()
          Return the Spring TrailsMessageSource.
 java.lang.String getValue()
           
 
Methods inherited from class org.apache.tapestry.components.Insert
printText, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainedRenderers, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getInnerRenderers, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, peekClientId, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

InsertI18N

public InsertI18N()
Method Detail

getResourceBundleMessageSource

@InjectObject(value="service:trails.core.MessageSource")
public abstract TrailsMessageSource getResourceBundleMessageSource()
Return the Spring TrailsMessageSource. This is used to implement i18n in all Trails components, accessing a i18n properties file in the application instead of accessing the property file located in org.trais.component package. By doing this, someone who would need i18n wouldn't need to change the property located in the org.trails.component package and rebuild the trails.jar

Returns:

getBundleKey

@Parameter(required=true)
public abstract java.lang.String getBundleKey()

getDefaultMessage

@Parameter
public abstract java.lang.String getDefaultMessage()

getParams

@Parameter
public abstract java.lang.Object getParams()

getLocale

@Parameter(defaultValue="page.locale")
public abstract java.util.Locale getLocale()

getFormat

@Parameter
public abstract java.text.Format getFormat()
A Format object used to convert the value to a string.

Specified by:
getFormat in class org.apache.tapestry.components.Insert
Returns:

getRaw

@Parameter
public abstract boolean getRaw()
If false (the default), then HTML characters in the value are escaped. If true, then value is emitted exactly as is.

Specified by:
getRaw in class org.apache.tapestry.components.Insert
Returns:

getRenderTag

@Parameter(defaultValue="false")
public abstract boolean getRenderTag()
If true, causes the tag used to define the insert to be used, as well as any informal parameters bound.

Specified by:
getRenderTag in class org.apache.tapestry.components.Insert
Returns:

getMode

@Parameter
public abstract org.apache.tapestry.components.InsertMode getMode()
Determines which mode to use: breaks after each line, or wrap each line as a paragraph.

Specified by:
getMode in class org.apache.tapestry.components.Insert
Returns:

getValue

public java.lang.String getValue()
Specified by:
getValue in class org.apache.tapestry.components.Insert

constructServiceParameters

public static java.lang.Object[] constructServiceParameters(java.lang.Object parameterValue)
Converts a parameter value to an array of objects.

Parameters:
parameterValue - the input value which may be
  • null (returns null)
  • An array of Object (returns the array)
  • A List(returns an array of the values in the List})
  • A single object (returns the object as a single-element array)
Returns:
An array representation of the input object.


Copyright © 2004-2008. All Rights Reserved.