Event within grid not triggering

Started by Zereliq, October 17, 2022, 09:19:34 AM

Previous topic - Next topic

Zereliq

I have a grid with multiple listboxes, the listboxes all look as followed:

[list project_code$ (_lock$) event=uren.pxp@update_col][data rowsep=/ valsep=: text=(project_tbl$)][/list]

they all have the same event so uren/pxp@update_col
but whenever i triggered one of the events, the other listboxes will not trigger the events anymore onchange.
(page starts loading on first change in listbox, doesnt load on change second time onchange listbox this include changing the same listbox twice doesnt work the second time)

Is there a different way of triggering these events onchange for a listbox?

Mike King

#1
We were able to replicate this issue and have corrected the JavaScript libraries so if you have downloaded them you will need to re-download again otherwise simply refresh your forms (ctrl-F5 on most browsers) and the event should work.

In order to test this we did make a sample Webster application and I have attached a ZIP file to this message
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Zereliq

Hey Mike,

First of all thanks for taking the time to look into this bug/issue, but sadly after updating my local libraries and using ctrl+f5 on the page with the issue i still get the same problem.  After triggering an event with a listbox it doesnt trigger any other listbox events after. (only after a refresh or trigger from another element will it work again)

Would love to hear your suggestions  ;D

Mike King

Did you try the setup I included in the zip file?

Also what release are you using? We addressed the issue for version 19 -- are you using v18?
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Zereliq

#4
Hey Mike,

Thanks for the suggestion I resolved some issues with our licensekey and checked for updates (updates which returned we're running on the latest version) inside pxplus.exe, however after having done that it seems that i can not update the library nor get the library on a fresh installation. It seems to stop after having some files added in the docroot > lib folder (see attachment two) and after a long while gives me a error #3 (see attachment one)

Mike King

That looks like perhaps the sysimage zip file did not come down cleanly.  Try deleting (or renaming to allow for restore if needed) the docroot/lib directory and try to download again.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Mike King

Were you able to get your list boxes inside a grid to fire events?
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Zereliq

Hi Mike,

Sorry for the long awaited respons, I have gotten the listboxes to trigger events so that works fine now
although I have gotten repeated errors on trying to download the library locally so i decided to keep that globally.

May I make one more suggestion when it comes to grids in Webster+:
Whenever you edit/ update or remove a row it will reset the tabindex, therefor making it sometimes a bit annoying to work in a grid structure.
Now I have checked to fix this with some .JS but sadly without succes, maybe this would be a nice touch in the default webster.js

Thanks again  ;) ;D

Mike King

We will have a look at the issue with the tabindex and also checkout the download library. 
Just to confirm, what version PxPlus are you running?
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Zereliq

running PxPlus 2022 (Version 19.10), as far as i know latest version (we updated when you released the webster updates)

Mike King

Can you advise what the issue is with tabindex?  We have tried a number of variations and it seemed to work for us.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Zereliq

Hey Mike,

Inside a grid; When adding or changing a value for example

WRITE ([grid],rec=[obj])
or
%WEBSTER'UPDATE(FIELD$,VALUE$,GRID$,ROW)

will both reset the tabindex back to the first column in the first row instead of staying where its suppost to be.

See the GIF attachment i have recorded what happends in the current situation.


Mike King

Okay, it appears the issue you are changing the cell contents for the cell that currently has focus?

Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Mike King

As a follow up, If you are updating the cell that currently has focus such that the cell (or row) has to be reloaded you generally will have to use the 'Focus(variable_name$) method to set the focus to the cell/control.

There is no easy way for the system to guess at where you want focus to go when making changes to control that currently has focus so when doing this is is a good idea to force focus.

When forcing focus to a grid cell the name of the variable will be GGGGG-RRR-VVVVV where GGGGG Is the name of the grid, RRR is the row number, and VVVVV is the variable name (e.g. "mygrid-3-accttype$")
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Mike King

We made a small change to the webster JavaScript on our server.  Please refresh your browser (CTRL-F5) and see if that resolves your focus issue.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com