On Mon, 16 Apr 2012 22:14:35 -0300, netdawg <net.d...@yahoo.com> wrote:

In other words, if you could modify the EditPerson class to service a form input that is both Add and Update, what "smart" coding would you do in
onActivate and why?

If there's a context value passed, it is the id of an object to be edited. If not, we're going to create a new object.

And, for the benefit of the community, can we declare that as a
standard/best practice for this common design pattern of Edit/Create form?

I don't think we need to define a best practice in this case. I just think the code and template for editing and creating a new object so similar that using different pages for them ends up using copied code or a shared subclass, and that can be avoided.

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

Reply via email to