title: Create and add f:selectItems to HtmlSelectOneRadio programmatically
body: <p>I'm using JSF to create a questionnaire and therefore I need to create my whole xhtml pragmatically because there are different types of questions and the number of them is not predefined. </p>
  
  <p>All I have is a h:panelGrid on my view and the rest is generated in my backing bean.</p>
  
  <p>I have no problem creating HtmlOutputText and HtmlInputText. For that purpose I create them using getApplication e.g. like this:</p>
  
  <pre><code>getApplication().createComponent(HtmlOutputText.COMPONENT_TYPE);
  </code></pre>
  
  <p>and then add the component to my grid like this:</p>
  
  <pre><code>grid.getChildren().add(questionnumber);
  </code></pre>
  
  <p>where "grid" is my panelGrid element.
  So I put my questions in a loop and based on the type of question from the db I decide what type of component to create. If the question is a normal text question I can easily use a HtmlInputText. But I have multiple choice questions too. Therefore I need to create SelectOneRadio menus and add SelectItems in them. </p>
  
  <p>I can create a <code>HtmlSelectOneRadio</code> using the same createComponent method that I mentioned above. But I'm unable to add options to it (selectitem components). Is there a way that I can do this? Do we have a UIComponent for this that I am missing?</p>