Servoy 5.2.9

Servoy announcements

Servoy 5.2.9

Postby Jan Blok » Fri Jul 01, 2011 5:05 pm

We are pleased to announce the immediate availability of Servoy 5.2.9

This version is available through the download option on the Servoy website and auto update.
Always make a backup of your current Servoy installation (directory and database) before installing/upgrading.
To update a Servoy eclipse open "Check for updates" via help menu.

Client Changes
[fix] 387335 integer is displayed as decimal on label
[fix] 390966 strange problem viewing same record data
[fix] 389132 License issue
[fix] 372162 Aggregation used in a data tag does not show 0 if result is 0
[fix] 387477 Multiselect: when selecting from top to bottom, the selection disappears when right-clicking
[fix] 391397 Typeahead accepts unlisted data
[fix] 390619 bug in related tabpanel (selfjoin)
[fix] 388942 application.setValueListItems issue in certain circumstances
[fix] 389091 bug in setting/changing DATETIME in DATETIME field in table-view
[fix] 393663 onHide in window, return false, hides the window behind the main-solution
[fix] 393113 editable checkboxes not selectable any more in tableview
[fix] 389871 Duplicated dataset for custom valuelists
[fix] 389983 Setting form variables is slow when they are shown on screen

WebClient Changes
[fix] 386439 sometimes combobox is not editable
[fix] 389834 Tabpanel defect after recreateUI
[fix] 388988 bug in loadRecords(query,arguments)
[fix] 382396 FormIndialog broken Opéra 11.10 (windows)
[fix] 338848 Different vertical alignment of checkbox
[fix] 386108 Label Enable Disable on TabPanel does not works

Developer Changes
[fix] 390756 bug in setting datetime fields icm valuelist & mask-issue
[fix] 387982 Externalize Messages gives Exception

Application Server Changes
[fix] 364090 Committed changes are lost after restart application server

Plugin/Bean Changes
[fix] 387388 DBTreeView's .setNodeLevelVisible(x,true) sometimes does not expand the tree
[fix] 375768 File Download Dialog of browser closes the modal dialog
[fix] 388075 PDF print not honoring printsliding
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Servoy 5.2.9

Postby rafig » Sat Jul 02, 2011 6:28 pm

Hi,
I'm afraid I don't know if this is a bug introduced in 5.2.9, or if it was there before, as I've only just been trying to do this today after updating last night.
The bug seems to be that the parameters passed into a function are being changed indirectly by changing local variables that have been assigned to them :?
I am working on an appointments system as part of a solution and am using the IT2Be Calendar bean.
My client wants to be able to block book a day, week or month's worth of time slots in one go for the logged in user.
There is a button for each day/week/month creation which basically loop thru an array of the days & times and at the lowest level call another method that when given a start & end datetime create an event record with various set values.
I am also using the Dr Maison dateutils plugin that generates a date series for me in an array, so I can get the user to pick a start date & time and an end date & time with a duration (span) and the dateutils creates an array with all the different time slots in it. However, maybe I'm not doing it correctly or something, it is not generating the final array value for the last time slots end time.
So my lower function that creates the event is looking for a 'null' end datetime and I am then saying - set the enddatetime to the startdatetime + the duration/span, BUT as well as setting the enddatetime it is also setting the startdatetime parameter, even though I am NOT directly assigning the startdatetime!!

Here is my code and console output for a few appts on one day

Code: Select all
/**
* @param {Date} startdate Start date
*
* @param {Date} enddate End date
*
* @properties={typeid:24,uuid:"A422ADC4-9371-4BC7-8BDD-4AFEC6DA89E5"}
*/
function add_event_in_loop ( startdate, enddate )
{
   var $start_date = startdate ;
   var $end_date = enddate ;
   application.output ( 'inner function call before doing anything. Startdate param = ' + startdate + ' local var = ' + $start_date + ' enddate param = ' + enddate + ' local var = ' + $end_date );
   //Stop executing when the start_date is empty
   if ( !startdate )
   {
      application.output ( "Halting here...", LOGGINGLEVEL.INFO );

      return;
   }

   // check boundary condition, as dateutils doesn't set last element for me
   if ( $end_date == null )
   {
      $end_date = $start_date;
      var $mins = $end_date.getMinutes ( ) ;
      $end_date = $end_date.setMinutes ( ( $mins + globals.span_minutes) ); // !!!!!THIS IS WHERE IT GOES WRONG!!!!!!
   application.output ( 'after null assign.                         Startdate param = ' + startdate + ' local var = ' + $start_date + ' enddate param = ' + enddate + ' local var = ' + $end_date );
   }
   //Add the record to the form and fill the date fields
   globals.mod_pos_temp_start_date = $start_date ;
   globals.mod_pos_temp_end_date = $end_date ;
   if ( databaseManager.hasRecords ( g_check_event ) )
   {
      // event already exists, should we do something?
      // application.output ( 'Event already there...' );
   }
   else
   {
   application.output ( 'about to set record values.                Startdate param = ' + startdate + ' local var = ' + $start_date + ' enddate param = ' + enddate + ' local var = ' + $end_date );
      var $record = foundset.getRecord(foundset.newRecord());
      $record.startdatetime = $start_date;
      $record.enddatetime = $end_date;
      $record.id_staff = globals.user_ID;
      $record.team_code = $record.events_to_staff.team_code;
      $record.realcategoriesid = $record.events_to_staff.realcategoriesid;

      $record.flag_available = globals.flag_available;
      $record.flag_ok_for_1st_appt = globals.flag_ok_1st;

      if ( globals.mod_pos_colour != null )
      {
         $record.colour = globals.mod_pos_colour;
      }
      $record.description = globals.mod_pos_text;
      databaseManager.saveData($record);
   }
}

/**
*
* @properties={showInMenu:true,typeid:24,uuid:"C513357C-4D94-457C-AE0C-F3F27F5EDC7C"}
*/
function add_events_day_loop ()
{
   globals.mod_pos_pleaseWait ( 'Creating Days Appointments...' );

   // Create start and end Date for the series
   globals.mod_pos_start_date = elements.it2be_calendar.date;
   globals.mod_pos_end_date = elements.it2be_calendar.date;
   globals.mod_pos_start_date = globals.mod_pos_start_date.setHours ( 8 );
   globals.mod_pos_start_date = globals.mod_pos_start_date.setMinutes ( 30 );
   globals.mod_pos_start_date = globals.mod_pos_start_date.setSeconds ( 0 );
   globals.mod_pos_start_date = globals.mod_pos_start_date.setMilliseconds ( 0 );
   globals.mod_pos_end_date = globals.mod_pos_end_date.setHours ( 17 );
   globals.mod_pos_end_date = globals.mod_pos_end_date.setMinutes ( 30 );
   globals.mod_pos_end_date = globals.mod_pos_end_date.setSeconds ( 0 );
   globals.mod_pos_end_date = globals.mod_pos_end_date.setMilliseconds ( 0 );

   forms.et_FID_appt_create.time_span_text = 'Day';
   forms.et_FID_appt_create.time_span_no = '1';
   application.showFormInDialog ( forms.et_FID_appt_create, -1, -1, -1, -1, 'Create Slots', false, false, false );

   if ( globals.mod_pos_fid_ok == 1 )
   {
      var vPeriod = plugins.DateUtils.Period ( 0, 0, 0, globals.appt_hours, globals.appt_minutes );

      globals.span_minutes = ( globals.appt_hours > 0 ) ? ( ( globals.appt_hours * 60 ) + globals.appt_minutes ) : globals.appt_minutes;
      globals.mod_pos_start_date = globals.mod_pos_start_date.setMinutes ( globals.mod_pos_start_date.getMinutes ( ) - globals.span_minutes );
      globals.mod_pos_end_date = globals.mod_pos_end_date.setMinutes ( globals.mod_pos_end_date.getMinutes ( ) - globals.span_minutes );
      // Create the date series
      var vDates = plugins.DateUtils.createDateSeries ( globals.mod_pos_start_date, vPeriod, globals.mod_pos_end_date );

      var lv_len = vDates.length;
      for ( var i = 0; i < lv_len; i++ )
      {
         application.output('loop ' + i);
         application.output ( 'before inner loop call ' + vDates[i] + ' ' + vDates[i + 1] );
         add_event_in_loop ( vDates[i], vDates[i + 1] );
      }
      databaseManager.saveData ( );
      refresh_form ( );
   }
   globals.mod_pos_ready ( );
}

so the lower method calls the one above it...
here is the output from the console
loop 0
before inner loop call Mon Jul 04 16:00:00 BST 2011 Mon Jul 04 16:30:00 BST 2011
inner function call before doing anything. Startdate param = Mon Jul 04 16:00:00 BST 2011 local var = Mon Jul 04 16:00:00 BST 2011 enddate param = Mon Jul 04 16:30:00 BST 2011 local var = Mon Jul 04 16:30:00 BST 2011
about to set record values. Startdate param = Mon Jul 04 16:00:00 BST 2011 local var = Mon Jul 04 16:00:00 BST 2011 enddate param = Mon Jul 04 16:30:00 BST 2011 local var = Mon Jul 04 16:30:00 BST 2011
loop 1
before inner loop call Mon Jul 04 16:30:00 BST 2011 Mon Jul 04 17:00:00 BST 2011
inner function call before doing anything. Startdate param = Mon Jul 04 16:30:00 BST 2011 local var = Mon Jul 04 16:30:00 BST 2011 enddate param = Mon Jul 04 17:00:00 BST 2011 local var = Mon Jul 04 17:00:00 BST 2011
about to set record values. Startdate param = Mon Jul 04 16:30:00 BST 2011 local var = Mon Jul 04 16:30:00 BST 2011 enddate param = Mon Jul 04 17:00:00 BST 2011 local var = Mon Jul 04 17:00:00 BST 2011
loop 2
before inner loop call Mon Jul 04 17:00:00 BST 2011 undefined
inner function call before doing anything. Startdate param = Mon Jul 04 17:00:00 BST 2011 local var = Mon Jul 04 17:00:00 BST 2011 enddate param = undefined local var = undefined
after null assign. Startdate param = Mon Jul 04 17:30:00 BST 2011 local var = Mon Jul 04 17:30:00 BST 2011 enddate param = undefined local var = 1309797000000
about to set record values. Startdate param = Mon Jul 04 17:30:00 BST 2011 local var = Mon Jul 04 17:30:00 BST 2011 enddate param = undefined local var = 1309797000000


I might be doing something wrong, but I don't think so. It looks like Servoy is using pointers or something to reference the variables, thereby linking them to the parameters they were assigned to (i.e. the same memory slot) instead of allocating separate ones. (BTW, before using the local variable, I was just using the passed parameters and changing the passed 'endtime' param and changing it, but this also changed the 'starttime', so I then tried using local variables)

Thanks

Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Servoy 5.2.9

Postby ROCLASI » Sat Jul 02, 2011 8:34 pm

Hi Rafi,

Objects (Date is an Object) will always be passed as reference.
So you need to create your own local instance of it if you want to do some functions on it but not want to change the original value.
You can simply do that by using var myLocalDate = new Date(myPassedDate).
Or you can pass the dates by value like I explained in the following post:
viewtopic.php?f=22&t=16380

Hope this helps.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Servoy 5.2.9

Postby rafig » Sat Jul 02, 2011 11:19 pm

ROCLASI wrote:Hi Rafi,

Objects (Date is an Object) will always be passed as reference.
So you need to create your own local instance of it if you want to do some functions on it but not want to change the original value.
You can simply do that by using var myLocalDate = new Date(myPassedDate).
Or you can pass the dates by value like I explained in the following post:
viewtopic.php?f=22&t=16380

Hope this helps.


Phew!
Thanks Robert!
I didn't know that. I am learning new things all the time, even though I've been working with Servoy for years...
I will change my code (& look for other methods that might have this) accordingly.
Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: Servoy 5.2.9

Postby jwservoy » Tue Jul 05, 2011 7:02 pm

[fix] 364090 Committed changes are lost after restart application server

Is there any way we could get some more information on what this bug was in regards to? I looked for the case in the support section but it doesn't appear to be a public case.

Thanks
________________________
Jason Walsh
ReadQ Technologies LLC
Servoy Certified Developer
jwservoy
 
Posts: 29
Joined: Mon Sep 14, 2009 10:35 pm
Location: New York, NY

Re: Servoy 5.2.9

Postby martinh » Wed Jul 06, 2011 9:41 am

jwservoy wrote:[fix] 364090 Committed changes are lost after restart application server

Is there any way we could get some more information on what this bug was in regards to? I looked for the case in the support section but it doesn't appear to be a public case.


The situation is/was that when I committed changes from developer into the Application Server Teamrepository, then after commit when you do a restart of the Application Server that the changes were not committed.
This is only the case for Dataprovider properties (like auto-enter settings)

- Sync changes with the server (commit)
- Do a sync again, now Servoy says that there are no changes
- Quit developer
- Restart application server
- Start developer
- Do a sync again
- Now Servoy is coming with changes. I see the correct auto-enter settings in my workspace, but the server version doesn't have my changes.

You can have the following work around:

- Sync changes with the server (commit)
- Export solution in developer
- Quit developer
- Setting use as TeamProvider=False on the adminpage
- Restart of the AS
- Import the exported solution into the AS
- Setting use as TeamProvider=True on the adminpage
- Restart of the AS
- Start developer
- Do a sync again

Now there are no changes and the correct auto-enter settings are in the server.

For the moment I can't tell you if this issue is completely fixed in 5.2.9
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Servoy 5.2.9 - Cant add media

Postby Kahuna » Fri Jul 15, 2011 1:48 pm

Hi Folks

Since upgrade to 5.2.9 we cant upload any single media file. The upload button on the media properties window simply flashes and does not open the selection dialog as it always used to.

We can still upload if we place the media in a folder however and use the folder upload button.
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Servoy 5.2.9

Postby lvostinar » Fri Jul 15, 2011 1:59 pm

Kahuna wrote:Hi Folks

Since upgrade to 5.2.9 we cant upload any single media file. The upload button on the media properties window simply flashes and does not open the selection dialog as it always used to.

We can still upload if we place the media in a folder however and use the folder upload button.


I guess is this issue: viewtopic.php?f=11&t=16352&hilit=open+file+update+26 ?
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Servoy 5.2.9

Postby Kahuna » Fri Jul 15, 2011 2:39 pm

Thanks Laurian - do you guys think this is likely to be fixed in Java - or will Servoy be issuing a workaround so we can move on with Java versions??
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: Servoy 5.2.9

Postby lvostinar » Fri Jul 15, 2011 2:59 pm

Kahuna wrote:Thanks Laurian - do you guys think this is likely to be fixed in Java - or will Servoy be issuing a workaround so we can move on with Java versions??


I see it is high priority now, hopefully they fill fix it soon. Don't think there is something we can do about it.

http://bugs.sun.com/bugdatabase/view_bu ... id=7056092
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Servoy 5.2.9

Postby eKelman » Fri Jul 15, 2011 6:15 pm

Hi

Has anyone noticed the unusual long period of time it takes to get developer (locally) loaded and ready to run after installing 5.2.8 and 5.2.9?

Also with our application server, when importing solutions, it is taking an incredibly long time to import solutions (over 30 minutes - i don't know exactly how long as I decided to go home and verify the import vs sitting around and not knowing when servoy would be finished with the import)

I have to add that we are utilizing a large data model (hundreds or thousands of tables) with a lot of records (tens of milions, per client), so keep that in mind if responding please.

Is there a pre-requisite for the java version when running this version? I also notice that the little loading bar stays visible in the test environments.


Development environment
O/S - Windows 7
Java Version: 1.6.0_24
Servoy version: 5.2.9 1020
Broswer: Firefox 3.6.16
Web Application

Test environments
O/S - Linux
Java Version: 1.6.0_21
Servoy version: 5.2.9 1020
Broswer: Firefox 3.6.16
Web Application
Ernest
Kelman Technologies
eKelman
 
Posts: 52
Joined: Tue May 12, 2009 9:09 pm

Re: Servoy 5.2.9

Postby martinh » Mon Jul 18, 2011 9:41 am

I do notice this in the Servoy 6 RC versions, but not in the 5.2.9 (not much slower than earlier 5.2 versions)

Maybe your virus scanner is checking all Servoy files on startup?
I excluded my workspace from being checked by the virusscanner
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Servoy 5.2.9

Postby martinh » Mon Jul 25, 2011 11:56 am

[fix] 364090 Committed changes are lost after restart application server


This is for 99% working now.

But there is still 1 problem.
The creationOrderIndex is not being commited.

Capture.JPG
You do not have the required permissions to view the files attached to this post.
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Servoy 5.2.9

Postby Jan Blok » Mon Jul 25, 2011 12:50 pm

creation order is read from the database and is only present in the file for when table needs to be (re)created in db.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Servoy 5.2.9

Postby rafig » Tue Jul 26, 2011 7:38 pm

Hi,
[fix] 364090 Committed changes are lost after restart application server

This has just reminded me that I still seem to be having this as a problem.
When I upload a new release of a solution with new default values for columns (e.g. set to 0, or set to lookup value), if I restart the Service after the solution has been imported, it 'loses' the defaults I had just set.
What can I do to make those defaults 'stick'?

Thanks

Rafi
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Next

Return to Announcements

Who is online

Users browsing this forum: No registered users and 19 guests

cron