0
good night. I have a String type attribute that receives a question coming directly from a textarea. My problem is that I can’t let the questions go when it comes to displaying them equally as a record.
Ex:
Registration an issue like this:
Questão?
A)
B)
C)
D)
I recover the questions and play on a List, a List<Questoes> questoes
and when displaying the question on a datatable they are displayed like this:
Questão? A) B) C) D)
I mean, all on the same line. Can anyone 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 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 />
Was not brother.
– Felipe Portela