Results 1 to 3 of 3
- 01-16-2013, 11:37 AM
Thread Author #1
What to do if you delete the last item in a list?
I'm 90% finished my app, but if you delete the last item in the list, the best that I can do now is that I disable the button that directed you to the list page. Once the user hits back, they have to use a different button to add data then they can see the list again.
You can't pop() off the page using the signal because my updatePage has a signal and when you save, it pops off, so the signal can't pop off prematurely.
Unfortunately, the ListView is under a Page, which itself is under a NavPane. Only NavePans have "onPopTransitionEnded". - 01-16-2013, 03:10 PM #2
- 01-16-2013, 07:53 PM
Thread Author #3
I suppose I should be more clear. I was too lazy to type it all.
Here's my design:
main.qml (NavPane) -> addData.qml (Page) then pop back to NavPane
or
main.qml (NavPane) -> viewData.qml (Page with ListView) -> [addData.qml (Page or updateData.qml (Page, delete or remove data)]
If the ListView's GroupDataModel is empty, the main.qml will disable the viewData button. That's fine. However, if I am viewing viewData.qml, and there's one entry that I wish to delete, and I delete it, then it pops me back to an empty list. If you close the list, then you're back to main.qml that prevents you from going back to the list.
Question 1: Is it acceptable to leave the user looking at an empty list where he/she can add back some data?
Question 2: If no above, then how can I automatically pop ALL open panes/pages to go back to main.qml (NavPane) IFF the GroupDataModel is empty after deleting.
onCreationCompleted: {} doesn't seem to work for pretty much anything I use it for.
This code is used in a JavaScript signal called by the updateData.qml page whenever an item is deleted. It works because the button on the main.qml page is disabled if the count is 0. Moving this code to onCreationCompleted: {} does nothing simply because onCreationCompleted: {} is used only when the ListView page is created, not updated. Also, within updateData.qml, after an update and/or delete, the page is popped off and destroyed.Code:if (myListView.dataModel.size() == 0) { if (btViewDataProperty) { btViewDataProperty.enabled = false btViewDataProperty.text = "No Data" } }
Question 3: Is there a signal that can be used within a Page {} similar to onPopTransitionEnded: {}? The NavigationPane has it.
Question 4: Would it be wise to use a NavigationPane to push another NavigationPane that houses a ListView that opens the addData.qml/updateData.qml that then when popped off, the second NavigationPane is its parent?
Similar Threads
-
What to do if BB Travel doesnt run on the 9780
By saymen in forum BlackBerry OS AppsReplies: 3Last Post: 05-16-2011, 02:05 PM -
What to do if your BlackBerry Got Wet ? The Solution
By Ahmed G. in forum BlackBerry Curve 8900Replies: 0Last Post: 05-20-2010, 01:48 PM -
What to do if you buy 20 apps on 1 BB, then it breaks, and you get a new one, pinprob
By JoeT6681 in forum BlackBerry OS AppsReplies: 11Last Post: 06-30-2009, 04:40 PM -
What to do if you buy 20 apps on 1 BB, then it breaks, and you get a new one, pinprob
By JoeT6681 in forum BlackBerry Curve 83xxReplies: 11Last Post: 06-30-2009, 04:40 PM -
What to do if handset reconcile doesnt work
By gosling in forum General BlackBerry DiscussionReplies: 1Last Post: 08-05-2008, 06:43 AM

Reply
















