Meaningless Drivel is fun!*
The moose likes JSF and the fly likes How to auto-render a GUI using Ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to auto-render a GUI using Ajax " Watch "How to auto-render a GUI using Ajax " New topic
Author

How to auto-render a GUI using Ajax

Enrique Villamizar
Ranch Hand

Joined: Jul 30, 2005
Posts: 93
Hello to Everybody:

I have a selectOneMenu. If the user select one specific value relating to age of a person, I need to validate if this selection is valid based on code in the Backing bean. I am using Ajax and I donĀ“t undestand why when the selection is not valid the selectOneMenu is not rendering.

The XHTML code:


On the backing bean:
Guy deLyonesse
Ranch Hand

Joined: Apr 12, 2011
Posts: 200

You should be using JSF's validation feature. You can write a custom validator that uses the selectOneMenu and whatever other values it gets compared to, and puts the result in the validation queue.
Enrique Villamizar
Ranch Hand

Joined: Jul 30, 2005
Posts: 93
Thanks Guy deLyonesse for your help.

That's a better idea... Now I have a custom validation. Anyway I would like to use Ajax for instant validation ( I mean no waiting until the entire form will be submitted). How can I do it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to auto-render a GUI using Ajax
 
Similar Threads
selectOneMenu label value
Update another component when selectOneMenu
Can we assign JSF Ajax Render attribute dynamically?
h:selectOneMenu breaking up in IE 9
f:ajax to update h:selectOneMenu