Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SelectItem as Href

 
James Gosl
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

Im new to JSF.JSF Gurus Could any one please help me with sample code how to create a selectItem as href.
My requirement is to create radiobutton group, each button have value,label and label as href should open in new tab.
some thing like this radio button value="p1" label="Click Here" and href="/gothispage";
When ever i click on "Click Here" link it should open in new tab.
I was trying something like this...
<h:selectOneRadio id="selectedCategory" layout="pageDirection" required="true" valueChangeListener="#{RequestBean.setSelectedCategory}" >
<f:selectItems value="#{RequestBean.selectList}" />
</h:selectOneRadio>

SelectItem item =new SelectItem(catalogue.getCategoryValue(),catalogue.getCategoryName() );
selectList.add(item);

Thanks in advance.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic