|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.appserver.WOAction
Field Summary | |
static String |
actionText
|
Constructor Summary | |
WOAction(WORequest aRequest)
Subclasses must override to provide any additional initialization. |
Method Summary | |
static boolean |
canAccessFieldsDirectly()
WOAction's implementation of this static method returns true , indicating that key-value coding is allowed to access fields
in this object if an appropriate method isn't present. |
WOContext |
context()
Returns the current WOContext object. |
static void |
debugString(String string)
Deprecated. use NSLog instead. |
WOSession |
existingSession()
Restores the session based on the request. |
abstract String |
getSessionIDForRequest(WORequest aRequest)
Get and return the session ID for the request, if one exists. |
Object |
handleQueryWithUnboundKey(String key)
|
void |
handleTakeValueForUnboundKey(Object value,
String key)
|
void |
initializeRequestSessionIDInContext(WOContext aContext)
|
NSArray |
languages()
Returns an NSArray of languages for which the action is localized. |
static void |
logString(String string)
Deprecated. Use NSLog instead |
WOComponent |
pageWithName(String aComponentName)
Returns the page with given name. |
abstract WOActionResults |
performActionNamed(String anActionName)
Performs the action with the specified name and returns the result of that action. |
WORequest |
request()
Returns the WORequest that created this Action object. |
WOSession |
session()
If there is no session, this method first tries to restore the session that the request's session ID refers to. |
void |
setLanguages(NSArray someLanguages)
Sets the languages for which the action is localized. |
void |
takeValueForKey(Object value,
String key)
|
void |
takeValueForKeyPath(Object value,
String keyPath)
|
String |
toString()
|
void |
unableToSetNullForKey(String key)
|
Object |
validateTakeValueForKeyPath(Object value,
String keyPath)
|
Object |
validateValueForKey(Object value,
String key)
|
Object |
valueForKey(String key)
|
Object |
valueForKeyPath(String keyPath)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String actionText
Constructor Detail |
public WOAction(WORequest aRequest)
aRequest
- the request to be processedMethod Detail |
public static boolean canAccessFieldsDirectly()
true
, indicating that key-value coding is allowed to access fields
in this object if an appropriate method isn't present.
true
only if key can access fields directly, false
otherwisepublic WOContext context()
public static void debugString(String string)
string
- message to be loggedNSLog
public WOSession existingSession()
null
. To determine if a session failed to restore,
check the request's session ID to see if it non-null
and if so, call this
method to check its result.
session()
public abstract String getSessionIDForRequest(WORequest aRequest)
null
.
aRequest
- the request being handled
null
public Object handleQueryWithUnboundKey(String key)
public void handleTakeValueForUnboundKey(Object value, String key)
public void initializeRequestSessionIDInContext(WOContext aContext)
public NSArray languages()
setLanguages
.
setLanguages(NSArray languages)
public static void logString(String string)
NSLog.err.appendln(string)
.
You should use NSLog instead.
string
- message to be loggedNSLog
public WOComponent pageWithName(String aComponentName)
aComponentName
- the name of the WOComponent
public abstract WOActionResults performActionNamed(String anActionName)
actionText
to anActionName
and tries to invoke the resulting method name.
Override this method to change how actions are dispatched.
anActionName
- name of the action
public WORequest request()
public WOSession session()
This method may call WOApplication's restoreSessionWithID
, which posts
a SessionDidRestoreNotification
. If the session does not exist or cannot be restored,
the notification is posted with a null
session for parameter
(the only indication that a session time out has occurred),
and a new session object is created.
This method may also call WOApplication's createSessionForRequest
If the session can not be created, an IllegalStateException
is thrown,
otherwise, a SessionDidCreateNotification
is posted and the new session is returned.
existingSession()
,
WOSession.SessionDidRestoreNotification
public void setLanguages(NSArray someLanguages)
.lproj
directories for localized strings, images, and component definitions.
Note that the language setting only last for an action and does not persist across
actions. If you want the language setting to persist, you should consider creating a
temporary session and use setLanguages
in that session. If you set the
language setting in a session, that setting has precedence.
someLanguages
- the array of languages for the actionlanguages()
,
WOSession.setLanguages(NSArray)
public void takeValueForKey(Object value, String key)
public void takeValueForKeyPath(Object value, String keyPath)
public String toString()
public void unableToSetNullForKey(String key)
public Object validateTakeValueForKeyPath(Object value, String keyPath) throws NSValidation.ValidationException
NSValidation.ValidationException
public Object validateValueForKey(Object value, String key) throws NSValidation.ValidationException
NSValidation.ValidationException
public Object valueForKey(String key)
public Object valueForKeyPath(String keyPath)
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |