This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JSF and the fly likes SelectItem as Href Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "SelectItem as Href" Watch "SelectItem as Href" New topic
Author

SelectItem as Href

James Gosl
Greenhorn

Joined: Apr 30, 2012
Posts: 1
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.

 
Don't get me started about those stupid light bulbs.
 
subject: SelectItem as Href