Anonymous | Login | Signup for a new account | 12-17-2024 11:38 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0005590 | [Resin] | major | always | 11-19-13 03:46 | 02-13-14 18:54 | ||||
Reporter | VladV | View Status | public | ||||||
Assigned To | alex | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 4.0.37 | ||||||
Summary | 0005590: JSTL bug: empty values handled incorrectly in fmt:formatNumber tag | ||||||||
Description |
Empty (null) values passed to fmt:formatNumber as "value" attribute are handled incorrectly: instead of being displayed as empty values, they are displayed as values from previously evaluated fmt:formatNumber tags. Please see the example below. If the value is passed as the tag content, not as an attribute, everything works as expected. |
||||||||
Additional Information |
Code to reproduce the bug: <%@ page pageEncoding="utf-8" trimDirectiveWhitespaces="true" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" [^] %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" [^] %> <html> <head> <title>JSP Test Page</title> </head> <body> <c:set var="x" value="12.345" /> <c:set var="y" value="${null}" /> [<fmt:formatNumber maxFractionDigits="2" value="&0000036;{x}"/>] [<fmt:formatNumber maxFractionDigits="2" value="&0000036;{y}"/>] [<fmt:formatNumber maxFractionDigits="2">&0000036;{x}</fmt:formatNumber>] [<fmt:formatNumber maxFractionDigits="2">&0000036;{y}</fmt:formatNumber>] </body> </html> Output: [12.34] [12.34] <-- this should be empty [12.34] [] |
||||||||
Attached Files | |||||||||
|
Notes | |
(0006397) alex 02-13-14 18:51 |
jsp/1dbd |
(0006398) alex 02-13-14 18:53 |
fixed in 4.0.39 |
(0006399) alex 02-13-14 18:54 |
jsp/1dbd |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
37 total queries executed. 29 unique queries executed. |