我正在从数据库端获取一个字符串,并进行适当的行更改。当我在java端和浏览器控制台上进行调试时,我的字符串如下所示。但是当我在UI上打印它时,它显示为像Email Request To: FedEx Legal; FedExEmailTeam Subject: Approval request to send email as transactional Attachment: <customer email creative>
这样的单行字符串。为什么以及如何解决这个问题。
我的字符串-
Email Request
To: FedEx Legal; FedExEmailTeam
Subject: Approval request to send email as transactional
Attachment:customer email creative
我的UI代码-
<f:facet name="body">
<ice:panelGroup style="margin-top: 2%;">
<div style="border-top: 1px solid #a7a7a7;">
<div
style="border-left: 1px solid #a7a7a7; border-right: 1px solid #a7a7a7;">
<div style="padding: 8px 0px 4px 8px; background-color: #FFF;">
<ice:panelGrid columns="1" border="0">
<ice:outputText
value="#{campaignTrackingCodesBean.emailTransPanel}"></ice:outputText>
</ice:panelGrid>
</div>
</div>
</div>
<div style="border-top: 1px solid #a7a7a7;"></div>
</ice:panelGroup>
</f:facet>
尝试在您希望保存文本格式的地方使用<pre>
标签
<pre>
<ice:outputText value="#{campaignTrackingCodesBean.emailTransPanel}"> </ice:outputText>
</pre>