• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calling a managed bean method from JSF

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys, need your help.
Have this bean :


and JSF code :

and i get every time this error:

What is the matter ? I read that with JSF 2.0, calling methods with parameter is posible. Any idea ?
 
Greenhorn
Posts: 17
Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please check if you have the faces-config.xml file, under the WEB-INF directory. In case you forgot it, and given the context you showed us, I give you an example of the file:

 
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, the problem here is that you are not allowed to pass a parameter in EL, like you did here:



The only way you can call a method in the backing bean is like:

,

Cheers!
 
Carlo Lopez
Greenhorn
Posts: 17
Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry to dissapoint you but thats not true,

you can pass parameters in EL
 
Carlo Lopez
Greenhorn
Posts: 17
Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If what I told you doesn't help, please check your web.xml file under WEB-INF, to make it look something like this:



taking into account that you have to change the value of the "welcome-file" property, to the name of your JSF file
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic