Hi Andrew,

Thank you for your help. I will give it a try. 

Thanks,

Pdt


Andrew Robinson-5 wrote:
> 
> Sorry, just remembered after saying that, I think I did have to setup
> some kind of registration with javascript (check the aa.js API) that
> told AA that the variable was a global variable and AA will
> automatically set a window variable from the var.
> 
> FYI, the code that sets the variable gets the ID from:
> 
> String popupId =
> JavascriptUtils.getValidJavascriptName(clientId+"Popup",false);
> 
> On 8/16/07, Andrew Robinson <[EMAIL PROTECTED]> wrote:
>> It should work fine without any additional code. BTW - I stopped using
>> AA a long time ago, and now switched to Trinidad from A4J
>>
>> On 8/16/07, pdt_p <[EMAIL PROTECTED]> wrote:
>> >
>> > Hi Andrew,
>> >
>> > Just wondering, have you able to integrate ajaxanywhere with tomahawk
>> popup?
>> >
>> > Thanks,
>> >
>> > Pdt
>> >
>> >
>> > Andrew Robinson-5 wrote:
>> > >
>> > > Wondering if anyone has a work around for this...
>> > >
>> > > The tomahawk popup (1.1.2) is not AJAX friendly, at least not
>> AjaxAnywhere
>> > > friendly.
>> > >
>> > > The popup creates the following javascript in the renderer:
>> > >         String popupId = JavascriptUtils.getValidJavascriptName
>> > > (clientId+"Popup",false);
>> > >
>> > >         ResponseWriter writer = context.getResponseWriter();
>> > >         writer.startElement(HTML.SCRIPT_ELEM, uiComponent);
>> > >         writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR,
>> > > HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT,null);
>> > >         writer.writeText("var "+popupId+"=new
>> > > orgApacheMyfacesPopup('"+clientId+"',"+
>> > >                
>> (displayAtDistanceX==null?-5:displayAtDistanceX.intValue
>> > > ())+","+
>> > >                
>> (displayAtDistanceY==null?-5:displayAtDistanceY.intValue
>> > > ())+");",null);
>> > >         writer.endElement(HTML.SCRIPT_ELEM);
>> > >
>> > > As you can see, it uses the "var" syntax. To get JavaScript to load,
>> > > AjaxAnywhere will execute an eval on the JavaScript contents. As a
>> result,
>> > > this variable will immediately lose scope and not be available to
>> code on
>> > > the page.
>> > >
>> > > If it was "window[" + popupId + "]" = new ..." it would bind the
>> > > javascript
>> > > variable to the window (the recommended method of having a global
>> > > variable).
>> > >
>> > >
>> > > Has anyone come across this, and if so, found a workaround?
>> > >
>> > > -Andrew
>> > >
>> > >
>> >
>> > --
>> > View this message in context:
>> http://www.nabble.com/Tomahawk-popup---AjaxAnywhere-tf1637487.html#a12192138
>> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >
>> >
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomahawk-popup---AjaxAnywhere-tf1637487.html#a12193477
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to