org.trails.component
Class TrailsComponent

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by org.trails.component.TrailsComponent
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, org.apache.tapestry.ITemplateComponent
Direct Known Subclasses:
ClassDescriptorComponent, EditCollection, InvokeMethod

public abstract class TrailsComponent
extends org.apache.tapestry.BaseComponent

Author:
fus8882

TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates


Field Summary
static java.lang.String DEFAULT
           
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
TrailsComponent()
           
 
Method Summary
 java.lang.String getMessage(java.lang.String key)
          This method will lookup for a message in Trails resource bundle and return a message, if found, in the default Locale.
abstract  TrailsMessageSource getResourceBundleMessageSource()
          Return the Spring TrailsMessageSource.
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad, getContainedRenderers, getInnerRenderers, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, generateClientId, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, 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.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Field Detail

DEFAULT

public static java.lang.String DEFAULT
Constructor Detail

TrailsComponent

public TrailsComponent()
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:

getMessage

public java.lang.String getMessage(java.lang.String key)
This method will lookup for a message in Trails resource bundle and return a message, if found, in the default Locale. This is normally called from Component templates, so messages will be looked up outside the component, making it easier for an user to localize Trails.



Copyright © 2004-2008. All Rights Reserved.