aspose file tools
The moose likes JSF and the fly likes Error 500: Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Error 500: "{2}" Conversion Error setting value Watch "Error 500: "{2}" Conversion Error setting value New topic
Author

Error 500: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.

allen gilbert
Greenhorn

Joined: May 31, 2006
Posts: 13
I have the following code in my jsp

<h:selectOneMenu id="menu1"
value ="#pc_MerchantSearchResults.recordsPerPage}">
<f:selectItem value="pc_MerchantSearchResults.recordsPerPageItems" />
</h:selectOneMenu>

My bean definition is as follows

public class MerchantSearchResults extends PageCodeBase {

protected SelectItem[] recordsPerPageItems = {
new SelectItem(new Integer(5), "5"),
new SelectItem(new Integer(10), "10"),
};

protected Integer recordsPerPage;

public SelectItem[] getRecordsPerPageItems() {
return recordsPerPageItems;
}

public void setRecordsPerPageItems(SelectItem[] recordsPerPageItems) {
this.recordsPerPageItems = recordsPerPageItems;
}

public Integer getRecordsPerPage() {
return recordsPerPage;
}

public void setRecordsPerPage(Integer recordsPerPage) {
this.recordsPerPage = recordsPerPage;
}

When the browser tries to laod the page, I get the following Error

Error 500: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.

I read that this is/was a bug in JSF implemntation. Am not sure if it was resolved.

Any help appreciated.

Thanks
}
g madhava
Ranch Hand

Joined: Sep 14, 2001
Posts: 85
In <h:selectOneMenu id="menu1"
value ="#pc_MerchantSearchResults.recordsPerPage}">

you are missing the starting braces.

"#pc_MerchantSearchResults.recordsPerPage}" should be "#{pc_MerchantSearchResults.recordsPerPage}
allen gilbert
Greenhorn

Joined: May 31, 2006
Posts: 13
madhav ..that was just a typo there.. I have the bracket properly used...still the problem
g madhava
Ranch Hand

Joined: Sep 14, 2001
Posts: 85
Shouldn't the <f:selectItem> be <f:selectItems> or that was also a typo ?
Sajan Patel
Ranch Hand

Joined: Oct 25, 2004
Posts: 77
I am not sure this BUG is fixed or not. But I do get this error when my f:selectitems is null.

I hope this help you.

Enjoy,

Sajan Patel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error 500: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.
 
Similar Threads
Problem with selectOneMenu in MyFaces 1.1.1
Problem in JSF
Facing Problem in JSF form SelectItem[]
Generics, POJOs & JSF cuestion
how to use "h:selectOneMenu"