Thanks, Thiago.  I am not sure I understand, though.  Let me clarify.  

Here is a another thread that brought up this subject with a rather
elaborate (unnecessary) workaround: 

http://tapestry.1045711.n5.nabble.com/Using-the-same-page-for-edit-new-Solution-td4876281.html


Howard Lewis Ship wrote
> 
> I recently changed Tapestry 5.3 so that the Hibernate ValueEncoder (used
> implicitly by @PageActivationContext) will encode a transient entity as
> null.  This makes it possible to use the same page for add and edit, with
> *a bit of smart logic in your onActivate() event handler 
> method</br>. 
> 

In the above EditPerson class from Tapesrty-Hibernate tutortial, I was able
to replace @Persist("entity") 
with @PageActivationContext and get it to work, apparently.  

Still somewhat mystified, though, about the "smart logic" needed within
onActivate()...what am I missing...??

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?   

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?  
If not, what would that practice be, if that can be articulated?

Hope that is clear.  Thanks, again, for your time. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-tp5643323p5645309.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