You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Julian Wood <wo...@ucalgary.ca> on 2007/02/02 01:25:02 UTC

Re: ajax and popuplink error -- Bug?

Okay I've posted a sample program to demonstrate the problem.

http://jwoodchip.blogspot.com/2007/02/ajax-and-tapestry.html

I'm still hoping I'm missing something silly, but maybe this is a bug?

Thanks,

J


On 31-Jan-07, at 8:46 PM, Julian Wood wrote:

> Actually this is not yet solved. It turns out it works in some  
> cases, but not in others. I've found it very difficult to track  
> down when it works, and when it doesn't work. I think I was fooled  
> (previously) into thinking it works when there is an error in the  
> javascript in the ajax response, which then forces the whole page  
> to reload, and then everything needed for the popup is there.
>
> Everything quoted below still stands, when it doesn't work.
>
> If anyone could shed some light on how the <response  
> id="bodyscript"...> part of the ajax-response is integrated (or is  
> supposed to be integrated) into the page, it would be much  
> appreciated, since that is what fails to happen. The <response  
> id="media" ...> part shows up fine. Any ideas why the second part  
> would be ignored? Where are the hooks (before I go digging)? What  
> needs to be on the page in order for it to work? Has anyone had  
> something like this work? - the only part that is a little  
> different in this scenario is that the ajax response contains a  
> component which has attached javascript.
>
> Thanks for any hints - this is driving me batty!
>
> J
>
> PS I've been working on the tiniest example that shows this, and  
> will post it if necessary.
>
>
> On 30-Jan-07, at 3:01 PM, Julian Wood wrote:
>
>> Turns out this was actually a problem with a Border component and  
>> a custom shell delegate - the Body component was not making it  
>> through properly - all working now!
>>
>> J
>>
>> On 29-Jan-07, at 3:22 PM, Julian Wood wrote:
>>
>>> I have a div that is updated in response to an EventListener.  
>>> This is all fine.
>>>
>>> I just added a DirectLink which uses a PopupLinkRenderer in that  
>>> div. All is still good.
>>>
>>> When you click that link, I get a "popup_window not defined"  
>>> error in javascript.
>>>
>>> I can see that the correct script is passed in the AJAX response:
>>>
>>> <ajax-response><response id="media" type="element">
>>> <div class="section">
>>>     <span id="For_59">
>>>             <div id="mediaobject">
>>>                 <span>
>>>                      ....
>>>                     <a id="popupFullMediaViewer"  
>>> href="javascript:popup_window();">+</a>
>>>                 </span>
>>>             </div>
>>>     </span>
>>> </div>
>>> </response>
>>> <response id="bodyscript" type="script"><script>
>>> //<![CDATA[
>>> function popup_window()
>>> {
>>>   var newWindow = window.open('/medvr/app? 
>>> component=media.popupFullMediaViewer&page=ViewModule&service=direct& 
>>> session=T&sp=12', 'MedVR Media Viewer',  
>>> 'top=100,left=100,width=480,height=480,scrollbars=yes,resizable=no') 
>>> ;
>>>   newWindow.focus();
>>> }
>>> //]]>
>>> </script></response></ajax-response>
>>>
>>> but is it not made available to my page?
>>>
>>> Am I missing something?
>>>
>>> Tried with 4.1.2-SNAPSHOT and 4.1.1.
>>>
>>> Thanks.
>>>
>>> J
>>>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

--
Julian Wood <wo...@ucalgary.ca>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca



Re: ajax and popuplink error -- Bug?

Posted by andyhot <an...@di.uoa.gr>.
I already commented at your blog... it's fixed in 4.1.2-SNAPSHOT

Julian Wood wrote:
> Bug is reported, if anyone is interested.
>
> https://issues.apache.org/jira/browse/TAPESTRY-1247
>
> J
>
> On 1-Feb-07, at 5:25 PM, Julian Wood wrote:
>
>> Okay I've posted a sample program to demonstrate the problem.
>>
>> http://jwoodchip.blogspot.com/2007/02/ajax-and-tapestry.html
>>
>> I'm still hoping I'm missing something silly, but maybe this is a bug?
>>
>> Thanks,
>>
>> J
>>
>>
>> On 31-Jan-07, at 8:46 PM, Julian Wood wrote:
>>
>>> Actually this is not yet solved. It turns out it works in some 
>>> cases, but not in others. I've found it very difficult to track down 
>>> when it works, and when it doesn't work. I think I was fooled 
>>> (previously) into thinking it works when there is an error in the 
>>> javascript in the ajax response, which then forces the whole page to 
>>> reload, and then everything needed for the popup is there.
>>>
>>> Everything quoted below still stands, when it doesn't work.
>>>
>>> If anyone could shed some light on how the <response 
>>> id="bodyscript"...> part of the ajax-response is integrated (or is 
>>> supposed to be integrated) into the page, it would be much 
>>> appreciated, since that is what fails to happen. The <response 
>>> id="media" ...> part shows up fine. Any ideas why the second part 
>>> would be ignored? Where are the hooks (before I go digging)? What 
>>> needs to be on the page in order for it to work? Has anyone had 
>>> something like this work? - the only part that is a little different 
>>> in this scenario is that the ajax response contains a component 
>>> which has attached javascript.
>>>
>>> Thanks for any hints - this is driving me batty!
>>>
>>> J
>>>
>>> PS I've been working on the tiniest example that shows this, and 
>>> will post it if necessary.
>>>
>>>
>>> On 30-Jan-07, at 3:01 PM, Julian Wood wrote:
>>>
>>>> Turns out this was actually a problem with a Border component and a 
>>>> custom shell delegate - the Body component was not making it 
>>>> through properly - all working now!
>>>>
>>>> J
>>>>
>>>> On 29-Jan-07, at 3:22 PM, Julian Wood wrote:
>>>>
>>>>> I have a div that is updated in response to an EventListener. This 
>>>>> is all fine.
>>>>>
>>>>> I just added a DirectLink which uses a PopupLinkRenderer in that 
>>>>> div. All is still good.
>>>>>
>>>>> When you click that link, I get a "popup_window not defined" error 
>>>>> in javascript.
>>>>>
>>>>> I can see that the correct script is passed in the AJAX response:
>>>>>
>>>>> <ajax-response><response id="media" type="element">
>>>>> <div class="section">
>>>>>     <span id="For_59">
>>>>>             <div id="mediaobject">
>>>>>                 <span>
>>>>>                      ....
>>>>>                     <a id="popupFullMediaViewer" 
>>>>> href="javascript:popup_window();">+</a>
>>>>>                 </span>
>>>>>             </div>
>>>>>     </span>
>>>>> </div>
>>>>> </response>
>>>>> <response id="bodyscript" type="script"><script>
>>>>> //<![CDATA[
>>>>> function popup_window()
>>>>> {
>>>>>   var newWindow = 
>>>>> window.open('/medvr/app?component=media.popupFullMediaViewer&page=ViewModule&service=direct&session=T&sp=12', 
>>>>> 'MedVR Media Viewer', 
>>>>> 'top=100,left=100,width=480,height=480,scrollbars=yes,resizable=no');
>>>>>   newWindow.focus();
>>>>> }
>>>>> //]]>
>>>>> </script></response></ajax-response>
>>>>>
>>>>> but is it not made available to my page?
>>>>>
>>>>> Am I missing something?
>>>>>
>>>>> Tried with 4.1.2-SNAPSHOT and 4.1.1.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> J
>>>>>
>>>>>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ajax and popuplink error -- Bug?

Posted by Julian Wood <wo...@ucalgary.ca>.
Bug is reported, if anyone is interested.

https://issues.apache.org/jira/browse/TAPESTRY-1247

J

On 1-Feb-07, at 5:25 PM, Julian Wood wrote:

> Okay I've posted a sample program to demonstrate the problem.
>
> http://jwoodchip.blogspot.com/2007/02/ajax-and-tapestry.html
>
> I'm still hoping I'm missing something silly, but maybe this is a bug?
>
> Thanks,
>
> J
>
>
> On 31-Jan-07, at 8:46 PM, Julian Wood wrote:
>
>> Actually this is not yet solved. It turns out it works in some  
>> cases, but not in others. I've found it very difficult to track  
>> down when it works, and when it doesn't work. I think I was fooled  
>> (previously) into thinking it works when there is an error in the  
>> javascript in the ajax response, which then forces the whole page  
>> to reload, and then everything needed for the popup is there.
>>
>> Everything quoted below still stands, when it doesn't work.
>>
>> If anyone could shed some light on how the <response  
>> id="bodyscript"...> part of the ajax-response is integrated (or is  
>> supposed to be integrated) into the page, it would be much  
>> appreciated, since that is what fails to happen. The <response  
>> id="media" ...> part shows up fine. Any ideas why the second part  
>> would be ignored? Where are the hooks (before I go digging)? What  
>> needs to be on the page in order for it to work? Has anyone had  
>> something like this work? - the only part that is a little  
>> different in this scenario is that the ajax response contains a  
>> component which has attached javascript.
>>
>> Thanks for any hints - this is driving me batty!
>>
>> J
>>
>> PS I've been working on the tiniest example that shows this, and  
>> will post it if necessary.
>>
>>
>> On 30-Jan-07, at 3:01 PM, Julian Wood wrote:
>>
>>> Turns out this was actually a problem with a Border component and  
>>> a custom shell delegate - the Body component was not making it  
>>> through properly - all working now!
>>>
>>> J
>>>
>>> On 29-Jan-07, at 3:22 PM, Julian Wood wrote:
>>>
>>>> I have a div that is updated in response to an EventListener.  
>>>> This is all fine.
>>>>
>>>> I just added a DirectLink which uses a PopupLinkRenderer in that  
>>>> div. All is still good.
>>>>
>>>> When you click that link, I get a "popup_window not defined"  
>>>> error in javascript.
>>>>
>>>> I can see that the correct script is passed in the AJAX response:
>>>>
>>>> <ajax-response><response id="media" type="element">
>>>> <div class="section">
>>>>     <span id="For_59">
>>>>             <div id="mediaobject">
>>>>                 <span>
>>>>                      ....
>>>>                     <a id="popupFullMediaViewer"  
>>>> href="javascript:popup_window();">+</a>
>>>>                 </span>
>>>>             </div>
>>>>     </span>
>>>> </div>
>>>> </response>
>>>> <response id="bodyscript" type="script"><script>
>>>> //<![CDATA[
>>>> function popup_window()
>>>> {
>>>>   var newWindow = window.open('/medvr/app? 
>>>> component=media.popupFullMediaViewer&page=ViewModule&service=direct 
>>>> &session=T&sp=12', 'MedVR Media Viewer',  
>>>> 'top=100,left=100,width=480,height=480,scrollbars=yes,resizable=no' 
>>>> );
>>>>   newWindow.focus();
>>>> }
>>>> //]]>
>>>> </script></response></ajax-response>
>>>>
>>>> but is it not made available to my page?
>>>>
>>>> Am I missing something?
>>>>
>>>> Tried with 4.1.2-SNAPSHOT and 4.1.1.
>>>>
>>>> Thanks.
>>>>
>>>> J
>>>>
>>>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org