Submitting a form in Liferay using Ajax and SpringSubmitting a form in Liferay using Ajax and Springhttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=2710032024-03-29T00:11:02Z2024-03-29T00:11:02ZSubmitting a form in Liferay using Ajax and SpringAdam Chttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=2710022007-11-13T16:42:06Z2007-11-13T16:42:06Z<html><head></head><body>I've followed the tutorial on submitting a form via Ajax in Liferay, but have been unsuccessful so far. The only difference between what I'm doing and the example is that I'm not using struts, so I don't have a struts_action parameter. I'm using spring portlet mvc instead of struts.<br><br>I get the following error after pressing the submit button on the form.<br><br><blockquote>Nov 13, 2007 11:31:29 AM org.apache.tomcat.util.http.Parameters processParameters<br>WARNING: Parameters: Invalid chunk ignored.<br>Nov 13, 2007 11:31:29 AM org.apache.tomcat.util.http.Parameters processParameters<br>WARNING: Parameters: Invalid chunk ignored.</blockquote><br><br>Here is the important code.<br><br><pre><code><portlet:actionurl var="actionURL" windowState="<%=LiferayWindowState.EXCLUSIVE.toString()%>" />
<c:set var="namespace" scope="page"><portlet:namespace /></c:set>
${namespace}submitEntry = function(form) {
AjaxUtil.submit(form, "${namespace}poll");
}
<div id="${namespace}poll">
<form:form commandname="pollCommand" action="${actionURL}" name="${namespace}pollfm" onsubmit="${namespace}submitEntry(document.${namespace}pollfm); return false;">
<c:foreach var="c" items="${question.choices}">
<form:radiobutton path="choiceId" value="${c.choiceId}" />${c.prompt}
<c:if test="${c.allowUserInput}">
<form:input path="response" />
</c:if>
<br>
</c:foreach>
<c:if test="${question.allowComments}">
Additional Comments:
<br>
<form:textarea path="comments" rows="3" cols="30" />
</c:if>
<input type="submit" value="Vote!">
</form:form>
</div></code></pre></body