Hi list,
I have a problem with getting an AjaxUpdateContainer to actually update. My
idea is to have an AjaxUpdateContainer with a list of Items and an
AjaxModalDialog to insert a new item into said list. At the moment my code
looks something like this:
HTML
<webobject name = “ItemListUpdateContainer”>
(LIST TO REFRESH)
<webobject name = "createItemDialog">
<webobject name = "form”>
(FORM FOR NEW ITEM)
<webobject name = "createItemSubmitButton"/>
</weboject>
</weboject>
</weboject>
Bindings
itemListUpdateContainer : AjaxUpdateContainer {
id = “itemList";
action = updateItemListContainer;
}
createItemDialog: AjaxModalDialog {
id = "createItemDialog";
title = "Create New Item";
label = "Create New Item";
locked = true;
}
form : WOForm {
}
createItemSubmitButton : CCSmartAjaxButton {
action = createItem;
useAjax = true;
value = "Create";
updateContainerID = "itemList";
}
Java
public WOActionResults updateItemListContainer() {
return null;
}
public WOActionResults createItem() {
(SETTING ALL THE VALUES AND STUFF)
ec.insertObject(newItem);
ec.saveChanges();
AjaxUtils.appendScript(context(), "AMD.close(); itemListUpdate();");
return null;
}
Does anyone have an idea what i’m doing wrong? It’s probably a trivial mistake,
but i really don’t see it right now.
Thanks,
Beni
_______________________________________________
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]