在html页面上保留字符串样式

时间:2016-07-17 10:21:46

标签: html css jsf

我从数据库端获取一个字符串,正确的行更改,当我在java端和浏览器控制台上看到调试时,所有.My字符串看起来如下所示。但是当我在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

我的用户界面代码 -

<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>

1 个答案:

答案 0 :(得分:3)

尝试在您希望保留文字格式的地方使用public function yourFunction() { $query = $this->db->query("CALL `your_stored_procedure()`"); return $query->result_array(); } 标记

{{1}}