希望你做得好, 我尝试了icon_URLImage来优化我的代码下面的多列表中的加载
while (c.next())
{
hlist = new Hashtable();
r = c.getRow();
hlist.put("Line1", r.getString(6));
hlist.put("Line2", r.getString(8));
sb.delete(0, sb.length());
sb.append("alb").append(r.getInteger(4));
urlcover = r.getString(10);
hlist.put("icon", defaultimg);
hlist.put("iconName", sb.toString());
hlist.put("icon_URLImage", urlcover);
vlist.add(hlist);
}
mlist.setModel(new Model(vlist));
mlist.setRenderer(createListRenderer());
In createListRenderer my code is :
private static MultiButton createRendererMultiButton() {
MultiButton b = new MultiButton();
b.setName("icon");
b.setNameLine1("Line1");
b.setNameLine2("Line2");
b.setUIID("Label");
return b;
}
private static ListCellRenderer createListRenderer() {
MultiButton sel = createRendererMultiButton();
MultiButton unsel = createRendererMultiButton();
return new GenericListCellRenderer(sel, unsel);
}
已加载PlaceHolder,但在线图片仍无法显示,请帮帮我。 我的英语不好,请原谅。
答案 0 :(得分:0)
您应该删除该行:
hlist.put("icon", defaultimg);
您正在放置图像,而URLImage代码认为下载已经完成。
仅供参考这不是MultiList
MultiButton