-
Jul 4th, 2008, 01:33 AM
#1
Problem updating Combo box using Spring XT ReplaceContentAction
Hi everyone,
I want to update the following combo box in my JSP on select of some other Combo
<form:select id="products" path="cmd.products"
onchange="XT.doAjaxAction('productSelection', this);">
<form:option value="" label="Select product"/>
</form:select>
I tried in my action class the following code but its not updating the combo pl help
List<Component> options = new LinkedList<Component>();
Option first = new Option("", "Select product");
options.add(first);
for (ProductFolder folder : childFolders) {
Option option = new Option(folder, "id", "path");
options.add(option);
}
// Create an ajax action for replacing the content of the "products"
// element
ReplaceContentAction action =
new ReplaceContentAction("products", options);
// Create the ajax response
AjaxResponse response = new AjaxResponseImpl();
// Add the action
response.addAction(action);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules