Hi All,

I am experiencing some issues with ajax submit with Struts2. I am trying to
do an asynchronous post to an action class that will make a crud call and
return back the html page with the updated input value. I am able to get the
result when posting to form action without using ajax.

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<s:head theme="ajax" debug="true"/>
</head>
<body>
<s:div id="updateDiv" theme="ajax">
<s:text name="Welcome : " />
<s:property value="#session['auth'].fullName" />
<table>
    <tr><td><s:actionerror/><s:fielderror /></td></tr>


       <s:form name="updateStatus" action="action_item_update"
validate="true">
        <tr>
            <td><s:select name="actionStatus" headerKey=""
                 headerValue="Change Status" list="statuses" />
            </td>
            <td><s:hidden name="id" /></td>
           <td> <s:submit  theme="ajax" name="update" value="Update"
notifyTopics="/action_item_update" targets="updateDiv"/> </td>
        </tr>
        </s:form>
</table>
</s:div>
</body>
</html>
When I remove all ajax related attributes from <s:submit .... /> tag, then
the application is submitted without any issues, but not when using Ajax
submission. On my form, I  see the following:

Action Item List
DEBUG: widget ID collision on ID: action_item_update_update

On submission, I see the following error:

Action Item List
[object Error]
DEBUG: widget ID collision on ID: action_item_update_update
Action Item List
DEBUG: widget ID collision on ID: updateDiv


The form parameters are always null on ajax submit. Can anyone tell me what
I am doing wrong? Any help would be appreciated.

Reply via email to