Basically, your theory stands. I'm not sure about step 4. But you save on
the fact that the code plucking occurs on the server side, it simply sends
back an XML document that contains elements with the same names as the
replaced DIVs, not the entire page.
----- Original Message -----
From: "Patrick Casey" <[EMAIL PROTECTED]>
To: "'Tapestry users'" <[email protected]>
Sent: Monday, August 15, 2005 12:21 PM
Subject: More Partial Form Stuff
Is anyone here pretty familiar with the way the Tacos library
implemented Partial Forms? If so, could you reality check me on how I
*think* the implementation was managed? I've done a fair amount of AJAX
stuff, but that was all with my own servlets and my own javascript, so I'm
familiar with the core concepts, but I'm a bit fuzzy on how exactly the
tacos components implemented them.
So, is this the proper model:
1) A Partial Form is posted. The javascript takes the contents of
the
form, builds and encoded POST string, and calls it.
2) Tapestry catches the POST and redirects it to the appropriate
listener.
3) Tapestry listener implements POST.
4) Tapestry rebuilds *entire page* on server.
5) Tapestry returns entire page.
6) Javascript recognizes POST has completed.
7) Javascript parses result string.
8) Javascript plucks out any divs that are on the list of divs to be
updated.
9) Javascript replaces current document's version of that div with
the
div that came out of the response.
As you can tell from the bolding, I'm concerned about step 4. Unless I'm
mistaken (which wouldn't be the first time), this particular AJAX
implementation isn't going to save me anything on page render time because
even if I'm only updating a small div in the middle of the form, Tapestry
still has to render the entire form and return it. So the only thing I'm
really saving on is the "screen flicker" associated with a complete
redraw.
In terms of server side resources and network resources, I'm still A)
building the whole form and B) sending the whole form.
Am I wrong here? Is there some alternative approach to make tacos just
render (and respond with) the divs its interested in?
--- Pat
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]