Package com.webobjects.appserver

Examples of com.webobjects.appserver.WODisplayGroup$Delegate


    }

    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);
        }
    }
View Full Code Here


        }
    }

    protected void _makePrimarySortOrderingWithSelector(NSSelector aSelector) {
        String aKey = _selectedKey;
        WODisplayGroup aDisplayGroup = displayGroup();
        NSArray<EOSortOrdering> sortOrderings = aDisplayGroup.sortOrderings();
        NSMutableArray<EOSortOrdering> aSortOrderingArray;
        if (sortOrderings!=null) {
            aSortOrderingArray = new NSMutableArray<EOSortOrdering>(sortOrderings);
        } else {
            aSortOrderingArray = new NSMutableArray<EOSortOrdering>();
        }
        EOSortOrdering aNewSortOrdering = EOSortOrdering.sortOrderingWithKey(aKey, aSelector);
        aSortOrderingArray.insertObjectAtIndex(aNewSortOrdering, 0);
        if (aSortOrderingArray.count() > 3) {
            // ** limits sorting to 3 levels
            aSortOrderingArray.removeLastObject();
        }
        aDisplayGroup.setSortOrderings(aSortOrderingArray);
    }
View Full Code Here

  public WODisplayGroup displayGroup;
  public String keyToAdd;
 
    public ERXLocalizationEditor(WOContext context) {
        super(context);
        displayGroup = new WODisplayGroup();
        displayGroup.setSortOrderings(ERXS.ascInsensitives("key"));
        displayGroup.setNumberOfObjectsPerBatch(20);
        displayGroup.setDefaultStringMatchFormat("*%@*");
        displayGroup.setDefaultStringMatchOperator(EOQualifier.QualifierOperatorCaseInsensitiveLike.name());
    }
View Full Code Here

        return _value;
    }

    public void setValue(Object newValue) {
        _value = newValue;
        WODisplayGroup displayGroup = displayGroup();
        if (displayGroup != null) {
            displayGroup.queryMatch().removeAllObjects();
            if (relationshipKey() != null) {
                displayGroup.queryMatch().takeValueForKey(newValue, relationshipKey() + "." + selectedKey());
                if (newValue != null) {
                    displayGroup.queryOperator().takeValueForKey(selectedOperator(), relationshipKey() + "." + selectedKey());
                }
            } else {
                displayGroup.queryMatch().takeValueForKey(newValue, selectedKey());
                if (newValue != null) {
                    displayGroup.queryOperator().takeValueForKey(selectedOperator(), selectedKey());
                }
            }
        }
    }
View Full Code Here

  private NSMutableDictionary configData;
  public WODisplayGroup displayGroup;

  public AjaxGridExample(WOContext context) {
    super(context);
    displayGroup = new WODisplayGroup();
    displayGroup().setObjectArray(sampleData());

    // We preset the batch size so that our x / N display is updated when
    // the page first renders
    displayGroup().setNumberOfObjectsPerBatch(Integer.parseInt((String) configData().valueForKey("batchSize")));
View Full Code Here

     * When querying for properties with a null value, and the null value checkbox for a property key is checked, this
     * method substitutes <code>NSKeyValueCoding.NullValue</code> into the display group's query dictionaries for that
     * property key.
     */
    protected void substituteValueForNullableQueryKeys() {
        WODisplayGroup displayGroup = displayGroup();
        for(Enumeration nullableKeysEnum = nullablePropertyKeys().objectEnumerator(); nullableKeysEnum.hasMoreElements();) {
            String key = (String)nullableKeysEnum.nextElement();
            Boolean value = (Boolean)keysToQueryForNull.objectForKey(key);
            if (Boolean.TRUE.equals(value)) {
                displayGroup.queryOperator().takeValueForKey(EOQualifier.stringForOperatorSelector(EOQualifier.QualifierOperatorEqual), key);
                if (displayGroup.queryBindings().valueForKey(key) != null) {
                    displayGroup.queryBindings().takeValueForKey(NSKeyValueCoding.NullValue, key);
                } else {
                    displayGroup.queryMatch().takeValueForKey(NSKeyValueCoding.NullValue, key);
                }
            }
        }
    }
View Full Code Here

        return (NSArray<EOSortOrdering>)_WOJExtensionsUtil.valueForBindingOrNull("sortOrderings",this);
    }

    @SuppressWarnings("unchecked")
  protected NSMutableArray<EOSortOrdering> XX_sortOrderingArray() {
        WODisplayGroup displayGroup = displayGroup();
        NSArray<EOSortOrdering> orderingArray;
        if (null!=displayGroup)
            orderingArray = displayGroup.sortOrderings();
        else
            orderingArray = (NSArray<EOSortOrdering>)_WOJExtensionsUtil.valueForBindingOrNull("sortOrderings",this);

        if (null==orderingArray) {
            orderingArray = new NSMutableArray<EOSortOrdering>();
        } else {
            orderingArray = new NSMutableArray<EOSortOrdering>(orderingArray);
        }

        if (null!=displayGroup)
            displayGroup.setSortOrderings(orderingArray);
        else {
            setValueForBinding(orderingArray, "sortOrderings");
        }

        return (NSMutableArray<EOSortOrdering>)orderingArray;
View Full Code Here

  public WODisplayGroup dg;
  public Word current;

  public UpdateDisplayGroupExample(WOContext context) {
    super(context);
    dg = new WODisplayGroup();
    dg.setObjectArray(ExampleDataFactory.allWords());
    dg.setNumberOfObjectsPerBatch(20);
  }
View Full Code Here

        }
        return name;
    }
       
    public String entityLabel() {
        WODisplayGroup dg = (WODisplayGroup)valueForBinding("displayGroup");
        if (dg.allObjects().count() == 1) {
            return _singularName();
        } else {
            return _pluralName();
        }
    }
View Full Code Here

        super(context);
    }

    public WODisplayGroup displayGroup() {
        if(displayGroup == null) {
            displayGroup = new WODisplayGroup();
        }
        return displayGroup;
    }
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WODisplayGroup$Delegate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.