Servoy 3.5 - time for local [window and/or form] variables

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Do you use globals as data provider to help data entry?

Yes, often
15
60%
Yes, occasionally
8
32%
No, never
2
8%
Don't know
0
No votes
 
Total votes : 25

Servoy 3.5 - time for local [window and/or form] variables

Postby olivier melet » Tue Jul 17, 2007 11:12 am

As a side effect of the multiple window feature, we will need a new data provider type: locals.

I don't know for you, but we are commonly using globals.myTxtVar to help in complex data entry forms. The introduction of the multiple window feature in servoy 3.5 has the side effect to render this method obsolete, as globals will display the same values for all open windows. Therefore we now need a new type of data provider: locals.

Implementation proposal:
We suggest that locals may be linked to and shared by either a form instance or a window, with the latter being may be more complex to use.
- Forms locals: [forms.myForm.locals.myLocalVar]
With this implementation, locals will be referred to using formName and may display different data with any new instance of the form. Forms locals may be created either using the define dataprovider dialog (needs interface change) or as a new property for forms with the help of a specific editor or by script (although the latter method is quite non intuitive).
- Window locals: [locals.myLocalVar]
With this implementation, locals will behave like plain globals with the only difference being that they will be linked to a window instance instead to the application/solution. Window locals may be created either using a new tab (locals) in the define datprovider dialog or adding a 'local'property to existing globals tab.

Case 86011 has been posted as an issue about usage of globals while in multiple windows.

Please comments and suggestions about this issue/feature?
Olivier Melet
Administration et projets
InfoForm SA
olivier melet
 
Posts: 183
Joined: Mon Apr 19, 2004 3:33 pm
Location: Switzerland

Postby MSibai » Tue Jul 17, 2007 11:22 am

I completely agree with you..

We usually requires "Temporary fields" in the scope of the "Form" not the application.

We are still workaround it by using a global variable set/unset but it will be great to have this ...
Mohamad Sibai
http://www.Nothom.Com
User avatar
MSibai
 
Posts: 145
Joined: Tue Dec 05, 2006 7:17 am
Location: Saudi Arabia

Postby olivier melet » Thu Jul 19, 2007 2:13 pm

Does any of you fellow servoy users have a workaround for this?

We try to investigate several different ways but are blocked by the fact only columns and globals can be choosed as dataproviders. Which lead to another idea in order to solve this issue: let us set any 'custom' object as dataprovider (quick and mainly dirty, but will do the trick).

Any suggestion?
Olivier Melet
Administration et projets
InfoForm SA
olivier melet
 
Posts: 183
Joined: Mon Apr 19, 2004 3:33 pm
Location: Switzerland

Postby IT2Be » Thu Jul 19, 2007 2:25 pm

When you need a 'local', form related variable that only shows in your form there maybe sort of an alternative.

You can assign 'virtual' columns in your table.
These columns are in fact calculations and the only thing you should code is return;

That columns is not just form related but might do it for you.
You can use it like a regular column, values are only available in and during your current session and only within that table.
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby olivier melet » Thu Jul 19, 2007 3:16 pm

Thank you Marcel,
very interesting trick but it just wouldn't solve the issue in a multiple windows environnement.

As values are table related, any instance of the form/window will share the same value for such a 'virtual' column... the same issue that we encounter with globals.

Here is a practical and simple example of the issue:
- lets say we have a main form with a filter field (dataprovider == globals.myFilter) the filter is used to restrain foundset on a table view tab placed in the same form.
- if we create a new instance of the window, the expected behaviour is to be able to set a different filter for the second window in order to compare data.
- actually, the user will get the same result in both windows, due to the fact that the data provider is in the table/application scope.
- therefore we still need locals...

Any other idea?
Olivier Melet
Administration et projets
InfoForm SA
olivier melet
 
Posts: 183
Joined: Mon Apr 19, 2004 3:33 pm
Location: Switzerland

Postby IT2Be » Thu Jul 19, 2007 3:21 pm

I was already afraid that it would not solve your issue but did not want to be the judge of that :)
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby Robert Huber » Thu Jul 19, 2007 5:25 pm

Hi Olivier

Unfortunatly not, but we also fight with this problem :-(

I do not think you can use any object as dataprovider as objects can return very different data.

I assume using modules doesn't help? May be using 2 very small modules and defining globals there, which are for the whole solution not "visible" (at max a bad workaround)

Best regards, Robert

olivier melet wrote:Does any of you fellow servoy users have a workaround for this?

We try to investigate several different ways but are blocked by the fact only columns and globals can be choosed as dataproviders. Which lead to another idea in order to solve this issue: let us set any 'custom' object as dataprovider (quick and mainly dirty, but will do the trick).

Any suggestion?
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Postby olivier melet » Mon Jul 23, 2007 9:59 am

Thank you all,

May someone from dev team send some feedback on this, Jan or Marteen?
I think this may also get the attention of Jan Block...

We definitely need a dataprovider type tied to the form instance ( or at least to the window instance).
Olivier Melet
Administration et projets
InfoForm SA
olivier melet
 
Posts: 183
Joined: Mon Apr 19, 2004 3:33 pm
Location: Switzerland

Postby IT2Be » Mon Jul 23, 2007 10:03 am

Olivier, creating a case (as you already did if I am correct) should be enough to get attention for this.
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby jcompagner » Mon Jul 23, 2007 8:22 pm

this will not made it into 3.5 because that one is almost finished.
only bug fixes will be done anymore.

We will release one more RC tomorrow so please test that build as good as you guys can!
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby jcompagner » Mon Jul 23, 2007 8:25 pm

there will be a small drawback for form variables. Would those be cleared if we remove the form from memory?

So when you get an onLoad event you know you have to initialize them for that form.. And that could happen more then once in the session.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby Gary R. Schaecher » Mon Jul 23, 2007 9:00 pm

I know our programmers would be happy with the form variables being cleared when the form is purged from the cache.

No problem with that for us.

Form variables would be a blessing!
Gary R. Schaecher
TMA Systems, LLC
www.tmasystems.com
Gary R. Schaecher
 
Posts: 72
Joined: Sat Jan 06, 2007 11:01 pm

Postby sbutler » Mon Jul 23, 2007 9:24 pm

In Servoy 3.5 we will have the API for getting JavaBeans to work in the Web Client. So, you could make a simple wrapper around the JTextField Bean to also work for web client. Then you can get and set data in the bean and you will essentially have Form variables.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
sbutler
Servoy Expert
 
Posts: 759
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Postby olivier melet » Tue Jul 24, 2007 10:41 am

jcompagner wrote:this will not made it into 3.5 because that one is almost finished.
only bug fixes will be done anymore.


Does this mean 4.0 or 3.5.x Johan ?

Anyway it is great news for us that form variables will be implemented soon. :D

As Gary said, we will also be comfortable with form variables being reinitialized with each onLoad event, this is expected behaviour as they are form variables, not session variables.

goldcougar wrote:In Servoy 3.5 we will have the API for getting JavaBeans to work in the Web Client. So, you could make a simple wrapper around the JTextField Bean to also work for web client. Then you can get and set data in the bean and you will essentially have Form variables.

Thank you for that one, as it is a real workaround. We also investigate that option prior to post the issue, but we skipped it as it proves to be very clumsy to implement in complicated forms and would prevent us (or at least render quite uneasy) from integrating seemlessly our actual standards in data entry validation.
Unless implementation of form variables will be postponed after this september, we would not consider using beans as an option. We may rather consider to postpone implementation of the multiple window feature in our solutions, waiting to be able to support it with native servoy features.
Olivier Melet
Administration et projets
InfoForm SA
olivier melet
 
Posts: 183
Joined: Mon Apr 19, 2004 3:33 pm
Location: Switzerland

Postby olivier melet » Thu Aug 02, 2007 4:20 pm

{Ping} - Can we expect something for 3.5.1?
Olivier Melet
Administration et projets
InfoForm SA
olivier melet
 
Posts: 183
Joined: Mon Apr 19, 2004 3:33 pm
Location: Switzerland

Next

Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 13 guests