Examples of EODataSource


Examples of com.webobjects.eocontrol.EODataSource

    public static final NSSelector selector = EOQualifier.QualifierOperatorCaseInsensitiveLike;    // FIXME: turn into property   
   
    // accessors   
    public String searchKey() {
      String searchKey = (String) d2wContext().valueForKey("searchKey");
      EODataSource dataSource = displayGroup().dataSource();
     
      if (searchKey == null && dataSource instanceof EODatabaseDataSource) {
        searchKey = (String) ((EODatabaseDataSource) dataSource).entity().classPropertyNames().objectAtIndex(0);
      }
      return searchKey;
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

      return (displayNameForSearchKey != null && !displayNameForSearchKey.equals("")) ? displayNameForSearchKey : searchKey();
    }
   
    // actions
    public WOActionResults search() {
      EODataSource dataSource = displayGroup().dataSource();
     
      if (value != null && dataSource instanceof EODatabaseDataSource) {
        EOQualifier _qualifier = new EOKeyValueQualifier(searchKey(), selector, "*" + value + "*");
        ((EODatabaseDataSource) dataSource).setAuxiliaryQualifier(_qualifier);
      } else ((EODatabaseDataSource) dataSource).setAuxiliaryQualifier(null);
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

    public static final NSSelector selector = EOQualifier.QualifierOperatorCaseInsensitiveLike;    // FIXME: turn into property   
   
    // accessors   
    public String searchKey() {
      String searchKey = (String) d2wContext().valueForKey("searchKey");
      EODataSource dataSource = displayGroup().dataSource();
     
      if (searchKey == null && dataSource instanceof EODatabaseDataSource) {
        searchKey = (String) ((EODatabaseDataSource) dataSource).entity().classPropertyNames().objectAtIndex(0);
      }
      return searchKey;
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

      return (displayNameForSearchKey != null && !displayNameForSearchKey.equals("")) ? displayNameForSearchKey : searchKey();
    }
   
    // actions
    public WOActionResults search() {
      EODataSource dataSource = displayGroup().dataSource();
     
      if (value != null && dataSource instanceof EODatabaseDataSource) {
        EOQualifier _qualifier = new EOKeyValueQualifier(searchKey(), selector, "*" + value + "*");
        ((EODatabaseDataSource) dataSource).setAuxiliaryQualifier(_qualifier);
      } else ((EODatabaseDataSource) dataSource).setAuxiliaryQualifier(null);
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

        if(_objects == null) {
            if(super.hasBinding("objects")) {
                _objects = (NSArray)super.valueForBinding("objects");
            } else {
                if(super.hasBinding("dataSource")) {
                    EODataSource ds = (EODataSource)super.valueForBinding("dataSource");
                    ERXAssert.DURING.notNull("dataSource", ds);
                    _objects = ds.fetchObjects();
                }
            }
        }
        return _objects;
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

    public WOComponent listPrinterFriendlyVersion() {
        D2WContext d2wContext = d2wContext();
        WOSession session = session();
        WODisplayGroup displayGroup = displayGroup();
        EODataSource dataSource = dataSource();
        if(dataSource == null) {
          if (displayGroup instanceof ERXBatchingDisplayGroup) {
        ERXBatchingDisplayGroup dg = (ERXBatchingDisplayGroup) displayGroup;
              dataSource = ERXEOControlUtilities.dataSourceForArray(displayGroup.displayedObjects());
      } else {
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

   * Overridden to clear out the sort ordering if it is no longer applicable.
   * @param ds the proposed EODataSource
   */
  @Override
  public void setDataSource(EODataSource ds) {
    EODataSource old = dataSource();
    super.setDataSource(ds);
    if(old != null && ds != null && ObjectUtils.notEqual(old.classDescriptionForObjects(), ds.classDescriptionForObjects())) {
      setSortOrderings(NSArray.EmptyArray);
    }
  }
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

    public NSArray theList() {
        NSMutableArray aSortedArray;
        NSArray anUnsortedArray;
        if (_privateList()==null) {
            EODataSource aDataSource = _localDataSource();
            anUnsortedArray = aDataSource.fetchObjects();
            // 81398 sort contents
            aSortedArray = new NSMutableArray(anUnsortedArray);
            try {
                _WOJExtensionsUtil._sortEOsUsingSingleKey(aSortedArray, _localDestinationDisplayKey());
            } catch (NSComparator.ComparisonException e) {
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

                if(_list != null && _list.lastObject() instanceof EOEnterpriseObject) {
                    _list = ERXEOControlUtilities.localInstancesOfObjects(editingContext(), _list);
                }
            }
            if(_list == null) {
              EODataSource ds = dataSource();
              if(ds.editingContext()!=null) {
                _list = ds.fetchObjects();
                if(ds.editingContext() != editingContext()) {
                  _list = ERXEOControlUtilities.localInstancesOfObjects(editingContext(), _list);
                }
              } else {
                log.error("EC of datasource is null, possible resubmit: " + ERXApplication.erxApplication().extraInformationForExceptionInContext(null, context()));
                _list = NSArray.EmptyArray;
View Full Code Here

Examples of com.webobjects.eocontrol.EODataSource

     * mandatory and isEntityRemoveable returns true.
     */
    public Boolean showRemoveButton() {
      if (_showRemoveButton == null) {
        boolean isRemoveable = ERXValueUtilities.booleanValueWithDefault(d2wContext().valueForKey("isEntityRemoveable"), false);
        EODataSource ds = dataSource();
        if (ds!= null && ds instanceof EODetailDataSource) {
          EODetailDataSource dds = (EODetailDataSource)ds;
          EOEnterpriseObject masterObj = (EOEnterpriseObject)dds.masterObject();
          EOEntity masterEntity = ERXEOAccessUtilities.entityForEo(masterObj);
          EORelationship relationship = masterEntity.relationshipNamed(dds.detailKey());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.