简体   繁体   中英

How can I add a Radio Button Cell to a CellTable in GWT?

I'm trying to implement a possibility to vote either yes or no or nothing and I implemented the entry to vote for in a CellTable. I now want to add Columns "yes" and "no" and per row I want to add two Radio Buttons. Per default there is no way to add a Radio Button Cell?

I tried it like this by creating my own Button Cell but it doesn't seem to work. class ButtonZelle extends AbstractCell {

    RadioButton button;

    public ButtonZelle(RadioButton button){
        this.button=button;

    }

    @Override
    public void render(RadioButton value) {
        // Prüfen ob der Wert null ist
        if (value == null) {
            return;
        }

    }

}

}
Does anyone know how to implement this correctly?

Kind regards Alina

I'm trying to implement a possibility to vote either yes or no or nothing and I implemented the entry to vote for in a CellTable. I now want to add Columns "yes" and "no" and per row I want to add two Radio Buttons. Per default there is no way to add a Radio Button Cell?

I tried it like this by creating my own Button Cell but it doesn't seem to work. class ButtonZelle extends AbstractCell {

    RadioButton button;

    public ButtonZelle(RadioButton button){
        this.button=button;

    }

    @Override
    public void render(RadioButton value) {
        // Prüfen ob der Wert null ist
        if (value == null) {
            return;
        }

    }

}

}
Does anyone know how to implement this correctly?

Kind regards Alina

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM