public class ERXJSToManyRelationshipEditor extends ERXNonSynchronizingComponent
Name | Description |
---|---|
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 |
Modifier and Type | Class and Description |
---|---|
static interface |
ERXJSToManyRelationshipEditor.Keys |
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
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.MapImplementation, com.webobjects.foundation.NSKeyValueCoding.Null<T>, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
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
Modifier and Type | Field and Description |
---|---|
protected NSArray |
_list |
protected NSArray |
_selections |
protected Object |
currentItem |
_dynamicBindings
_Extension, _IsEventLoggingEnabled, _keyAssociations
Constructor and Description |
---|
ERXJSToManyRelationshipEditor(com.webobjects.appserver.WOContext context) |
Modifier and Type | Method and Description |
---|---|
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. |
String |
availableValuesPopupMenu()
Builds the select menu for adding available items to the selected items.
|
Object |
currentItem()
Gets the item currently being displayed.
|
String |
displayString()
Gets the display string for the current item.
|
String |
editorContextID()
Gets the context ID of the editor (this component), escaped for use in JavaScript.
|
String |
editorName()
Formats the name of this editor instance.
|
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() |
int |
itemIndex()
Gets the index of the current item in the overall list.
|
String |
javascriptForThisEditorInstance()
Formats the JavaScript used to initialize this instance of the editor.
|
NSArray |
list()
Gets the list of items to display.
|
NSArray |
maybeSortedList()
Gets the list of items and sorts it by the sort key if a sort key is available.
|
String |
removeItemScript()
Builds the JavaScript used to remove the item from the selections.
|
void |
reset()
このメソッドは、指定されているコンテクストのオブジェクトに対する、
ステートレス・コンポーネントの一時的リファレンスをリセットもしくは削除します。
あるコンポーネントの共有化されたインスタンスが、他のセッションによって再利用されるとき、
このメソッドを利用し、各コンポーネントのインスタンス変数を解放します。
|
String |
selectedValuesTableName()
Formats the name of the selected values table for this editor instance.
|
NSArray |
selections()
Gets the selections.
|
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(Object anItem)
Sets the item being displayed.
|
void |
setSelectionsString(String value)
Sets the selection string from the input.
|
void |
sleep() |
invokeAction, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings, takeValuesFromRequest
_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, arrayValueForBinding, arrayValueForBinding, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, browser, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, shouldCheckAccess, stringValueForBinding, stringValueForBinding, useDefaultComponentCSS, useDefaultComponentJavascript
__valueForBinding, _associationWithName, _childTemplate, _cleanUpStatelessComponent, _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, setVariableValueForName, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
protected NSArray _list
protected NSArray _selections
protected Object currentItem
public ERXJSToManyRelationshipEditor(com.webobjects.appserver.WOContext context)
public boolean isStateless()
isStateless
in class com.webobjects.appserver.WOComponent
public void reset()
ERXComponent
reset
in class ERXComponent
public Object currentItem()
public void setCurrentItem(Object anItem)
anItem
- to displaypublic NSArray list()
public NSArray selections()
public 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 NSArray maybeSortedList()
public boolean isListEmpty()
public int itemIndex()
public String selectionsString()
public void setSelectionsString(String value)
value
- of the selections stringpublic String editorContextID()
public String editorName()
public String hiddenFieldName()
public String selectedValuesTableName()
public String javascriptForThisEditorInstance()
public String removeItemScript()
public String addItemScript()
public String availableValuesPopupMenu()
Copyright © 2002 – 2020 Project Wonder.