• Post Reply Bookmark Topic Watch Topic
  • New Topic

selectOneMenu call a method on select item  RSS feed

 
Diego Creador
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys!


Im having a problem with the selectOneMenu tag. What I have to do is when I pick one of the item of the list call a method that fill me anothers fields

But the thing is that I tried several ways but the method is never call

My code look like this



Do you guys see any problem? Im using primefaces 3.x

Thanks in advance
Regards
Diego
 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Primefaces has become quite popular here lately. Unfortunately, I haven't read up on it, so I can't give specific help, but on some of the other platforms I know of, you often have to limit what goes down to the server.

JSF AJAX doesn't "call" a method, it fires an action. Actions are methods that conform to JSF constraints, meaning public, no arguments, returns void. They also are at the farther end of the JSF lifecycle, so they won't get fired at all unless the preceding stages all passed.

What that usually means is that you have one or more invalid items on your JSF form, although they may not be related to the control that you're attempting to run AJAX against. Some frameworks can be instructed to ignore those items. For example, in RichFaces, the "ajaxSingle="true"" attribute on their equivalent of "p:ajax" will do that. You might want to check the docs for p:ajax and see if it has a similar option.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!