• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Issue

 
shubhranshu swain
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic