org.apache.tapestry.internal
Interface InternalComponentResources

All Superinterfaces:
ComponentResources, ComponentResourcesCommon, InternalComponentResourcesCommon, Locatable
All Known Implementing Classes:
InternalComponentResourcesImpl

public interface InternalComponentResources
extends ComponentResources, InternalComponentResourcesCommon

An extension of ComponentResources that represents additional methods that are private to the framework and not exposed in any public APIs.


Method Summary
 Object getFieldChange(String fieldName)
          Get the current persisted value of the field.
 boolean hasFieldChange(String fieldName)
          Checks to see if there is a value stored for the indicated field.
 boolean isInvariant(String parameterName)
          Returns true if the named parameter's Binding is invariant, false if otherwise, or if the parameter is not bound.
 void persistFieldChange(String fieldName, Object newValue)
          Posts a change to a persistent field.
 void postRenderCleanup()
          Allows the resources to cleanup any render-time only data.
 void queueRender(RenderQueue queue)
          Invoked to make the receiver queue itself to be rendered.
<T> T
readParameter(String parameterName, Class<T> expectedType)
          Reads the value of a parameter, via the parameter's Binding.
 Object readParameter(String parameterName, String desiredTypeName)
          Used by generated component code to read a parameter value.
<T> void
writeParameter(String parameterName, T parameterValue)
          Updates a parameter.
 
Methods inherited from interface org.apache.tapestry.ComponentResources
addPageLifecycleListener, createActionLink, createPageLink, discardPersistentFieldChanges, getAnnotationProvider, getBaseResource, getBlockParameter, getBoundType, getComponent, getComponentModel, getContainer, getContainerMessages, getContainerResources, getElementName, getEmbeddedComponent, getMessages, getPage, getParameterAnnotation, getRenderVariable, isBound, renderInformalParameters, storeRenderVariable
 
Methods inherited from interface org.apache.tapestry.ComponentResourcesCommon
findBlock, getBlock, getCompleteId, getElementName, getId, getLocale, getLogger, getNestedId, getPageName, isRendering, triggerContextEvent, triggerEvent
 
Methods inherited from interface org.apache.tapestry.ioc.Locatable
getLocation
 
Methods inherited from interface org.apache.tapestry.internal.InternalComponentResourcesCommon
bindParameter, getInformalParameterBindings, getMixinByClassName, isLoaded
 

Method Detail

getFieldChange

Object getFieldChange(String fieldName)
Get the current persisted value of the field.

Parameters:
fieldName - the name of the field to access
Returns:
the value stored for the field, or null if no value is currently stored

hasFieldChange

boolean hasFieldChange(String fieldName)
Checks to see if there is a value stored for the indicated field.


persistFieldChange

void persistFieldChange(String fieldName,
                        Object newValue)
Posts a change to a persistent field. If the component is still loading, then this change is ignored. Otherwise, it is propagated, via the page to the PersistentFieldManager.


readParameter

<T> T readParameter(String parameterName,
                    Class<T> expectedType)
Reads the value of a parameter, via the parameter's Binding.

Type Parameters:
T -
Parameters:
parameterName - the name of the parameter to read
expectedType - the expected type of parameter
Returns:
the value for the parameter, or null if the parameter is not bound.

readParameter

Object readParameter(String parameterName,
                     String desiredTypeName)
Used by generated component code to read a parameter value.

Parameters:
parameterName - the name of the parameter to read
desiredTypeName - the class name of the desired value (classes will be resolved in the component class loader)
Returns:
the value coerced to the correct type

writeParameter

<T> void writeParameter(String parameterName,
                        T parameterValue)
Updates a parameter. It is an error to update a parameter which is not bound. The parameter binding may also not support updates.

Type Parameters:
T -
Parameters:
parameterName - of parameter to update
parameterValue - new value (which may be null)

isInvariant

boolean isInvariant(String parameterName)
Returns true if the named parameter's Binding is invariant, false if otherwise, or if the parameter is not bound. Invariant bindings are cached more aggressively than variant bindings.

Parameters:
parameterName - the name of parameter to check for invariance
Returns:
true if the binding is an invariant, false if the binding has no fixed value

postRenderCleanup

void postRenderCleanup()
Allows the resources to cleanup any render-time only data.


queueRender

void queueRender(RenderQueue queue)
Invoked to make the receiver queue itself to be rendered.



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.