Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Form not saved when nothing is changed
Form not saved when nothing is changed [message #1065109] Mon, 24 June 2013 08:10 Go to next message
Eclipse UserFriend
Hi,

I have a form. In the prepareCreate method of the corresponding service we fill the formadata. Sometimes this is exactly what the user wants so he just has to press the OK button. But nothing is saved then because nothing is changed by the user. Can I mark the data unsaved to force the data being saved?

Regards Bertin
Re: Form not saved when nothing is changed [message #1065110 is a reply to message #1065109] Mon, 24 June 2013 08:13 Go to previous messageGo to next message
Eclipse UserFriend
You could use the org.eclipse.scout.rt.client.ui.form.IForm.touch() method, it will "touch" the form so that a save is needed.
Re: Form not saved when nothing is changed [message #1065112 is a reply to message #1065109] Mon, 24 June 2013 08:16 Go to previous messageGo to next message
Eclipse UserFriend
I assume you call the Service from
AbstractFormHandler.execLoad

Scout calls markSaveNeeded(false) on all fields after the execLoad phase.

In your case (as in almost all prepareCreate cases)
make the Service call from within
AbstractFormHandler.execPostLoad


verify with the javadoc of these methods that this is what you need.

Does this solve your issue?
Re: Form not saved when nothing is changed [message #1065114 is a reply to message #1065112] Mon, 24 June 2013 08:17 Go to previous messageGo to next message
Eclipse UserFriend
Also consider using
IFormField.touch
in case you have mixed and very complex gui logic.
Re: Form not saved when nothing is changed [message #1065330 is a reply to message #1065114] Tue, 25 June 2013 06:56 Go to previous message
Eclipse UserFriend
Using IFormField.touch inside the AbstractFormHandler.execPostLoad method worked for me,

thanks.
Previous Topic:Minimize SearchForms
Next Topic:Spinner field
Goto Forum:
  


Current Time: Fri Jul 25 05:46:50 EDT 2025

Powered by FUDForum. Page generated in 0.11545 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top