List Info

Thread: set default value by h:selectOneRadio




set default value by h:selectOneRadio
country flaguser name
United Kingdom
2007-08-31 06:05:33
Hi,

I tried to set a default value by the h:selectOneRadio tag
but it didn't 
work

my bean looks like this:

    private String radio="Accessions";

        if (radio.equals("0")) {
            System.out.println("Accession
choosed");
        } else {
            System.out.println("Sequence
choosed");
        }

    public String getRadio() {
        return radio;
    }

    public void setRadio(String radio) {
        this.radio = radio;
    }

and my xhtml like this:

<h:selectOneRadio id="radio"
value="#{home.radio}">
                    <f:selectItem
itemLabel="Accessions"
itemValue="0"/>
                    <f:selectItem
itemLabel="Sequences"
itemValue="1"/>
</h:selectOneRadio>

Cheers WOlfgang


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )