I am using Lifery 6.2 and working with AUI 2.0. The following code works on tomcat bundle. However, it does not render the jsp in the popup when the portlet is deployed on Weblogic. Has anyone come across this scenario?
<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>
To make the above sample work in Tomcat,
I added the following to the liferay-portlet.xml:
<add-default-resource>true</add-default-resource>
I added the whitelist property for my portlet.
I tried all of the above on Weblogic. The popup opens but displays no body content. I do not see any java script errors in the console. However, I do see the following errors in the Firefox Console -> debugger.
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
Any insight or help would be much appreciated!
Thanks!
User contributions licensed under CC BY-SA 3.0