• 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
WODisplayGroup and insert
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WODisplayGroup and insert


  • Subject: WODisplayGroup and insert
  • From: "Antonio Moro" <email@hidden>
  • Date: Mon, 6 Jan 2003 11:07:05 +0100

I've build two component, the first for listing products and the second to
insert/edit a product.
The list is a WODisplayGroup and when I insert a new product and save it, the
WODisplayGroup dosen't update.
Then if I recall the list from the Main component I can see the new product.

My code for the new product action in list component is:

    public DetailProductPage newRecord() {
        DetailProductPage nextPage =
(DetailProductPage)pageWithName("DetailProductPage");

        // Initialize your component here
        EOEditingContext ec = this.session().defaultEditingContext();
        product = new Product();
        ec.insertObject( product );
        nextPage.setProduct( product );
        nextPage.setBackComponent( this );

        return nextPage;
    }

the code in detail component for save changes is:

    public WOComponent saveRecord() {
        EOEditingContext ec = this.session().defaultEditingContext();
        ec.saveChanges();

        return backComponent();
    }

What I'm wronging?

Thanks.

Antonio Moro
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: WODisplayGroup and insert
      • From: Daniel Muller <email@hidden>
  • Prev by Date: Re: Validation exceptions
  • Next by Date: Re: WODisplayGroup and insert
  • Previous by thread: Re: [ANN] BDXmlRpcForWO 1.0.0 released
  • Next by thread: Re: WODisplayGroup and insert
  • Index(es):
    • Date
    • Thread