permaculture playing cards*
The moose likes JSF and the fly likes JSF Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Issue" Watch "JSF Issue" New topic
Author

JSF Issue

shubhranshu swain
Greenhorn

Joined: Dec 14, 2010
Posts: 3
Folks,

I am new to jsf. I have a jsf page as below.

<h:selectOneMenu binding="#{commonBeans.htmlSelectOneMenu}">
<f:selectItem itemValue="human" itemLabel="HUMAN"/>
<f:selectItem itemValue="yeast" itemLabel="YEAST"/>
<f:selectItem itemValue="worm" itemLabel="WORM"/>
<f:selectItem itemValue="fly" itemLabel="FLY"/>
<f:selectItem itemValue="mouse" itemLabel="MOUSE" />
</h:selectOneMenu>

It runs fine on my system. But on client machine it shows
"org.apache.jasper.el.JspELException: /CHDIHomeSearch.jsp(65,2) '#{commonBeans.htmlSelectOneMenu}' Cannot convert #{commonBeans.htmlSelectOneMenu} of type class java.lang.String to class javax.faces.component.UIComponent"
exception

here is my bean class
public class CommonBeans{
private HtmlSelectOneMenu htmlSelectOneMenu = new HtmlSelectOneMenu();
public HtmlSelectOneMenu getHtmlSelectOneMenu() {
return htmlSelectOneMenu;
}

public void setHtmlSelectOneMenu(HtmlSelectOneMenu htmlSelectOneMenu) {
this.htmlSelectOneMenu = htmlSelectOneMenu;
}

}

dont know how to deal with this.

thanks
shubhranshu swain
Greenhorn

Joined: Dec 14, 2010
Posts: 3
Guys,

We have solved the issue. Actually, we have been constantly developing the application in java 1.6 but the client's machine have java 1.5.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSF Issue