2

I am fetching a string from database side ,with proper line change and all .My string looks like given below when I see on debug both on java end as well as browser console . But when I print it on UI ,it is shown as a single line string like Email Request To: FedEx Legal; FedExEmailTeam Subject: Approval request to send email as transactional Attachment: <customer email creative> .Why and how can I resolve this .

My string -

  Email Request 
    To: FedEx Legal; FedExEmailTeam 
    Subject: Approval request to send email as transactional  
    Attachment:customer email creative

My UI code-

<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>
themaster
  • 453
  • 11
  • 32

1 Answers1

3

try using <pre> tag inside the place you wish to conserve the text format

    <pre>
    <ice:outputText value="#{campaignTrackingCodesBean.emailTransPanel}"> </ice:outputText>
    </pre>
Yehia Awad
  • 2,898
  • 1
  • 20
  • 31