|
WebObjects 5.4.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.appserver.WOElement com.webobjects.appserver.WOComponent
public class WOComponent
WOComponent objects dynamically render web pages (or sections of pages) at runtime. They provide custom navigation and other logic for the page, provide a framework for organizing constituent objects (static and dynamic HTML elements and subcomponents), and enable the attribute bindings of dynamic elements.
The WOComponent class has many methods that have the same names as methods of the WOApplication class. However, the scope of the WOComponent methods is limited to a component rather than being application-wide. For example, you can control component-definition caching on a per-component basis
using setCachingEnabled
, which has a WOApplication counterpart. When this kind of caching is enabled for a component, the application parses the contents of the component directory the first time the component is requested, creates the component definition, stores this object in
memory, and restores it for subsequent requests.
WOComponent objects also respond to awake(), sleep()
and the three request-handling methods: takeValuesFromRequest, invokeAction
and appendToResponse
. You can override these methods in your compiled subclasses, and thereby integrate your custom
behavior into the request-response loop.
takeValuesFromRequest
, it forwards that message to its subcomponents.
The WOComponent class also provides a child-parent callback mechanism to allow a child component to communicate with its parent. In the parent's declaration file, bind an arbitrary attribute of the child to an action method of the parent. Then, as the last step in the child's action method,
invoke performParentAction
with the argument being the arbitrary attribute, returning the object received back as the response page.
Stateless components cannot have state. They can have instance variables, but the variable's content must be transient. To ensure that when the shared instance of a component is reused by another session there are no side effects, reset your component's instance variables by implementing the
reset
method. In your implementation of reset , set to null each instance variable. Note that a stateless component's instance variables will remain valid for the duration of the phase (takeValuesFromRequest , invokeAction , appendToResponse
); this lets you
use instance variables in the stateless components to hold things analogous to items in a WORepetition.
Stateless components primarily save memory, but they can significantly speed up the application as well depending on how many stateless components you use in the application. To make a component stateless, override the component's isStateless
method so that it returns true.
If a stateless component is needed simultaneously in separate threads, additional instances of the component are created (and later discarded) as necessary to prevent conflicts. Thus, the number of threads in which a component could be used determines the maximum number of instances of a stateless component that may be allocated at any given time.
WOComponent.setCachingEnabled(boolean)
,
WOComponent.awake()
,
WOComponent.sleep()
,
WOComponent.takeValuesFromRequest(WORequest, WOContext)
,
WOComponent.invokeAction(WORequest, WOContext)
,
WOComponent.appendToResponse(WOResponse aResponse, WOContext aContext)
,
WOComponent.performParentAction(String anActionName)
,
WOComponent.reset()
,
WOComponent.isStateless()
,
Serialized FormNested Class Summary | |
---|---|
static class |
WOComponent.Event
The WOComponent.Event class is used to time various operations at the component level. |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
---|
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException |
Field Summary |
---|
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
KeyPathSeparator |
Constructor Summary | |
---|---|
WOComponent()
Deprecated. use WOComponent(WOContext aContext) instead. Using this constructor will slow down your application considerably. |
|
WOComponent(WOContext aContext)
WebObjects Builder archive files exist in the component directory, and this constructor initializes component variables from this archive. |
Method Summary | |
---|---|
void |
appendToResponse(WOResponse aResponse,
WOContext aContext)
Forces the component to generate its interface and output it in the response's content. |
WOApplication |
application()
Returns the WOApplication object for the current application. |
void |
awake()
Invoked at the beginning of a WOComponent's involvement in a cycle of the request-response loop. |
String |
baseURL()
Returns the component URL relative to the server's document root. |
NSArray |
bindingKeys()
Returns an NSArray containing the binding keys (as String objects) for each of the WOComponent's associations. |
static boolean |
canAccessFieldsDirectly()
WOComponent's implementation of this static method returns true . |
boolean |
canGetValueForBinding(String aBindingName)
Verifies that the binding exists and that valueForBinding will return a value. |
boolean |
canSetValueForBinding(String aBindingName)
Verifies that the binding exists and that setValueForBinding will succeed. |
Object |
clone()
Conformance to Cloneable. |
WOContext |
context()
Returns the WOContext object for the current transaction (request-response loop) |
static void |
debugString(String string)
Deprecated. debugString is no longer supported |
String |
descriptionForResponse(WOResponse aResponse,
WOContext aContext)
Records information about the component, if it is the top-level component. |
void |
ensureAwakeInContext(WOContext aContext)
Ensures that the receiver is awake in the specified context. |
String |
frameworkName()
If the component is stored in a framework, this method returns the name of that framework. |
WOResponse |
generateResponse()
Conformance to WOActionResults. |
Object |
handleQueryWithUnboundKey(String key)
Conformance to NSKeyValueCoding.ErrorHandling. |
void |
handleTakeValueForUnboundKey(Object value,
String key)
Conformance to NSKeyValueCoding.ErrorHandling. |
boolean |
hasBinding(String aBindingName)
Returns whether the component has a binding named aBindingName . |
boolean |
hasSession()
Returns whether the component is already in a session. |
WOActionResults |
invokeAction(WORequest aRequest,
WOContext aContext)
Tells the component to execute any action specified in the request. |
boolean |
isCachingEnabled()
Returns whether component definition caching is enabled for this component. |
boolean |
isEventLoggingEnabled()
Called to determine if a component wants event logging. |
boolean |
isStateless()
By default, this method returns false , indicating that state will be maintained for instances of the receiver. |
static void |
logString(String string)
Deprecated. logString is no longer supported. |
String |
name()
Returns the name of the component, which includes a path of all directories under DOCUMENTROOT/WebObjects and is minus the ".wo" extension. |
WOComponent |
pageWithName(String aName)
Returns a new page instance (a WOComponent object) identified by aName . |
WOComponent |
parent()
|
String |
path()
Deprecated. use pathURL instead. |
URL |
pathURL()
Returns the path URL to the component. |
WOActionResults |
performParentAction(String anActionName)
Allows a subcomponent to invoke an action method of its parent component bound to the child component. |
void |
pullValuesFromParent()
Pulls binding values from the parent component. |
void |
pushValuesToParent()
Pushes binding values to the parent component. |
void |
reset()
Allows a stateless component to reset temporary references. |
WOSession |
session()
Returns the current WOSession object. |
void |
set_componentUnroll(Object anObject)
Private. |
void |
set_unroll(Object anObject)
Private - this method is used by the Direct to Web generation layer, and does nothing in WOComponent. |
void |
setCachingEnabled(boolean aFlag)
Enables or disables the caching of this component's definition. |
void |
setValueForBinding(Object aValue,
String aBindingName)
Sets the value of the binding specified in the parent component. |
void |
setVariableValueForName(String name,
Object value)
|
void |
sleep()
Invoked at the conclusion of a request-handling cycle. |
boolean |
synchronizesVariablesWithBindings()
Indicates if the push-pull of values in the parent component is enabled. |
void |
takeValueForKey(Object value,
String key)
Conformance to NSKeyValueCoding. |
void |
takeValueForKeyPath(Object value,
String keyPath)
Conformance to NSKeyValueCodingAdditions. |
void |
takeValuesFromRequest(WORequest aRequest,
WOContext aContext)
Tells the component to synchronize its variables with values from the request. |
WOElement |
template()
Returns the graph of static, dynamic elements and components that compose this component. |
static WOElement |
templateWithHTMLString(String anHTMLString,
String aDeclarationString,
NSArray aLanguageArray)
Deprecated. Use WOComponent.templateWithHTMLString(String, String, String, NSArray, WOAssociationFactory, WOMLNamespaceProvider) instead. |
static WOElement |
templateWithHTMLString(String referenceName,
String anHTMLString,
String aDeclarationString,
NSArray aLanguageArray,
WOAssociationFactory associationFactory,
WOMLNamespaceProvider namespaceProvider)
Deprecated. since 5.4 |
static WOElement |
templateWithHTMLString(String frameworkName,
String referenceName,
String anHTMLString,
String aDeclarationString,
NSArray aLanguageArray,
WOAssociationFactory associationFactory,
WOMLNamespaceProvider namespaceProvider)
Programmatically creates a component's template. |
WOElement |
templateWithName(String aName)
Deprecated. Use template instead. |
String |
toString()
|
void |
unableToSetNullForKey(String key)
Conformance to NSKeyValueCoding.ErrorHandling. |
Object |
validateTakeValueForKeyPath(Object value,
String keyPath)
Validates (and coerces) the given value, assigning it if it is different than the current value. |
Object |
validateValueForKey(Object value,
String key)
Conformance to NSValidation. |
void |
validationFailedWithException(Throwable t,
Object value,
String keyPath)
Called when an Enterprise Object or formatter failed validation during an assignment. |
Object |
valueForBinding(String aBindingName)
Gets the value for the specified binding from the parent component. |
boolean |
valueForBooleanBinding(String binding,
boolean defaultValue)
Gets the value of an optional boolean binding of the component. |
Integer |
valueForIntegerBinding(String binding,
Number defaultValue)
Gets the value of an optional integer binding of the component. |
Object |
valueForKey(String key)
Conformance to NSKeyValueCoding. |
Object |
valueForKeyPath(String keyPath)
Conformance to NSKeyValueCodingAdditions. |
NSArray |
valueForNSArrayBindings(String binding,
NSArray defaultValue)
Gets the value of an optional NSArray binding of the component. |
NSDictionary |
valueForNSDictionaryBindings(String binding,
NSDictionary defaultValue)
Gets the value of an optional NSDictionary binding of the component. |
Number |
valueForNumberBinding(String binding,
Number defaultValue)
Gets the value of an optional number binding of the component. |
String |
valueForStringBinding(String binding,
String defaultValue)
Gets the value of an optional String binding of the component. |
Object |
variableValueForName(String name)
|
WOComponentVariable |
variableWithName(String name)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public WOComponent()
WOComponent.WOComponent(WOContext aContext)
public WOComponent(WOContext aContext)
WOComponent(WOContext aContext)
in compiled subclasses to perform custom initializations; as always, first invoke super
's default constructor.
aContext
- context of a transactionMethod Detail |
---|
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- when the object is not of known formatpublic String toString()
toString
in class WOElement
public String name()
DOCUMENTROOT/WebObjects
and is minus the ".wo" extension. For example, "Main" is a typical component name.
WOComponent.baseURL()
,
WOComponent.path()
@Deprecated public String path()
WOComponent.pathURL()
public URL pathURL()
file://Users/auser/MyApp.woa/Resources/Main.wo
or jar:file://Users/auser/MyApp.jar!/Resources/Main.wo
or
WOComponent.baseURL()
,
WOComponent.name()
public String baseURL()
WOComponent.name()
,
WOComponent.path()
public String frameworkName()
NeXT_ROOT/System/Library/Frameworks/WOExtensions.framework
, then this method returns the String "WOExtensions". If the component is not
stored in a framework, this method returns null
.
WOResourceManager
public void setCachingEnabled(boolean aFlag)
By default, individual component definition caching is controlled by WOApplication's global component definition caching policy. The global policy is set according to the start-up parameter WOCachingEnabled, or WOApplication's setCachingEnabled(boolean aFlag)
. With it, you can
turn component definition caching off globally. You can then control caching of individual component definitions using WOComponent's version of this method. Note that most large applications will set the global caching to false at deployment time. Selective caching is an especially valuable
technique for large applications where a few highly specialized components should not be cached but re-parsed everytime they are requested.
aFlag
- flag deciding the caching of the receiving componentWOComponent.isCachingEnabled()
,
WOApplication.setCachingEnabled(boolean aFlag)
public boolean isCachingEnabled()
true
if caching is enabled for the component, false
otherwiseWOComponent.setCachingEnabled(boolean flag)
,
WOApplication.isCachingEnabled()
public WOElement template()
WOElement
,
WOComponent.setCachingEnabled(boolean)
,
WOApplication.setCachingEnabled(boolean aFlag)
public void pullValuesFromParent()
synchronizesVariablesWithBindings()
returns true
), this method causes binding values to be pulled from the parent component.
public void pushValuesToParent()
synchronizesVariablesWithBindings()
returns true
), this method causes binding values to be pushed up to the parent component.
@Deprecated public WOElement templateWithName(String aName)
template
instead.
aName
- ignored
WOComponent.template()
public NSArray bindingKeys()
public boolean isStateless()
false
, indicating that state will be maintained for instances of the receiver. Overriding this method to return true
will make the component stateless. A single instance of each stateless component is shared between multiple
sessions, reducing the application's memory footprint.
By default, stateless components don't synchronize. So, if you override this method to return true
and you want the component to synchronize, you must also override synchronizesVariablesWithBindings
and return true
.
true
if this method is overidden, false
otherwiseWOComponent.reset()
,
WOComponent.synchronizesVariablesWithBindings()
public void reset()
WOComponent.isStateless()
public boolean synchronizesVariablesWithBindings()
This method returns false
for stateless components and true
otherwise. Override this method to create a non-synchronizing, stateful component (return false
), or a synchronizing stateless component (return true
).
false
if this method creates a non-synchronizing component, true
otherwiseWOComponent.valueForBinding(String aBindingName)
,
WOComponent.setValueForBinding(Object aValue, String aBindingName)
,
WOComponent.pullValuesFromParent()
,
WOComponent.pushValuesToParent()
,
WOComponent.isStateless()
public Object valueForBinding(String aBindingName)
null
.
aBindingName
- name of a binding
WOComponent.canGetValueForBinding(String aBindingName)
,
WOComponent.setValueForBinding(Object aValue, String aBindingName)
,
WOComponent.synchronizesVariablesWithBindings()
public boolean valueForBooleanBinding(String binding, boolean defaultValue)
binding
- The binding namedefaultValue
- The default value
public Number valueForNumberBinding(String binding, Number defaultValue)
binding
- The binding namedefaultValue
- The default value
public Integer valueForIntegerBinding(String binding, Number defaultValue)
binding
- The binding namedefaultValue
- The default value
public String valueForStringBinding(String binding, String defaultValue)
binding
- The binding namedefaultValue
- The default value
public NSArray valueForNSArrayBindings(String binding, NSArray defaultValue)
binding
- The binding namedefaultValue
- The default value
public NSDictionary valueForNSDictionaryBindings(String binding, NSDictionary defaultValue)
binding
- The binding namedefaultValue
- The default value
public void setValueForBinding(Object aValue, String aBindingName)
aBindingName
is set to aValue
in the parent component. If the binding isn't settable, this method throws an exception.
aValue
- value of the bindingaBindingName
- name of the binding to be setWOAssociation.isValueSettableInComponent(WOComponent aComponent)
public boolean hasBinding(String aBindingName)
aBindingName
. This method traverses the chain of associations to the top-level parent, if necessary.
aBindingName
- name of the binding
true
if the binding exists on the component else false
WOComponent.canGetValueForBinding(String aBindingName)
,
WOComponent.canSetValueForBinding(String aBindingName)
public boolean canGetValueForBinding(String aBindingName)
valueForBinding
will return a value. The default implementation just calls hasBinding(String aBindingName)
aBindingName
- binding name used when values are pushed to or pulled from the parent component
true
if key gets value for binding, otherwise false
WOComponent.canSetValueForBinding(String aBindingName)
,
WOComponent.hasBinding(String aBindingName)
,
WOComponent.valueForBinding(String aBindingName)
public boolean canSetValueForBinding(String aBindingName)
setValueForBinding
will succeed.
aBindingName
- binding name used when values are pushed to or pulled from the parent component
true
if key can set value for binding, otherwise false
WOComponent.canGetValueForBinding(String aBindingName)
,
WOComponent.hasBinding(String aBindingName)
,
WOComponent.setValueForBinding(Object aValue, String aBindingName)
public void awake()
WOComponent.ensureAwakeInContext(WOContext aContext)
,
WOComponent.sleep()
public void ensureAwakeInContext(WOContext aContext)
ensureAwakeInContext()
if the component was just created with pageWithName
, if it was restored from
the WebObjects page cache, or if the page will simply be returned as the result of an action. That is, you only need to invoke this method if you're going to invoke methods on a component that is otherwise not awakened. If the receiving component is already awake, this method has no effect.
aContext
- context of a transactionWOComponent.awake()
,
WOComponent.pageWithName(String aName)
public void takeValuesFromRequest(WORequest aRequest, WOContext aContext)
template()
. In this phase, each dynamic element in the template extracts any entered data or changed state (such as a check in a check box)
associated with an attribute and assigns the value to the component variable bound to the attribute. Subclasses of WOComponent can override this method to replace or supplement the default behavior with custom logic.
takeValuesFromRequest
in class WOElement
aRequest
- the current request with the WOComponent objectaContext
- context of a transactionWOComponent.appendToResponse(WOResponse aResponse, WOContext aContext)
,
WOComponent.invokeAction(WORequest aRequest, WOContext aContext)
public WOActionResults invokeAction(WORequest aRequest, WOContext aContext)
invokeAction
method is
propagated through the WOElement objects of the page. The dynamic element on which the user has acted (by, for example, clicking a button) responds by triggering the method in the request component that is bound to the action. WOComponent's default implementation of this method invokes
invokeAction
on the root WOElement object of the component template.
invokeAction
in class WOElement
aRequest
- the requestaContext
- context of the transaction
WOComponent.appendToResponse(WOResponse aResponse, WOContext aContext)
,
WOComponent.takeValuesFromRequest(WORequest aRequest, WOContext aContext)
public void appendToResponse(WOResponse aResponse, WOContext aContext)
appendToResponse
method on the root WOElement object of the component template, which in turn invokes
appendToResponse
. Subclasses of WOComponent can override this method to replace or supplement the default behavior with custom logic.
appendToResponse
in class WOElement
aResponse
- the HTTP response that an application returns to a Web server to complete a cycle of the request-response loopaContext
- context of a transactionWOComponent.invokeAction(WORequest aRequest, WOContext aContext)
,
WOComponent.takeValuesFromRequest(WORequest aRequest, WOContext aContext)
public void sleep()
WOComponent.awake()
public WOComponent parent()
public WOActionResults performParentAction(String anActionName)
An example best illustrates this mechanism. Let's say there is a Palette subcomponent, and this WOComponent is nested in a parent component with a displaySelection
action method. When the user selects an item in the palette (perhaps a color), you want to invoke
displaySelection
to show the result of the new selection (perhaps a car in the new color). The declaration in the parent's .wod file would look like this:
PALETTE: Palette {
selection = number;
callBack = "displaySelection";
};
The "callBack" item is an arbitrary attribute of the child component bound in this declaration to the parent component's displaySelection
method. The performParentAction
method is used to activate this binding. Assuming the child component has an action method
called click
, the implementation would look like this:
public WOActionResults click() { // this is the child's action
selection = "xxxx"; // some value
// now invoke the parent's action
return performParentAction(callBack);
}
anActionName
- name of the current action method
public WOComponentVariable variableWithName(String name)
public Object variableValueForName(String name)
public void setVariableValueForName(String name, Object value)
public WOApplication application()
WOComponent.context()
,
WOComponent.session()
,
WOApplication
public WOContext context()
WOComponent.application()
,
WOComponent.session()
,
WOContext
public boolean hasSession()
hasSession
before session
.
true
if the component is in a session, false
otherwiseWOComponent.session()
public WOSession session()
WOComponent.application()
,
WOComponent.context()
,
WOComponent.hasSession()
,
WOSession
public WOComponent pageWithName(String aName)
aName
. If aName is null, the "Main" component is returned. If the method cannot create a valid page instance, it throws an exception.
aName
- the name of the component to be returned
WOSession.restorePageForContextID(String aContextID)
,
WOSession.savePage(WOComponent aPage)
,
WOApplication.pageWithName(String aName, WOContext aContext)
@Deprecated public static void logString(String string)
string
- NSLog
@Deprecated public static void debugString(String string)
string
- NSLog
public void validationFailedWithException(Throwable t, Object value, String keyPath)
t
- the exception thrown during validationvalue
- the given value to be validatedkeyPath
- the key path associated with this value, identifies the property of an objectpublic Object validateValueForKey(Object value, String key) throws NSValidation.ValidationException
validateValueForKey
in interface NSValidation
value
- the given value to be validatedkey
- the key path associated with this value, identifies the property of an object
NSValidation.ValidationException
- when the key cannot be validated by validateValueForKeyWOComponent.validateValueForKey(java.lang.Object, java.lang.String)
public Object validateTakeValueForKeyPath(Object value, String keyPath) throws NSValidation.ValidationException
validateValueForKey
returns an exception. Returns the coerced (assigned) value.
validateTakeValueForKeyPath
in interface NSValidation
value
- the given value to be validatedkeyPath
- the key path associated with this value, identifies the property of an object
NSValidation.ValidationException
- when the key cannot be validated by validateValueForKeyWOComponent.validateValueForKey(Object value, String key)
@Deprecated public static WOElement templateWithHTMLString(String anHTMLString, String aDeclarationString, NSArray aLanguageArray)
WOComponent.templateWithHTMLString(String, String, String, NSArray, WOAssociationFactory, WOMLNamespaceProvider)
instead.
WOComponent.templateWithHTMLString(String, String, String, NSArray, WOAssociationFactory, WOMLNamespaceProvider)
, which is
the preferred API call.
anHTMLString
- HTML string to create the template of the componentaDeclarationString
- declaration on the template of the componentaLanguageArray
- list of languages in specific order
@Deprecated public static WOElement templateWithHTMLString(String referenceName, String anHTMLString, String aDeclarationString, NSArray aLanguageArray, WOAssociationFactory associationFactory, WOMLNamespaceProvider namespaceProvider)
anHTMLString
as the HTML template contents and aDeclarationString
as the declarations file contents, returns (as a WOElement object) the graph of static and dynamic elements built by parsing the HTML and
declaration Strings. You can then use the returned WOElement as a component's template. This method is not called by WebObjects.
referenceName
- A name to use in reference to lend context to any exceptions thrown, or null if none is desired. For example, WOComponent would pass its name().anHTMLString
- HTML string to create the template of the componentaDeclarationString
- declaration on the template of the componentaLanguageArray
- list of languages in specific orderassociationFactory
- The association factory to use when parsing the template, pass WOApplication.application().associationFactory() for the default behavior.namespaceProvider
- The namespace provider to be used when parsing the template, pass WOApplication.application().namespaceProvider() for the default behavior.
WOComponent.templateWithName(String aName)
public static WOElement templateWithHTMLString(String frameworkName, String referenceName, String anHTMLString, String aDeclarationString, NSArray aLanguageArray, WOAssociationFactory associationFactory, WOMLNamespaceProvider namespaceProvider)
anHTMLString
as the HTML template contents and aDeclarationString
as the declarations file contents, returns (as a WOElement object) the graph of static and dynamic elements built by parsing the HTML and
declaration Strings. You can then use the returned WOElement as a component's template. This method is not called by WebObjects.
frameworkName
- framework name of the component to parsereferenceName
- A name to use in reference to lend context to any exceptions thrown, or null if none is desired. For example, WOComponent would pass its name().anHTMLString
- HTML string to create the template of the componentaDeclarationString
- declaration on the template of the componentaLanguageArray
- list of languages in specific orderassociationFactory
- The association factory to use when parsing the template, pass WOApplication.application().associationFactory() for the default behavior.namespaceProvider
- The namespace provider to be used when parsing the template, pass WOApplication.application().namespaceProvider() for the default behavior.
WOComponent.templateWithName(String aName)
public String descriptionForResponse(WOResponse aResponse, WOContext aContext)
This method is invoked only on the top-level response component, that is, the one representing the entire page. Components nested inside of that top-level component do not receive this method.
If a CLFF log file is kept for this application, the string returned by this method is recorded in that log file. Thus, you must ensure that the string you return can be analyzed by a CLFF-analysis tool.
aResponse
- the HTTP response that an application returns to a Web server to complete a cycle of the request-response loopaContext
- context of a transaction
WOStatisticsStore
public WOResponse generateResponse()
appendToResponse
on itself.
generateResponse
in interface WOActionResults
WOComponent.appendToResponse(WOResponse, WOContext)
,
WOResponse.generateResponse()
public void set_unroll(Object anObject)
anObject
- name of the current objectpublic void set_componentUnroll(Object anObject)
anObject
- name of the current objectpublic boolean isEventLoggingEnabled()
true
.
true
if the event logging is enabled for the component, false
otherwiseWOEvent
public static boolean canAccessFieldsDirectly()
true
. It indicates that key-value coding is allowed to access fields in this object if an appropriate method is not present.
true
if key can access fields directly, otherwise false
public Object valueForKey(String key)
valueForKey
in interface NSKeyValueCoding
key
- identifies the property of an object
key
NSKeyValueCoding.NullValue
,
NSKeyValueCoding.takeValueForKey(java.lang.Object, java.lang.String)
,
NSKeyValueCoding.DefaultImplementation
,
NSKeyValueCoding.ErrorHandling
,
NSKeyValueCoding.ErrorHandling.handleQueryWithUnboundKey(java.lang.String)
public void takeValueForKey(Object value, String key)
takeValueForKey
in interface NSKeyValueCoding
key
- identifies the property to be setvalue
- the value to which the property specified by key
should be setNSKeyValueCoding.NullValue
,
NSKeyValueCoding.valueForKey
,
NSKeyValueCoding.DefaultImplementation
,
NSKeyValueCoding.ErrorHandling
,
NSKeyValueCoding.ErrorHandling.handleTakeValueForUnboundKey(java.lang.Object, java.lang.String)
public Object handleQueryWithUnboundKey(String key)
handleQueryWithUnboundKey
in interface NSKeyValueCoding.ErrorHandling
key
- one of the attributes of the receiver's request
NSKeyValueCoding.DefaultImplementation
,
NSKeyValueCoding.UnknownKeyException#TargetObjectUserInfoKey
,
NSKeyValueCoding.UnknownKeyException#UnknownUserInfoKey
,
NSKeyValueCoding.valueForKey(String key)
public void handleTakeValueForUnboundKey(Object value, String key)
handleTakeValueForUnboundKey
in interface NSKeyValueCoding.ErrorHandling
value
- receiver's property identified by key is set to thiskey
- one of the attributes of the receiver's requestNSKeyValueCoding.UnknownKeyException#TargetObjectUserInfoKey
,
NSKeyValueCoding.UnknownKeyException#UnknownUserInfoKey
,
NSKeyValueCoding.takeValueForKey(Object value, String key)
public void unableToSetNullForKey(String key)
unableToSetNullForKey
in interface NSKeyValueCoding.ErrorHandling
key
- identifies the property of an objectNSKeyValueCoding.takeValueForKey
,
NSKeyValueCoding.DefaultImplementation
public Object valueForKeyPath(String keyPath)
valueForKeyPath
in interface NSKeyValueCodingAdditions
keyPath
- identifies the derived property of an object
keyPath
NSKeyValueCoding.valueForKey(java.lang.String)
,
NSKeyValueCodingAdditions.takeValueForKeyPath(java.lang.Object, java.lang.String)
,
NSKeyValueCodingAdditions.DefaultImplementation
public void takeValueForKeyPath(Object value, String keyPath)
takeValueForKeyPath
in interface NSKeyValueCodingAdditions
keyPath
- identifies a derived property of the receivervalue
- value to which the derived property identified by keyPath
will be setNSKeyValueCoding.takeValueForKey(java.lang.Object, java.lang.String)
,
NSKeyValueCodingAdditions.valueForKeyPath(java.lang.String)
,
NSKeyValueCodingAdditions.DefaultImplementation
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |