awaisalvi / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

<s:url> + formId in <sj:div> bug with first form field #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using a <s:url> + <sj:div> with formIds attribute the first form field
appear with bug at request.

Which struts2 version?
2.1.8.1

Which struts2-jquery plugin version?
1.8.3

JSP code

<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/struts-jquery-tags" prefix="sj" %>
<%@ page language="java" pageEncoding="ISO-8859-1"%>

<html>
<head>
<s:head/>
<sj:head jqueryui="true"/>
</head>

<body>
<s:form id="form1">

<s:hidden name="field1"></s:hidden>

<s:textfield name="field2"></s:textfield>

</s:form>

<s:url var="u1" action="test-form" escapeAmp="false">
    <s:param name="field3" value="%{'aaaa'}"></s:param>
    <s:param name="field4" value="%{'bbbb'}"></s:param>
</s:url>

<sj:div id="d1" href="%{u1}" formIds="form1"></sj:div>

</body>
</html>

The generated request query for the <sj:div> is

field3=aaaa&field4=bbbb&amp;field1=&field1=

Using a HTTP Request analizer, I got the attached result

Only the first form field is affected.

If using escapeAmp="true" the result is worst.

Original issue reported on code.google.com by jyoshiriro on 11 Feb 2010 at 3:37

Attachments:

GoogleCodeExporter commented 9 years ago
is fixed in svn trunk, thanks for test case.

Original comment by johgep on 12 Feb 2010 at 8:04

GoogleCodeExporter commented 9 years ago
Fixed

Original comment by jyoshiriro on 26 Feb 2010 at 5:44