Package er.directtoweb.embed

Source Code of er.directtoweb.embed.ERXD2WEditRelationship

package er.directtoweb.embed;

import com.webobjects.appserver.WOContext;
import com.webobjects.directtoweb.D2WEmbeddedComponent;
import com.webobjects.directtoweb.NextPageDelegate;
import com.webobjects.eocontrol.EOEnterpriseObject;
import com.webobjects.foundation.NSArray;

import er.directtoweb.delegates.ERD2WEmbeddedComponentActionDelegate;

/**
* A clone of David LeBer's ERMD2WEditRelationship component.
*/
public class ERXD2WEditRelationship extends D2WEmbeddedComponent {
  /**
   * Do I need to update serialVersionUID?
   * See section 5.6 <cite>Type Changes Affecting Serialization</cite> on page 51 of the
   * <a href="http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf">Java Object Serialization Spec</a>
   */
  private static final long serialVersionUID = 1L;

  public ERXD2WEditRelationship(WOContext context) {
    super(context);
  }
 
  public NSArray<Object> masterObjectAndRelationshipKey() {
    return new NSArray<Object>(masterObject(), relationshipKey());
  }
   
  public EOEnterpriseObject masterObject() {
    EOEnterpriseObject obj = (EOEnterpriseObject) valueForBinding("masterObject");
    return obj;
  }
 
  public String relationshipKey() {
    String obj = (String) valueForBinding("relationshipKey");
    return obj;
  }

  /**
     * Overridden to support serialization
     */
    @Override
    public NextPageDelegate newPageDelegate() {
      return ERD2WEmbeddedComponentActionDelegate.instance;
    }
   
    /**
     * Causes errors when using deserialized components in 5.4.3
     */
    @Override
    public void awake() {}
}
TOP

Related Classes of er.directtoweb.embed.ERXD2WEditRelationship

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.