How to set value in a selectOneRadio in jsf

0

I have a problem what happens is that I want to set some values that come from the DB and there is a column with certain names that I send them from a dao implement and those same ones by means of a method I want to do that set to to give edit I want to load the one they selected (to edit) I have this code but I do not run anything:

if (notificacion.getTipoTerminoInOut() != null) {
        if (notificacion.getTipoTerminoInOut().equals("IN")) {
            positionInGeo = 1;
             System.out.println("Posicion: " + positionInGeo);
        } else if (notificacion.getTipoTerminoInOut().equals("OUT")) {
            positionInGeo = 2;
        }



    }

Those values I want to set in an object in the selectOneRadio in my xhtml that would be this:

<p:selectOneRadio id="selectPosicionGeo" value="#{notificationsBean.positionInGeo}" layout="grid" columns="1" >
                                                        <f:selectItem itemLabel="Dentro de geocerca" itemValue="1" />
                                                        <f:selectItem itemLabel="Fuera de geocerca" itemValue="2" />
                                                        <p:ajax event="change" listener="#{notificationsBean.positionUnit()}" />
                                                    </p:selectOneRadio>

What I need more than anything else is that the radio that you selected was painted, I hope and you can help me please, I remain alert, greetings.

    
asked by cratus666jose 17.10.2018 в 01:31
source

0 answers