Good evening. I have a String attribute that receives a question coming directly from a textArea. My problem is that I can not leave the questions at the time of displaying the same as registering them.
Ex:
Register a question like this:
Questão?
A)
B)
C)
D)
I retrieve the questions and play in a List, a List<Questoes> questoes
and at the time of displaying the question in a dataTable they are displayed like this:
Questão? A) B) C) D)
that is, everything on the same line. Can someone help me? Follow the related codes.
@Column(name = "PERGUNTA")
private String pergunta;
XHTML:
<p:outputLabel value="Descricao do Item:" for="descItem"
style="font-weight:bold" />
<p:inputTextarea id="descItem" required="true"
requiredMessage="Por favor, elabore a pergunta."
value="#{cadastroQuestaoBean.questao.pergunta}" cols="120" rows="2"
autoResize="true" label="descItem" />
DataTable where the questions are displayed:
<p:dataTable id="exibePerguntas" var="questao" paginator="true"
rowsPerPageTemplate="3,5,10,12" paginatorPosition="bottom"
value="#{gerarSimuladoBean.questoes}">
<p:column headerText="Perguntas">
<br></br>
<p:outputLabel value="#{questao.pergunta}" />
</p:column>
</p:dataTable />