So basically what i am trying to achieve is when i select certain radio button some things get rendered and some not. Ofcorse, i dont need to render the hole page again, just some things. I have written something like this, but this is not working:
Here, "methodWithYourLogic" is the method name can be anything that you define in your bean class with the logic on what basis you want to display the component or the other way around. In this method by the end make that variable true so it will show the component.
You can make your sample code and XML easier to read by using the "Code" button in our message editor. Also, we would prefer that you didn't "piggyback" onto an existing topic if you have a question of your own. Start your own topic. It makes it easier for people to follow.
Your exception comes from the fact that the SelectOneRadiobutton control does not take string labels, it takes SelectItem model objects. A SelectItem is a label/value pair where the itemlabel is the text displayed next to the button and the itemvalue is what the radioButton's value will be set to when the button is clicked.
In essence, the SelectOneRadiobutton has mechanics that work exactly like a selectOneMenu control, except that instead of rendering as a dropdown list, you get buttons.
An IDE is no substitute for an Intelligent Developer.