Ray Auge Vor 16 Jahren You can't even imagine how timely this post was... I was about 2 minutes away from asking you how to best extend an existing function...This is very clever... Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Ray Auge Vor 16 Jahren ok! what if the methods has params... do I just cascade those down?Liferay.Navigation.around( '_removePage', function (params) { ... this.yield(params) ; ... }) ; Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Nate Cavanaugh Ray Auge Vor 16 Jahren Yes sir Just like that. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Nate Cavanaugh Vor 16 Jahren I have this:Liferay.Util.actsAsAspect(Liferay.Navigation);Liferay.Navigation.around( '_removePage', function (obj, instance) { alert('test'); });new Liferay.Navigation( { layoutIds: [<%= ListUtil.toString(layouts, "layoutId") %>], navBlock: '#navigation', hasPermission: <%= GroupPermissionUtil.contains(permissionChecker, portletGroupId.longValue(), ActionKeys.MANAGE_LAYOUTS) %> });this doesn't work... I'm doing something wrong aren't I?Does an instance of an object need to be treated differently? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Nate Cavanaugh Ray Auge Vor 16 Jahren Yeah, sorry, I should have mentioned that. For instantiable classes, you would modify that objects prototype, like so:Liferay.Util.actsAsAspect(Liferay.Navigation.prototype);Liferay.Navigation.prototype.around(...)That will also make sure that every instance of it will get your function with it. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Nate Cavanaugh Vor 16 Jahren Yup, that works.. you rock Nate.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Alexandra Mereuta Nate Cavanaugh Vor 13 Jahren Hi,I'm using Liferay 6.0.5 and I used the your method to hook into some navigation javascript. The problem I have is that for IE8 I get this message: 'Liferay.Navigation.prototype' is null or not an object. Do you know what the problem might be?Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Barry Rowe Alexandra Mereuta Vor 12 Jahren I was pleasantly surprised that this post was still dead on for LR 6.0 EE SP1. The Example Ray was working through above was exactly what we needed to do. Our end result looks like so:<aui:script position="inline" use="liferay-navigation"> Liferay.Util.actsAsAspect(Liferay.Navigation.prototype); Liferay.Navigation.prototype.around('_removePage', function(event){ alert('before'); //do your work here this.yield(event); alert('after'); //do more work here });</aui:script> Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ray Auge Ray Auge Vor 16 Jahren ok! what if the methods has params... do I just cascade those down?Liferay.Navigation.around( '_removePage', function (params) { ... this.yield(params) ; ... }) ; Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Nate Cavanaugh Ray Auge Vor 16 Jahren Yes sir Just like that. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Nate Cavanaugh Vor 16 Jahren I have this:Liferay.Util.actsAsAspect(Liferay.Navigation);Liferay.Navigation.around( '_removePage', function (obj, instance) { alert('test'); });new Liferay.Navigation( { layoutIds: [<%= ListUtil.toString(layouts, "layoutId") %>], navBlock: '#navigation', hasPermission: <%= GroupPermissionUtil.contains(permissionChecker, portletGroupId.longValue(), ActionKeys.MANAGE_LAYOUTS) %> });this doesn't work... I'm doing something wrong aren't I?Does an instance of an object need to be treated differently? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Nate Cavanaugh Ray Auge Vor 16 Jahren Yeah, sorry, I should have mentioned that. For instantiable classes, you would modify that objects prototype, like so:Liferay.Util.actsAsAspect(Liferay.Navigation.prototype);Liferay.Navigation.prototype.around(...)That will also make sure that every instance of it will get your function with it. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Nate Cavanaugh Vor 16 Jahren Yup, that works.. you rock Nate.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Alexandra Mereuta Nate Cavanaugh Vor 13 Jahren Hi,I'm using Liferay 6.0.5 and I used the your method to hook into some navigation javascript. The problem I have is that for IE8 I get this message: 'Liferay.Navigation.prototype' is null or not an object. Do you know what the problem might be?Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Barry Rowe Alexandra Mereuta Vor 12 Jahren I was pleasantly surprised that this post was still dead on for LR 6.0 EE SP1. The Example Ray was working through above was exactly what we needed to do. Our end result looks like so:<aui:script position="inline" use="liferay-navigation"> Liferay.Util.actsAsAspect(Liferay.Navigation.prototype); Liferay.Navigation.prototype.around('_removePage', function(event){ alert('before'); //do your work here this.yield(event); alert('after'); //do more work here });</aui:script> Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Nate Cavanaugh Ray Auge Vor 16 Jahren Yes sir Just like that. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Nate Cavanaugh Vor 16 Jahren I have this:Liferay.Util.actsAsAspect(Liferay.Navigation);Liferay.Navigation.around( '_removePage', function (obj, instance) { alert('test'); });new Liferay.Navigation( { layoutIds: [<%= ListUtil.toString(layouts, "layoutId") %>], navBlock: '#navigation', hasPermission: <%= GroupPermissionUtil.contains(permissionChecker, portletGroupId.longValue(), ActionKeys.MANAGE_LAYOUTS) %> });this doesn't work... I'm doing something wrong aren't I?Does an instance of an object need to be treated differently? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Nate Cavanaugh Ray Auge Vor 16 Jahren Yeah, sorry, I should have mentioned that. For instantiable classes, you would modify that objects prototype, like so:Liferay.Util.actsAsAspect(Liferay.Navigation.prototype);Liferay.Navigation.prototype.around(...)That will also make sure that every instance of it will get your function with it. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Nate Cavanaugh Vor 16 Jahren Yup, that works.. you rock Nate.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Alexandra Mereuta Nate Cavanaugh Vor 13 Jahren Hi,I'm using Liferay 6.0.5 and I used the your method to hook into some navigation javascript. The problem I have is that for IE8 I get this message: 'Liferay.Navigation.prototype' is null or not an object. Do you know what the problem might be?Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Barry Rowe Alexandra Mereuta Vor 12 Jahren I was pleasantly surprised that this post was still dead on for LR 6.0 EE SP1. The Example Ray was working through above was exactly what we needed to do. Our end result looks like so:<aui:script position="inline" use="liferay-navigation"> Liferay.Util.actsAsAspect(Liferay.Navigation.prototype); Liferay.Navigation.prototype.around('_removePage', function(event){ alert('before'); //do your work here this.yield(event); alert('after'); //do more work here });</aui:script> Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ray Auge Nate Cavanaugh Vor 16 Jahren I have this:Liferay.Util.actsAsAspect(Liferay.Navigation);Liferay.Navigation.around( '_removePage', function (obj, instance) { alert('test'); });new Liferay.Navigation( { layoutIds: [<%= ListUtil.toString(layouts, "layoutId") %>], navBlock: '#navigation', hasPermission: <%= GroupPermissionUtil.contains(permissionChecker, portletGroupId.longValue(), ActionKeys.MANAGE_LAYOUTS) %> });this doesn't work... I'm doing something wrong aren't I?Does an instance of an object need to be treated differently? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Nate Cavanaugh Ray Auge Vor 16 Jahren Yeah, sorry, I should have mentioned that. For instantiable classes, you would modify that objects prototype, like so:Liferay.Util.actsAsAspect(Liferay.Navigation.prototype);Liferay.Navigation.prototype.around(...)That will also make sure that every instance of it will get your function with it. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Nate Cavanaugh Vor 16 Jahren Yup, that works.. you rock Nate.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Alexandra Mereuta Nate Cavanaugh Vor 13 Jahren Hi,I'm using Liferay 6.0.5 and I used the your method to hook into some navigation javascript. The problem I have is that for IE8 I get this message: 'Liferay.Navigation.prototype' is null or not an object. Do you know what the problem might be?Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Barry Rowe Alexandra Mereuta Vor 12 Jahren I was pleasantly surprised that this post was still dead on for LR 6.0 EE SP1. The Example Ray was working through above was exactly what we needed to do. Our end result looks like so:<aui:script position="inline" use="liferay-navigation"> Liferay.Util.actsAsAspect(Liferay.Navigation.prototype); Liferay.Navigation.prototype.around('_removePage', function(event){ alert('before'); //do your work here this.yield(event); alert('after'); //do more work here });</aui:script> Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Nate Cavanaugh Ray Auge Vor 16 Jahren Yeah, sorry, I should have mentioned that. For instantiable classes, you would modify that objects prototype, like so:Liferay.Util.actsAsAspect(Liferay.Navigation.prototype);Liferay.Navigation.prototype.around(...)That will also make sure that every instance of it will get your function with it. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Auge Nate Cavanaugh Vor 16 Jahren Yup, that works.. you rock Nate.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Alexandra Mereuta Nate Cavanaugh Vor 13 Jahren Hi,I'm using Liferay 6.0.5 and I used the your method to hook into some navigation javascript. The problem I have is that for IE8 I get this message: 'Liferay.Navigation.prototype' is null or not an object. Do you know what the problem might be?Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Barry Rowe Alexandra Mereuta Vor 12 Jahren I was pleasantly surprised that this post was still dead on for LR 6.0 EE SP1. The Example Ray was working through above was exactly what we needed to do. Our end result looks like so:<aui:script position="inline" use="liferay-navigation"> Liferay.Util.actsAsAspect(Liferay.Navigation.prototype); Liferay.Navigation.prototype.around('_removePage', function(event){ alert('before'); //do your work here this.yield(event); alert('after'); //do more work here });</aui:script> Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ray Auge Nate Cavanaugh Vor 16 Jahren Yup, that works.. you rock Nate.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Alexandra Mereuta Nate Cavanaugh Vor 13 Jahren Hi,I'm using Liferay 6.0.5 and I used the your method to hook into some navigation javascript. The problem I have is that for IE8 I get this message: 'Liferay.Navigation.prototype' is null or not an object. Do you know what the problem might be?Thanks Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Barry Rowe Alexandra Mereuta Vor 12 Jahren I was pleasantly surprised that this post was still dead on for LR 6.0 EE SP1. The Example Ray was working through above was exactly what we needed to do. Our end result looks like so:<aui:script position="inline" use="liferay-navigation"> Liferay.Util.actsAsAspect(Liferay.Navigation.prototype); Liferay.Navigation.prototype.around('_removePage', function(event){ alert('before'); //do your work here this.yield(event); alert('after'); //do more work here });</aui:script> Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Barry Rowe Alexandra Mereuta Vor 12 Jahren I was pleasantly surprised that this post was still dead on for LR 6.0 EE SP1. The Example Ray was working through above was exactly what we needed to do. Our end result looks like so:<aui:script position="inline" use="liferay-navigation"> Liferay.Util.actsAsAspect(Liferay.Navigation.prototype); Liferay.Navigation.prototype.around('_removePage', function(event){ alert('before'); //do your work here this.yield(event); alert('after'); //do more work here });</aui:script> Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Hamidreza Soleimani Vor 16 Jahren The test. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jorge Ferrer Vor 16 Jahren Very very cool!Keep this type of post coming Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ed Shin Vor 16 Jahren Great post! Thanks Nate! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen