protected void _removeOrderingWithKey(String aKey) { int anIndex = 0; EOSortOrdering ordering; NSArray orderingArray = _sortOrderingArray(); Enumeration anEnumerator = orderingArray.objectEnumerator(); while (anEnumerator.hasMoreElements()) { ordering = (EOSortOrdering) anEnumerator.nextElement(); if (aKey.equals(ordering.key())) { ((NSMutableArray)orderingArray).removeObjectAtIndex(anIndex); return ; } anIndex++; } }
/** Loops over each RecordGroup and group it. Init each new sub RecordGroup with empty record groups for each record group in the parent */ public void groupSubRecordGroupsWithMasterCriteriaLookupDict(NSDictionary groupLookUpDict) { Enumeration anEnum = recordGroupList().objectEnumerator(); while (anEnum.hasMoreElements()) { DRRecordGroup recGrp = (DRRecordGroup)anEnum.nextElement(); NSMutableArray arr = new NSMutableArray(masterCriteriaDrillDownList()); arr.removeObjectAtIndex(0); recGrp.groupSubRecordGroupGroupLookUpDict(arr, groupLookUpDict); } }
public WOHelperFunctionBindingNameAssociation(String keyPath) { super(keyPath); // Extract _keyPath for bug fix in setValue() NSMutableArray aKeyArray = NSArray._mutableComponentsSeparatedByString(keyPath, "."); if(aKeyArray.count() > 1) { aKeyArray.removeObjectAtIndex(0); _keyPath = aKeyArray.componentsJoinedByString("."); } }
protected void _removeSortOrderingWithKey(String aKey) { int anIndex = 0; EOSortOrdering aSortOrdering = null; WODisplayGroup aDisplayGroup = displayGroup(); NSArray<EOSortOrdering> sortOrderings = aDisplayGroup.sortOrderings(); if (sortOrderings!=null) { NSMutableArray<EOSortOrdering> aSortOrderingArray = sortOrderings.mutableClone(); Enumeration anEnumerator = aSortOrderingArray.objectEnumerator(); while (anEnumerator.hasMoreElements()) { aSortOrdering = (EOSortOrdering) anEnumerator.nextElement(); if (aKey.equals(aSortOrdering.key())) { aSortOrderingArray.removeObjectAtIndex(anIndex); break; } anIndex++; } aDisplayGroup.setSortOrderings(aSortOrderingArray); } }
protected void _removeSortOrderingWithKey(String aKey) { int anIndex = 0; EOSortOrdering aSortOrdering = null; WODisplayGroup aDisplayGroup = displayGroup(); NSArray<EOSortOrdering> sortOrderings = aDisplayGroup.sortOrderings(); if (sortOrderings!=null) { NSMutableArray<EOSortOrdering> aSortOrderingArray = sortOrderings.mutableClone(); Enumeration anEnumerator = aSortOrderingArray.objectEnumerator(); while (anEnumerator.hasMoreElements()) { aSortOrdering = (EOSortOrdering) anEnumerator.nextElement(); if (aKey.equals(aSortOrdering.key())) { aSortOrderingArray.removeObjectAtIndex(anIndex); break; } anIndex++; } aDisplayGroup.setSortOrderings(aSortOrderingArray); } }
/** * Ajax action method for when columns are dragged and dropped. Updates * configurationData(). */ public void columnOrderUpdated() { // The Java script should ensure that these are valid int sourceIndex = Integer.parseInt((String) context().request().formValueForKey(SOURCE_COLUMN_FORM_VALUE)) - 1; int destinationIndex = Integer.parseInt((String) context().request().formValueForKey(DESTINATION_COLUMN_FORM_VALUE)) - 1; Object sourceColumn = columns().objectAtIndex(sourceIndex); columns().removeObjectAtIndex(sourceIndex); columns().insertObjectAtIndex(sourceColumn, destinationIndex); }
public void walkPresetsPossibleValues(NSArray presets, NSDictionary vlDict) { DRSubMasterCriteria scSub = (DRSubMasterCriteria)presets.objectAtIndex(0); NSMutableArray newPresets = new NSMutableArray(presets); Enumeration anEnum = scSub.possibleValues().objectEnumerator(); newPresets.removeObjectAtIndex(0); int count = newPresets.count(); while (anEnum.hasMoreElements()) { Object possibleValue = anEnum.nextElement(); NSMutableDictionary moreVlDict = new NSMutableDictionary(vlDict); moreVlDict.setObjectForKey(possibleValue, scSub.keyDesc()); if (count == 0) { //////////NSLog(@"DRMasterCriteria: walkPresets:possibleValues: count == 0"); criteriaWithPossibleValueList(moreVlDict); } else { //////////NSLog(@"DRMasterCriteria: walkPresets:possibleValues: count _NOT== 0"); walkPresetsPossibleValues(newPresets, moreVlDict); } } }
public void groupSubRecordGroupGroupLookUpDict(NSArray groupList, NSDictionary groupLookUpDict) { int cnt = groupList.count(); if (cnt > 0) { DRMasterCriteria mc = (DRMasterCriteria)groupList.objectAtIndex(0); DRGroup grp = (DRGroup)groupLookUpDict.objectForKey(mc.keyDesc()); if (!childrenFromGroupCriteriaList(grp)) { groupByInto(recordList(), grp.masterCriteria(), recordGroupDict()); } // loop over each RecordGroup and send groupSubRecordGroup:(NSArray *)groupList // but only count is > 1 Enumeration anEnum = children().objectEnumerator(); while (anEnum.hasMoreElements()) { DRRecordGroup rg = (DRRecordGroup)anEnum.nextElement(); NSMutableArray arr = new NSMutableArray(groupList); arr.removeObjectAtIndex(0); rg.groupSubRecordGroupGroupLookUpDict(arr, groupLookUpDict); } } }
public void toggleGroupInList(DRAttribute att) { DRAttribute newAtt; NSMutableArray arr = _attribute.attributes(); int curDex = arr.indexOfObject(att); if (att.isGroup()) { newAtt = DRAttribute.withKeyPathFormatLabelTotalUserInfo(att.keyPath(), att.format(), att.label(), att.shouldTotal(), att.userInfo()); } else { newAtt = DRAttributeGroup.withKeyPathFormatLabelTotalListUserInfo(att.keyPath(), att.format(), att.label(), att.shouldTotal(), new NSMutableArray(), att.userInfo()); } arr.insertObjectAtIndex(newAtt, curDex); arr.removeObjectAtIndex(curDex+1); }
public void toggleGroupInList(DRAttribute att) { int curDex; DRAttribute newAtt; NSMutableArray arr = new NSMutableArray(attributeList()); curDex = arr.indexOfObject(att); if (att.isGroup()) { newAtt = DRAttribute.withKeyPathFormatLabelTotalUserInfo(att.keyPath(), att.format(), att.label(), att.shouldTotal(), att.userInfo()); } else { newAtt = DRAttributeGroup.withKeyPathFormatLabelTotalListUserInfo(att.keyPath(), att.format(), att.label(), att.shouldTotal(), new NSMutableArray(), att.userInfo()); } arr.insertObjectAtIndex(newAtt, curDex); arr.removeObjectAtIndex(curDex+1); setAttributeList(arr); }