Two Laptop Bag
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
JavaRanch » Java Forums » Java » JSF
Bookmark "SelectItem as Href" Watch "SelectItem as Href" New topic

SelectItem as Href

James Gosl

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}" />

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

Thanks in advance.

I agree. Here's the link:
subject: SelectItem as Href
It's not a secret anymore!