• 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: Editing Context getting stripped off new EO in ERXD2WInspectPage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing Context getting stripped off new EO in ERXD2WInspectPage


  • Subject: Re: Editing Context getting stripped off new EO in ERXD2WInspectPage
  • From: Johnny Miller <email@hidden>
  • Date: Fri, 15 Mar 2013 11:55:33 -1000



On Mar 15, 2013, at 11:52 AM, Ramsey Gurley <email@hidden> wrote:

Because I'm most likely not to see something when it is directly in front of me :P Evidently I overlooked that when I was fixing a serialization issue. It only needs to do that once.

<sarcasm>Boy what's that like?</sarcasm>

Have a nice weekend and thanks again.

Ramsey

On Mar 15, 2013, at 2:33 PM, Johnny Miller wrote:

That's a final method in EOCustomObject so the compiler is complaining when I try to override it.

As a side note...

ERD2WPage has this method:

@Override
    public void setObject(EOEnterpriseObject eo) {
        setEditingContext((eo != null) ? eo.editingContext() : null);
        // for SmartAssignment
        d2wContext().takeValueForKey(eo, Keys.object);
        /*
         * Storing the EO in the D2WComponent field prevents serialization. The
         * ec must be serialized before the EO. So we store the value in the
         * context instead.
         */
        //super.setObject(eo);
        d2wContext().takeValueForKey(eo, Keys.object);
    }

Do you know why it calls takeValueForKey twice on the d2wcontext?  Do you think that's on purpose or a mistake?

Johnny


On Mar 15, 2013, at 11:26 AM, Ramsey Gurley <email@hidden> wrote:

Override __setEditingContext on your object and see what's setting it to null?

On Mar 15, 2013, at 2:22 PM, Johnny Miller wrote:

Hi Ramsey,

I tried that one for sanity's sake (to no effect) but I'm using (EOEnterpriseObject) dataSource().createObject(); because it's a master/select page and I already have the data source for the list.

It only happens with new objects.  If I pass in an existing EO it works.  And I've checked that the EO has an EC after it is initialized.  

But by the time it reaches tryToSaveChanges in ERD2WInspectPage it's unassigned?

Thanks,

Johnny

On Mar 15, 2013, at 10:39 AM, Ramsey Gurley <email@hidden> wrote:

Are you using EOUtilities.createAndInsertInstance? Don't use a constructor on an EO.

One possibility, when an EO is deleted, its ec is null.

Ramsey

On Mar 15, 2013, at 12:16 PM, Johnny Miller wrote:

Hi,

Run for the hills I have a new problem.  In my Inspect Page's action bar I have an action that creates a new eo.  The EO is created in the top level component that contains the embedded inspect page.  I know when the EO is created it has an editing context.  But when it gets passed in somehow it is stripped.  I don't think it could be garbage collected because the top level component still has a pointer to it.

Any idea why an EO would get it's editing context stripped?  And how to prevent it?

Thanks in advance,

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail

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
References: 
 >Editing Context getting stripped off new EO in ERXD2WInspectPage (From: Johnny Miller <email@hidden>)
 >Re: Editing Context getting stripped off new EO in ERXD2WInspectPage (From: Ramsey Gurley <email@hidden>)
 >Re: Editing Context getting stripped off new EO in ERXD2WInspectPage (From: Johnny Miller <email@hidden>)
 >Re: Editing Context getting stripped off new EO in ERXD2WInspectPage (From: Ramsey Gurley <email@hidden>)
 >Re: Editing Context getting stripped off new EO in ERXD2WInspectPage (From: Johnny Miller <email@hidden>)
 >Re: Editing Context getting stripped off new EO in ERXD2WInspectPage (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: Editing Context getting stripped off new EO in ERXD2WInspectPage
  • Next by Date: Re: Private coding comments in WO .html files
  • Previous by thread: Re: Editing Context getting stripped off new EO in ERXD2WInspectPage
  • Next by thread: audit trails problem
  • Index(es):
    • Date
    • Thread