[ 
http://www.stripesframework.org/jira/browse/STS-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter closed STS-177.
--------------------------


> Using a Map with a Key(length=1) produces ClassCastExceptions
> -------------------------------------------------------------
>
>                 Key: STS-177
>                 URL: http://www.stripesframework.org/jira/browse/STS-177
>             Project: Stripes
>          Issue Type: Bug
>          Components: Validation
>    Affects Versions: Release 1.3
>            Reporter: Alexander Thomson
>            Assignee: Tim Fennell
>             Fix For: Release 1.4
>
>
> When using Maps in your ActionBean, supplying the binding expression name 
> with single quotes in the input tag leads to problems
> e.g
> In the ActionBean I have a property defined as 
>      private Map<String,String> receptaclePosition;
> In the JSP I bind to it using
>      <input type="text" value="blah" name="receptaclePosition['T']"/>
> Problem is when OGNL evals
>    receptaclePosition['T'] 
> it decides the key for the map is a Character not a String, unfortunately 
> this means you now have a type safe map that contains incorrectly typed 
> values, and class class exceptions will ensue.
> WORKAROUND: instead of  receptaclePosition['T']  use 
> receptaclePosition[&quot;T&quot;]. OGNL always evals double quotes to a 
> String.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to