[ 
https://issues.apache.org/struts/browse/WW-2342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Musachy Barroso resolved WW-2342.
---------------------------------

    Resolution: Not A Problem

given an expression like "A.B", if A is a Map, then B will be interpreted as a 
key in the map, and get(B) will be called. If you want to call some method on 
the map, then use the "A.B()" notation

> Class that inherite from HashMap couldn't use in value stack
> ------------------------------------------------------------
>
>                 Key: WW-2342
>                 URL: https://issues.apache.org/struts/browse/WW-2342
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Expression Language, Value Stack
>    Affects Versions: 2.0.9
>            Reporter: Vladimir A. Balandin
>             Fix For: Future
>
>
> In jsp the tag <s:property value="map.value"/> doesn't evalutes correct on 
> action:
> class SomeAction {
>      Map map = new HashMap() {
>          public String getValue() {
>              return "failed";
>          }
>      };
>      Map getMap() {
>         return map;
>      }
>      public String execute() {
>          return "success";
>      }
>  }
> But on the following action it evalutes currect:
> class SomeAction {
>      Object map = new Object() {
>          public String getValue() {
>              return "success";
>          }
>      };
>      Object getMap() {
>         return map;
>      }
>      public String execute() {
>          return "success";
>      }
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to