2
I have a table with several columns, between them I have one that is a SelectOneMenu
, the table is loaded with a list of Inscricao
.
In the status column of the application I have a SelectOneMenu
with the status: {"Solicitada","Deferida","Indeferida"}
. By default each registration when performed contains the status 0, ie "Requested", so I want to change the status of the registration in a listing when the user chooses an option other than the status that is currently in the registration.
The problem is I can’t get the Signup id and new value at the same time, so I can’t change the status value of the signup.
"i
" is a variable that contains a list of entries:
<p:column headerText="StatusAdmin" filterBy="#{i.status}" filterMatchMode="contains" rendered="#{p:ifGranted('admin')}" >
<p:selectOneMenu id="statusSelectOneMenu" value="#{i.status}" style="width:125px"
onchange="submit()" valueChangeListener="#{inscricaoBean.editarInscricao(i)}" >
<f:selectItem itemLabel="Solicitada" itemValue="0" />
<f:selectItem itemLabel="Deferida" itemValue="1" />
<f:selectItem itemLabel="Indeferida" itemValue="2" />
</p:selectOneMenu>
</p:column>
In this way:
valueChangeListener="#{inscricaoBean.evt}"
I have access to the new value that was assigned, but in this case I do not know what the inscription related to this new value.
valueChangeListener="#{inscricaoBean.evt(i)}"
This way I have access to the inscription, but I do not know what the new value, as I do to have both at the same time?