Trying to get my head into B4Xpages. I have a project that has a custom list view page that is loaded from a SQLlite db. This works as expected.
I have options to show some sub sets of items in the SQLlite db but I cannot get the list to clear and reload. I have a clv.Clear in the B4X_PageAppear sub but this is only called once and never again until the app is closed. Have tried closing the page and tried ShowPageAndRemovePreviousPages when returning to the main page but nothing seems to work. Once a set of db rows are loaded into the list view it becomes static and always displays the intitial set of rows loaded.
1. Create a Sub called LoadData and move all code you use to retrieve data from sqlite and populate CLV from P4XPage_Create Sub.
2. Call this Sub whenever you want to refresh CLV data
B4X:
Public Sub LoadData
'1. Get data from sqlite
'''''your code
'2. Populate CLV
'''your code
'3. B4XPage.ShowPage(CurrentPageName)
End Sub
1. Create a Sub called LoadData and move all code you use to retrieve data from sqlite and populate CLV from P4XPage_Create Sub.
2. Call this Sub whenever you want to refresh CLV data
B4X:
Public Sub LoadData
'1. Get data from sqlite
'''''your code
'2. Populate CLV
'''your code
'3. B4XPage.ShowPage(CurrentPageName)
End Sub