如何在 Oracle Apex 的仅显示项目中换行?
How to make a linebreak in Display Only item in Oracle Apex?
我正在 Oracle Apex 中开发应用程序。我有一个 Display Only item 通过使用 Dynamic Action 构建并通过以下 PL/SQL Function Body
设置值
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;
问题是换行符在呈现的页面中被忽略了。你能告诉我如何显示带有换行字符的项目吗?
让通知table变成这样
ID NOTIFICATION_MSG
1 Last date for the application is 18th Dec.
2 Office closed from 25th dec to 1st Jan.
我希望页面中呈现的 Display Only Item
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.
从 chr(10) || chr(10)
开始:您的意思是 chr(13) || chr(10)
吗?
无论如何:包括 <br>
作为换行符,例如
v_message := item.notification_msg || '<br>'
不要忘记将该显示项的转义特殊字符设置为“否”。
我正在 Oracle Apex 中开发应用程序。我有一个 Display Only item 通过使用 Dynamic Action 构建并通过以下 PL/SQL Function Body
设置值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;
问题是换行符在呈现的页面中被忽略了。你能告诉我如何显示带有换行字符的项目吗?
让通知table变成这样
ID NOTIFICATION_MSG
1 Last date for the application is 18th Dec.
2 Office closed from 25th dec to 1st Jan.
我希望页面中呈现的 Display Only Item
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.
从 chr(10) || chr(10)
开始:您的意思是 chr(13) || chr(10)
吗?
无论如何:包括 <br>
作为换行符,例如
v_message := item.notification_msg || '<br>'
不要忘记将该显示项的转义特殊字符设置为“否”。