You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by caarney <cr...@centrum.cz> on 2008/04/02 11:13:34 UTC

updateComponent doesn't work if component contains HTML BR tag (4.1.2)

Hello,
I'm using AJAX functionality in my Tapestry 4.1.2 application in the
following way:

Code that updates the component:

  cycle.getResponseBuilder().updateComponent("standardArea");

Component to update:

  <div jwcid="standardArea@Any">
   ... 
  </div>

Everything works fine until I add HTML line break tag into the component:

  <div jwcid="standardArea@Any">
   ...
   <br>
   ...
  </div>

In this case, the component is not updated any more. 
Can somebody reproduce this behaviour? Is it a bug?



-- 
View this message in context: http://www.nabble.com/updateComponent-doesn%27t-work-if-component-contains-HTML-BR-tag-%284.1.2%29-tp16445844p16445844.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: updateComponent doesn't work if component contains HTML BR tag (4.1.2)

Posted by Andy Pahne <ap...@net22.de>.
I had the same problem. It's not only unclosed <br> tags, but also <hr> 
and others. It works with an unclossed <img> tag. Don't know why, but 
it's not specified anywhere.


Igor Drobiazko schrieb:
> please close the tag: <br/>
> 
> On Wed, Apr 2, 2008 at 11:13 AM, caarney <cr...@centrum.cz> wrote:
> 

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


Re: updateComponent doesn't work if component contains HTML BR tag (4.1.2)

Posted by caarney <cr...@centrum.cz>.
Thank you. Finally I found the reason for some strange errors I encountered
(components not updating after AJAX :) ... Btw, I need to close the IMG
tags, otherwise it doesn't work.



Igor Drobiazko wrote:
> 
> The ajax response is XHTML. Since your template is rendered to create the
> response, it fails if the template is not XHTML.
> 

-- 
View this message in context: http://www.nabble.com/updateComponent-doesn%27t-work-if-component-contains-HTML-BR-tag-%284.1.2%29-tp16445844p16490312.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: updateComponent doesn't work if component contains HTML BR tag (4.1.2)

Posted by Igor Drobiazko <ig...@gmail.com>.
The ajax response is XHTML. Since your template is rendered to create the
response, it fails if the template is not XHTML.

On Wed, Apr 2, 2008 at 2:03 PM, caarney <cr...@centrum.cz> wrote:

>
> That works, thanks.
> Does it mean that the component must be in XHTML? Is it specified
> somewhere?
>
>
> Igor Drobiazko wrote:
> >
> > please close the tag: <br/>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/updateComponent-doesn%27t-work-if-component-contains-HTML-BR-tag-%284.1.2%29-tp16445844p16446889.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko

Re: updateComponent doesn't work if component contains HTML BR tag (4.1.2)

Posted by caarney <cr...@centrum.cz>.
That works, thanks. 
Does it mean that the component must be in XHTML? Is it specified somewhere?


Igor Drobiazko wrote:
> 
> please close the tag: <br/>
> 
> 

-- 
View this message in context: http://www.nabble.com/updateComponent-doesn%27t-work-if-component-contains-HTML-BR-tag-%284.1.2%29-tp16445844p16446889.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: updateComponent doesn't work if component contains HTML BR tag (4.1.2)

Posted by Igor Drobiazko <ig...@gmail.com>.
please close the tag: <br/>

On Wed, Apr 2, 2008 at 11:13 AM, caarney <cr...@centrum.cz> wrote:

>
> Hello,
> I'm using AJAX functionality in my Tapestry 4.1.2 application in the
> following way:
>
> Code that updates the component:
>
>  cycle.getResponseBuilder().updateComponent("standardArea");
>
> Component to update:
>
>  <div jwcid="standardArea@Any">
>   ...
>  </div>
>
> Everything works fine until I add HTML line break tag into the component:
>
>  <div jwcid="standardArea@Any">
>   ...
>   <br>
>   ...
>  </div>
>
> In this case, the component is not updated any more.
> Can somebody reproduce this behaviour? Is it a bug?
>
>
>
> --
> View this message in context:
> http://www.nabble.com/updateComponent-doesn%27t-work-if-component-contains-HTML-BR-tag-%284.1.2%29-tp16445844p16445844.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko