Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling a managed bean method from JSF  RSS feed

 
Popescu Ion
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • 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 ?
 
Carlo Lopez
Greenhorn
Posts: 17
Linux
  • Mark post as helpful
  • send pies
  • 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:

 
Flavio Henrique Furlanetto
Greenhorn
Posts: 1
Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!