users@glassfish.java.net

Re: RE: Cannot get _at_ManagedProperty to work

From: <glassfish_at_javadesktop.org>
Date: Sun, 19 Sep 2010 17:04:05 PDT

>
> implement javax.annotation.ManagedBean on the class
> to be Managed for example by annotation

Well, I tried that and it wasn't working. I tried it again and now it seems to be working. I wonder if I had imported the ManagedBean annotation from some other package without realizing it? (Netbeans will add import statements for you but if there is more than one choice it is easy to get the wrong one.)

I started using @Model instead of @ManagedBean because of the discussion about how @ManagedBean was to be deprecated as redundant. However it does seem in this case to make a difference in how GF treats the bean.

> any reason you're implementing RequestScope instead
> of SessionScope ?

Note that one of the values accessed for the managed properties is the request-scoped #{param['toot']}, not accessible from wider scopes. So attempting to do so gets this error message:

[code]Unable to create managed bean goHere. The following problems
were found: - The scope of the object referenced by expression
#{param[toot]}, request, is shorter than the referring managed
 beans (goHere) scope of session[/code]

Thanks for your response.
[Message sent by forum member 'alan94539']

http://forums.java.net/jive/thread.jspa?messageID=483104