|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.ajax.AjaxComponent
er.ajax.AjaxExpansion
public class AjaxExpansion
AjaxExpansion provides an easy way to make expansion areas that appear and disappear by clicking a link (for instance, expandable options areas). The simple implementation of an expansion area would include wrapping the toggle link in the AjaxUpdateContainer. The problem with this approach is that if you want to animate the appearance of the contents, the animation effects the link as well as the contents. AjaxExpansion instead only updates the contents and applies an "expanded" class to the link, which you can use to change the expansion icon in a stylesheet (see AjaxExample2's ToggleDetails example). If you want to use something fancier than a string as link label, you can put a ERXWOTemplate with templateName='label' inside the component. If present, that will replace the label provided by the 'string' binding.
Bindings | |
id | the id of the contents div |
linkID | the id of the toggle link (defaults to "[id]Link") |
class | the class of the contents div |
linkClass | the class of the toggle link (always gets "expansion" added, and "expanded" when opened) |
expanded | optionally allows controlling the expansion state of the contents |
initiallyExpanded | optionally allows controlling the initial expansion state when the "expanded" binding is NOT used |
string | the string displayed for the link. For something fancier than a plain string, see above. |
openedLabel | the string to display when expanded. An alternative to the 'string' binding. |
closedLabel | the string to display when not expanded. An alternative to the 'string' binding. |
insertion | the insertion effect (see AjaxUpdateLink) |
insertionDuration | the insertion effect duration (see AjaxUpdateLink) |
action | the action to fire when the contents are expanded |
onLoading | JavaScript function to evaluate when the update request begins |
onComplete | JavaScript function to evaluate when the update request has finished. |
onSuccess | JavaScript function to evaluate when the update request was successful. |
onFailure | JavaScript function to evaluate when the update request has failed. |
onException | JavaScript function to evaluate when the update request had errors. |
accesskey | hot key that should toggle the expansion (optional) |
onExpansionComplete | value for the AjaxUpdateContainer onRefreshComplete binding when the contents are expanded |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent |
---|
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor |
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
---|
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException |
Field Summary |
---|
Fields inherited from class com.webobjects.appserver.WOComponent |
---|
_Extension, _IsEventLoggingEnabled, _keyAssociations |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling |
---|
_CLASS |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
---|
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator |
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding |
---|
NullValue |
Fields inherited from interface com.webobjects.foundation.NSValidation |
---|
_CLASS |
Constructor Summary | |
---|---|
AjaxExpansion(com.webobjects.appserver.WOContext context)
|
Method Summary | |
---|---|
protected void |
addRequiredWebResources(com.webobjects.appserver.WOResponse response)
Override this method to append the needed scripts for this component. |
com.webobjects.appserver.WOActionResults |
handleRequest(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Override this method to return the response for an Ajax request. |
java.lang.String |
id()
|
boolean |
isExpanded()
|
java.lang.String |
jsEscapedString()
|
java.lang.String |
linkClass()
|
java.lang.String |
linkID()
|
java.lang.String |
onExpansionComplete()
|
void |
setExpanded(boolean expanded)
|
java.lang.String |
string()
|
boolean |
synchronizesVariablesWithBindings()
|
com.webobjects.appserver.WOActionResults |
toggle()
|
Methods inherited from class com.webobjects.appserver.WOComponent |
---|
_associationWithName, _awakeInContext, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AjaxExpansion(com.webobjects.appserver.WOContext context)
Method Detail |
---|
public boolean synchronizesVariablesWithBindings()
synchronizesVariablesWithBindings
in class com.webobjects.appserver.WOComponent
public java.lang.String linkID()
public java.lang.String linkClass()
public java.lang.String id()
public java.lang.String string()
public java.lang.String jsEscapedString()
protected void addRequiredWebResources(com.webobjects.appserver.WOResponse response)
AjaxComponent
addRequiredWebResources
in class AjaxComponent
public com.webobjects.appserver.WOActionResults handleRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
AjaxComponent
handleRequest
in interface IAjaxElement
handleRequest
in class AjaxComponent
public boolean isExpanded()
public void setExpanded(boolean expanded)
public com.webobjects.appserver.WOActionResults toggle()
public java.lang.String onExpansionComplete()
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |