Detail component error org.zkoss.zk.ui.UiException: Widget class required for <Detail lZ4Vf4> with default

asked 2016-01-05 14:52:44 +0800

gbacigalupo gravatar image gbacigalupo

Hi all,

I am facing an issue with ZK 7.0.2 version.

I have a grid defined on my zul file and then, on the Java Composer I add dynamically a Detail component for each row. It compiles but on runtime I get the following error when going to render the grid:

org.zkoss.zk.ui.UiException: Widget class required for <Detail lZ4Vf4> with default

Here is the .zul:

<window id="controlPointCheckerController"
                          <grid id="gridControlPoints">
                                <columns sizable="true"
                                    style="text-align: center;" height="30px">
                                    <column width="28px" />
                                        label="${c:l('cpc.select')}" width="65px" />
                                        label="${c:l('cpc.editor')}" width="145px" />
                                        label="${c:l('cpc.dateEdition')}" width="155px" />
                                        label="${c:l('cpc.changeReason')}" />
                                        label="${c:l('cpc.type')}" width="115px" />
                                        label="${c:l('cpc.actions')}" width="150px" />

And on the .java file:

    public class ControlPointCheckerController extends GenericForwardComposer {

    public void render (Row row, Object data,int paramInt) throws Exception {


                Detail det = new Detail();
                Div detailContent = new Div();


Thanks for your help.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-17 14:25:55 +0800

Darksu gravatar image Darksu
1991 1 4

Hello gbacigalupo,

Please use as a reference the following code:


    <window border="none" apply="pkg$.MasterDetailComposer">
        <grid id="grid">
                <column width="10%"/>
                <column label="test" />


package pkg$;

import java.util.ArrayList;
import java.util.List;

import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Detail;
import org.zkoss.zul.Grid;
import org.zkoss.zul.Label;
import org.zkoss.zul.ListModelList;
import org.zkoss.zul.Row;
import org.zkoss.zul.RowRenderer;
import org.zkoss.zul.Window;

public class MasterDetailComposer extends GenericForwardComposer<Window> {

    private static final long serialVersionUID = 748611244810222881L;

    private Grid grid;

    public void doAfterCompose(Window comp) throws Exception {
        List<String> list = new ArrayList<String>();
        list.add("item 1");
        list.add("item 2");
        list.add("item 3");
        ListModelList<String> model = new ListModelList<String>(list);
        grid.setRowRenderer(new RowRenderer<String>() {
            public void render(Row row, String data, int index) throws Exception {
                Detail detail = new Detail();
                new Label("detail data of item 1").setParent(detail);
                new Label(data).setParent(row);

Best Regards,


link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2016-01-05 14:52:44 +0800

Seen: 27 times

Last updated: Jan 17 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More