Package er.extensions.batching

Examples of er.extensions.batching.ERXBatchingDisplayGroup


   * Creates the display group and sets the _displayGroup instance variable
   */
  protected void createDisplayGroup() {
    boolean useBatchingDisplayGroup = useBatchingDisplayGroup();
    if (useBatchingDisplayGroup) {
      _displayGroup = new ERXBatchingDisplayGroup();
    } else {
      _displayGroup = new ERXDisplayGroup();
    }
  }
View Full Code Here


        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 {
              dataSource = ERXEOControlUtilities.dataSourceForArray(displayGroup.allObjects());
      }
        }
        D2WContext newContext = ERD2WContext.newContext(session);
        String newTask = d2wContext.task().equals("edit") ? "inspect" : d2wContext.task();
        // for editable list pages...
        if("list".equals(d2wContext().valueForKey("subTask"))) {
            newTask = "list";
        }
        newContext.takeValueForKey(newTask, "task");
        // not using subTask directly here because the cache mechanism relies on
        // being able to compute wether this key
        // is 'computable' (subTask is since a rule can fire to give a default)
        // or an external output
        //        newContext.takeValueForKey("excel","subTask");
        newContext.takeValueForKey("excel", "forcedSubTask");
        newContext.takeValueForKey(d2wContext.valueForKey("pageName"), "existingPageName");
        newContext.takeValueForKey(d2wContext.valueForKey("subTask"), "existingSubTask");
        newContext.takeValueForKey(d2wContext.valueForKey("pageConfiguration"), "pageConfiguration");
        newContext.takeValueForKey(d2wContext.entity(), "entity");
        ListPageInterface result = (ListPageInterface) WOApplication.application().pageWithName((String) newContext.valueForKey("pageName"), session.context());
        ((D2WPage) result).setLocalContext(newContext);

        result.setDataSource(dataSource);
        WODisplayGroup dg = null;
        if (result instanceof D2WListPage) {
            dg = ((D2WListPage) result).displayGroup();
        } else if (result instanceof ERDListPageInterface) {
            dg = ((ERDListPageInterface) result).displayGroup();
        } else {
            dg = (WODisplayGroup) ((WOComponent) result).valueForKey("displayGroup");
        }
        if (dg != null) {
            dg.setSortOrderings(displayGroup.sortOrderings());
            dg.setNumberOfObjectsPerBatch(displayGroup.allObjects().count());
            dg.updateDisplayedObjects();
        }
        return (WOComponent) result;
    }
View Full Code Here

TOP

Related Classes of er.extensions.batching.ERXBatchingDisplayGroup

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.