Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Saving Form State to XML and Templates
Saving Form State to XML and Templates [message #831234] Wed, 28 March 2012 12:49 Go to next message
Eclipse UserFriend
Errors cased by the bugzilla 367850 caused some confusion recently. I'm sorry for the inconvenience. This is an attempt to summarize the topic once again. Please post any further comments regarding this topic in this thread or in the bugzilla ticket directly.

It is possible to store the form state to XML and loading it again. (see doExportXml,doImportXml,getXML, setXML on org.eclipse.scout.rt.client.ui.form.IForm). In the XML the current values of all fields of the form are stored.

This functionality is for example used to create bookmarks by org.eclipse.scout.rt.client.services.common.bookmark.internal.BookmarkUtility.

Previously the fields were identified by the simple class name. It is not allowed to use multiple fields with the same simple name in a form directly. The Scout SDK prevents this and form data creation fails.

However, it is possible to end up with duplicate simple class names when using templates. Consider the following example:

AbstractDateBox.java:
public class AbstractDateBox extends AbstractGroupBox {
public class FromField extends AbstractDateField {}
public class ToField extends AbstractDateField {}
}

ExampleSearchForm.java:
public class ExampleSearchForm extends AbstractSearchForm {
public class MainBox extends AbstractGroupBox {
public class BillingDateBox extends AbstractDateBox {}
public class PaymentDateBox extends AbstractDateBox{}
}
}

FormData import/export still works, because in this case a hierarchical structure using org.eclipse.scout.commons.ClassIdentifier and breadthfirst search is used.

In the XML import/export the fields BillingDateBox.FromField und PaymentDateBox.FromField could not be distinguished. This problem was addressed in ticket 367850.
Re: Saving Form State to XML and Templates [message #870228 is a reply to message #831234] Mon, 07 May 2012 06:59 Go to previous message
Eclipse UserFriend
See also: Bug 377781 - IFormField: field ID, XML field ID and missing fully qualified class names in XML I/O
Previous Topic:Default OS Browser and AbstractBrowserField
Next Topic:FileChooser with default filename
Goto Forum:
  


Current Time: Tue Jul 08 18:32:48 EDT 2025

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

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

Back to the top