[Wicket-user] IChoiceRenderer error , somthing about generic

2007-01-08 Thread tooy li(Gmail)
I got a cast error , when i use customer IChoiceRender class ColumnRender implements IChoiceRendererColumnInfo { public Object getDisplayValue(ColumnInfo object) { return object.getFormattedName(); } public String getIdValue(ColumnInfo object, int index) { return object.getId(); }

Re: [Wicket-user] IChoiceRenderer error , somthing about generic

2007-01-08 Thread Johan Compagner
if i look at this: new DropDownChoiceColumnInfo (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.

Re: [Wicket-user] IChoiceRenderer error , somthing about

2007-01-08 Thread tooy li(Gmail)
Hi,johan y, your right, the column id is string object, render is always get a string object in this case. I first use expression for default Render, and get the same error. show you the complete stacktrace WicketMessage: Exception in rendering component: [MarkupContainer [Component id =

Re: [Wicket-user] IChoiceRenderer error , somthing about

2007-01-08 Thread Igor Vaynberg
your model object must be of the same type as the object in the choices list ie DropDownChoiceT(WebMarkupContainer, String, IModelT, IModelListT, IChoiceRendererT) so if your model is String then the list of choices you pass in must be ListString -igor On 1/8/07, tooy li(Gmail) [EMAIL