Hi, i'm new to tapestry and i need some help:

I show a list of objects in a table to allow the user to select wich one to 
edit. To do so i followed the quickstart and i created a DirectLink and 
passed the object id along with it. The handler of the DirectLink gets the 
edit page (@InjectPage) and sets the id to edit in it (setPID).
The edit page loads the object from the db in the pageBeginRender method 
using the PID property set in the other page. And this is ok.

My problem is that this edit page allows the user to edit only few 
properties of the object, not all. So, when i submit i have this situation:
- the pageBeginRender is called but the PID property is null because no one 
set that up this time, so i instantiate a new object. I tried to save the 
PID property in a hidden field in the form but the setter is called only 
after pageBeginRenderer so i can't use it to "preload" the object.
- the submit listener is called after all the properties from the form have 
been set, so, as far as i was not able to preload it, only few properties 
of the object are set (remember i'm doing a partial edit) and i can't load 
the object now otherwise i will lose the data coming from the form. 
Obviously i want to avoid to copy properties from the (partial filled) 
object coming from the form into the original object because i want to try 
to use all possible automatism provided by the framework and i want to stay 
indipendent from what i put in the form if possible.

Is there a way to escape from this situation? I'm open to change the logic 
of the whole thing if necessary.

Thank you
ciao


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to