You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by gs_tapestry <si...@gallerysystems.com> on 2012/01/05 16:28:04 UTC

JavaScript waitForPage() handler be added when rendering a partial Ajax response

Hi,

I am upgrading to Tapestry5.2.6 and ran into an error which didn't occur
with T5.0.

My page template is like :

<div id="asl"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
   # advancedSearch 
     
    <t:zone t:id="asBlock">
    	
	   <div class="hide">
	    	<div id="as">
	   			<div t:type="search/advancedSearchComponent"
id="advancedSearchComponent" t:id="advancedSearchComponent" />
	   		</div>
	   </div>
    </t:zone>
</div>

The line 
     

In T5.2.6, is rendered as
    

in T5.0, is rendered as
   

In T5.0 it works fine. In T5.2.6 it doesn't.  I found in T5.1.0.2 release
notes that TAP5-586 which seemed to have addressed this issue.  Could anyone
please point out what i did wrong?

Thanks,
Simon

BTW, In javascript console, I found
   And in javascript console, there are two errors
       Uncaught TypeError: Object [object Object] has no method
'attachEvent'       prototype.js:5644
            observeprototype.js:5644
            _methodized                                                                                   
prototype.js:438
            Tapestry.onDOMLoaded                                                                    
tapestry.js:171
             (anonymous function)                                                                      
start:298




--
View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5122946.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by gs_tapestry <si...@gallerysystems.com>.
Any help or idea ???  Thanks

--
View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5132745.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by gs_tapestry <si...@gallerysystems.com>.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5134861.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by gs_tapestry <si...@gallerysystems.com>.
Sorry for missing information. Let me try again. The issue line was in
advancedsearchlink which is a component on start.tml which is using
layout.tml. I listed thembelow (with some part replaced by ). 

Thanks,
Simon


== advancedsearchlink.tml==


== start.tml ===


== layout.tml ===



--
View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5136953.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by Josh Canfield <jo...@gmail.com>.
Still missing the component that actually contains the link that isn't
rendering...

You've given us a line that doesn't work, and the contents of
components that don't actually contain that line.

On Tue, Jan 10, 2012 at 12:36 PM, gs_tapestry <si...@gallerysystems.com> wrote:
> Yes. I am using nabble directly.
>
> advancedsearchcomponent is another component.  its template is at the
> bottom. You can see the xmlns:t is defined.  What i don't understand is why
> this works in T5.0 but not the T5.2. I have two application side by side
> with only difference is the Tapestry version.
>
> Thanks,
> Simon
>
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5135154.html
> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by gs_tapestry <si...@gallerysystems.com>.
Yes. I am using nabble directly. 

advancedsearchcomponent is another component.  its template is at the
bottom. You can see the xmlns:t is defined.  What i don't understand is why
this works in T5.0 but not the T5.2. I have two application side by side
with only difference is the Tapestry version.  

Thanks,
Simon




--
View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5135154.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by Josh Canfield <jo...@gmail.com>.
> Oh really?! I just tried 3 different browser and able to see them.
Ah. This is a mailing list. I get messages in my email client. I
assume you're using nabble directly. When nabble sends email to the
mailing list it strips html. You can look at the quoted response to
see that your HTML was stripped again.

I took a look at your question on nabble and it doesn't make any
sense. What is the search component? The line you are referring to
must be coming from there? Your jquery refers to an id that doesn't
exist in your sample code...

It looks like you are saying that the component isn't being rendered at all?

>From your message:

The line

<a id="advancedSearch" class="homeAdv" href="#" t:type="actionlink"
t:id="advancedSearch" t:zone="asBlock">advancedSearch</a>

In T5.2.6, is rendered as

<a id="advancedSearch" class="homeAdv" href="#" t:type="actionlink"
t:id="advancedSearch" t:zone="asBlock">advancedSearch</a>

in T5.0, is rendered as

<a class="homeAdv" href="#" id="advancedSearch">Advanced Search</a>


Are you missing the xmlns:t declaration in your advanced search component?

Josh

On Tue, Jan 10, 2012 at 10:34 AM, gs_tapestry <si...@gallerysystems.com> wrote:
> Oh really?! I just tried 3 different browser and able to see them.
>
> Here they are (I put them in quotes)
>
>
> The line
>
> " # advancedSearch "
>
> In T5.2.6, is rendered as
>
> " # advancedSearch "
>
> in T5.0, is rendered as
>
> " # Advanced Search "
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5134854.html
> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by gs_tapestry <si...@gallerysystems.com>.
Oh really?! I just tried 3 different browser and able to see them.  

Here they are (I put them in quotes)


The line 
     
" # advancedSearch "

In T5.2.6, is rendered as 
   
" # advancedSearch "

in T5.0, is rendered as 
   
" # Advanced Search "


--
View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5134854.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by Josh Canfield <jo...@gmail.com>.
The email that you sent to the list has no HTML output in it.

You wrote:
"

The line


In T5.2.6, is rendered as


in T5.0, is rendered as


In T5.0 it works fine. In T5.2.6 it doesn't.  I found in T5.1.0.2 release

"

I imagine there was supposed to be something between those lines. It's
hard to help debug something without all the information :)

Josh


On Tue, Jan 10, 2012 at 7:54 AM, gs_tapestry <si...@gallerysystems.com> wrote:
> Hi,
>
> Thank you for the response.
>
> Sadly i am not quite clear what you meant my html being stripped.  The
> problematic link is just one component on a page where all other components
> work fine.  Also I am not sure what you meant that "the message sent from
> nabble".   Will appreciate if you may provide some details.
>
> This waitForPage() handler only being injected if this actionLink is ajax
> call (ie associated with a zone). If i remove the zone part, there is no
> injection of that handler.
>
> Thanks again in advance,
> Simon
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5134416.html
> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by gs_tapestry <si...@gallerysystems.com>.
Hi,

Thank you for the response. 

Sadly i am not quite clear what you meant my html being stripped.  The
problematic link is just one component on a page where all other components
work fine.  Also I am not sure what you meant that "the message sent from
nabble".   Will appreciate if you may provide some details.

This waitForPage() handler only being injected if this actionLink is ajax
call (ie associated with a zone). If i remove the zone part, there is no
injection of that handler. 

Thanks again in advance,
Simon

--
View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5134416.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

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


Re: JavaScript waitForPage() handler be added when rendering a partial Ajax response

Posted by Josh Canfield <jo...@gmail.com>.
Your html appears to have been stripped. This often happens if you
send the message from nabble.

On Thu, Jan 5, 2012 at 7:28 AM, gs_tapestry <si...@gallerysystems.com> wrote:
> Hi,
>
> I am upgrading to Tapestry5.2.6 and ran into an error which didn't occur
> with T5.0.
>
> My page template is like :
>
> <div id="asl"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
>   # advancedSearch
>
>    <t:zone t:id="asBlock">
>
>           <div class="hide">
>                <div id="as">
>                                <div t:type="search/advancedSearchComponent"
> id="advancedSearchComponent" t:id="advancedSearchComponent" />
>                        </div>
>           </div>
>    </t:zone>
> </div>
>
> The line
>
>
> In T5.2.6, is rendered as
>
>
> in T5.0, is rendered as
>
>
> In T5.0 it works fine. In T5.2.6 it doesn't.  I found in T5.1.0.2 release
> notes that TAP5-586 which seemed to have addressed this issue.  Could anyone
> please point out what i did wrong?
>
> Thanks,
> Simon
>
> BTW, In javascript console, I found
>   And in javascript console, there are two errors
>       Uncaught TypeError: Object [object Object] has no method
> 'attachEvent'       prototype.js:5644
>            observeprototype.js:5644
>            _methodized
> prototype.js:438
>            Tapestry.onDOMLoaded
> tapestry.js:171
>             (anonymous function)
> start:298
>
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/JavaScript-waitForPage-handler-be-added-when-rendering-a-partial-Ajax-response-tp5122946p5122946.html
> Sent from the Tapestry - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>

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