Hi All,
I'm trying to add by the backing a checkbox to my page. I used the afd faces 
CoreSelectBooleanCheckbox class as here:

            field = new CoreSelectBooleanCheckbox();

            ((CoreSelectBooleanCheckbox)field).setSelected(true);

            ((CoreSelectBooleanCheckbox)field).setValue("1");
            ((CoreSelectBooleanCheckbox)field).setText(camp.getLabecamp());

But it doesn't work correctly, the checkbox is not rendered as I want:

<input id="form1:chk" name="form1:chk" type="checkbox" value="t">

And now I'm trying to use myfaces component HtmlCheckbox. It doesn't at least 
have the setSelected, setValue and setText methods!
 
            field = new HtmlCheckbox();

            ((HtmlCheckbox)field).setSelected(true);

            ((HtmlCheckbox)field).setValue("1");
            ((HtmlCheckbox)field).setText(camp.getLabecamp());

How can I produce this output without using Htmloutputtext?

<input id="form1:chk" name="form1:chk" type="checkbox" value="1" 
checked="true">

Thanks,
Luiz Carlos Geron

Luiz Carlos Geron

Reply via email to