0

我正在开发 Oracle Apex 中的应用程序。我有一个使用动态操作构建的仅显示项目,并通过以下 PL/SQL 函数体设置值

DECLARE
v_message varchar2(1000);
v_notification varchar2(10000);

BEGIN
FOR item IN
(SELECT * FROM NOTIFICATIONS)
LOOP
    v_message := item.notification_msg || chr(10) || chr(10);
    v_notification := v_notification || v_messsage;
END LOOP;
return v_notification;

END;

问题是在呈现的页面中,换行符被忽略了。你能告诉我如何显示带有换行符的项目。

让 Notifications 表像这样

ID     NOTIFICATION_MSG
1      Last date for the application is 18th Dec.
2      Office closed from 25th dec to 1st Jan.

我希望页面中呈现的仅显示项目是

Last date for the application is 18th Dec.

Office closed from 25th dec to 1st Jan.

但它呈现为

Last date for the application is 18th Dec.Office closed from 25th dec to 1st Jan.
4

1 回答 1

2

截至chr(10) || chr(10):你的意思是chr(13) || chr(10)相反吗?


无论如何:包括<br>作为换行符,例如

v_message := item.notification_msg || '<br>'

不要忘记将该显示项目的转义特殊字符设置为“否”。

于 2020-12-07T07:21:18.257 回答