On Wednesday 07 April 2004 22:43, Tin Pham wrote:

+1

Tiles basically is a highly configurable extension to the
RequestDispatcher.include() capabilities provided by the
Servlet API. Therefore, the entire page has to be rebuilt
upon each request, which is done in a flash, but sometimes
not without a flash. The reason for this is not how Tiles or
the Servlet API work, but how the HTTP protocol works.
If you want to update only parts of your page, you have
to fall back to HTML's capabilities in this direction (frames,
iframes). In this case, you still generate an entirely new
page, but one that is embedded into the overall frame,
so by browser magic it seems only part of the page is
actually updated.  Both approaches have advantages
and disadvantages. Personally, I don't like (i)frames, as
they can cause several kinds of trouble and are not
search engine friendly in particular (important if you
have partly dynamic content on your start page and
want it to be indexed). If you're dealing with a 'true'
web application, presenting results in an iframe
(make sure the target browser supports iframes)
instead of embedding it in the page itself can make
things faster, avoid any 'flashes' and all, but you have
to weigh the disadvantage of having to generate
(and synchronize) two pages instead of one against
the advantage of a better 'user experience'. Generally,
we keep the 'main page' as static as possible, and
if we still have to provide dynamic content there,
we use <div> tags in favor of iframes, generating
the full contents, but showing only part of it; the
user may search and scroll as he likes. He may
have to take 'flashes' sometimes, but having an
indexable start page is more important than
user feelings. 'Inside' web applications, we
use iframes (if supported). In any case, we
explicitly forbid caching as soon as any kind
of dynamic content is in play. Otherwise, the
user may get stale pages from the browser
cache, and that would definitely counter the
general intent of providing 'fresh' results.
Choosing the right technology therefore
depends on the scenario, as always :-)

HTH,

-- Chris.

> Well it is technically possible if you start using frames or inline
> frames, but that is a whole other ballpark I do not recommend getting
> into.
>
> What you are asking is not possible because you have to reload the
> entire page. I do this in all my apps, but I do not get a flash.
>
> It may be your page is too heavy or your server is too slow. Even
> then, your browser caching should prevent that. Did you turn off page
> caching or something.
>
> If you send me an url I can take a look and possibly diagnose what is
> wrong.
>
>
> "Phan, Hung" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Hi all,
> >
> > I have a question regarding tiles.  One of my page uses a layout
> > like
> >
> >   <body leftmargin="0" rightmargin="0" bottommargin="0"
> > topmargin="0" marginwidth="0" marginheight="0" bgcolor="#E6E6E6"
> >           onUnload="closeAllSubwindows()"
> > onLoad="initWin(document.forms[0])">
> >             <table border="1" frame="void" height="100%"
> > width="100%" cellpadding="5" cellspacing="0"  >
> >                 <tr>
> >                   <td colspan="2"><tiles:insert name='top' /></td>
> >                 </tr>
> >                 <tr>
> >                   <td width="140" valign="top" align="left"
> > ><tiles:insert name='menu' /></td>
> >                   <td width="100%" valign="top" align="center"
> > bgcolor="#FFFFFF"><tiles:insert name='body' /></td>
> >                 </tr>
> >             </table>
> >     </body>
> >
> > It has a classic layout (top, menu, and body).  When you select an
> > item in the menu, it displays a new page.  The problem is that,
> > only the body changes each time (top and menu are the same).  The
> > result is kind of a flash when displaying the new page.  Is it
> > possible that I don't have to refresh top and menu, just the body
> > so that the whole page does not flash? Or can I somehow speed up
> > the display for top and meu instead of waiting
>
> for
>
> > the page to finish?
> >
> > Thanks for any suggestion,
> > --Hung
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to