• 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: AjaxModalDialog not going away
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AjaxModalDialog not going away


  • Subject: Re: AjaxModalDialog not going away
  • From: Samuel Pelletier <email@hidden>
  • Date: Mon, 21 Oct 2013 17:23:06 -0400

Hi Klaus,

I read your initial message again and something caught my attention. I do not think the ModalDialog will call the action the second time, it reuse it's contents, I remember having trouble like this 2 years ago.

I never use the action on AjaxModalDialog, I always use a separate WOComponent with a binding for the edited entity. 

The HTML logo like this:
<wo:AjaxModalDialog id = "coursEditor" resizeDuration = "0.25" slideDownDuration = "0" closeUpdateContainerID = "ficheCours" title = "$localizer.CoursEdit.titre.EditerPeriode"><wo:PeriodeEditor object = "$editedPeriode"/></wo:AjaxModalDialog>

The action of the AjaxModalDialogOpener simply set the variable bound to the object like this:
public WOActionResults editPeriode() {
EOEditingContext ec = ERXEC.newEditingContext();
editedPeriode = periode().localInstanceIn(ec);
return null;
}

I even created a BasicEditorComponent class for these editors.

Hope this help,

Samuel


Le 2013-10-21 à 15:28, Klaus Berkling <email@hidden> a écrit :

I still getting anywhere.

If anyone wants to look at it let me know and I'll send you the URL in private.

On Oct 20, 2013, at 8:43 AM, Samuel Pelletier <email@hidden> wrote:

Klaus,

If your modal modify the repetition list and you do not refresh the displayed list (you can specify an  closeUpdateContainerID in the AjaxModalDialog) to refresh the list, you can have strange behaviours.

I also always put AjaxModalDialog before the list.

Check the browser console for _javascript_ errors when closing the dialog the second time.

Samuel

Le 2013-10-18 à 20:35, Klaus Berkling <email@hidden> a écrit :


With some more logging:
The second time around, the action method in AjaxModalDialog does not get called. 
But the action method in AjaxModalDialogOpener does get called.

So the page is already messed up the second time it opens.
This could point the finger at the update container.

Thanks.

On Oct 18, 2013, at 2:53 PM, Chuck Hill <email@hidden> wrote:

The dialog not closing should mean either a _javascript_ error on the page or an exception on the back end resulting in the wrong (or or likely no) _javascript_ getting returned to the client.    Seeing the same data again makes me suspect the second but then I would expect the same result in Eclipse.

I recall a problem with some _javascript_ going out of scope in the page after an AjaxUpdate, but the details are not coming to me.

Chuck


On 2013-10-17 9:40 PM, "Klaus Berkling" wrote:


I have a page that has a page wrapper and on that page is also a reusable component.
There is nothing but simple strings in the page and it's wrapper.

The reusable component does have a number of Ajax things on it.
- There are three AjaxModalDialog outside of everything, outer to inner: a WOForm, an AjaxUpdateContainer, an AjaxObserveField, and a WORepetition.
- For all three dialogs I use AjaxModalDialogOpener. 
- Two of the three dialog openers are inside the repetition. One is inside the observe field.

The repetition is an array of people, each person has a one-to-many additional records.
One dialog edits the person's record, another dialog edits the additional records for that person, and the third is to create a new person record.
Each of the dialogs is a component, a new person and edit person share the same component.

Alles klar?

So here is the problem.  
- When I run the app and view the list of persons, open the dialog to edit the additional records then cancel or save, it works the first time.

- If I do the same edit again for any other person I get the information of the first person in the dialog.

- The submit buttons (cancel, save) do not close the dialog the second time (calling AjaxModalDialog.close(context());).
Clicking the buttons in the dialog cause awake() to be called on all three components (page, page wrapper, reusable component).

For extra pain, this only happens when deployed, not when debugging in Eclipse.
When first deployed I had to add WOFrameworksBaseURL because the Ajax frameworks _javascript_s didn't load (404 errors).
Fixed that and now there are no errors on the page in the browser. I'm still suspicious that my problem has to do with a bad reference on the page, some incorrect URL.

It's a build with embedded frameworks.

Anyone have any suggestions on what the problem might be? Am I putting too mach Ajax on the page?

TIA

kib

Klaus Berkling
www.berkling.us | @kiberkli





-- 
Chuck Hill             
Executive Managing Partner, VP Development and Technical Services

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! 

Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!



kib

Klaus Berkling
www.berkling.us | @kiberkli




kib

Klaus Berkling
www.berkling.us | @kiberkli


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: AjaxModalDialog not going away
      • From: Klaus Berkling <email@hidden>
References: 
 >Re: AjaxModalDialog not going away (From: Chuck Hill <email@hidden>)
 >Re: AjaxModalDialog not going away (From: Klaus Berkling <email@hidden>)
 >Re: AjaxModalDialog not going away (From: Samuel Pelletier <email@hidden>)
 >Re: AjaxModalDialog not going away (From: Klaus Berkling <email@hidden>)

  • Prev by Date: Re: AjaxModalDialog not going away
  • Next by Date: Re: AjaxModalDialog not going away
  • Previous by thread: Re: AjaxModalDialog not going away
  • Next by thread: Re: AjaxModalDialog not going away
  • Index(es):
    • Date
    • Thread