Module tapestry.state
Back to master index

[public] Schema tapestry.state.StateObjectContribution
Schema used with the ApplicationObjects (and FactoryObjects) configuration points, used to declare application-wide state objects.
Element <state-object>
An object that stores application wide state, referenced by a unique name.
Attribute name Translator: string
The unique name by which the state object is accessed.
Attribute scope (required) Translator: string
The scope of the attribute, which controls its lifecycle and how it is persisted between requests. Matches a contribution to the StateObjectPersistenceManagers configuration point.
Nested Elements
An object that stores application wide state, referenced by a unique name.
<create-object class="StateObjectContribution" />
<read-attribute attribute="name" property="name" />
<read-attribute attribute="scope" property="scope" />
<invoke-parent method="addElement" />
Attribute name Translator: string
The unique name by which the state object is accessed.
Attribute scope (required) Translator: string
The scope of the attribute, which controls its lifecycle and how it is persisted between requests. Matches a contribution to the StateObjectPersistenceManagers configuration point.
Element <create-instance>
Defines a simple factory for the state object, by instantiating an instance of a class.
Attribute class (required) Translator: class
The fully qualified name of the class to instantiate.
Conversion Rules
<conversion class="InstantiateClassStateObjectFactory" parent-method="setFactory" >
  • <map attribute="class" property="objectClass" />
</conversion>
Element <invoke-factory>
Defines a reference to a state object factory (an object implementing StateObjectFactory).
Attribute object (required) Translator: object
The factory object that will create the state object as needed.
Conversion Rules
<push-attribute attribute="object" />
<invoke-parent method="setFactory" />
Conversion Rules
<create-object class="StateObjectContribution" />
<read-attribute attribute="name" property="name" />
<read-attribute attribute="scope" property="scope" />
<invoke-parent method="addElement" />
References
Configurations
tapestry.state.ApplicationObjects
tapestry.state.FactoryObjects

Module tapestry.state
Back to master index