Hi,
I mean that the value is null now that I use ognl 2.7.2. When using 2.6.11 the 
value is a correct map.

This is in the model för the jsp page:
    SortedMap<Integer, String> jobTypeList = new TreeMap<Integer, String>();

    public SortedMap<Integer, String> getjobTypeList() {
        jobTypeList.put(1, "Förfrågan");
        jobTypeList.put(8, "VP-flytt");
        // return this.getWc().getTypeAsText();
        return jobTypeList;
    }

/Gunnar
 

> -----Ursprungligt meddelande-----
> Från: Dale Newfield [mailto:[EMAIL PROTECTED] 
> Skickat: den 6 oktober 2008 20:34
> Till: Bostrom Gunnar
> Kopia: user@struts.apache.org
> Ämne: Re: SV: Ognl versions
> 
> [EMAIL PROTECTED] wrote:
> > The jobTypelist is empty, but it worked with 2.6.11 version of ognl.
> > The applications is our own.
> 
> So you're saying that the updated version doesn't silently 
> fail, and that's enough to condemn it?  I would argue that 
> that's an improvement.
> 
> In fact, if you look in the source code for the exception 
> stack you provide, this is by design:
> 
> core/src/main/java/org/apache/struts2/components/ListUIBean.java:
> >         if (value == null) {
> >             if (throwExceptionOnNullValueAttribute) {
> >                 // will throw an exception if not found
> >                 value = findValue((list == null) ? (String) 
> list : list.toString(), "list",
> >                     "The requested list key '" + list + "' 
> could not be resolved as a 
> collection/array/map/enumeration/iterator type. " +
> >                     "Example: people or people.{name}");
> >             }
> >             else {
> >                 // ww-1010, allows value with null value to 
> be compatible with ww
> >                 // 2.1.7 behaviour
> >                 value = findValue((list == null)?(String) 
> list:list.toString());
> >             }
>  >         }
> 
> So, in fact, what you're finding through your testing is a 
> place where ognl 2.6.11 is doing the wrong thing.
> 
> If you want silent failure, there's a flag to throw so that 
> your app gets it.  If you want to evaluate the correctness of 
> a component, please ensure you're testing what you think 
> you're testing.
> 
> -Dale
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to