struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasanth <dbad...@pangburngroup.com>
Subject Map backed form
Date Thu, 14 Feb 2019 23:17:38 GMT
Hi,

I have a map (Map<Long, Double>) but based on the data entered by the user the value
in the Map is Double or String. Example if the user enters a value of 10 then it is coming
in as double but if the
user enters 10.5 then a string is present in the value. Does Struts2 look at the data types
of the key and value of the map and set the key and values in the map accordingly?

If not, what is the best practice for the declaration of Map, is there a way to force Struts2
to only have Double objects as values?

Thanks,
Prasanth

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message