Show Complete string in modal

Asked

Viewed 113 times

0

I’m using Java, JPA, Wildfly and Primefaces.I have a table that displays a text, but this text is being cut in the display by table size. I decided to create a boão that calls a modal to display the full text.Each row of the table has its button to display its detail. The problem is that in any button I press it shows me the last string, the last text. Follow the XHTML code of the column:

	<p:column headerText="Detalhes">
							<p:commandButton value="Visualizar detalhes" type="button"
								onclick="PF('dlg1').show();" update="idDescricao" />
							<p:dialog header="Modal Detalhes" widgetVar="dlg1" minHeight="40"
								width="700" id="idDescricao">
								 <p:outputPanel id="multiCarDetail" style="text-align:center;">
								   <ui:repeat value="#{cadastroMB.listaCadastro}"  var="cad">
								<h:outputText value="#{cad.descricao}" />
								</ui:repeat>
								</p:outputPanel>
							</p:dialog>
						</p:column>

The image below shows that I pressed the second button but this showing me the one of the first line inserir a descrição da imagem aqui

1 answer

1

The problem is that in your test there is no space between the words "Test", which makes it a very big word. The Primefaces breaks the line as is the case with the first line of the image. Try giving spaces between words this will make the test more realistic.

  • Exactly, before I used a textarea, I decided to change to the editing panel, it worked normally because in the hand it works only that I was copying and pasting a text, silly mistake but that did not pay attention at the time of developing, Thanks Marcelo

Browser other questions tagged

You are not signed in. Login or sign up in order to post.