B4J Question [ABMaterial] ABMDatePicker 3.02 Refreshing Issue???

Mashiane

Expert
Licensed User
Longtime User
Hi there

I need some advise please, my 1 pager project is herein attached.

I have an ABMTable with edit functionality, I can 'Open' and 'Copy' each record as I need. The thing is as soon as I do an update of an entry in the modal sheet, whilst the record read from the db is correct, the ABMDatePicker does not get refreshed.

To Reproduce The Issue

1. Compile and run the app (please copy the www folder from your ABMaterial download and put it in the objects folder of the attached zipped project first)
2. Open app on localhost:51045/drpw
3. Click Edit to open any of the holiday entries (take notes of your dates in the modal sheet, these are correct, the logs will also indicate so)
4. Whilst one of the entries are opened on the modal sheet, click 'Save'
5. Back to the table, click Edit to open any of the holiday entries (take note of your date in the modal sheet, they reflect the last saved date. The logs show the correct date has been read from the database though)
6. Now if I exit this page and go to another page and come back to it and 'Edit' any of the records, the modal sheet reflects the correct dates even after the save.

The holidays table



After opening a record (see the log bottom right and the date on the datepicker in the modal sheet)



Opening another record after having done a save of another (the date in the modal sheet reflects the old saved date whilst the record read (bottom right logs) show the correct date)



The .Refresh method has been added to my datepicker source code.

Can someone please advise what I could be missing here please.

Thanks a lot.
 

Attachments

  • drpw.zip
    74.8 KB · Views: 321

stanmiller

Active Member
Licensed User
Longtime User
I downloaded but couldn't build as there are AddJar dependencies I don't have. If you post links to said dependencies I'll take a look.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Well, whilst I dont really understand why this is happening, I have opted to RemoveAllComponents on that cell and re-create them each time I read the record from the db to display the correct date. I had noted that If i saved a record then navigated to the same page, the datepicker displays the correct date. So instead of reloading the page again, I have opted for this fix even if I dont like it.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…