ActionItem question in a context menu

Hello

I am trying to add a context menu to list items. That's how I started:

            ListView {
                id: tasksList
                objectName: "tasksList"
                layout: StackListLayout {
                    headerMode: ListHeaderMode.Sticky
                }
                dataModel: tasksModel

                listItemComponents: [
                    ListItemComponent {
                        type: "item"
                        StandardListItem {
                            imageSpaceReserved: false
                            title: ListItemData.title

                            contextActions: [
                                ActionSet {
                                    title: contentView.title
                                    ActionItem {
                                        title: "View"
                                        imageSource: "asset:///images/email.png"

                                        onTriggered: {
                                            var page = taskPageDefinition.createObject();
                                            nav.push(page);
                                        }
                                    }
                                    ActionItem {
                                        title: contentView.done == 0 ? "Done" : "Todo"
                                        imageSource: "asset:///images/email.png"
                                    }
                                }
                            ]
                        }
                    },
                    ListItemComponent {
                        type: "header"
                        Header {
                            title: ListItemData == 1 ? "Done" : "Todo"
                        }
                    }
                ]

Two points appear correctly. However, the onTriggered is never called. If I move the table of contextActions up to the ListView, it works. However, headers and the empty area of the list trigger the context menu, which is not what I want.

Why the onTriggered slot is not called?

Thank you.

I guess that onTrigger is called, but taskPageDefinition and nav are not visible because the ListItemComponents have their own field of visibility.

If the id of the ListItemComponent is rootId, then off elements are accessed like this:

rootId.ListItem.view.someJavaScriptFunction)

Set someJavaScriptFunction inside ListView. Inside this function, it is possible to access other objects defined in the qml file.

This thread has an example:

http://supportforums.BlackBerry.com/T5/Cascades-development/ContextActions-inside-ListItem-can-not-a...

Tags: BlackBerry Developers

Similar Questions

  • Call attachedobject from context menu

    Dear developers

    When I press an action in the contextmenu in my list, I want to open a sheet that is attached to my page. But when I try that, he repeated to me that it can not find this sheet. Is it correct to say that the contextmenu knows only the element where it is defined in? I thought that my call might be spread until he found, but this isn't what he does.

    I need that attachedobject also in my page, is not possible to define it in the same element that where my context menu is defined in.

    Thanks in advance

    ListItemComponents have their own field of visibility. This thread has a similar problem and workaround:

    http://supportforums.BlackBerry.com/T5/Cascades-development/ActionItem-issue-in-a-context-menu/m-p/2...

    It is also possible to use this hack to keep a global pointer to the page:

    http://supportforums.BlackBerry.com/T5/Cascades-development/variable-object-visibility-in-ListViewIt...

  • Tree with action listener node context menu attached to a bean - question

    Hello

    I have a tree node that contains a context menu and a popup. The Popup has a group that has a menu with two menu items. Each menu item has a menu-> to a bean that I created-> #{MenuBean.cmi1_action}. The actions are to add a node to the tree, or remove a node. All parts are connected together and work fine.

    The question is, how do I get a reference to the data node was selected with the right click to launch the popup?

    In addition, from code created as a bean, Java what is the best way to refer to all objects in the user interface?

    Ideally, I would like to put the code in the bean to add or remove a node in the tree and then the table that the data in the tree comes.

    Thanks Bob

    PS, here's the code:

    < af:tree id = "t1" value = "#{bindings." Var OrdersView1.treeModel}' = 'node '.
    selectionListener = "#{bindings." RowSelection OrdersView1.treeModel.makeCurrent}"'unique' = >
    < f: facet name = "nodeStamp" >
    < af:group id = "g2" >
    < af:outputText value = "#{node}" id = "ot28" / >
    < / af:group >
    < / f: facet >
    < f: facet name = "contextMenu" >
    < childCreation = "deferred" autoCancel af:popup = "disabled" id = "p1" >
    < af:panelGroupLayout id = "pgl2" >
    < af:menu text = "menu 1" id = 'm2' >
    < af:commandMenuItem text = "add node" id = "cmi1.
    action = "#{MenuBean.cmi1_action}" / >
    < text af:commandMenuItem = "Delete node" id = "cmi2.
    action = "#{MenuBean.cmi2_action}" / >
    < / af:menu >
    < / af:panelGroupLayout >
    < / af:popup >
    < / f: facet >
    < / af:tree >

    Here's the BEAN:

    Overview;



    public class {MenuAction
    public MenuAction() {}
    }

    public String cl4_action() {}
    Add the code in the event here...
    System.out.println ("Menu clicked...");
    Returns a null value.
    }

    public String cmi1_action() {}
    Add the code in the event here...

    System.out.println ("Menu Clicked.1..");
    Returns a null value.
    }

    The validation operation is available at the level of the data control - so select the data control, you would see the operation.

    Check the screenshot:
    http://adfsampleapplications.googlecode.com/svn/trunk/images/commitoperation.PNG

    Thank you
    Nini

  • Starting stupid question, where is the context menu for the project?

    9 online help tell how make to enable some features in the project view toggle the preview area elements, change the size of thumbnail. The help says:

    «Right/ctrl-click the project view, and then select one of the following:...» »

    and it shows a screenshot of the menu, I need (http://help.adobe.com/en_US/premiereelements/using/WS5D044C3B-1939-4c8e-BC5A-97D122D4D73F. html).

    But no matter where I right click on the project view, I can't this context menu. If I'm on an item in the list, I get a menu with Clipboard functions, interpret the film, etc. No "Thumbnails" option or "views". No menu at all if I right click (or ctrl-click) click anywhere else. I've tried to get this context menu... what in the world I am doing wrong?

    Thank you

    -Mark

    My book offers more detailed advice.

    First, go to the window menu and select the option to display docking headers. Then in the upper right of the project Panel, click on the > button.

    These options are available through the context menu also, if you right-click on an empty spot on the project Panel, after the list of media clips.

  • The context menu 'this framework' is missing

    There are two users in question, the two Firefox running on Windows 7 36.0.1. When right clicking on a frame in a Web site, they have a context menu option 'the framework', echoes cascading on to provide various actions you can take (this frame printed, etc.). The other user doesn't have this option. To the best of my knowledge, the two users are running installs similar: the default collection of plug-ins that are enabled in our enterprise environment, they do not have twisted all topic parameters: config, etc. Why 'This framework' context menu would only not available for one of them? Is there a way to force be activated?

    I found it...

    I re-read your posts tonight and spent some time tinkering with Firefox on my machine at home (36.0.3 on Win8.1). I was watching my mailbox in OWA, which has a shared mailbox added as well. I discovered that the messages in the shared mailbox Inbox had the option of this framework in the context menu, while the Inbox has no messages in my personal mailbox.

    A little back of comparison and I finally noticed: display the list of my Inbox is configured to display Conversations by Date (see screenshot). However, the shared mailbox Inbox had the Conversations view option deselected.

    When the Conversations view option is disabled, OWA displayed each message in the reading pane in a frame. In Conversations mode, it seems to use CSS for the reading instead of this pane.

    Thank you for your help is in the right direction.

  • Firefox always displays all the possible options in the context menu

    When I select some text on a web site and right-click, I get a popup menu with about 50 options.

    Some earlier, archived posts have addressed one of the causes of this - extensions - but disable my extensions and restarting did not work for me. I always get the context menu options-50.

    Here are the previous posts:
    https://support.Mozilla.org/en-us/questions/955270
    https://support.Mozilla.org/en-us/questions/951383

    Do a clean reinstall and remove the Firefox program before (re) install a new copy of the current version of Firefox.

    Download a new copy of Firefox and save the file to the desktop.

    If possible to uninstall your current version of Firefox to clean the Windows registry and settings in the security software.

    • Do NOT remove the "personal data" when you uninstall your current version of Firefox, because this will remove all profile folders and you lose personal data such as bookmarks and passwords including data profiles created by other versions of Firefox.

    Remove the Firefox program before installation newly downloaded copy of the Firefox installer.

    • (32-bit Windows) "C:\Program Files\Mozilla Firefox\"
    • (Windows 64 bit) "C:\Program Files (x 86) \Mozilla.

    Your bookmarks and other personal data are stored in the Firefox profile folder and will not be affected by a uninstall and (re) install, but make sure that 'delete personal data' is NOT selected when you uninstall Firefox.

    If you keep problems also create a new profile.

  • Popup context menu arrows are oversized...

    After having upgraded to 8.1 windows context menu "'(extended menu) flyout arrows are now huge...
    I thought it could have been my DPI which is 108 (so I corrected the remarks: config setting), or it could be something in
    My chrome.css file...
    It is not of the foregoing, it seems to me.
    Looking at a new installation of all night also makes these oversized arrows.
    Any thoughts?
    BTW, I do not wish if away from my DPI custom setting in Windows... everything was fine in 8.0?

    We had at least one previous thread: size of triangles bookmarks menu has changed.

    There is a bug on file and a patch is in preparation for Firefox 29. You can follow here: https://support.mozilla.org/questions/975184#answer-496494

    Firefox allows you to custom style rules change or hide the triangles. An approach has been posted here: https://support.mozilla.org/questions/975184#answer-509823

    (I think it's specific to Windows 8.1, so most of the volunteers probably won't be able to get your hands on establish more specific).

  • Is it possible to change the order of items in the context menu of 'link' (I want to 'open in a new window... ("Be the first)?

    I did an upgrade FF v3.6.xx to v17.0.x and found that the order of items in the context menu 'Link' is not the same.
    v3.6 menu looks as follows: 1. "Open link in a new window", 2. "Open link in a new tab,"
    order of the items in menu v17.0 is 1 reverse. "Open link in a new tab", 2. " Open the link in a new window. "
    Position of all the other elements are uninteresting to me.
    How to exchange it two points higher in the contextual menu "link"?

    The two ways are useful:

    "Drag-n-drop" in the Editor window works.

    For my Windows XP path looks like: "C:\Documents and Settings\%account%\Application Data\Mozilla\Firefox\Profiles\%random_name%\chrome\userChrome.css".

  • Private browsing on right context menu on the shortcut icon of Mozilla's Firefox on MS Win XP

    I am already aware that the Mozilla Firefox browser has the ability to always start Firefox in private browsing mode by putting the brand into its Options on...

    However, I noticed that on MS Win 7 OS, we can run Mozilla Firefox browser directly, by clicking on the right click (context menu right) on Mozilla's Firefox shortcut icon (for example in Windows taskbar and Start Menu) and here are the options available immediately: 'Enter private browsing', 'New tab' and 'open a new fenΩtre '.

    Now, my question is, can I do something that has the same options (or at least 'option to Enter private browsing), is also available on that even just before the track described as on MS Win 7 OS, but the MS Win XP operating system also?

    Thank you in advance for help!
    Best regards!

    Bruno.H.

    Create a shortcut on the desktop, and add the switch to the command line to start in private browsing mode.

  • Firefox crashes when you open no matter what context menu - Save as download window, window options, etc.

    This is the third time I had this problem with firefox...

    Firefox crashes when you try to upload images, files, etc. right click context menu opens (with bookmark, save the page, save the image, options etc) but after selecting an option, save the image or another, the real save as dialog box does not open and firefox crashes.

    say many pages open the download and clear history... I can't do that, trying to open the download hangs there, too. like, trying to open any what other dialogues.

    the first time that this has happened, the only solution I could find was a total wipe and re-install (simple uninstall/reinstall didn't work... it had to be weeded manually in the registry).
    the second time that I got just to rebuild my system, so I just do a fresh install on a fresh OS.

    This time I can't seem to solve the problem of uninstalling and re - install...

    Help?

    discovered what he was doing!

    After trying safe mode of firefox and safe mode of windows and any number of other things I gave a little upward for a bit there, but I woke up from a dream in the middle of the night thinking ' based on the conduct in question, it * must * be something in the shell that is the cause. " (Sorry, I dream of geek).

    so I grabbed a shell viewer editor - ShelleExView (http://www.nirsoft.net/utils/shexview.html) (had to use a yucky, any browser to download) and gave him a race.

    I have listed all the extensions of the date they were added as a clsid and trying of think back to when the problem started... about a month or so, after a new system, reinstall. and through a little trial and error disabling, I found the culprit.

    It is an overlay Manager icon set by what is called WagerLogic. After looking into the company's name, I have to assume this was related to one of the annoying "just lost real money on our virtual casino" pop-ups that infest the net nefariously scenic for an easy mark as orphaned Dickens.

    I disabled it and voila! Firefox is still in full function.

  • How to customize the context menu in the legend of plotting the graph of wave?

    I am currently on the creation of a simulation of various control loops as educational objectives. Here, I have a chart in waveform to different signals. Now my question, how to customize the context menu in the track of the Waveform graph legend => when I click on 'image' behind the Plotnames one menu to open options where you can customize the color etc. or plotwidth. But students should not have access to these settings. How can I change or disable this menu? The context menu for the waveform graph, I've already customized by right click on table of waveform-Advanced online-online menu, but for the legend of conspiracy, I have not found this setting...

    Thanks for your answers... I tried different things, but I don't see a solution yet :-(

    See you soon

    DCP

    Hi, STC,

    There have been a number of suggestions for change or disable the table , right-click menu, but I see that this does not affect the context menu of legend , which is what you ask for help with.

    To prevent completely the menu right-click to work, you must disable the chart control entirely. You can do this by double-clicking on the chart and select Advanced Options > active state > disabled. This will prevent the operator to be able to generate a menu right click on the chart control.

    If however you still wanted the table, make a right click menu to work, but the legend made a right-click menu will be disabled, I see two options:

    1. draw a classic decoration square on the legend and the transparent color. This will prevent the mouse clicks to achieve the legend, and transparent it will not interfere with your user interface appearance.

    2 use a Structure of the event to capture the event filter Popup Menu of Activation?  for the chart control. You can then use the Coords property to determine if the mouse is over the legend or not. If this is the case, send faithful away? right Terminal. It will refuse the context menu when the user clicks on the legend of the plot.

  • How can I remove Windows Live Call to the context Menu of Windows Xp Desktop?

     

    I'm unable to remove Windows Live Call in my context Menu of Windows Xp Desktop. Send me instructions on how to remove Windows Live Call in my context Menu of WIndows Xp Desktop. See screenshot.

    Screenshot:

    http://i47.Tinypic.com/2cwqzqg.jpg

    Hello again,

    Another reason for not getting answers in due time, it's that you post in the wrong forum in "answers". This should really be posted in this forum...

    http://answers.Microsoft.com/en-us/windowslive/Forum/Messenger

    .. because Windows live call is part of messenger. By posting your question in the wrong forum you not reach the largest selection of possible contributors, perhaps even eliminate everyone with the appropriate knowledge.

    You have already been informed of the connection of Windows live call with messenger by Srinivas KR in your original question.

    In short, most of the lack of response, you have found is down to your own lack of knowledge about the best way to get results. If you want to use a new tool, it is always a good idea to do some research before you use it so that you can get the best out of it. "Answers" are your information tool and will make you much better work for you if you are reading this...

    http://answers.Microsoft.com/en-us/page/FAQ

    .. .in conjunction with the link I gave in another of your questions.

    That said...

    It doesn't seem like Messenger have the ability to disable this option. Editing the registry appears as a possible solution. Editing the registry when done incorrectly can have serious detrimental effects on your system. Do so at your own risk. I can say that I followed the instructions here...

    http://www.mydigitallife.info/how-to-remove-Windows-Live-call-entry-from-new-ShellNew-menu/

    .. .and they worked on my PC.

    Of course, if you do not use Messenger, you could just uninstall as advised previously by Srinivas KR.

    Tricky

  • Problem VLC media player - option of the context menu "add to vlc media player playlist" disappear in the selection of multiple files.

    OK, here's my problem. I installed VLC. It works very well. I have 'Add to playlist in vlc meadia player' on the pop-up menu file.

    PROBLEM: If I select more than 16 files and then "Add to vlc meadia Player playlist" disappear from the file context menu.

    ANNOYING: This stupid Windows Media Player is still there.

    QUESTION: Why vlc disappear from the file context menu if I select more then 16 files but wmp doesn't?  Is M$ trying to force people to use WMP?

    I also did my OWN program and he added in the context menu, and I discovered that my OWN program has also 16 files limit.

    Why windows deletes non MS program context menu, if I select more than 16 files? How can I solve this problem? I want to have my custom context menu program, even if I select more than 16 files.

    How to fix this?

    Hello
     
    I ask you to post this question on the Microsoft Development Network forums.
    Here is the link:
    http://social.msdn.Microsoft.com/forums/en/windowspro-audiodevelopment/threads
     
    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Add the "Print Directory Listing" option to the context menu of Windows Explorer

    Get the error message when you try to use the "Print Directory Listing" solution found in:
    http://support.microsoft.com/kb/321379/en-us on my new Windows 7 system (from February 2010).

    Could create the context menu of Windows Explorer for the task, but selecting just results in the following error message:

    "This file doesn't have an associatd with her program to perform this action. Please install a program or... to create an association in the default programs control panel. »

    Wentback and checked my Regedit work.  Even deleted the new key and she recreated (just in case.)

    NOTE: I had successfully used the instructions in this article to add "Print Directory Listing features on Windows XP systems, so I reviewed these instructions to see differences and noticed that it * no. * 'associate' step for Vista/Win7 in the article, but this step still shown for XP.»

    And, there seems to be NO WAY to associate a program (in this case, a ".bat") with all of 'record' as target.  Only choices I see these in the 'control panel default programs ' are'. [extensions] "and the protocols.

    So I'm puzzled.

    Any help would be appreciated.

    SJ Pratt

    I just tried this with instructions to the http://support.microsoft.com/kb/321379/en-us link you provided and it worked fine.

    In view of the error you get here are my assumptions to what may be the problem.  Please try these out and answer:

    -Because it denounces, "file doesn't have an associated program.." I would make sure that when you created with Notepad the file .bat you na not to create a file called 'Printdir.bat.txt' or 'Printdir.bat.some_bad_extension '.  If your Windows Explorer settings are set to hide file extensions when you look at a file name, then maybe the REAL file extension you give the command file is being hidden on your part and Windows does not know how to open a file with the extension hidden type.  Make sure that you can see all the file extensions and make sure that the batch file is named with the .bat extension.

    -If you see very well all the file extensions in Windows Explorer and your file is called really Printdir.bat, make sure that you have saved in your root directory of Windows.  If you access %windir% you see Printdir.bat inside there?  If this isn't the case, put it there.  If you do, when you double-click the .bat file Windows run without error and print the dir?  If it works, you know that the batch file works correctly.

    -There's a typing error in the instructions for Vista/Windows 7, check that your registry entries look like this:

    HKEY_CLASSES_ROOT\Directory\shell\Print directory Listing\command

    This shows the new key under shell called "Print Directory Listing" and inside this key/folder another folder/key named "command".

    To within the key/folder 'command', it takes only one entrance with the name of (by default).  Double-click (default) and make sure that its value data is set to:

    Printdir.bat %1

    -You shouldn't need step "the associate" in Windows 7.

    -You can add "Add Print Directory Listing to the context menu of Windows Explorer" for the title of your question so that others can find it.

  • Weird "cmd" option in the context menu for the drive/folder

    Recently, I noticed a strange 'cmd' (as what) command appeared in the context menu for the drive/folder. After pressing it, I get an error "this file doesn't have an associated program to perform this action."

    Efforts to eliminate this question nagging eye, using regedit and various 3rd party menu popup editors, have failed.

    Any ideas why this might have happened?

    Thank you in advance.

    So, I thought about it. It indeed is a corruption of the menu prompt integrated (that I didn't know existed until I started to search for this problem).  The problem and the fix is here:

    There is a key called "command" in HKCR\Directory\shell. Delete the key "cmd" under "shell", and then adding the following code appear to have solved the problem.

    [HKEY_CLASSES_ROOT\Directory\shell]
    @= 'none '.

    [HKEY_CLASSES_ROOT\Directory\shell\Command Prompt]
    'Extended '=' '
    "NoWorkingDirectory"=""

    [HKEY_CLASSES_ROOT\Directory\shell\Command Prompt\command]
    @= "@shell32.dll,-8506.
    'Extended '=' '
    "NoWorkingDirectory"=""

    [HKEY_CLASSES_ROOT\Directory\shell\Command Prompt\command]
    @= "cmd.exe /s /k pushd \"%V\"" "

Maybe you are looking for