Servoy 3.5.1

We announce the immediate availability of Servoy 3.5.1

Make a backup of your current Servoy installation (directory and database) before installing.

This version will be available shortly through auto update for users of versions later than 3.5 b2 (check via help menu → check for new version)

Changes
[new] databaseManager.mergeRecords function, see below
[new] DBTreeView.isNodeExpanded function, see below
[new] i18n.getTimezoneOffset function

[enh] changed names of auto-discovered relations from foreign key to allow multiple FKs to the same table
[enh] rich client I18N dialog showDialog call now accepts optional key_to_select
[enh] tooltips in webclient
[enh] form shortcuts can be used in form-in-dialog
[enh] remember form dialog boundaries when showing in a dialog
[enh] support for tags in html buttons
[enh] added the option to encrypt traffic over the http tunnel using the new SocketFactory.http.tunnel.encryption boolean property
[enh] labels defined with ‘labelFor’ property will follow enablement and visibility of the element
[enh] numpad decimal key will enter ‘,’ or ‘.’ depending on locale
[enh] DbTreeView bean will dynamically update tree on data changes in records

[chg] Launch Servoy Client web page offers to install Java 1.6 instead of 1.4
[chg] I18N editor focuses filter field rather than key field
[chg] improved hasRecordChanges: -1 or 0 or nothing means complete foundset
[chg] foundset.duplicateRecord not duplicating in find mode
[chg] all tab panels are transparent as long as the background color isn’t set

[fix] requestFocus function fix in the web client
[fix] image update problems in web client
[fix] tabpanel repaint problem
[fix] if a form is disabled, do not disable the scroll-bars so that the form can still be seen
[fix] smart-client disable/enable on fields from table view had no effect
[fix] web client printPreview for Internet Explorer did not work
[fix] fields that have onFocusGained events registered on table view and list view forms could not be focused
[fix] media fields with scrollbars property set to ‘never,never’ on disabled forms would not update
[fix] foundsetUpdater would not update when on last row
[fix] valuelist based on relation didn’t get updated after creating or deleting related records
[fix] rowbgcolor not working properly on a disabled field in table view
[fix] wrapping lines in HTMLAreas, Test Areas and Labels with HTML were chopped when printed
[fix] exception when exporting solutions with value lists on tables that have been dropped
[fix] incorrect xml in solution export
[fix] when forms were renamed, the new name didn’t show in the menu
[fix] allow user override of auto-enter type for identity columns
[fix] security preferences screen would not show a list of users when there were many users
[fix] slow opening of preferences window when having many tables or views
[fix] type-ahead popup can be wider than type-ahead field width
[fix] bold and italic font styles can now be reset to plain in web client
[fix] empty strings treated as null for validators so the validator won’t be called for them
[fix] on record edit start executed on entry in web client instead of on exit
[fix] printing popup window always correctly shown
[fix] web client portal headers no longer bold
[fix] isFormInDialog will only return true if the form is in a dialog and the dialog is visible
[fix] printpreview fixes when the print preview is shown in a dialog
[fix] protected solution security issue
[fix] workaround for text starting with ‘W’, because of JVM left side bearing issue
[fix] popup menu window position (popup plugin)
[fix] show tab for tabpanel if it has one tab and its orientation is not default
[fix] disabled browser autocomplete
[fix] screen not refreshed when using history.back() in web client
[fix] many DBTreeView bean fixes for web client
[fix] when deleting an entry in the I18N editor, the wrong entry might be deleted
[fix] elements.setImageURL() did not work in web client with AJAX turned on
[fix] joins and sorts on relations (based on calculations)

New functions
Servoy 3.5.1 introduces two new Javascript functions; databaseManager.mergeRecords and DBTreeView.isNodeExpanded

databaseManager.mergeRecords
This function is very handy in situations where duplicate data is inserted. It allows you to merge the two records and move all related records in one go. Say the sourceRecord is Ikea and the combinedDestinationRecord is IKEA, the Ikea record is deleted and all records related to it (think of contacts and orders, for instance) will be related to the IKEA record.

mergeRecords takes an optional array of column names. If provided, the data in the named columns will be copied from sourceRecord to combinedDestinationRecord.
The function returns a boolean indicating success or failure.
Note that it is essential for both records to originate from the same foundset, as shown in the example below.

Syntax: databaseManager.mergeRecords( sourceRecord, combinedDestinationRecord, [columnnamesarray_to_copy])

Example:

//Merge records from same foundset, updates entire datamodel (via foreign type on columns) with destination record pk, deletes source record, do use a transaction!
databaseManager.mergeRecords(foundset.getRecord(1), foundset.getRecord(2));

DBTreeView.isNodeExpanded
The isNodeExpanded function tells whether or not the given path is expanded, returning true if it is and false otherwise.

Syntax: DBTreeView.isNodeExpanded(path)

Example:

//Check the path (array with pk records values (only single pk key supported)) expanded status
var pathArray = new Array(14,24,45,67);
var isExpanded = elements.treeViewBean.isNodeExpanded(pathArray);

Previous release
http://forum.servoy.com/viewtopic.php?t=8834

databaseManager.mergeRecords

Very nice!

IT2Be:

databaseManager.mergeRecords

Very nice!

Yep, good work.

HTML label print sliding fixes were promised for this release, and appear to be working in my demo solution – though they are not mentioned above. Whohoo!

See: http://forum.servoy.com/viewtopic.php?t=8524&highlight=

greg.

Thanks for this new version and mostly what i was waiting for:

[enh] changed names of auto-discovered relations from foreign key to allow multiple FKs to the same table

It seems that there’s still have problem with pk_constraints like i explained in the post

erdione:
I think that The new relation should better be named like that
fk_field_fktable_pktable because we can have more than one constraint from one table to another table:
for exemple see db diagram below and result of a sql query to discover constraint

table_user
=> fk_modifuserid_table_b_table_user
=> fk_creatuserid_table_b_table_user
=> fk_table_c_table_user
table_b
=> pk_modif_user_id_table_b_table_user
=> pk_create_user_id_table_b_table_user
table_c
=> pk_tab_user_id_table_c_table_user

“exec sp_fkeys @pktable_qualifier = null, @pktable_owner = null, @pktable_name = ‘table_user’”

table_user tab_user_id testfk dbo table_b create_user_id FK_create_user_id_table_b_table_a PK_table_a
table_user tab_user_id testfk dbo table_b modif_user_id FK_modif_user_id_table_b_table_a PK_table_a
table_user tab_user_id testfk dbo table_c tab_user_id FK_tab_user_id_table_c_table_user PK_table_a

With version 3.51 I’ve got
3 relations in table_user as expected
1 in table_c
Nothing in table_b

Hope you’ll fix it in 3.52

Is there anything we need to know in terms of getting the latest Help file (not PDF Doc’s)?

When I downloaded 3.5.1 (build 514) I am still running Help file 3.5.0.0D 2007.

Is this the current one?

I am pretty sure, when I am informed well, it is only a couple of days away before we will have the latest version of the docs :)

Michael Mooney:
When I downloaded 3.5.1 (build 514) I am still running Help file 3.5.0.0D 2007.

Is this the current one?

Yes, it is. With 3.5.2, we plan to ship fresh docs.

Unfortunately the treeview doesn’t show the nodes in the same order as in version 3.5.

Hi

First of all many thanks for the update and especially the bug fixing, which is good to see thei don’t get forgotten :-) Of course all other work is also very much appreciated!

One thing we noticed after the upgrade is that we still have “transparency” problems:

[chg] all tab panels are transparent as long as the background color isn’t set

I think though it has to do with bean transparency, in my case the JSplitPane transparency and may be not with tabless panel transparency.

I tested in short some beans and the property opaque doesn’t (generally?) seem to work!? I put a bean on a backround graphic: on opaque disabled, I assume the background graphic to see (through) the bean but don’t.

Can others confirm that? As we load the applications user interface dynamically, this function to work is fundamental as otherwise the whole concept breaks down.

Regards, Robert

svroemisse:
We announce the immediate availability of Servoy 3.5.1

Make a backup of your current Servoy installation (directory and database) before installing.

This version will be available shortly through auto update for users of versions later than 3.5 b2 (check via help menu → check for new version)

Changes
[new] databaseManager.mergeRecords function, see below
[new] DBTreeView.isNodeExpanded function, see below
[new] i18n.getTimezoneOffset function

[enh] changed names of auto-discovered relations from foreign key to allow multiple FKs to the same table
[enh] rich client I18N dialog showDialog call now accepts optional key_to_select
[enh] tooltips in webclient
[enh] form shortcuts can be used in form-in-dialog
[enh] remember form dialog boundaries when showing in a dialog
[enh] support for tags in html buttons
[enh] added the option to encrypt traffic over the http tunnel using the new SocketFactory.http.tunnel.encryption boolean property
[enh] labels defined with ‘labelFor’ property will follow enablement and visibility of the element
[enh] numpad decimal key will enter ‘,’ or ‘.’ depending on locale
[enh] DbTreeView bean will dynamically update tree on data changes in records

[chg] Launch Servoy Client web page offers to install Java 1.6 instead of 1.4
[chg] I18N editor focuses filter field rather than key field
[chg] improved hasRecordChanges: -1 or 0 or nothing means complete foundset
[chg] foundset.duplicateRecord not duplicating in find mode
[chg] all tab panels are transparent as long as the background color isn’t set

[fix] requestFocus function fix in the web client
[fix] image update problems in web client
[fix] tabpanel repaint problem
[fix] if a form is disabled, do not disable the scroll-bars so that the form can still be seen
[fix] smart-client disable/enable on fields from table view had no effect
[fix] web client printPreview for Internet Explorer did not work
[fix] fields that have onFocusGained events registered on table view and list view forms could not be focused
[fix] media fields with scrollbars property set to ‘never,never’ on disabled forms would not update
[fix] foundsetUpdater would not update when on last row
[fix] valuelist based on relation didn’t get updated after creating or deleting related records
[fix] rowbgcolor not working properly on a disabled field in table view
[fix] wrapping lines in HTMLAreas, Test Areas and Labels with HTML were chopped when printed
[fix] exception when exporting solutions with value lists on tables that have been dropped
[fix] incorrect xml in solution export
[fix] when forms were renamed, the new name didn’t show in the menu
[fix] allow user override of auto-enter type for identity columns
[fix] security preferences screen would not show a list of users when there were many users
[fix] slow opening of preferences window when having many tables or views
[fix] type-ahead popup can be wider than type-ahead field width
[fix] bold and italic font styles can now be reset to plain in web client
[fix] empty strings treated as null for validators so the validator won’t be called for them
[fix] on record edit start executed on entry in web client instead of on exit
[fix] printing popup window always correctly shown
[fix] web client portal headers no longer bold
[fix] isFormInDialog will only return true if the form is in a dialog and the dialog is visible
[fix] printpreview fixes when the print preview is shown in a dialog
[fix] protected solution security issue
[fix] workaround for text starting with ‘W’, because of JVM left side bearing issue
[fix] popup menu window position (popup plugin)
[fix] show tab for tabpanel if it has one tab and its orientation is not default
[fix] disabled browser autocomplete
[fix] screen not refreshed when using history.back() in web client
[fix] many DBTreeView bean fixes for web client
[fix] when deleting an entry in the I18N editor, the wrong entry might be deleted
[fix] elements.setImageURL() did not work in web client with AJAX turned on
[fix] joins and sorts on relations (based on calculations)

New functions
Servoy 3.5.1 introduces two new Javascript functions; databaseManager.mergeRecords and DBTreeView.isNodeExpanded

databaseManager.mergeRecords
This function is very handy in situations where duplicate data is inserted. It allows you to merge the two records and move all related records in one go. Say the sourceRecord is Ikea and the combinedDestinationRecord is IKEA, the Ikea record is deleted and all records related to it (think of contacts and orders, for instance) will be related to the IKEA record.

mergeRecords takes an optional array of column names. If provided, the data in the named columns will be copied from sourceRecord to combinedDestinationRecord.
The function returns a boolean indicating success or failure.
Note that it is essential for both records to originate from the same foundset, as shown in the example below.

Syntax: databaseManager.mergeRecords( sourceRecord, combinedDestinationRecord, [columnnamesarray_to_copy])

Example:

//Merge records from same foundset, updates entire datamodel (via foreign type on columns) with destination record pk, deletes source record, do use a transaction!

databaseManager.mergeRecords(foundset.getRecord(1), foundset.getRecord(2));





__*DBTreeView.isNodeExpanded*__
The isNodeExpanded function tells whether or not the given path is expanded, returning true if it is and false otherwise.

*Syntax:* DBTreeView.isNodeExpanded(path)

*Example:*


//Check the path (array with pk records values (only single pk key supported)) expanded status
var pathArray = new Array(14,24,45,67);
var isExpanded = elements.treeViewBean.isNodeExpanded(pathArray);




**Previous release**
<a class="postlink" href="http://forum.servoy.com/viewtopic.php?t=8834">http://forum.servoy.com/viewtopic.php?t=8834</a>

Created a sample solution with 2 forms: main and details

On main I placed a transparent tabpanel, containing forms.details

On main I also placed a JSplitPane bean

I also gave the main form a yellow background color and placed a button on the form, with the following code attached:

elements.bean_215.leftComponent = elements.tabs_70;
elements.bean_215.rightComponent = null

When I open the forms.main in browse mode, the for in the tabPanel is rendered transparent, so it gets the background color of the main form.

When I hit the button, the tabPanel is placed in the bean and still the details form which is now in the JSplitPane bean has the background color of the main form.

also when I place the tabPanel into the JSplitPane in the onload event of the main form, the background color of the details form is the same as the main form.

Offcourse, you should not set a specific background color on the details form, that needs to remain default…

So, it seems to work perfectly fine.

If it doesn’t work for you in such a scenario, please specify the L&F you are using and the platform, sicne that might have influency and then create a case for it int eh support system.

Paul

Hi Paul

With the background color set, that works for me as well. But it doesn’t work if I have a background graphic and want to “shine” that through the bean as the yellow bg color. That’s the problem. Can you put a bg graphic instead of the yellow bg color in your example?

Thanks, Robert

pbakker:
Created a sample solution with 2 forms: main and details

On main I placed a transparent tabpanel, containing forms.details

On main I also placed a JSplitPane bean

I also gave the main form a yellow background color and placed a button on the form, with the following code attached:

elements.bean_215.leftComponent = elements.tabs_70;

elements.bean_215.rightComponent = null




When I open the forms.main in browse mode, the for in the tabPanel is rendered transparent, so it gets the background color of the main form.

When I hit the button, the tabPanel is placed in the bean and still the details form which is now in the JSplitPane bean has the background color of the main form.

also when I place the tabPanel into the JSplitPane in the onload event of the main form, the background color of the details form is the same as the main form.

Offcourse, you should not set a specific background color on the details form, that needs to remain default...

So, it seems to work perfectly fine.

If it doesn't work for you in such a scenario, please specify the L&F you are using and the platform, sicne that might have influency and then create a case for it int eh support system.

Paul

Robert, indeed, this doesn’t work now.

Reason for this is that we had to workaround Look and Feel implementations that gave tabPanels a background color regardless the transparency setting.

Please create a case for this int eh support system and we’ll try to find a solution for this.

Paul

Paul, thanks for confirming, made an entry in the support system and thanks for trying to find a solution!

Best regards, Robert

pbakker:
Robert, indeed, this doesn’t work now.

Reason for this is that we had to workaround Look and Feel implementations that gave tabPanels a background color regardless the transparency setting.

Please create a case for this int eh support system and we’ll try to find a solution for this.

Paul

Do you think that it’ll be fixed in the 3.52 ?

erdione:
Thanks for this new version and mostly what i was waiting for:

[enh] changed names of auto-discovered relations from foreign key to allow multiple FKs to the same table

It seems that there’s still have problem with pk_constraints like i explained in the post

Db constraints to relation - Classic Servoy - Servoy Community

erdione:
I think that The new relation should better be named like that
fk_field_fktable_pktable because we can have more than one constraint from one table to another table:
for exemple see db diagram below and result of a sql query to discover constraint

table_user
=> fk_modifuserid_table_b_table_user
=> fk_creatuserid_table_b_table_user
=> fk_table_c_table_user
table_b
=> pk_modif_user_id_table_b_table_user
=> pk_create_user_id_table_b_table_user
table_c
=> pk_tab_user_id_table_c_table_user

“exec sp_fkeys @pktable_qualifier = null, @pktable_owner = null, @pktable_name = ‘table_user’”

table_user tab_user_id testfk dbo table_b create_user_id FK_create_user_id_table_b_table_a PK_table_a
table_user tab_user_id testfk dbo table_b modif_user_id FK_modif_user_id_table_b_table_a PK_table_a
table_user tab_user_id testfk dbo table_c tab_user_id FK_tab_user_id_table_c_table_user PK_table_a

With version 3.51 I’ve got
3 relations in table_user as expected
1 in table_c
Nothing in table_b

Hope you’ll fix it in 3.52