Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 83
Registered: ‎02-05-2012
My Device: PRIV
My Carrier: T-Mobile

Using ActionItems on ListView items within QML does not behave as expected

I am trying to provide context actions which are available to ListItems in a ListView (Edit / Delete). After looking over the bucketList example I came up with this QML:


ListView {
    id: accountsListView
    dataModel: GroupDataModel {
       id: accountsDataModel
    listItemComponents: [
        AccountListItem {
	contextActions: [
	    ActionSet {
	        title: "accountActions"
	        ActionItem {
	            title: "Edit"
	            onTriggered: {
	                var selectedItem = accountsListView.selected();
	                console.log("got selected item");
	                console.log("Selected item coming:");
	                for(var i in selectedItem){
	                console.log("Did you catch that?");
	        ActionItem {
	            title: "Delete"



When I try to activate the 'Edit' action, it works intermittently. It works if I:


- Do a Long press on an item in the list

- Remove my finger from the screen

- Then tap the Edit icon


It does not work if I:

- Do a Long press on an item in the list

- Drag my finger over to the context menu (without lifting the finger)

- Lift my finger off the screen over the 'Edit' action


This is confusing behavior as when I 'drag' my finger over to the context menu I can see the name of the action pop-out to the left which implies that I should be able to perform an action.


Has anyone else encountered this behavior? Any solutions? I'd rather not provide unexpected behavior to end users.