Exemplo n.º 1
0
  public void appendToResponse(WOResponse aResponse, WOContext aContext) {
    try {
      Number b = (Number) valueForBinding("firstNameDisplay");
      if (b != null) firstNameDisplay = b.intValue();
      else firstNameDisplay = 2;

      b = (Number) valueForBinding("secondNameDisplay");
      if (b != null) secondNameDisplay = b.intValue();
      else secondNameDisplay = 2;

    } catch (ClassCastException cex) {
      throw new IllegalArgumentException("NameDisplay bindings should be integer");
    }
    String request = (String) valueForBinding("searchRequest");
    if (request != null) {
      performSearchRequest(request);
    } else {
      selection =
          (PersonLink)
              EOUtilities.localInstanceOfObject(
                  ec, (EOEnterpriseObject) valueForBinding("selection"));
      //			syncSelection();
    }
    if (selection == null && Various.boolForObject(valueForBinding("showPopup"))) {
      selection = defaultSelectionValue();
      setValueForBinding(selection, "selection");
    }
    super.appendToResponse(aResponse, aContext);
    found = null;
    //		searchMessage = null;
  }
Exemplo n.º 2
0
 public Group localInstanceIn(EOEditingContext editingContext) {
   Group localInstance = (Group) EOUtilities.localInstanceOfObject(editingContext, this);
   if (localInstance == null) {
     throw new IllegalStateException(
         "You attempted to localInstance " + this + ", which has not yet committed.");
   }
   return localInstance;
 }
Exemplo n.º 3
0
 public static IndividuUlr localInstanceIn(EOEditingContext editingContext, IndividuUlr eo) {
   IndividuUlr localInstance =
       (eo == null) ? null : (IndividuUlr) EOUtilities.localInstanceOfObject(editingContext, eo);
   if (localInstance == null && eo != null) {
     throw new IllegalStateException(
         "You attempted to localInstance " + eo + ", which has not yet committed.");
   }
   return localInstance;
 }
Exemplo n.º 4
0
 public void takeValuesFromRequest(WORequest aRequest, WOContext aContext) {
   super.takeValuesFromRequest(aRequest, aContext);
   if (!Various.boolForObject(valueForBinding("showPopup"))) {
     selection =
         (PersonLink)
             EOUtilities.localInstanceOfObject(
                 ec, (EOEnterpriseObject) valueForBinding("selection"));
     //			syncSelection();
   }
 }
 public static ScolMaquetteAp localInstanceIn(EOEditingContext editingContext, ScolMaquetteAp eo) {
   ScolMaquetteAp localInstance =
       (eo == null)
           ? null
           : (ScolMaquetteAp) EOUtilities.localInstanceOfObject(editingContext, eo);
   if (localInstance == null && eo != null) {
     throw new IllegalStateException(
         "You attempted to localInstance " + eo + ", which has not yet committed.");
   }
   return localInstance;
 }
 public static EOVPersonnelActuelEns localInstanceIn(
     EOEditingContext editingContext, EOVPersonnelActuelEns eo) {
   EOVPersonnelActuelEns localInstance =
       (eo == null)
           ? null
           : (EOVPersonnelActuelEns) EOUtilities.localInstanceOfObject(editingContext, eo);
   if (localInstance == null && eo != null) {
     throw new IllegalStateException(
         "You attempted to localInstance " + eo + ", which has not yet committed.");
   }
   return localInstance;
 }
 public static ERSyncClientDevice localInstanceIn(
     EOEditingContext editingContext, ERSyncClientDevice eo) {
   ERSyncClientDevice localInstance =
       (eo == null)
           ? null
           : (ERSyncClientDevice) EOUtilities.localInstanceOfObject(editingContext, eo);
   if (localInstance == null && eo != null) {
     throw new IllegalStateException(
         "You attempted to localInstance " + eo + ", which has not yet committed.");
   }
   return localInstance;
 }
 public static TimePointApplication localInstanceIn(
     EOEditingContext editingContext, TimePointApplication eo) {
   TimePointApplication localInstance =
       (eo == null)
           ? null
           : (TimePointApplication) EOUtilities.localInstanceOfObject(editingContext, eo);
   if (localInstance == null && eo != null) {
     throw new IllegalStateException(
         "You attempted to localInstance " + eo + ", which has not yet committed.");
   }
   return localInstance;
 }
Exemplo n.º 9
0
 public WOActionResults delete() {
   NSMutableArray personList = (NSMutableArray) session().valueForKey("personList");
   if (personList != null && personList.count() > 0) {
     for (int i = 0; i < personList.count(); i++) {
       PersonLink pers = (PersonLink) personList.objectAtIndex(i);
       if (item == EOUtilities.localInstanceOfObject(ec, pers.person())) {
         personList.removeObjectAtIndex(i);
         break;
       }
     }
   }
   return context().page();
   //		onEdit = null;
 }
Exemplo n.º 10
0
 protected PersonLink defaultSelectionValue() {
   NSArray list = (NSArray) valueForBinding("forcedList");
   if (list != null && list.count() > 0) {
     return (PersonLink)
         EOUtilities.localInstanceOfObject(ec, (EOEnterpriseObject) list.objectAtIndex(0));
   }
   list = (NSArray) session().valueForKey("personList");
   if (list != null && list.count() > 0) {
     Enumeration enu = list.objectEnumerator();
     while (enu.hasMoreElements()) {
       EOEnterpriseObject pers = (EOEnterpriseObject) enu.nextElement();
       if (entity().equals(pers.entityName())) {
         return (PersonLink) pers;
       }
     }
   }
   return null;
 }
Exemplo n.º 11
0
 /**
  * Get a local instance of the given object in another editing context.
  *
  * @param editingContext The target editing context
  * @param eo The object to import
  * @return An instance of the given object in the target editing context
  */
 public static UserMessageSubscription localInstance(
     EOEditingContext editingContext, UserMessageSubscription eo) {
   return (eo == null)
       ? null
       : (UserMessageSubscription) EOUtilities.localInstanceOfObject(editingContext, eo);
 }
Exemplo n.º 12
0
 /**
  * Get a local instance of this object in another editing context.
  *
  * @param editingContext The target editing context
  * @return An instance of this object in the target editing context
  */
 public UserMessageSubscription localInstance(EOEditingContext editingContext) {
   return (UserMessageSubscription) EOUtilities.localInstanceOfObject(editingContext, this);
 }