[ 
https://issues.apache.org/jira/browse/TAPESTRY-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Howard M. Lewis Ship closed TAPESTRY-2512.
------------------------------------------

    Resolution: Invalid
      Assignee: Howard M. Lewis Ship

Yes, typically you make a field persistent and then bind the parameter to the 
persisted field.

> @Persist should allow to persist data not only between request, but also when 
> submitting a form or making actions
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2512
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2512
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Annotations
>    Affects Versions: 5.0.13
>            Reporter: Martin Papy
>            Assignee: Howard M. Lewis Ship
>
> If you use @Persist on on Component property the value is kept between 2 
> request, but not when submitting a Form for instance.
> I think it would be very useful / powerful -particularly with Hibernate- to 
> give access to the Persisted value even when a when a Form is submitted (if 
> it is possible...)
> Ex :
> 1 - Get my instance of a User from Hibernate and display it with the 
> BeanEditForm and use @Persist on it
> 2 - Update my values and post the form
> 3 - My instance of user would be directly update (because the BeanEditForm 
> would use the persisted value and not a freshly created one)
> 4 - use onSuccess to do a Merge and a Commit :)
> Code exemple :
> public class UserEditor {
>       @Parameter(required=true)
>       @Property
>       @Persist
>       private User _user;
>       
>       @Inject
>       private UserManager _userManager;
>       
>       protected void onSuccess() {
>               //Save the Profile Update
>               _userManager.merge(_user);
>               _userManager.commit();
>       }
> }
> Associated template
> <t:beanEditForm t:object="user" 
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"; />

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to