File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF Issue
 
Similar Threads
Dropdown i created, has a list of items. I feel there is some mistake with the Bean.
JSF
JSF - Missing source code using templating and composition
Seam/RichFaces - extendedDataTable, datascroller, and changeable page size
unable to populate select one menu