• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
allen gilbert
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
madhav ..that was just a typo there.. I have the bracket properly used...still the problem
 
g madhava
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shouldn't the <f:selectItem> be <f:selectItems> or that was also a typo ?
 
Sajan Patel
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!