Eric, If I'm understanding Brad's issue correctly he is trying to proxy a normal jQuery web app through the WebProxyPortlet. In this case, is there any way he could use the portlet namespace variable in his web app?
From: [email protected] [mailto:[email protected]] On Behalf Of Eric Dalquist Sent: Wednesday, February 06, 2013 7:33 AM To: [email protected] Subject: Re: [uportal-dev] query functions firing and not firing So I just realized that best practices page isn't completely right. I've updated https://wiki.jasig.org/display/PLT/JavaScript+Best+Practices Read through the "JavaScript Loading" and "jQuery Selectors" sections. -Eric On 02/06/2013 09:12 AM, Brad Morse wrote: I am using noconflict mode, but I am not sure about what you mean by the portlet namespace. Could you provide a short example? I am a novice with jQuery/js and I looked up stuff about namespacing but I am not 100% I did it correctly. I have copied the js file here: http://pastie.org/6079763 On Feb 6, 2013, at 9:47 AM, Eric Dalquist wrote: Just to double check: 1. You're using jQuery in extreme noconflict mode 2. You're using the portlet namespace in your selectors to find elements within the dom -Eric On 02/06/2013 07:37 AM, Brad Morse wrote: I think it might have to do something with my general config portlet settings, something with the portlet URL's with exclusive/normal. When I get this resolved, I'll report back the fix - in the meantime I welcome anything you recommend me to look into why this is happening. Thanks! On Feb 5, 2013, at 12:36 PM, Eric Dalquist wrote: Take a look over https://wiki.jasig.org/display/PLT/JavaScript+Best+Practices and see if that helps. If not let us know and we'll help get it figured out :) -Eric On 02/05/2013 10:02 AM, Brad Morse wrote: I created a calendar portlet, using the web proxy portlet. It uses jQuery to fire off two ajax posts at page load. One function is to display the calendar, the other is a function that displays a listing of today's events. I use jQuery v 1.9.0 and the script loads just above the closing of the body tag. When I view it outside of the portal, it works as expected, everything is normal in firebug. Then when I run it in the portal, firebug doesn't return any errors, besides all the other things it loads from the other portlets, and it shows those two (calendar and today's events) functions firing the ajax posts, as expected. But...sometimes it'll display the list of today's events twice, and no calendar. Or...it'll display the calendar twice and no list of today's events. This happens about half the time. The other half it works as expected, showing the calendar, and a list of today's events underneath it. There are other portlets that utilize other versions of jQuery, as I found out in firebug. I imagine that has something to do with it. What I want to know is, has anyone else experienced something similar to this and what are some things I should look into, to begin resolving my issue? -- You are currently subscribed to [email protected]<mailto:[email protected]> as: [email protected]<mailto:[email protected]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev -- You are currently subscribed to [email protected]<mailto:[email protected]> as: [email protected]<mailto:[email protected]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
