我正在使用Lifery 6.2并使用AUI 2.0。以下代码适用于tomcat bundle。但是,当在Weblogic上部署portlet时,它不会在弹出窗口中呈现jsp。有没有人遇到过这种情况?
<portlet:renderURL var="popupSample" windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<portlet:param name="mvcPath" value="/viewPopup.jsp"/>
</portlet:renderURL>
<script type="text/javascript">
function showPopup() {
AUI().use('aui-modal', function(A) {
var dialog = new A.Modal({title:'Hello', headerContent: '<h3>Popup Example</h3>', modal: true,
centered: true, width: 800, height: 600, zIndex: 1050, visible: true, focused: true
}).plug(A.Plugin.IO, {uri: '<%=popupSample%>'}).render();
dialog.show();
});
}
</script>
<a href="javascript: showPopup(); "><b>Click here to open popup sample</b></a>
</br>
使上述示例在Tomcat中运行,
我在liferay-portlet.xml中添加了以下内容:
<add-default-resource>true</add-default-resource>
我为我的portlet添加了白名单属性。
我在Weblogic上尝试了以上所有内容。弹出窗口打开但不显示正文内容。我没有在控制台中看到任何java脚本错误。但是,我确实在Firefox控制台中看到以下错误 - &gt;调试器。
Error loading source:
Could not load the source for javascript:%20showPopup();.
[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)
[nsIChannel.asyncOpen]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"
location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js ->
resource://gre/modules/devtools/server/main.js -> resource://gre/modules/devtools/server/actors
/script.js :: fetch :: line 5218" data: no]Line: 5218, column: 0
非常感谢任何见解或帮助!
谢谢!