Fórum

Modal dialog not working on switch to 6.2 SP9 from SP8

a b, modificado 8 Anos atrás.

Modal dialog not working on switch to 6.2 SP9 from SP8

New Member Postagens: 24 Data de Entrada: 20/08/13 Postagens Recentes
In my MVC-portlet i have a button that opens a modal dialog and fetches its contents from server. The buttons function is:

function() {
    NCVoting.createDialog = new NCVoting.Modal('<%= createVotingURL%>');
    A.one('#voting-wizard-header-title')._node.innerHTML = '<liferay-ui:message key="nv.label.wizard.new.details.title" />';
});


The modal dialog is created this way:

AUI()
	.use(
			'node',
			'aui-modal',
			'aui-io',
			function(A) {
				
				function VotingModalImpl(uri) {
					this.modal = new A.Modal({
						headerContent: '<span id="voting-wizard-header-title">&nbsp;</span>',				   	
						draggable : true,		            
						modal : true,
						resizeable : false,
						centered: true,
						height: 700,
						width: 750,
						zIndex : 400,
						destroyOnHide: true,
						cssClass: 'nabucco-voting',
					}).plug(A.Plugin.IO, { 
						uri: uri,
						method: 'GET',
						failureMessage : '',
						on : {
							success : function (event, id, response) {
							},
							failure : function () {
								alert('failure');
							}
						} 
					
					}).render();
					
					// prevent close modal on key down of esc key
					this.modal.get('boundingBox').on('key', function(e) {
						e.halt();
					}, 'down:27');

					
				};
				
				NCVoting.Modal = VotingModalImpl;
			});


This all works fine until sp8 (1, 5...) but on SP9 the url is not requested from server. If i enter the generated url in browser the resource is loaded fine (serveResource in portlet is executed). But if i click on the button i get an empty dialog (with correct title) but "serverResource" in portlet class is not hit.

So how to fix the modal so that it is requesting the given url like in previous service packs.

thanks in advance
thumbnail
Nate Cavanaugh, modificado 8 Anos atrás.

RE: Modal dialog not working on switch to 6.2 SP9 from SP8

Junior Member Postagens: 94 Data de Entrada: 27/11/06 Postagens Recentes
Hi there,
That's pretty strange... Do you get any JS errors?
Is the dialog opened?
Also, have you tried putting some breakpoints in the JS you pasted to see if and where it reaches into the code?

If so, do you know where it stops running?
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Modal dialog not working on switch to 6.2 SP9 from SP8

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Why stop at SP9? SP11 is out and they're probably working on 12 already...