Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Using same formData on multiple forms(Using same formData on multiple forms)
Using same formData on multiple forms [message #991143] Mon, 17 December 2012 13:48 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 309
Registered: August 2011
Senior Member
Hi,

I have a wizard with three forms, but I like to handle that data with only one formData object. So every form of the wizard only uses part of the data and when the wizard finishes, the complete formData is sent to the server.

Can I do this and is the "Scout way" to do it?

Regards bertin
Re: Using same formData on multiple forms [message #991212 is a reply to message #991143] Mon, 17 December 2012 19:16 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 43
Registered: November 2010
Member
Bertin,

I think it depends:


  • If you have three different and independent forms and you want that them to be stored only at the end of the wizard "in one go", then you would probably use 3 formDatas (one for each form). And the end of the wizard, you would fill each of them individually and then pass them to a store() method that takes three formDatas as an argument instead of just one:
    public void storeWizard(WizardStep1FormData formData1, WizardStep2FormData formData2, WizardStep2FormData formData3) ...

  • If you have a large form that should be edited in three steps by enabling (or showing) only parts in each step, then you would use the same instance of the form in each step. In the wizard's activate/deactivate methods, you can show or hide the desired fields. In each step, the form is filled more and more. At the end, all fields have a value and you can export the form to a single formData. (Invisible fields are exported as well.)
  • If you have three separate forms that have the same value fields on them (but maybe a different layout), it should be possible to share the formDatas. Just let the @FormData annotation point to the same class. (Note: I have never done this and I would not recommend it, as the field structure and the field names _really_ must be identical.)


Does that information help you? If not, maybe you could tell us a little bit more about your intension.

Beat
Re: Using same formData on multiple forms [message #991449 is a reply to message #991212] Wed, 19 December 2012 08:35 Go to previous message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 309
Registered: August 2011
Senior Member
Yes, that helps me to do things in a Scout way.

Regards Bertin
Previous Topic:TCP KeepAlive in Scout Client
Next Topic:Wizard prevent next step
Goto Forum:
  


Current Time: Thu Nov 27 18:42:21 GMT 2014

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

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