Forums de discussion

AUI 2.0 modal dialog does not work in Weblogic?

Vanita Chawla, modifié il y a 9 années.

AUI 2.0 modal dialog does not work in Weblogic?

New Member Publications: 23 Date d'inscription: 25/03/10 Publications récentes
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!
Jordi Joan Gomez Augustin, modifié il y a 9 années.

RE: AUI 2.0 modal dialog does not work in Weblogic?

New Member Publications: 21 Date d'inscription: 18/05/11 Publications récentes
Hi

I had a similar issue with AUI() dialog, it worked with a Tomcat bundle but not in Weblogic

Try to use:
AUI().use('aui-dialog', 'aui-io-plugin-deprecated', function(A) {});

Cheers,

Jordi-Joan