
parent1(child1,child2,child3)
parent2(child4,child5)
parent3(child2,child5)
When the user selects parent1, its appropriate children are displayed in the second popup. If the user selects child2 in the children pop-up this is the value that is returned to the user through the childrenSelection variable. This is either an NSArray if multiple is true or the single selected object. For the display of the parent popup, if we aren't passed in a parentSelection, then we default to parentPopUpStringForAll. If we aren't given that either, then we default to the first parent in the array. For the display of the child popup, if we aren't passed in a childrenSelection, then we default to childPopUpStringForAll. If we aren't given that either, then we default to the first child in the array.multiple boolean the defines if there can multiple parents and children selected. parentEntitiesList array of the parent objects that appear in the first pop-up. parentToChildrenRelationshipName name of the relationship from the parent to its possible children. This is used to fill the values that appear in the children popup. parentSelection currently selected parent(s) in the parent pop-up. This can be null, but will return the user-selected parent. childrenSelection returns the user-selected child(ren). parentDisplayValueName keypath of the parent displayed in the parent pop-up parentLabel value displayed in the table interface for the parent popup. childLabel value displayed in the table interface for the child popup. defaultChildKey keypath of the parent for the default child (eg, largest city) childrenSortKey keypath to sort the children on childDisplayValueName keypath of the child displayed in the child pop-up parentPopUpStringForAll to display if no parent is chosen ("- all -") childPopUpStringForAll to display if no child is chosen ("- all -") size number of rows in select boxes possibleChildren shows only these values for children
| ERXJSPopUpRelationPicker | ( | WOContext | aContext | ) |
| void appendChildPopupStringWithParent | ( | StringBuffer | returnString, | |
| NSArray | aParents | |||
| ) | [private] |
| void awake | ( | ) |
| String childDisplayValueName | ( | ) |
| Object childFromID | ( | Object | parent, | |
| String | id | |||
| ) | [protected] |
| String childLabel | ( | ) |
| String childPopUpString | ( | ) |
<select name="children_select">
<option value=4>poodle
<option selected value=5>puli
<option value=6>greyhound
</select> | String childPopUpStringForAll | ( | ) |
| NSArray childrenSelection | ( | ) |
| String childrenSortKey | ( | ) |
| String defaultChildKey | ( | ) |
| String formName | ( | ) |
| String hiddenFormElementStrings | ( | ) |
| Object idForChild | ( | Object | parent, | |
| Object | child | |||
| ) | [protected] |
| Object idForParent | ( | Object | parent | ) | [protected] |
| boolean isSelectedChild | ( | Object | aChild | ) | [private] |
| aChild |
| boolean isSelectedParent | ( | Object | aParent | ) | [private] |
| aParent |
| String jsString | ( | ) |
| boolean multiple | ( | ) |
| String objectArrayCreationString | ( | ) |
| int offsetForChild | ( | Object | parent, | |
| Object | child | |||
| ) | [protected] |
| int offsetForID | ( | String | id | ) | [protected] |
| String parentDisplayValueName | ( | ) |
| NSArray parentEntitiesList | ( | ) |
| Object parentFromID | ( | String | id | ) | [protected] |
| String parentLabel | ( | ) |
| String parentPopUpString | ( | ) |
| String parentPopUpStringForAll | ( | ) |
| NSArray parentSelection | ( | ) |
| String parentToChildrenRelationshipName | ( | ) |
| NSArray possibleChildren | ( | ) | [protected] |
| void reset | ( | ) |
Reimplemented from ERXStatelessComponent.
| void setChildrenSelection | ( | NSArray | value | ) |
| void setSelectedParents | ( | NSArray | value | ) |
| int size | ( | ) |
| NSArray sortedChildren | ( | Object | parent | ) | [protected] |
| void takeValuesFromRequest | ( | WORequest | request, | |
| WOContext | context | |||
| ) |
Calls resetCachedBindingsInStatefulComponent prior to super.takeValuesFromRequest.
| request | from which the values will be taken | |
| context | of the request |
Reimplemented from ERXNonSynchronizingComponent.
| NSArray unsortedChildren | ( | Object | parent | ) | [protected] |
| void updateVarNames | ( | ) | [protected] |
String _childDisplayValueName [protected] |
String _childLabel [protected] |
String _childPopUpStringForAll [protected] |
NSArray _childrenSelection [protected] |
String _childrenSortKey [protected] |
String _defaultChildKey [protected] |
Boolean _multiple [protected] |
String _parentDisplayValueName [protected] |
NSArray _parentEntitiesList [protected] |
String _parentLabel [protected] |
String _parentPopUpStringForAll [protected] |
NSArray _parentSelection [protected] |
String _parentToChildrenRelationshipName [protected] |
NSArray _possibleChildren [protected] |
Integer _size [protected] |
String childSelectName [protected] |
final Logger jsLog = Logger.getLogger("er.extensions.ERXJSPopUpRelationPicker.script") [static] |
final int NOT_FOUND = -1 [static, private] |
String objectsArrayName [protected] |
String parentSelectName [protected] |
String pickerName [protected] |
final NSArray UNSET = new NSArray() [static, private] |
1.5.8