Op 27-2-2011 14:13, Thiago H. de Paula Figueiredo schreef:
On Sat, 26 Feb 2011 18:47:06 -0300, Tom van Dijk <t...@tvandijk.nl> wrote:
What exactly makes you bang your head?
Just the fact that I can't get my head around this thing.
I'm still curious to know more about it.
Well, what I want is very simple, there's a very simple database with
just a few tables and just a few columns in each table. I want to make
an AJAX admin panel for that database, so all editors on the same page.
I don't use the Grid component because I like to have a bit more control
over the result (I started with the Grid components for a prototype,
but I'm a bit past that stage and it's easier for my client if it's all
on one page.) The database structure is a simple hierarchy. Objects of
type A contain objects of type B, which contain objects of type C. So
when the admin wants to edit A, I need to update the zones with editors
for B and C, and if I edit the name of a "A" I want it to be updated in
the list of "A" items. I very quickly ran into problems with the
combination of nested zones, loops, forms and actions, partially because
the client IDs of the zones and forms tended to change and after I
edited something, the page was broken. Right now my client is using a
hack, where he needs to press the "refresh" buttons I put at different
places that sometimes generate fatal errors. Whenever she gets an error,
she can just click Refresh and it works again. It's terrible, so I
thought to fall back to what I know about javascript (I've created a
very similar AJAX database manager before and it's not too much work if
it's small and you know what you're doing) and combine it with what
Tapestry offers with the templates/page classes etc. Well, my "Render
block" thread is a result of that, where I thought it would be a great
idea to have tapestry render the blocks and that I could then put them
into the right divs (this time without them changing IDs when I know
that they are unique and unnecessary to change) right away. Apparently,
that's not the way it should be done. So now I'm trying to use zones and
forms and I'm considering to use a MultiZoneUpdate with one zone to be
an update to a "dummy" zone that will contain javascript calls, as I
didn't yet discover how to do a post-success hook in javascript...
aargh. Deadline: long ago. But my client doesn't seem to care, they
didn't even look at my prototype for 2 months after I gave it to them so
the complete lack of pressure doesn't help me much either. (The joys of
web development)
And writer's block. Every time I type a few lines of code, I want to
do something else, like drink beer.
I don't drink beer myself, but I know it's hard to compete with it for
time. :P
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org