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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to