• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ideas to dupe an EO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ideas to dupe an EO


  • Subject: Re: ideas to dupe an EO
  • From: Theodore Petrosky <email@hidden>
  • Date: Fri, 15 Feb 2013 10:11:32 -0800 (PST)

David,

I downloaded the ERXCopyable.java and added it to my Wonder.

I added the implements ERXCopyable<Agenda> to my EO and experimented with adding the default overrides. Finally living with:

@Override
public Agenda copy() {
	Agenda copy = (Agenda) copy(new NSMutableDictionary<EOGlobalID, ERXCopyable<?>>());
	return copy;
}

@Override
public Agenda copy(NSMutableDictionary<EOGlobalID, ERXCopyable<?>> copiedObjects) {
	Agenda copy = ERXCopyable.DefaultImplementation.copy(copiedObjects, (Agenda) this);
	return copy;
}

@Override
public Agenda duplicate(NSMutableDictionary<EOGlobalID, ERXCopyable<?>> copiedObjects) {
	Agenda duplicate = ERXCopyable.Utility.modelCopy(copiedObjects, (Agenda) this);
	return duplicate;
}

I am trying to add a method to my version of the ERMODInspectPage that will create and save a new copy the object().

i'm stuck with the method that fires to duplicate the EO. Could you point me to some code that actually copies?

Ted


--- On Fri, 2/15/13, David LeBer <email@hidden> wrote:

> From: David LeBer <email@hidden>
> Subject: Re: ideas to dupe an EO
> To: "Theodore Petrosky" <email@hidden>
> Cc: "WebObjects Development" <email@hidden>
> Date: Friday, February 15, 2013, 10:51 AM
> You probably want ERXCopyable.
>
> http://www.mail-archive.com/email@hidden/msg52084.html
>
> D
>
> On 2013-02-15, at 10:42 AM, Theodore Petrosky <email@hidden>
> wrote:
>
> > I am looking for an idea on duping an EO. I've thought
> of putting a hyperlink on the listPage then I thought of
> putting a button on the editPage (i am toying with that
> now).
> >
> > I duped ERMODInspectPage and I added a button. If I
> create a localInstance in a new EC, how can I save this
> 'new' EO. it isn't a new EO yet just a duplicate in a new
> editing context. I am looking at ERXEOControlUtilities to
> see if there are any methods to create a new EO from my old
> one.
> >
> > but some pointing in the right direction would be
> appreciated.
> >
> > Ted
> > _______________________________________________
> > Do not post admin requests to the list. They will be
> ignored.
> > Webobjects-dev mailing list      (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: ideas to dupe an EO
      • From: David Avendasora <email@hidden>
References: 
 >Re: ideas to dupe an EO (From: David LeBer <email@hidden>)

  • Prev by Date: Re: foreach: list must not be a constant
  • Next by Date: Mobile to full site page, not refreshed until browser refresh
  • Previous by thread: Re: ideas to dupe an EO
  • Next by thread: Re: ideas to dupe an EO
  • Index(es):
    • Date
    • Thread