cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject Re: Widget Tree and dynamic page updating with Ajax
Date Wed, 09 Aug 2006 19:27:21 GMT

On Aug 9, 2006, at 11:55 AM, nackey wrote:

> I am working on a generator, so if I have a small e.g. java class 
> diagram
> then I could display all information in one shot, but if I have an 
> object
> with a lot of sub object and sub sub object, then my tree is very big
> with a lot of nodes and sub nodes and so I have too many
> informaton, which I can't display all together.

Yeah, that's what I mean...

If it's "too much data to generate/send all at once", then AJAX makes 
sense.  If it's just a presentation issue, i.e. not really all that 
much data to generate/send, it just takes up too much room in the page 
to "display all together", as you say, then you don't really need to go 
back to the server for each little thing, you can send it all together 
and use browser JS to control the display, something like

	function showHideSomething() {			// (set somebody's onclick handler to 
this)
		if (whateverElement.hidden) {
			whateverElement.style.display = 'block';
			whateverElement.hidden = false;
		} else {
			whateverElement.style.display = 'none';
			whateverElement.hidden = 'true';
		}
	}

I'm pretty sure Dojo includes this kind of stuff out of the box, too.
—ml—


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


Mime
View raw message