Mailing List Message #146
From: Markus Ruggiero (rucotec) <>
Subject: Re: [WO-DEV] Mixup of AjaxModalDialog and AjaxUpateContainer on underlying page
Date: Sat, 17 Apr 2021 10:07:36 +0200
To: WebObjects & WOnder Development <>
Signed Data (Text SHA256)

it was a bad night I had and an even worse dream - but as it sometimes happen I dreamed up the solution - and the keyword was WOContext!

Instead of calling pageWithName() to instantiate the HTML mail contents component (which instantiates it with the current WOContext) I now call ERXApplication.instantiatePage(). This creates a fake WOContext for the page and so its output will not make it into the current context’s response.

After fixing a small typo in the bindings of the update container everything is now fine.

myUC : AjaxUpdateContainer { id = “REMOTE_REQUEST_UPDATE_CONTAINER_ID”; }
Of course there should not be double quotes as REMOTE_REQUEST_UPDATE_CONTAINER_ID is a final String constant in the Java file. Thus the update container was never found and so no update happened.

I trigger the update container with the AjaxModalDialog binding 

Sometimes a bad night’s sleep helps wonders (Wonder? where did I see that word that lately?)


On 16 Apr 2021, at 17:51, Markus Ruggiero (rucotec) <> wrote:


I am fighting with the following issue:

AjaxTabbedPabelTab contains a list of items (WORepetition).
Any such item can have an AjaxModalDialogOpener to open an edit dialog for that particular item.
The edit dialog has a save button whose action in Java looks like the following

public WOActionResults resendRemoteRequest() {

// preparation and stuff

// compose and send out mail
EmailRequestingRemoteSignatureAndPayment mailComponent = pageWithName(EmailRequestingRemoteSignatureAndPayment.class);

// more mailComponent.set(...)
try {
ERMailDeliveryHTML message = new ERMailDeliveryHTML();
message.setSubject("Please sign your contract with " + companyName);
catch (Exception ex) {
log.error("Error sending notification Email: " + ex.getMessage());
dialogErrorMessage = "Failed to send Email";
AjaxModalDialog.update(context(), "ERROR - Could not send Email");
return null;

// everything is fine, let's save things

return null;

Unfortunately I get very weird behavior...

Code written above returning both trigger for update and trigger to close dialog:
Dialog does not close and is dead in the water. No update happens, I have to manually reload the page in the browser. Then everything is fine.

Using updateContainerId binding on the AjaxSubmitButton that calls the above action and no call to trigger update from Java :
Dialog closes but the mail message text is pasted into the browser window! WHAT?! And no update happens (no data is reloaded)

No update container at all:
dialog closes properly, but nothing updates (of course)

What is going on here? How should I handle this stuff? I was thinking of returning a WORedirect, but how do I get the proper URL?

Thoroughly confused!

Markus Ruggiero

rucotec GmbH                        web
Steinenvorstadt 79                email
4051 Basel / Switzerland         mobile +41 79 508 4701

Content Unaltered as verified By:
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster