|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wotonomy.web.WOElement net.wotonomy.web.WOComponent
public class WOComponent
Pure java implementation of WOComponent.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.wotonomy.control.EOKeyValueCodingAdditions |
---|
net.wotonomy.control.EOKeyValueCodingAdditions.DefaultImplementation, net.wotonomy.control.EOKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
---|
net.wotonomy.foundation.NSKeyValueCoding.Null |
Nested classes/interfaces inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
---|
net.wotonomy.foundation.NSKeyValueCoding.Null |
Field Summary | |
---|---|
protected boolean |
cachingEnabled
|
protected WOContext |
context
|
protected WOComponent |
parent
|
protected WOElement |
template
|
Fields inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
---|
NullValue |
Fields inherited from interface net.wotonomy.foundation.NSKeyValueCoding |
---|
NullValue |
Constructor Summary | |
---|---|
WOComponent()
Default constructor. |
|
WOComponent(WOContext aContext)
Constructor specifying a context. |
Method Summary | |
---|---|
void |
appendToResponse(WOResponse aResponse,
WOContext aContext)
This method is called on all elements of the content tree to build a response to a user request. |
WOApplication |
application()
Returns the application containing this instance of the class. |
void |
awake()
Called at the beginning of a request-response cycle. |
java.lang.String |
baseURL()
Returns the URL for this component, relative to the server's document root on the server's file system. |
boolean |
canGetValueForBinding(java.lang.String aBinding)
Returns whether this component has a readable value that maps to the specified binding. |
boolean |
canSetValueForBinding(java.lang.String aBinding)
Returns whether this component has a writable value that maps to the specified binding. |
WOContext |
context()
Returns the current context for this component. |
static void |
debugString(java.lang.String aString)
|
java.lang.String |
descriptionForResponse(WOResponse aResponse,
WOContext aContext)
Called on the component that represents the requested page. |
java.lang.String |
frameworkName()
Returns the name of the framework that contains this component, or null if the component does not belong to a framework. |
WOResponse |
generateResponse()
Generates a WOResponse and calls appendToResponse() on it. |
java.lang.Object |
handleQueryWithUnboundKey(java.lang.String aKey)
|
void |
handleTakeValueForUnboundKey(java.lang.Object aValue,
java.lang.String aKey)
|
boolean |
hasBinding(java.lang.String aBinding)
Returns whether this component has the specified binding. |
boolean |
hasSession()
Returns whether a session has been created for this user. |
WOActionResults |
invokeAction(WORequest aRequest,
WOContext aContext)
This method is called on all objects and elements of the application until a non-null value is returned. |
boolean |
isCachingEnabled()
Returns whether templates are cached. |
boolean |
isStateless()
Returns whether this component should be considered stateless. |
static void |
logString(java.lang.String aString)
|
java.lang.String |
name()
Returns the name of the component, which is usually just the class name. |
WOComponent |
pageWithName(java.lang.String aName)
Returns a new WOComponent with the specified name. |
WOComponent |
parent()
Returns this component's parent component, or null if none. |
java.lang.String |
path()
Returns the system-dependent file path to the current component directory, including the ".wo" extension. |
WOActionResults |
performParentAction(java.lang.String anAction)
Invokes the specified action on this component's parent. |
void |
pullValuesFromParent()
Called before each phase of the request-response cycle, if synchronizesVariablesWithBindings is true and the component is not stateless. |
void |
pushValuesToParent()
Called after each phase of the request-response cycle, if synchronizesVariablesWithBindings is true and the component is not stateless. |
void |
reset()
Called only on stateless components to tell themselves to reset themselves for another invocation using a different context. |
WOSession |
session()
Returns the current session object, creating it if it doesn't exist. |
void |
setCachingEnabled(boolean enabled)
Sets whether templates are cached. |
void |
setValueForBinding(java.lang.Object aValue,
java.lang.String aBinding)
Sets the value for the specified binding for this component. |
void |
sleep()
Called at the end of a request-response cycle. |
java.lang.Object |
storedValueForKey(java.lang.String aKey)
|
boolean |
synchronizesVariablesWithBindings()
Returns true if this component should get and set values in its parent. |
void |
takeStoredValueForKey(java.lang.Object aValue,
java.lang.String aKey)
|
void |
takeValueForKey(java.lang.Object aValue,
java.lang.String aKey)
|
void |
takeValueForKeyPath(java.lang.Object aValue,
java.lang.String aPath)
|
void |
takeValuesFromDictionary(java.util.Map aValueMap)
|
void |
takeValuesFromRequest(WORequest aRequest,
WOContext aContext)
This method is called to retrieve user-entered data from the request. |
WOElement |
template()
Returns the root of the tree of elements produced by parsing the templates in the component directory for this component. |
static WOElement |
templateWithHTMLString(java.lang.String anHTMLString,
java.lang.String aDeclaration,
java.util.List aLanguageList)
Returns the root of the tree of elements produced by parsing the specfified HTML string and bindings declaration string. |
WOElement |
templateWithName(java.lang.String aComponentName)
Deprecated. Use template() instead. |
void |
unableToSetNullForKey(java.lang.String aKey)
|
java.lang.Object |
validateTakeValueForKeyPath(java.lang.Object aValue,
java.lang.String aKey)
|
void |
validationFailedWithException(java.lang.Throwable anException,
java.lang.Object aValue,
java.lang.String aPath)
Called when exceptions are raised by assigning values to this object. |
java.lang.Object |
valueForBinding(java.lang.String aBinding)
Returns the value for the specified binding for this component. |
java.lang.Object |
valueForKey(java.lang.String aKey)
|
java.lang.Object |
valueForKeyPath(java.lang.String aPath)
|
net.wotonomy.foundation.NSDictionary |
valuesForKeys(java.util.List aKeyList)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient WOContext context
protected boolean cachingEnabled
protected WOElement template
protected WOComponent parent
Constructor Detail |
---|
public WOComponent()
public WOComponent(WOContext aContext)
Method Detail |
---|
public java.lang.String name()
public java.lang.String path()
public java.lang.String baseURL()
public java.lang.String frameworkName()
public void setCachingEnabled(boolean enabled)
public boolean isCachingEnabled()
public WOElement template()
public WOElement templateWithName(java.lang.String aComponentName)
public static WOElement templateWithHTMLString(java.lang.String anHTMLString, java.lang.String aDeclaration, java.util.List aLanguageList)
public void awake()
public void takeValuesFromRequest(WORequest aRequest, WOContext aContext)
WOElement
takeValuesFromRequest
in class WOElement
public WOActionResults invokeAction(WORequest aRequest, WOContext aContext)
WOElement
invokeAction
in class WOElement
public void appendToResponse(WOResponse aResponse, WOContext aContext)
WOElement
appendToResponse
in class WOElement
public void sleep()
public WOResponse generateResponse()
generateResponse
in interface WOActionResults
public WOComponent parent()
public WOActionResults performParentAction(java.lang.String anAction)
public void pullValuesFromParent()
public void pushValuesToParent()
public boolean isStateless()
public void reset()
public WOApplication application()
public boolean hasSession()
public WOSession session()
public WOContext context()
public WOComponent pageWithName(java.lang.String aName)
public void validationFailedWithException(java.lang.Throwable anException, java.lang.Object aValue, java.lang.String aPath)
public java.lang.String descriptionForResponse(WOResponse aResponse, WOContext aContext)
public boolean synchronizesVariablesWithBindings()
public boolean canGetValueForBinding(java.lang.String aBinding)
public boolean canSetValueForBinding(java.lang.String aBinding)
public boolean hasBinding(java.lang.String aBinding)
public java.lang.Object valueForBinding(java.lang.String aBinding)
public void setValueForBinding(java.lang.Object aValue, java.lang.String aBinding)
public static void logString(java.lang.String aString)
public static void debugString(java.lang.String aString)
public java.lang.Object valueForKeyPath(java.lang.String aPath)
valueForKeyPath
in interface net.wotonomy.foundation.NSKeyValueCodingAdditions
public void takeValueForKeyPath(java.lang.Object aValue, java.lang.String aPath)
takeValueForKeyPath
in interface net.wotonomy.foundation.NSKeyValueCodingAdditions
public net.wotonomy.foundation.NSDictionary valuesForKeys(java.util.List aKeyList)
valuesForKeys
in interface net.wotonomy.foundation.NSKeyValueCodingAdditions
public void takeValuesFromDictionary(java.util.Map aValueMap)
takeValuesFromDictionary
in interface net.wotonomy.foundation.NSKeyValueCodingAdditions
public java.lang.Object valueForKey(java.lang.String aKey)
valueForKey
in interface net.wotonomy.control.EOKeyValueCoding
valueForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public void takeValueForKey(java.lang.Object aValue, java.lang.String aKey)
takeValueForKey
in interface net.wotonomy.control.EOKeyValueCoding
takeValueForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public java.lang.Object storedValueForKey(java.lang.String aKey)
storedValueForKey
in interface net.wotonomy.control.EOKeyValueCoding
storedValueForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public void takeStoredValueForKey(java.lang.Object aValue, java.lang.String aKey)
takeStoredValueForKey
in interface net.wotonomy.control.EOKeyValueCoding
takeStoredValueForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public java.lang.Object handleQueryWithUnboundKey(java.lang.String aKey)
handleQueryWithUnboundKey
in interface net.wotonomy.control.EOKeyValueCoding
handleQueryWithUnboundKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public void handleTakeValueForUnboundKey(java.lang.Object aValue, java.lang.String aKey)
handleTakeValueForUnboundKey
in interface net.wotonomy.control.EOKeyValueCoding
handleTakeValueForUnboundKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public void unableToSetNullForKey(java.lang.String aKey)
unableToSetNullForKey
in interface net.wotonomy.control.EOKeyValueCoding
unableToSetNullForKey
in interface net.wotonomy.foundation.NSKeyValueCoding
public java.lang.Object validateTakeValueForKeyPath(java.lang.Object aValue, java.lang.String aKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |