On Thu, 26 Apr 2012 01:10:22 -0300, netdawg <net.d...@yahoo.com> wrote:
Thanks, all, for college of knowledge ;-). Much appreciated.
1. I am not beaneditorform (or beaneditor) in EditPerson.tml, therefore
the @Persist annotation is needed in Person.java for the form to accept
the
submit.
No, this is not correct. You don't need @Persist for using BeanEditForm or
Form.
2. The @Persist for person in EditPerson does indeed seem to clash with
the declaration in Persons page,
No, this is not correct. @Persist is for a single page only. Even if you
have @Persist private Person person; in many pages, each field has its own
different state, being stored in different session attributes.
but simply changing it that variable to, say, personRow in Persons does
not work since the object person is stored in
session state
You shouldn't @Persist personRow.
and even the though the link above the grid renders without
the Id anymore, clicking edit will still pull up the last added/editted
record since it is in the session.
Not if you use @PageActivationContext or onActivate() correctly.
Bottom line, I really see no other workarounds to simply doing the
following:
<t:pagelink page="person/edit" context="0">Create
new</t:pagelink>
We already provided you the solution. Even more than one. You either post
your whole code (including templates) or please stop saying that Tapestry
doesn't work.
This create a error in logs, trying to pull up the record with zero id,
but the application chugs along fine. Using null or $N0 for context
breaks the list page. Only zero works.
Again, you could use null instead of zero and avoid this problem.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org