Hi, folks. I'm just learning Tapestry too but I want to participate in
the list. :-)

   Juan, I don't know much about Tapestry (yet!) but if I'm not mistaken
that declaration of your service isn't adequate. You should use a method to
handle the "activate" event and there initialize your property:

@Property
private Service service;

public void onActivate() {
    this.service = new Service();
}

   Good luck! And I'm looking for learning a lot about Tapestry.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus....@gmail.com

"Violence is the last refuge of the incompetent."
       Salvor Hardin (The Foundation, Isaac Asimov)


2010/3/25 Juan Isern <juanis...@gmail.com>

>
> 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
>
>

Reply via email to