[prev in list] [next in list] [prev in thread] [next in thread]
List: tapestry-user
Subject: Re: Javascript append to zone
From: Taylor Mathewson <taylor.mathewson () gmail ! com>
Date: 2012-07-30 16:55:29
Message-ID: CAM+EEDB__xM3bpzETHioE7HQtPDuuMRu4mc_NytcgMaCstLung () mail ! gmail ! com
[Download RAW message or body]
That would work but might be a bit onerous. You may also want to clear the
hidden div at the end.
I googled around a bit and found this mixin that should do it. The way the
constraints are setup is quite nice:
http://blog.bolkey.com/2010/05/creating-a-news-feed-in-tapestry-5/
Cheers,
Taylor
On Mon, Jun 18, 2012 at 4:38 AM, Lance Java <lance.java@googlemail.com>wrote:
> Hi,
>
> I'm writing a push library on top of cometd and I'd like to be able to
> append some markup to a zone (ie a chat application)
>
> My tapestry javascript knowledge is not great and I'd like to know any
> things to watch out for if doing this (including possible memory leaks in
> the client).
>
> I see that Tapestry.ZoneManager has a show(content) function that firstly
> purges a zone's children before setting it's content. I was thinking that I
> could do the following to perform an append:
>
> 1. Move the current zone contents to a hidden div
> 2. Append the new element to the hidden div
> 3. Call ZoneManager.show(appendedContent)
> 4. The show method has nothing to purge (since I moved the content to the
> hidden div)
> 5. The zone now contains the appended content.
>
> Will this work? Will this cause any memory leaks in the client?
>
> Thanks,
> Lance.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Javascript-append-to-zone-tp5713959.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
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic