Getting problem in rendering selectOneMenu component
Hi All,
I'm getting exception
pages/common/updated login.xhtml @18,60 value="#{newOrderBackingBean.strs}": Exception getting value of property strs of base of type : com.myorder.order.neworder.NewOrderBackingBean
whereas i have backing bean as
package com.myorder.order.neworder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.faces.component.UISelectItem;
import javax.faces.model.SelectItem;
public class NewOrderBackingBean {
private Collection<SelectItem> strs = new ArrayList<SelectItem>();
private String selected = "option 2 2";
public String getSelected() {
return selected;
}
public void setSelected(String selected) {
this.selected = selected;
}
public Collection<SelectItem> getStrs() {
SelectItem option = new SelectItem("ch1", "choice1", "This bean is for selectItems tag", true);
strs.add(option);
option = new SelectItem("ch5", "choice5");
strs.add(option);
return this.strs;
}
public void setStrs(Collection<SelectItem> strs) {
this.strs = strs;
}
}
and mentioned in faces-config file.
my faces file is like
<f:view>
<h:form>
<div class="grid_home" id="mainBody">
<h:selectOneMenu id="id1" value="#{newOrderBackingBean.selected}">
<f:selectItems value="#{newOrderBackingBean.strs}" />
</h:selectOneMenu>
</div>
</h:form>
</f:view>
but not getting the cause of error.
Please help us

