On 10/9/09 8:31 PM, glassfish_at_javadesktop.org wrote:
> Hi,
>
> I just downloaded NetBeans 6.8 M2 and installed GlassFish V3 b66 with it. I created a Java EE6 web app with an EJB 3.1 session bean, and a JSF page:
>
> package sandbox.jee6web1;
>
> import javax.ejb.Stateless;
> import javax.faces.bean.ManagedBean;
>
> @Stateless
> @ManagedBean
> public class FantasyBean {
> public String getMyName(String name) {
> return name;
> }
> }
>
>
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:h="http://java.sun.com/jsf/html">
> <h:body>
> Hello from the Facelets #{fantasyBean.myName('Bandit')}
> </h:body>
> </html>
>
>
> JSF throws an exception when I try that:
>
> javax.el.ELException: /index.xhtml: Method myName not found
>
> However, if I remove the method parameter and make it just return a hard coded String, it works. I was lead to believe that JEE6 and GlassFish V3 would support method parameters in EL expressions:
>
> http://blogs.sun.com/kchung/entry/jsr_245_mr_part_i
>
> Can anyone please shed some light?
>
When you're using the method parameter feature you have to use the full
method name.
#{fantasyBean.getMyName('Bandit')}
>
> Thanks,
> Ryan
> [Message sent by forum member 'rdelaplante' (ryan_at_ijws.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=367479
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>