-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regressionA bug that is also a regression
Milestone
Description
Przemek Ch opened SPR-8732 and commented
Method
protected String autogenerateId() throws JspException {
return StringUtils.deleteAny(getName(), "[]");
}form AbstractDataBoundFormElementTag class doesn't work with freemarker.
Example
<@spring.formInput path="lead.additionalSalesList[1].saleResult.policyId" attributes='class="policyId_1"'/>generates
<input id="additionalSalesList[1].saleResult.policyId" class="policyId_0" type="text" value="" name="additionalSalesList[1].saleResult.policyId">According to https://jira.springsource.org/browse/SPR-2380 the code above should generate id="additionalSalesList1.saleResult.policyId"
[] in ID is not a valid HTML so libraries like jQuery cant handle such elements
Tricks like this $(":input[name='additionalSalesList[1]\\.saleResult\\.policyId']") are needed now to select such items using jQuery.
Affects: 3.0.6
Issue Links:
- Using array syntax generates invalid id in freemarker [SPR-7710] #12366 Using array syntax generates invalid id in freemarker ("duplicates")
- Binding in Velocity templates using EL accessors ([, ]) for collections produces non xhtml strict compliant output [SPR-5172] #9845 Binding in Velocity templates using EL accessors ([, ]) for collections produces non xhtml strict compliant output
Referenced from: commits ba03d5b, e7e74c8, a9f4206
2 votes, 5 watchers
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regressionA bug that is also a regression