0
Guys, I’m having a doubt maybe a little bit stupid but I’m not able to solve, I’m starting web development using java and jsf, primefaces and I have a problem at the time of changing a record. I have a listing page that contains the detail button from there I open a
<p:dialog header="Detalhamento de Turmas" widgetVar="turmaDialog" modal="true" showEffect="explode" hideEffect="explode" resizable="false">
And inside I list my data:
<p:outputPanel id="turmaDetail" style="text-align:center;">
<p:panelGrid columns="2" columnClasses="label,value">
<h:outputText value="Código da Turma" />
<h:outputText value="#{controllerTurma.turmaAlterar.id}" />
<h:outputText value="Nome / Descrição" />
<h:outputText value="#{controllerTurma.turmaAlterar.descricao}" />
<h:outputText value="Tipo Ensino" />
<h:outputText value="#{controllerTurma.turmaAlterar.tipoEnsino}" />
<h:outputText value="Turno das Aulas" />
<h:outputText value="#{controllerTurma.turmaAlterar.turno}"/>
<center>
<p:commandButton ajax="false" value="Alterar"/>
</center>
</p:panelGrid>
</p:outputPanel>
my problem is, when trying to do the same, but passing the values to a
<h:inputText value="#{controllerTurma.turmaAlterar.descricao}" />
the input is empty, as if the value of the variable was null, but the same value is being listed there above. What should I do to load my data into an inputText
I commented, I ended up deleting, but I will comment again.
get
s until arriving in description, no? I know it is silly the question even more that worked in aoutputText
, but only to ease my conscience.– Gustavo Cinque
Gustavo, sorry I don’t quite understand what you want to know :/
– user55934
But honestly I don’t know why it doesn’t work, this is what should actually happen...
– Gustavo Cinque
You have the methods
get
, with which theExpression Language
can make reflection and take the description value? That is, withincontrollerTurma
, you havegetTurmaAlterar()
and withinturmaAlterar
you havegetDescricao
?– Gustavo Cinque
Hm weird, I hadn’t formatted the question correctly, sorry.
– Gustavo Cinque
Yes I have, the problem there is that to set the value that is in outputtext in an inputtext I’m not getting, the why I’m not understanding
– user55934
This shouldn’t be a problem, really. Once I get home from work I’ll try to recreate the problem. Until then, please leave the codes of the other components, please bean and class.
– Gustavo Cinque
So, I believe that the problems do not come from the bean or the entity class, because I can access them normally, my problem is only to set their value in an Input, including I have a datatable listing these data, however, when passing to a simple text field it is null.
– user55934
Doing some tests here I ended up seeing a possible error, actually the results are being listed, after putting in the input the attribute disabled=true the value is set
– user55934