On Mon, Mar 10, 2008 at 11:33 AM, stanlick <[EMAIL PROTECTED]> wrote:
>
> I am working on a custom result type and a weird scenario.
>
> If I issue vs.findValue("employees");
>
> the getEmployees() is called on my action just fine.
>
> However issuing vs.findValue("employee('e9874v')");
>
> for a specific employee, I get a null value!
>
> If I change th syntax to vs.findValue("getEmployee('e9874v')");
>
> it returns the employee.
>
> What's up with the funky requirement? "employees" finds getEmployees()
I believe, though I could easily be wrong, that when you use the
JavaBeans reference, anything in the parenthesis is considered a Map
reference, so it treats the return from getEmployee() as a map and
attempts to look up "e9874v", which of course fails and returns a
null. When you use the OGNL method syntax, it considers things in
parenthesis to be arguments to the method, so the call works as you're
expecting.
(*Chris*)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]