if the AjaxSubmit button is ONLY updating "tableBody" container, so
your container cannot dismiss
put an AjaxUpdateContainer that wraps the entire content ( your table
and the form ) than change
<wo:AjaxSubmitButton action = "$deleteContact" value = "Delete"
updateContainerID = "tableBody" />
to
<wo:AjaxSubmitButton action = "$deleteContact" value = "Delete"
updateContainerID = "mainContainer" />
Regards
Amedeo
On 17/apr/09, at 18:24, Theodore Petrosky wrote:
I am attempting to use this wonderful Wonder stuff...
I have a table and I want the user to be able to mark rows as
deleted. Actually they are updating the row and setting the
isDeleted boolean to true and saving the row.
I am trying to use the AjaxModalContainer to show the currently
selected row. I have used the AjaxExample2 as a template for the
container. So far the user can click the delete column and the
AjaxModalContainer comes up...
DeleteContact : AjaxModalContainer {
ajax = true;
id = current.companyName;
label = "delete";
}
Here is the row/column to delete the record:
<webobject name = "DeleteContact">
<wo:AjaxUpdateContainer>
<wo:form>
<b>Delete Company</b>
<p>
<wo:WOString value = "$current.companyName" size = "30" />
<wo:AjaxSubmitButton action = "$deleteContact" value = "Delete"
updateContainerID = "tableBody" />
</p>
</wo:form>
</wo:AjaxUpdateContainer>
</webobject>
My problem is that the modal dialog is not dismissing after the user
clicks the delete button. (the current record is indeed marked as
deleted. Here is the java:
public WOActionResults deleteContact() {
NSLog.out.appendln("top of deleteContact ++++++++++++++++++++++++++++
+");
dg.setSelectedObject(current);
dg.selectedObject().setIsDeleted(true);
try {
contactEO.saveChanges();
//jobListEO.saveChangesInEditingContext(jobListEO);
} catch (ValidationException e) {
NSLog.out.appendln("ValidationException e = " + e.getMessage());
} catch (EOGeneralAdaptorException e) {
NSLog.out.appendln("EOGeneralAdaptorException e = " + e.getMessage());
}
contactList = null;
contactList = Contact.fetchNotDeleted(contactEO);
dg.setObjectArray(contactList);
//this.sortByCompany(); //so it has an initial value
current = null;
dg.setSelectedObject(null);
dg.qualifyDisplayGroup();
deleteContactBoolean = false;
return null;
}
Why doesn't this dialog dismiss when you click the submit button....
Ted
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/amedeomailing%40insigno.it
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]