|
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.extensions.components.ERXComponent
er.extensions.components.ERXNonSynchronizingComponent
er.extensions.components.javascript.ERXJSToManyRelationshipEditor
public class ERXJSToManyRelationshipEditor
A fancy to-many relationship editor component.
Bindings | |
displayString | for the items in the menu, this should be a keyPath that will be resolved from each item to
produce the display string for the item. |
item | to use as an iteration variable |
list | of items to display; equivalent to the possible values from which a user might choose |
selections | items from the list that are selected. The resulting selections will be pushed back into the
parent component's variable that is bound to the selections binding. |
sortKey | (optional) to use in order to produce a sorted menu |
Nested Class Summary | |
---|---|
static interface |
ERXJSToManyRelationshipEditor.Keys
|
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 | |
---|---|
protected com.webobjects.foundation.NSArray |
_list
|
protected com.webobjects.foundation.NSArray |
_selections
|
protected java.lang.Object |
currentItem
|
static org.apache.log4j.Logger |
log
|
Fields inherited from class er.extensions.components.ERXComponent |
---|
_dynamicBindings |
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 | |
---|---|
ERXJSToManyRelationshipEditor(com.webobjects.appserver.WOContext context)
|
Method Summary | |
---|---|
java.lang.String |
addItemScript()
Builds the JavaScript used to add the selected item from the selections popup to the selected items. |
void |
appendToResponse(com.webobjects.appserver.WOResponse aResponse,
com.webobjects.appserver.WOContext aContext)
Calls ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent() prior to super.appendToResponse. |
java.lang.String |
availableValuesPopupMenu()
Builds the select menu for adding available items to the selected items. |
java.lang.Object |
currentItem()
Gets the item currently being displayed. |
java.lang.String |
displayString()
Gets the display string for the current item. |
java.lang.String |
editorContextID()
Gets the context ID of the editor (this component), escaped for use in JavaScript. |
java.lang.String |
editorName()
Formats the name of this editor instance. |
java.lang.String |
hiddenFieldName()
Formats the name of the hidden field for this editor instance. |
void |
invalidateCaches()
Resets the state variables. |
boolean |
isListEmpty()
Determines if the list is empty |
boolean |
isStateless()
component is not stateless |
int |
itemIndex()
Gets the index of the current item in the overall list. |
java.lang.String |
javascriptForThisEditorInstance()
Formats the JavaScript used to initialize this instance of the editor. |
com.webobjects.foundation.NSArray |
list()
Gets the list of items to display. |
com.webobjects.foundation.NSArray |
maybeSortedList()
Gets the list of items and sorts it by the sort key if a sort key is available. |
java.lang.String |
removeItemScript()
Builds the JavaScript used to remove the item from the selections. |
void |
reset()
|
java.lang.String |
selectedValuesTableName()
Formats the name of the selected values table for this editor instance. |
com.webobjects.foundation.NSArray |
selections()
Gets the selections. |
java.lang.String |
selectionsString()
Formats the selection string for the hidden field from the indexes of the items in the selection subset of the list. |
void |
setCurrentItem(java.lang.Object anItem)
Sets the item being displayed. |
void |
setSelectionsString(java.lang.String value)
Sets the selection string from the input. |
void |
sleep()
|
Methods inherited from class er.extensions.components.ERXNonSynchronizingComponent |
---|
invokeAction, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings, takeValuesFromRequest |
Methods inherited from class com.webobjects.appserver.WOComponent |
---|
_associationWithName, _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, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, takeValueForKey, takeValueForKeyPath, 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 |
Field Detail |
---|
public static final org.apache.log4j.Logger log
protected com.webobjects.foundation.NSArray _list
protected com.webobjects.foundation.NSArray _selections
protected java.lang.Object currentItem
Constructor Detail |
---|
public ERXJSToManyRelationshipEditor(com.webobjects.appserver.WOContext context)
Method Detail |
---|
public boolean isStateless()
ERXNonSynchronizingComponent
isStateless
in class ERXNonSynchronizingComponent
public void reset()
reset
in class ERXComponent
public java.lang.Object currentItem()
public void setCurrentItem(java.lang.Object anItem)
anItem
- to displaypublic com.webobjects.foundation.NSArray list()
public com.webobjects.foundation.NSArray selections()
public java.lang.String displayString()
public void invalidateCaches()
public void sleep()
sleep
in class com.webobjects.appserver.WOComponent
public void appendToResponse(com.webobjects.appserver.WOResponse aResponse, com.webobjects.appserver.WOContext aContext)
ERXNonSynchronizingComponent
ERXNonSynchronizingComponent.resetCachedBindingsInStatefulComponent()
prior to super.appendToResponse.
appendToResponse
in class ERXNonSynchronizingComponent
aResponse
- to which we are appendingaContext
- context of the responsepublic com.webobjects.foundation.NSArray maybeSortedList()
public boolean isListEmpty()
public int itemIndex()
public java.lang.String selectionsString()
public void setSelectionsString(java.lang.String value)
value
- of the selections stringpublic java.lang.String editorContextID()
public java.lang.String editorName()
public java.lang.String hiddenFieldName()
public java.lang.String selectedValuesTableName()
public java.lang.String javascriptForThisEditorInstance()
public java.lang.String removeItemScript()
public java.lang.String addItemScript()
public java.lang.String availableValuesPopupMenu()
|
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 |