if i look at this:
new DropDownChoice<ColumnInfo>
(form, "columnId",
columnMangerService.selectAllColumnInfo(), new ColumnRender());
then it seems to me that columnId is a id (integer)
So it doesn't hold a ColumnInfo object but the id of that object.
Then your choice renderer is wrong.
If this is the case then please let us see the stacktrace.
johan
On 1/8/07, tooy li(Gmail) <[EMAIL PROTECTED]> wrote:
I got a cast error , when i use customer IChoiceRender
class ColumnRender implements IChoiceRenderer<ColumnInfo> {
public Object getDisplayValue(ColumnInfo object) {
return object.getFormattedName();
}
public String getIdValue(ColumnInfo object, int index) {
return object.getId();
}
}
new DropDownChoice<ColumnInfo>(form, "columnId",
columnMangerService.selectAllColumnInfo(), new ColumnRender());
I can make sure it's the right type in the data list. and the dropdownlist
is show well,
but it make a cast error when i save. in the getIdValue method, render
only get a string object with the hashcode of ColumnInfo object. I think
the error is related generics.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user