How to temporarily save and then load new and edit pages being created

0
Because of the problem of having to view and retrieve data from other pages while creating a new page or edit page, I would like to use the temporary storage function for the above two pages. How should I implement it?
asked
3 answers
1

Hi Kim,

could you elaborate on this , what exactly your requirement is 

answered
1

Hi Kim,

 

If I understand it correctly, you want to continu working on the form at a later moment in time. Since the user might not expect the form to be pre-filled when you hit "create" again, you can consider giving the object a status. For instance, when you save it for the first time, but you didn't finish yet, you give it the status "concept". In a later status you can continu editing this form and give it a different status when it passes all validation. A bit like a "save as concept" and "save" button. 

 

This solution will still commit your objects, but you can use the status for conditional visibility for instance.

 

If you really don't want to commit the object into your database, you can make use of non-persistent entities and only commit them when you really want to. However, in that case you might need some non-persistent helper entities as well. Let me know if that's more what you're looking for.

answered
1

Hi kim,

your requirement could be achived  as follows

you have to maintain status like draft,submitted like that

and when user fills the form and don't submit and close the form

then commit it with status as draft

when user reopens the form, show him draft version

once user submits the form change its status to submit.

 

Note: the reason commit is necessary and unavoidable is  if you create non persistable entity or don't commit your data then after session ends , previous entered values won't be available so when user will login next time and open form , it won't be showing previous entered values

 

answered