Java 什么';我的zkoss代码中有什么错误? 公共类页扩展了GenericForwardComposer{ 组合框搜索框; 私有网格建议网格; 私有字符串q; 按钮b; 第p页; 标签la;列表单元格h,m; 受保护的Listbox lbx;//自动连线 私有ListModelList,listq;//列表框的模型 public void doAfterCompose(组件组件组件)引发异常{ super.doAfterCompose(comp); 对于(inti=0;i

Java 什么';我的zkoss代码中有什么错误? 公共类页扩展了GenericForwardComposer{ 组合框搜索框; 私有网格建议网格; 私有字符串q; 按钮b; 第p页; 标签la;列表单元格h,m; 受保护的Listbox lbx;//自动连线 私有ListModelList,listq;//列表框的模型 public void doAfterCompose(组件组件组件)引发异常{ super.doAfterCompose(comp); 对于(inti=0;i,java,zk,Java,Zk,,您可以在Listcell中创建自己的按钮 <listbox id="lbx" rows="4"> <listhead><listheader label="Name"></listheader><listheader label="Album"></listheader></listhead> </listbox> public class page extends GenericFor

,您可以在Listcell中创建自己的按钮

 <listbox id="lbx" rows="4">
   <listhead><listheader label="Name"></listheader><listheader label="Album"></listheader></listhead>
  </listbox>
public class page extends GenericForwardComposer{
    Combobox searchBox;
    private Grid SuggestGrid;

    private String q;
     Button b;
    Page p;
    Label la; Listcell h,m;
    protected Listbox lbx; // autowired

    private ListModelList list,listq; // the model of the listbox
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);


        for(int i=0;i<=10;i++)
        {
            Listitem li = new Listitem();
            new Listcell("example").setParent(li);
            new Listcell("google").setParent(li);

           Label subTotalLb = new Label("$example ");
           subTotalLb.setParent(li);
            li.setParent(lbx);
        }


    }
public void doAfterCompose(组件comp)引发异常{
super.doAfterCompose(comp);

对于(int i=0;i@The精英绅士:老兄,你编辑完后把“hai”留在里面了?@JoseK,我想这就是OP的问候方式,所以我尊重他的问候。
public void doAfterCompose(Component comp) throws Exception {
    super.doAfterCompose(comp);

    for(int i=0;i<=10;i++){
        Listitem li = new Listitem();
        Listcell lic = new ListCell();
        li.appendChild(lic);
        Button myBtn = new Button("Btn");
        myBtn.setParent(lic);

        //...

    }
}