On Oct 21, 2013, at 2:23 PM, Samuel Pelletier <[email protected]> wrote:
> 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.
Very interesting. Not using action and using WOComponent didn't change
anything - but good to know.
What you said about reusing the content of the dialog was the key. I have
placed the AjaxModalDialogs within the update container. Also, my ajax submit
buttons now have updateContainerID bound to the id of the update container.
Update container
Dialog1
Dialog2
Dialog3
Form
Observe field
Dialog Opener1 (new items)
Repetition
Dialog Opener2 (edit items)
Dialog Opener3
So, fixed, whoo hoo. Next...
Thanks all.
kib
Klaus Berkling
www.berkling.us | @kiberkli
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]