Robert Zeigler wrote:

I need the explicit getItem() because I create the value of the Item in
the Java. And once I've made an explicit getItem(), I must also supply
setItem() or Tapestry gets upset.



Then you'll want to read up on tapestry properties.
Tapestry page instances are pooled, so standard getter/setters are a bad
idea, unless the item is not specific to any one user.
Have you considered implementing PageRenderListener and making the
accessors abstract? Then you could set the value using the abstract
accessors inside of pageBeginRender.


I was just wondering about that this morning as I was walking into work. But the Tapestry "manifesto" is that we can pretend that we are in a single-threaded, one-user-per-object world, so it seems it should work. And if the property is persistent, then whatever changes one thread makes should get persisted to the session and the initial value restored before the next thread gets control.

But in fact, it appears that the single item is shared.

Anyway, this was just a "spike". In the real system, there's a database and objects are loaded using their ids, and there's none of this "create an object in main()" stuff going on.

=S

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



Reply via email to