| 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
|
posted

0
|
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
|
posted

0
|
|
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
|
 |
 |
|
|
subject: Error 500: "{2}" Conversion Error setting value ''{0}'' for ''{1}''.
|
|
|