Servoy 3.0 Release Candidate 4

Release notes for Servoy betas

Postby pbakker » Tue Sep 12, 2006 11:26 am

Have a couple of issues/questions about databaseManager.getEditedRecords() and databaseManager.getChangedRecordData:

- If you change a value on a record, but then change it back to the old value, then databaseManager.getEditedRecords() will return an edited record, but if you lookup the changed data (databaseManager.getChangedRecordData), it will contain nothing. Is it correct that databaseManager.getEditedRecords() returns a record that in effect holds no changes?

- I have a main form (A) based on table user. On this form, I have a relationless tabpanel with a form (B) based on table profiles. Form B shows all profiles with a checkbox besides it. The checkbox contains an onDataChange method, that will insert a record into or remove a record from the user-profile table (I have a form user-profile based on this user-profile table, through which I do the delete/insert). This way I link users to profiles. Now I notice the following behavior:
1: When a record gets added to the User-Profile table, databaseManager.getEditedRecords() returns no records, not even if the User table has changes as well.
2: When I get the details of the altered records, it looks like I inserted/removed records into/from the Profiles table, where that did not happen: Records were added/removed into/from the User-Profile table

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby pbakker » Tue Sep 12, 2006 2:46 pm

I'm trying to add a filter to a table using databasemanager.addTableFilterParam, but whatever syntax I try, no filter is added.

Can it be that this functionality is broken in the latest build?

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby pbakker » Tue Sep 12, 2006 3:12 pm

In IE and FF when you click into a Type Ahead type of field with a valuelist attached, the dropdown is not displayed. Once you start typing, it will display whatever values are still matching. When you remove whatever you have typed, only hten all values from the valuelist are shown.

I'd expect the dropdown to be shown once the field receives focus.

Can this be fixed, or is it browser behavior and something we have to live with?

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby pbakker » Tue Sep 12, 2006 3:16 pm

And the selected row in the Type Ahead dropdown is yellow.... Can this be made the same as the selected row in the dropdown of a ComboBox, so some shade of blue? All default colors are shades of white, blue and grey, so the yellow sticks out...

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby pbakker » Tue Sep 12, 2006 3:24 pm

Sorry to keep adding posts.... but:
In FF, the dropdown with values from the valuelist on a type ahead field issometimes replaced by another popup that holds values that the browser hints. I guess they are previously types values in any field. You get the same popup when you doubleclick in a normal textfield.

It happens when you type something into the typeahead field, then remove the typed text, so the full valuelist showns in the dropdown and then you press the arrow down key, to browse through the dropdownlist.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby pbakker » Tue Sep 12, 2006 3:44 pm

Regarding the post if addTableFilterParams still works: figured out that you can only set these filter params in the onSolutionLoad method. If it's done in the onload method for the first form based on the table you want to set the filters on, it doesn't work: they do not get set, eventhough the function returns true as a result...

The docs say that you need to apply the filters before the foundset is loaded: when they get set as the first thing in the onLoad method for a form, I would have thought they are set early enough.

Is this an incorrect assumption?

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby Harjo » Tue Sep 12, 2006 3:51 pm

Hi Paul, my assumption was that the filter must be set BEFORE any table is touched. (you can check this in the server-admin pages. here you can see which tables are allready touched)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby pbakker » Tue Sep 12, 2006 3:54 pm

I tried to set the filters in the onLoad of the first form of my solution, so I cannot think of an earlier point, except the onSolutionLoad method.

If this is the only place where you can use them, I guess this could be made more clear in the docs, but I think it also ought to work in the onLoad of a for, this is the first form that is loaded that is based on the table you want to set the filters on.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby Harjo » Tue Sep 12, 2006 3:57 pm

Did you test, it also in Servoy Client?

as far as I know, it will work there, because THAN you are touching the table for the first time. In Developer you have allready touched the table..

I'm not sure, but worth a try! ;-)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby pbakker » Tue Sep 12, 2006 3:59 pm

I tried just in Developer, but through "Open solution". To my knowledge, the entire solution is reloaded, so it should work I think...

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby chartpacs » Wed Sep 13, 2006 12:13 am

When creating global dataproviders of type INTEGER or NUMBER, the default value seems to be 0. I was expecting null. Is this the expected behavior? If so, would you consider making the default null? As of now, I have to remember to set the default value myself. Not the most pressing issue, but it would just be one less thing to worry about.
Regards,
Servoy Developer
Version 3.1 beta2-build 401
Java version 1.5.0_06-64, Mac OS X 10.4.8
User avatar
chartpacs
 
Posts: 188
Joined: Wed May 10, 2006 6:50 pm
Location: Cleveland, OH

Postby Jan Blok » Wed Sep 13, 2006 3:58 pm

pbakker wrote:Regarding the post if addTableFilterParams still works: figured out that you can only set these filter params in the onSolutionLoad method. If it's done in the onload method for the first form based on the table you want to set the filters on, it doesn't work: they do not get set, eventhough the function returns true as a result...

The docs say that you need to apply the filters before the foundset is loaded: when they get set as the first thing in the onLoad method for a form, I would have thought they are set early enough.

Is this an incorrect assumption?

It can be to late yes, foundset can already be accessed from a script, onSolutionLoad is before any form init.
btw see http://forum.servoy.com/viewtopic.php?t=4782&start=15
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby Jan Blok » Wed Sep 13, 2006 4:02 pm

pbakker wrote:I'm trying to add a filter to a table using databasemanager.addTableFilterParam, but whatever syntax I try, no filter is added.

Can it be that this functionality is broken in the latest build?

works fine for us in Servoy 3.0 rc4, we did fix the filter icw typeahead see http://forum.servoy.com/viewtopic.php?t=4782&start=15
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby pbakker » Wed Sep 13, 2006 4:17 pm

Jan, tnx for fixing the typeahead - tablefilterparam issue.

With regards to the addtablefilterparams only working in the onSolutionLoad: they really only work there. If I have no onsolutionLoad and as first thing in the onLoad method of the first form the addTableFilterParams, even then they do not work.

I can live with it, but it might be mentioned more clearly in the docs.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby pbakker » Wed Sep 13, 2006 4:37 pm

Code: Select all
//Get the edited records outstanding for a save
var array = databaseManager.getEditedRecords()
for( var i = 0 ; i < array.length ; i++ )
{
   var record = array[i];
   //use for example databaseManager.getChangedRecordData(record) here;
}


contrary to my earlier post, the sampelcode above does work. Dunno what I screwed up to make it stop working...

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

PreviousNext

Return to Latest Releases

Who is online

Users browsing this forum: No registered users and 14 guests