Hello,

In fact, the namespace part is usefull, Eric, I think.
We use it in prod in France. because Brat uses Jquery selector on id 
-JavasScrpt window.document.getElementById() - like that " 
jQuery('#display-subscriptions-update')".
And a user can put in the same tab, Brad's portlet two time, it's always 
good to namespace id.

@Brad, you should handle error on your ajax not only success.
you can set also timeout or may see the promise/defer pattern, and 
perhaps think i18n.

Best
-Christian

Le 06/02/13 16:59, Eric Dalquist a écrit :
> Ah sorry I missed that whole web proxy bit, the namespace part is 
> irrelevant then. You appear to be loading your AJAX URLs correctly for 
> them to work via the WPP but it is still a rather touchy proposition 
> to do AJAX via WPP. Maybe that is something we can provide better 
> support for in WPPv2 as we can use portlet resource URLs there to 
> better handle non-markup content.
>
> My only suggestion at this point is to watch the ajax network activity 
> in the browser's dev tools to see if you can see any hints as to what 
> is going on.
>
>
> -Eric
>
>
>
>
>
>
> On 02/06/2013 09:38 AM, Domazlicky, Eric wrote:
>>
>> 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 [email protected]  
>> <mailto:[email protected]>  as:[email protected]  
>> <mailto:[email protected]>
>>
>>         To unsubscribe, change settings or access archives, 
>> seehttp://www.ja-sig.org/wiki/display/JSG/uportal-dev
>>
>>     -- 
>>
>>       
>>
>>     You are currently subscribed [email protected]  
>> <mailto:[email protected]>  as:[email protected]  
>> <mailto:[email protected]>
>>
>>     To unsubscribe, change settings or access archives, 
>> seehttp://www.ja-sig.org/wiki/display/JSG/uportal-dev
>>
>> -- 
>>
>> You are currently subscribed [email protected]  
>> as:[email protected]
>> To unsubscribe, change settings or access archives, 
>> seehttp://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

Reply via email to