dev@woodstock.java.net

Re: Question on using new dojo'fied woodstock components

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Fri, 16 Nov 2007 15:04:55 -0500

What your looking at is a mixture of older HTML based components
(rendered server-side) and new Dojo based widgets. In the example app,
the main index page uses an older HTML based table. The components
inside the table cells are actually new Dojo based widgets (i.e., text
hyperlinks, etc.). When the page initially renders, you will see the
raw HTML displayed first (i.e., the output from the older HTML table
renderer). During the window onLoad event, the Dojo based widgets are
rendered and fill in the HTML table cells.

With Dojo .4, we were able to render JavaScript in-line as the page was
being evaluated by the browser. However, you stared at a white page for
a longer period of time (i.e., until the page completely loaded). In
Dojo .9, this approach actually generated security errors on IE because
the page body was being manipulated before it loaded completely.
Therefore, we process client-side widgets during the window onLoad event.

Although you may briefly see a partially rendered page, it takes
approximately the same amount of time for the page to load completely.
(Maybe even a little faster with the partial loading approach.) The
explanation I receieved from Dojo was that all HTML elements must be
available in the page before they can be manipulated; thus, the window
onLoad event is required.

That said, if next generation table were currently available, you would
not see this at all. That is because the Ajax based, next generation
table is completely rendered client-side and does not output HTML tags
directly in the page. Unfortunately, this particular tag will not be
available until the next release.

Dan

Brett M. Bergquist wrote:
> I was seeing some strange visual presentation after I installed the
> latest version of the widgets. So i downloaded the woodstock source
> from CVS and built it and the example program. Running the example
> programs I see some of the same strange visual presentation.
>
> Basically what I am seeing is that when a page is rendered, the page
> show a small version of what is going to be displayed, and then it
> appears that the widgets are rendered, bringing the page to its final
> state. Take for example, any of the table examples. When the page
> renders, the table is a squished up and with very thin areas
> representing the rows and then the table is finally rendered at the
> correct size with the rows in tack.
> This is a pretty disconcerting visual presentation seeing the widgets
> render in such a fashion. This is really noticeable when you have
> something like a tabbed pane with tables on each tab being displayed.
> Changing from tab to tab is pretty ugly I must say.
>
> Is this the way that it is supposed to be? Can something be done to
> eliminate this ugliness?
>
> I want to move the the new widgets and I'm am actually feeling that I
> must to get the new ajax functionality that I need in a few places but
> when I show the boss what this looks like, he is probably going to
> have a bird.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>