How can I disable SennaJS/SPA in Liferay 7?

微笑、不失礼 提交于 2019-12-04 23:41:33

问题


Liferay 7 uses SennaJS as its Single Page Application engine in order to load and replace certain parts of the portal page during form submission and navigation. Occasionally this feature interferes with my use case, so how can I disable it?


回答1:


If you want to disable the XHR GET navigation performed by SennaJS or its handling of form submissions, you can try one of the following:

  • If you want to disable SPA for only certain forms or links, you can add the data-senna-off="true" attribute to those <form> or <a> tags.

  • If you want to disable SPA for only one portlet, you can add <single-page-application>false</single-page-application> to the <portlet> section of your liferay-portlet.xml (see the DTD for the expected order of liferay-portlet.xml elements).

  • If you want to disable SPA on a portal wide basis, you can add javascript.single.page.application.enabled=false to your portal-ext.properties file.



来源:https://stackoverflow.com/questions/41288039/how-can-i-disable-sennajs-spa-in-liferay-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!