Actually, what's happening here is that the result of invoking new Service() is being stored with the page instance and used to reset the service field to its default value at the end of each request.
This isn't quite the same as storing it in the session, as the Service instance will be carried with the page and used by multiple *different* clients. In this way, data can bleed from one client to another. On Thu, Mar 25, 2010 at 5:07 AM, Juan Isern <juanis...@gmail.com> wrote: > > Hi guys, I hope you're doing great. > > I'm pretty new to Tapestry and I'm having some trouble with forms. > > It turns out that when some field of a form (e.g. a textfield) references > some property that's accessed by a dot notation (I mean, it's not a simple > page property but a property that belongs to a model object which in turn is > owned by the page) it doesn't clear its value when, for instance, I hit > refresh. Just as if it were persisted in the session. > > Simple properties are working okay. > > This is the code: > > public class ServicePublication { > �...@property > private Service service = new Service(); > �...@property > private String vanillaProperty; > > "service" here seems to be in the session whereas vanillaProperty behaves > normally. > > I understand there may be some rationale behind this but I'd like to be able > to control it, in this case I want to work with a fresh Service instance > every time the form is submitted. Does anyone know about a workaround for > this issue? > > I'll appreciate your thoughts. > -- > View this message in context: > http://old.nabble.com/Properties-persisted-%28compulsorily-%29-in-the-session-tp28027934p28027934.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org