Hello guys!

I am trying to use DropDownChoice. The first problem is no null value in
DropDownChoice... (I must add null value to choices array????) How i can do
this in right way?

And second problem is i can't understand why if i add System.out.println in
getIdValue method it calls twice for each ID?

This is my code:

final ArrayList<Object> typeList = typeDAO.getData(); DropDownChoice<Object>
ddcType = new DropDownChoice<Object>("typeid", typeList, new
IChoiceRenderer<Object>() {

private static final long serialVersionUID = 1L; public Object
getDisplayValue(Object object) { Map<?,?> map = (Map<?,?>) object; return
map.get("Name"); } public String getIdValue(Object object, int index) { if
(object instanceof HashMap<?,?>) {
//System.out.println("Test="+map.get("ID").toString()); Map<?,?> map =
(Map<?,?>) object; return map.get("ID").toString(); } return
object.toString(); } }); form.add(ddcType.setType(Integer.class));

Thank you.

Best regards, Ivan *Dudko*

Reply via email to