Servoy 4.1.4

Has there been a change in Tabsequence in combination with tableview.

My application is not working anymore like version 4.1.3
My tabsequence is containing 2 fields:

  • Amount (field in the tableview)
  • OK button (button in the ‘Trailing Grand Summary’ part (because summed totals are shown there also)

In 4.1.3 it seem to work that onFocusLost on Amount that controller.getSelectedIndex() remained on the last record in the tableview
Now in 4.1.4 it looks like that the controller.getSelectedIndex() is set to 1 , so controller skips to first record in foundset
Now I can’t check anymore in the onFocusLost method if I was on the last record

if (controller.getSelectedIndex() == controller.getMaxRecordIndex())

Can someone confirm that there was a change in behavior in Tabsequence in combination with TableView? And is the new behavior like it should work or is it a bug introduced when maybe fixing another issue?

Martin

Yes, there is a change with tabSequence and table-views for this case:
[fix] 223385 Tab order on Table View mode broken

The case reported that tabSequence does not work in table-view. The fix was to add tab-sequence behavior to table view columns.
So now, what you probably get is that only column “Amount” will get focus in the table when tabbing (jumping from one record to another) - expected behavior, because it’s the only column in the table that is part of the tab-sequence.
Previously , after focus was lost on “Amount” because of tab, you would probably get focus on the next column of the same row (tab sequence was ignored) instead of the same column of next/previous row.

To have it working as before, removing “Amount” from tab-seq. should be enough. (also be aware that specifying tab-sequence in smart client table-view will override some standard UI behavior that varies a bit with cross-platform, look&feels, JRE versions, so if you are going to use this make some tests with TAB/SHIFT+TAB on your table-views).

Hi Andrei,

Unfortunately what you desribe as solution doesn’t work for me.
On show of the form, I want to have the focus on the ‘Amount’ field, but because the amount field isn’t anymore in the tab-sequence, the application doesn’t work like it should work.

I want to have focus first on the amount.
In the onFocusLost trigger I check if the controller.selectIndex() = controller.getMaxRecordIndex() and if that is the case AND the amount is zero, then the focus must go to the ‘OK’ button.
If the amount is not zero, then a new record is created (controller.newRecord(false)), record is added as last record and same procedure is done again.

Are there any other solutions?

Martin

Hi Martin,

What did you do in 4.1.3 to make ‘Amount’ get focus when form is shown? Didn’t you do “el.requestFocus()”? If so, it should work in 4.1.4 as well.
I am asking because, as far as I know, putting a column field in table view as first in the tab-sequence doesn’t make it get focus when form is shown in 4.1.3. (I guess you would expect that column should get focus on the first row of the table)

I suggested you remove table column fields from tab-sequence to get the same behavior as in 4.1.3 - so that when you tab out of the last row’s ‘Amount’ column focus will just go to the next column on the same row (because it’s not the last column) instead of going to the next ‘Amount’ field in the table (that would be the first row). This way the selected record doesn’t change and the controller.selectIndex() check works.

So in less words, I didn’t understand why my suggestion doesn’t work in your case :).

Hi Andrei,

The selectIndex() problem seems to be solved with your solution.
Only the first time the form is shown, the focus needs to set the focus on the amount field (the amount field is the only field in the tableview and the form is loaded in a open dialog)
I see that the focus is not set. Also the select on enter is ON on this field,

So in the onShow of the form I’ve put:

controller.newRecord()
elements.amount.requestFocus(true)

[attachment=0]Capture.PNG[/attachment]

The TabSequence now only contains the OK-button + one of the fields you see next to the OK-button

And if the ‘Amount’ field is part of the tab-sequence, does the requesFocus() work?
I was also thinking it would be safer to base your last row check on focus gain (you read the selected index on focus gain and use it on focus lost) - this way you wouldn’t depend on row changing before you get the focus lost event. You would also need to read the value of the ‘Amount’ from the last record then.

You can use this suggestion if keeping the field in the tab-sequence will make initial focus work.
But requestFocus() should work the same in 4.1.4 as in 4.1.3 and shouldn’t be related to the tab sequence change - so please file a case for this.

I can’t seem to get my 4.1.3 to upgrade to 4.1.4. I’m on WinXP. Here’s what I’ve done.

1 - made backup of my ‘Servoy 4.1.3’ folder
2 - Opened a DOS prompt, navigated to the ‘Servoy 4.1.3’ folder and Ran the updater in the DOS prompt as shown below.

Note that I do also have a working 4.1.4 version installed in a folder called ‘Servoy 4.1.4 (clean install)’ and it is build 681. I installed that with the servoy_installer.exe I downloaded from the Servoy website. But my 4.1.3 is build 672. It’s as if the updater is seeing the Servoy in the ‘clean install’ folder instead of the one in the ‘Servoy 4.1.4’ folder.

Thanks for your help.

We are now using 4.1.4 as server with our solutions - everything seems allright.

On the contrary, developer refuse to work with our solutions - it crashes when opening our solutions, either on Mac OS or Windows.

Our trouble seem to be the size of our main Library module ‘global.js’ file which is pretty big with 27’002 lines of code for more than one million chars. Does anybody heard about a size limitation which may be introduced since 4.1.4 (it worked in 4.1.3) ?

Error is: stack overflow

Any idea?

About the update. Looks like the 4.1.3 is already updated; does it still report 4.1.3 when launching dev./app. server?
There is a possibility that if during the first update attempt the update process was interrupted it would report new version even if the update did not completely finish.

About the problem with developer not loading solutions. We will need to have a look at that stack trace. Please create a case containing the stack overflow trace; we may also need a sample js file but the stack might be enough for now.
It is not necessarily due to the size of the file…
http://crm.servoy.com/servoy-webclient/ … oy_support

Yes Developer it’s still reporting 4.1.3 on the splash screen and in the Help>>About.
I don’t recall interrupting an upgrade attempt.
Sounds like I’ll just have to move files into my clean 4.1.4 installation folder and hope I don’t screw it up. Unless you have any other ideas…