Package com.webobjects.directtoweb

Examples of com.webobjects.directtoweb.EditPageInterface


              EOEnterpriseObject object = ERXEOControlUtilities.editableInstanceOfObject(object(), createNestedContext);
           EOEditingContext ec = object.editingContext();
            ec.lock();
            try {
              EOEnterpriseObject eo = ERXEOControlUtilities.createAndAddObjectToRelationship(ec, object, key(), (String)valueForBinding("destinationEntityName"), null);
              EditPageInterface epi = (EditPageInterface)nextPage;
              epi.setObject(eo);
              epi.setNextPage(context().page());
            } finally {
              ec.unlock();
            }
          }
        } else {
View Full Code Here


    @Deprecated
    public WOComponent newObjectAction() {
        WOComponent nextPage = null;
        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(_manipulatedEntityName, session());
            epi.setNextPage(context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
            ErrorPageInterface epf = D2W.factory().errorPage(session());
            epf.setMessage(e.toString());
            epf.setNextPage(context().page());
View Full Code Here

    @Deprecated
    public WOComponent newObjectAction() {
        WOComponent nextPage = null;
        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(_manipulatedEntityName, session());
            epi.setNextPage(context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
            ErrorPageInterface epf = D2W.factory().errorPage(session());
            epf.setMessage(e.toString());
            epf.setNextPage(context().page());
View Full Code Here

        super(context);
    }
   
    // actions
    public WOActionResults newAction() {
      EditPageInterface newAction = (EditPageInterface) D2W.factory().editPageForNewObjectWithConfigurationNamed("AjaxCreate" + destinationEntityName(), session());
      newAction.setNextPage(context().page());
      return (WOActionResults) newAction;
   
View Full Code Here

     * @return a new create page for the current entity
     */
    public WOComponent createObject () {
        WOComponent nextPage = null;
        try {
            EditPageInterface epi = D2W.factory().editPageForNewObjectWithEntityNamed(d2wContext().entity().name(), session());
            epi.setNextPage(context().page());
            nextPage = (WOComponent) epi;
        } catch (IllegalArgumentException e) {
            ErrorPageInterface epf = D2W.factory().errorPage(session());
            epf.setMessage(e.toString());
            epf.setNextPage(context().page());
View Full Code Here

           ERCHelpText text = ERCHelpText.clazz.helpTextForKey(ec, key);
           if(text == null) {
             text = ERCHelpText.clazz.createAndInsertObject(ec);
             text.setKey(key);
           }
           EditPageInterface page = D2W.factory().editPageForEntityNamed(ERCHelpText.ENTITY, session());
           page.setObject(text);
           page.setNextPage(context().page());
           return (WOComponent)page;
         } finally {
           ec.unlock();
         }
    }
View Full Code Here

    }
    return key;
  }
 
  public WOComponent createHelpText() {
    EditPageInterface page = D2W.factory().editPageForNewObjectWithEntityNamed(ERCHelpText.ENTITY, session());
    ((WOComponent) page).takeValueForKeyPath(key(), "object." + ERCHelpText.Key.KEY);
    ((WOComponent) page).takeValueForKeyPath(defaultValue(), "object." + ERCHelpText.Key.VALUE);
    page.setNextPage(context().page());
    return (WOComponent) page;
  }
View Full Code Here

    page.setNextPage(context().page());
    return (WOComponent) page;
  }
 
  public WOComponent editHelpText() {
    EditPageInterface page = D2W.factory().editPageForEntityNamed(ERCHelpText.ENTITY, session());
    EOEnterpriseObject eo = ERXEOControlUtilities.editableInstanceOfObject(helpText(), false);
    page.setObject(eo);
    page.setNextPage(context().page());
    return (WOComponent) page;
  }
View Full Code Here

    String currentPageConfiguration = stringValueForBinding(Keys.pageConfiguration);
   
    NSDictionary extraValues = currentPageConfiguration != null ? new NSDictionary(currentPageConfiguration, Keys.pageConfiguration) : null;
        String createPageConfigurationName = (String)ERDirectToWeb.d2wContextValueForKey(Keys.createConfigurationName, destinationEntityName(), extraValues);
       
    EditPageInterface epi = (EditPageInterface)D2W.factory().pageForConfigurationNamed(createPageConfigurationName, session());
    EOEditingContext newEc = ERXEC.newEditingContext(object().editingContext());
    EOEnterpriseObject relatedObject = EOUtilities.createAndInsertInstance(newEc, destinationEntityName());
    EOEnterpriseObject localObj = ERXEOControlUtilities.localInstanceOfObject(relatedObject.editingContext(), object());
    if (localObj instanceof ERXGenericRecord) {
      ((ERXGenericRecord)localObj).setValidatedWhenNested(false);
    }
    localObj.addObjectToBothSidesOfRelationshipWithKey(relatedObject, propertyKey());
   
    epi.setNextPage(context().page());
    epi.setObject(relatedObject);
   
    // Null out the current searchValue so when we come back, it regenerates
    _searchValue = null;
   
    return (WOActionResults) epi;
View Full Code Here

    }
   
   
    public WOComponent editMyInfo() {
        People user = user();
        EditPageInterface epi = (EditPageInterface) D2W.factory().pageForConfigurationNamed("EditMyPeople", this);
        EOEditingContext ec = ERXEC.newEditingContext();
        ec.lock();
        try {
            user = (People) user.localInstanceIn(ec);
            epi.setObject(user);
            epi.setNextPage(context().page());
            return (WOComponent) epi;
      } finally {
            ec.unlock();
        }
      }
View Full Code Here

TOP

Related Classes of com.webobjects.directtoweb.EditPageInterface

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.