• 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: newEO.localInstanceIn(localEditingContext)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newEO.localInstanceIn(localEditingContext)


  • Subject: Re: newEO.localInstanceIn(localEditingContext)
  • From: "Ricardo J. Parada" <email@hidden>
  • Date: Thu, 26 Mar 2009 18:26:36 -0400


On Mar 26, 2009, at 5:51 PM, Chuck Hill wrote:

On Mar 26, 2009, at 2:36 PM, Ricardo J. Parada wrote:


On Mar 26, 2009, at 5:05 PM, Chuck Hill wrote:

On Mar 26, 2009, at 1:44 PM, Ricardo J. Parada wrote:


Yes, you are right... I better comment on the context. :-)

I'm playing with ajax tabbed panel and tabs.

Each component in a tab is getting its own editing context. Its own sandbox. :-)

If the user is editing something in tab1 (i.e. has pending edits), he can switch to tab2 and change something there and save that... then come back to tab1 and the changes there are still pending and he can click save there. Anyways, each tab has its own sandbox.

But this design breaks when you have a new EO because you cannot make a copy of the EO into the other editing contexts used by the other tabs.
And I think it also breaks if I attempt to make a copy of the EO if it has pending changes from tab1 for example (right?).


So... I could change it to have all the tabs share the editing context and would probably make things easier... I just wished I could have the tab submit the form within the displayed tab when the user switches tabs... Otherwise the user will change something in a text field in tab1 then switch to tab2 and then back to tab1 and notice that the change made in the text field was lost.

Thanks,
Ricardo

Have one EC for the tab form as whole, and one child EC for each tab. I think that will do what you want.

Hmm... If I do this then clicking save in one tab will simply commit the changes to the parent editing context (it won't save to the database right?).

Right, you need something to save the whole form. I'm not sure if this control will handle saving before each tab switch and refusing switching if not valid. I had wanted to add this, but don't think that I did.



I think that would feel weird to the user. :-)

I think what I'm looking for is for each AjaxTabbedPanelTab to have an optional inputContainerID binding. So for example, let's say the AjaxTabbedPanelTab has inputContainerID="form2". Then when tab2 is selected and you click on tab1 then the input elements within form2 would then be submitted with the request and then tab1 would be displayed. I don't think preventing switching tabs is that important. So I'm not concerned about that.

For example, in my ajax framework (a more basic framework but very similar in many ways to the Wonder Ajax framework, and which I'm ditching in favor of Wonder so I don't reinvent the wheel...) I used to have an AjaxSubmitLink. This AjaxSubmitLink was very similar to AjaxUpdateLink except for the addition of an inputContainerID binding which could be used to specify the id of a form (or any other html element, i.e. it could be a div or an actual input element, i.e. a text field or a pop-up list).

We used AjaxSubmitLinks to have links styled like buttons which behaved like ajax submit buttons in that they submitted values with the ajax request, invoked an action and update an AjaxUpdateContainer.


_______________________________________________ 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: newEO.localInstanceIn(localEditingContext)
      • From: "Ricardo J. Parada" <email@hidden>
References: 
 >newEO.localInstanceIn(localEditingContext) (From: "Ricardo J. Parada" <email@hidden>)
 >Re: newEO.localInstanceIn(localEditingContext) (From: Ken Anderson <email@hidden>)
 >Re: newEO.localInstanceIn(localEditingContext) (From: "Ricardo J. Parada" <email@hidden>)
 >Re: newEO.localInstanceIn(localEditingContext) (From: Chuck Hill <email@hidden>)
 >Re: newEO.localInstanceIn(localEditingContext) (From: "Ricardo J. Parada" <email@hidden>)
 >Re: newEO.localInstanceIn(localEditingContext) (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: newEO.localInstanceIn(localEditingContext)
  • Next by Date: Re: newEO.localInstanceIn(localEditingContext)
  • Previous by thread: Re: newEO.localInstanceIn(localEditingContext)
  • Next by thread: Re: newEO.localInstanceIn(localEditingContext)
  • Index(es):
    • Date
    • Thread