Context menu - edit the list item

I've added context Menu items to the items on the list

Something

With the context Menu, I've added two elements, one for delete and quickly change an attribute of that object. The question is, how do you take the elementID the context menu I know what item to edit or delete?

As I do with the onclick event.

That's how I add the context Menu.

var myItem = {actionId: '2', label: 'Remove', icon:'local:///images/icons/remove.png'},
        contexts = ["myContext"];
    blackberry.ui.contextmenu.addItem(contexts, myItem, function() {
        toast('You clicked Remove');
    });
    var myItem = {actionId: '1', label: 'Stop', icon:'local:///images/icons/stop.png'},
        contexts = ["myContext"];
    blackberry.ui.contextmenu.addItem(contexts, myItem, function() {
        toast('You clicked Stop');
    });

Ideally, I would like to replace the automatic button 'Cancel' which shows with the "delete" button instead of creating an extra one for it.

Thanks for any help!

In fact, you can speciy this assistance in support for the webworks-Framework data as a JSON object. I have a blog sitting around that I still have to post... . So here's the gist of it:

((1 when you create the data webworks context attribute you can specify 2 types of data 1) a string or 2) a JSON object. The JSON object is in the following form:

-"{'id': , 'type': , 'header': , 'subtitle': }" "

These data will be analyzed by the custom context API JSON and set your headers when the CCM appears, as well as send it back the ID it was chosen for your reminder.

2. This is why inside your reminder to add point put a parameter:

var myItem = {actionId: '2', label: 'Remove', icon:'local:///images/icons/remove.png'},
        contexts = ["myContext"];
    blackberry.ui.contextmenu.addItem(contexts, myItem, function(Id) {
        toast('You clicked Remove on id:' + Id);
    });
    var myItem = {actionId: '1', label: 'Stop', icon:'local:///images/icons/stop.png'},
        contexts = ["myContext"];
    blackberry.ui.contextmenu.addItem(contexts, myItem, function(Id) {
        toast('You clicked Stop on id:' + Id);
    });

Give that a shot and let me know how it goes

Tags: BlackBerry Developers

Similar Questions

  • Context menu in the list field

    Hi, I want to make the context menu, which will apper when the user clicks on an item in the list filed. It will be displayed right on the field.

    I don't see my context menu when the user clicks the button menu blackberry.

    Thank you.

    Finally that I do.

    I take a look at the example of ContactListDemo. Now it's working.

    I put this code in my screen main clas.

       protected void makeMenu(Menu menu, int instance)
            {
    
              menu.add(_viewEmailMenuItem);
              super.makeMenu(menu, instance);
            }
    
          private class ViewEmailMenuItem extends MenuItem
            {
                public ViewEmailMenuItem()
                {
                    super("View Email", 0x00000000, 0);
                }
    
                public void run()
                {
                    Dialog.inform("You clicked.");
                }
            }
    

    I'll open another thread about removing default menu items. See all keyboard, switching Applications and full menu.

  • Is it possible to edit Firefox context menu to the standard address for the displayed Web pages?

    Is it possible to edit Firefox context menu to the standard address for the displayed Web pages? Often, I want to save an image on a page. Sometimes I "slip" and press "Send Image" when I want to "Save Image under" and sit and wait for the default page - send an email to come, then shut up, juggling its dialog boxes "are you sure". It is a way of trying to manage a blunder. Basically I want an element directly from a page by email. Is it possible that I can simply remove "Send Image" from the context menu?

    It is possible with the Menu Editor extension:

    https://addons.Mozilla.org/en-us/Firefox/addon/710

  • How to add the menu item in the context menu of the Gallery

    Hi all

    I am new bie BlackBerrry development. Does anyone know how to add a menu item in the context menu of the BlackBerry Gallery. In other words, when I am browsing photos in the Gallery, click on the menu, there will be a configurable option so that my request will be executed when I select this item.

    Thank you
    TuanSandman

    See this article.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800367/How_To _...

    Check the class ApplicationMenuItemRepository for applications where you can add the custom menu item.

  • Show the popup inside the list item (JDEV 12 c)

    Hi all

    I'm having a problem when I try to display the pop-up window on an image, click.

    Inside the image, there is the showPopupBehaviour that triggers the popup.

    It is not working properly if I put the popup on the outside of the list item, but the problem is that I need inside so I can view the attributes of each element.

    The list with the elements (each icon should trigger the popup with information components):

    popup issue.png

    Best regards

    Luis Cabaco

    The problem is not the popup, but how you load the data from the context menu.

    The popup will match every time, only data changes.

    Make sure that the popup contentDelivery has the value "lazyUncached".

    Timo

  • Strange behaviour of the context menu in the pop-up window to disable the option

    Hello

    I have the table with the context menu of the pop-up window

    < f: facet name = "contextMenu" >
    < af:popup binding = "#{backingBeanScope.backing_jsf_fragments_postoffice_ContentMovementsView.p1}" id = "p1" contentDelivery = "immediate" > "
    < af:menu text = "menu 2" binding = "#{backingBeanScope.backing_jsf_fragments_postoffice_ContentMovementsView.m2}" id = "m2" > "
    < af:commandMenuItem text = "#{web_Bundle ['label.toolbar.menu.item.record.edit']}" "
    Binding = "#{backingBeanScope.backing_jsf_fragments_postoffice_ContentMovementsView.cmi3}" id = 'cmi3' "
    actionListener = "#{backingBeanScope.backing_jsf_fragments_postoffice_ContentMovementsView.showEditBookRecordPopupActionListener} '"
    Disabled = ' #{bindings. " RecordStateName.inputValue == 'ARRANGED'} "/ >"

    disabled the option works strange. When I right click on the folder with RecordStateName.inputValue = 'ARRANGED' menuItem is enabled. By selecting this menuItem enabled, nothing happens but menuItem is disabled. Disabled menuItem never going back active even I right click RecordStateName.inputValue "ARRANGED" <>and click on disabled menuItem does nothing.

    Help me how do to turn menuItem in context menu of the pop-up window.

    I use JD Studio Edition Version 11.1.1.5.0 on Weblogic 11.1.1.5

    Thanks in advance

    Hello

    You must use contentDelivery = "lazyUncached" to the context menu for re-read its content.

    Frank

  • Failed to create the menu popup JavaScript with to display the context Menu with the help of add behaviors

    Whenever I load a page with this added behavior and test it with my link, I get a message "error on Page".

    Here's what I do:

    Create a new HTML page in Dreamweaver 8.0.2 and save it.

    Add a hyperlink in the Insert-> menu hyperlink. Do not put anything in it except a few example of text; "THIS IS a TEST", or something.

    Select the hyperlink and choose "Show the context Menu" in the tag behaviors menu tab ' + '. The dialog box will appear.

    Add a single item and add a link to a page. Do not change the other options. Click OK to close the dialog box and the code will be added to the page.

    Save the HTML page again and press F12 to load the page on your test server and display them in a browser.

    Hover your mouse over the link to test. Nothing happens and there is a message in the status bar at the bottom of the browser, "error on Page".

    OK, it works. I saw the source file that are listed there, but I assumed that Dreamweaver would be to download the file with the HTML file to test on my test server. Usually, I'm prompted to download all the dependent files. Is there an exhibitor or dreamweaver do not miss this link?

    I'm sold on convictions explained in the rants you have linked, but only after I see that Dreamweaver menus don't work. It is not entirely necessary for my completely dependent users of my menus, they are only a feature of page layout.

    Since I have the ear, maybe you could tell me something before my attempt it: is it possible to generate the JavaScript using PHP? I would like to include JavaScript in the context of records with PHP MySQL. Is there another possible solution from PHP? I guess that ASP is a solution already and maybe Flash too.

    This is the kind of page I'm working on that:

    http://www.symbiota.com/MiloTrial/witnesses.php

    I would like to see a drop down menu for each trial where the number of witnesses is less than 10 to save someone the trouble to open a new page just to see a list of ten names.

  • Upcoming context menu in the screenshot using Display.Screenshot

    Hi all

    I have a Menu item. When click on that I take screenshot, but I also get the context menu in the screenshot. I want only the screenshot to the screen behind the context menu.

    Pointers for this?

    Thanks in advance,

    Sandeep

    Thanks for you answers.

    I tried to have the timer also option to wait for a while before taking screenshot didn't work.

    Then I tried after option, it worked. I've added a call to repaint before taking a screenshot. Is this a good method to do?

    // Added this line before taking screenshot UiApplication.getUiApplication().repaint();
    Display.screenshot(bitmap,0,0,Display.getWidth(),Display.getHeight());
    

    I'll also explore the options mentioned by you.

    Thank you

    Sandeep

  • Add context menu of the taskbar using the registry editor

    I am able to add context menu items in the background of the Office (HKEY_CLASSES_ROOT\DesktopBackground\Shell) or records (HKEY_CLASSES_ROOT\Folder\Shell) but I can't find the key needed to do this to the taskbar. What is it?

    As far as I KNOW, you can add items to the context menu of the taskbar. All we can add is deskbands and custom toolbars (if you are a programmer.)

  • Limit the width of the list item

    Hi all

    I use Oracle Application express 4.2.
    I have change a number filed for select list and created a dynamic lov to it.

    the problem is that its width increases dynamically.
    means, if I have a value "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.
    Width of the list will be the same length of the above "AAA...". ».


    How can I limit the width of the list item to a specific value? There is no such property for this it.

    Thank you.

    -Edit the item selection list.
    -Find the section 'Element '.
    -Enter the following value for the parameter "Attributes of the HTML Form element": style = "width: 100px;"
    -Adjust the number of pixels to your needs.

  • Context menu of the object library

    I created a bar of navigation flight path images and popups with links. I just inserted the navigation bar in the library as an object so that it can be placed in all the pages of my site. However, when you insert the navigation bar object into a new page, the text and links do not copy on the behaviour of the context menu.

    The flight path images work fine, but I can't get the popup to work after it is inserted into a new page. The links in the pop-up menu will change frequently so I want to be able to change just the file source and Dreamweaver to update automatically the other 40 pages +. Y at - it solution or a better way?

    Thanks for your time.

    > Is there a solution or a better way?

    There are two solutions * and * best ways.

    1. never use these context menus in DW/FW. They are clumsy, tedious, and
    simply broken.

    Check the uberlink and tutorials at PVII m
    ( http://www.projectseven.com/)

    and the tutorial/articles instead of Thierry Navbar
    ( http://tjkdesign.com/articles/dropdown/)

    Or this one (most recent article):
    ( http://tjkdesign.com/articles/Pure_CSS_Dropdown_Menus.asp)

    Or it will quickly, click here.

    http://www.Projectseven.com/tutorials/navigation/auto_hide/index.htm

    2 consider using models of DW, or inclusions side server to resolve your
    question interview (having to make changes to each page). Read about them
    the two DW F1 help.

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "eroc121" wrote in message
    News:ell5al$7h5$1@forums. Macromedia.com...
    > I created a composed the menus pop up navigation bar and the flight path images
    > with
    > Links. I have that insert the navigation bar in the library as an object so
    > who
    > it can be placed in all the pages of my site. However, when
    > insertion
    > the purpose of navigation in a new page, the text and links bar do not copy
    > on
    > with the behaviour of the context menu.
    >
    > Flight path images work fine, but I can't get the popup to work
    > after
    > inserting into a new page. The links in the pop-up menu will be
    > changing
    > frequently so I want to be able to simply edit the source file and have
    > Dreamweaver automatically update other pages 40 +. Is there a solution
    > or
    > best way?
    >
    > Thanks for your time.
    >

  • Context menu of the site overrides Firefox, so there is no orthographic integrated

    When I right click in a text area, menu contextual of the client program can't, Firefox, so I can't use spell checker integrated in Firefox, such as the suggested corrections options and "add to Dictionary". Which is frustrating, because the spell checker find new words and typos, but I can't do anything with them, because the context menu of the client program gets in the way.

    Is it possible to replace the integrated right-click to say, left click spell check menu or a button on the main browser?

    Hello sachss, you can turn off the ability for Web sites to replace the context menu in the Explorer - enter Subject: config in the bar firefox address (confirm the message information where it appears) & search for the preference named dom.event.contextmenu.enabled. Double-click it and change its value to false.

  • Is it possible to prevent the right click context menu of the combination of Stop/Reload?

    Is it possible (subject: config tweak or something) to prevent the context menu of the combination of Stop/Reload?

    Screenshot of what I mean: http://picsend.net/images/873089StupidReloadSto.png

    Try to add this code in the file userChrome.css below default @namespace.

    Customization files (interface) userChrome.css and userContent.css (Web sites) are located in the chrome folder in the user profile folder.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #context-stop,#context-reload[hidden="true"] { display: -moz-box!important; }
  • Refuses to pages to center the list items correctly (Pages 5.6.1)

    Hi guys! There is a problem with centering of the list items. When I create one of all kinds (numbered for example) and you want to place it in the center of the document, I get this:

    To move it to the right place (and I doubt that it is in fact a true Center) I need to use the list tab and use the left alignment as in the following image:

    Is there a way to make Pages to do things - to move the text with a number when I want to place it in the center of the document?

    Tried everything. Nothing works.

    Thanks in advance!

    [deleted - / viking] Thought I had it fixed, but apparently not.

  • 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.

Maybe you are looking for

  • Plugin Flash does not work

    I installed the latest version of the plugin Flash (11.3.300.214). Videos appear again, as whites in all versions of Firefox, although they work properly with Chrome. What could be the reason? I have only the AdBlock addon, and it cannot be the cause

  • Portege R400 - Firmware update fails for 3G card

    During the Firmwareupgrade of the G 3 embedded (expedite EU870D) in my protégé R400 card, I have a power fail. The next time you start, I can't countinue with the upgrade. The card no longer works. The Modem and the COM Ports, I don't see in Device M

  • Qosmio F20-136: where to get the DVB - T and TV lead?

    Hello I wonder if someone can help me. I bought my F20 end of last year, but never used until now due to working abroad. I bought Currys in the kingslynn store, previously owned. Now I just looking for the remote control and the rest material such as

  • DC7700 Compatible processors

    Hey everybody.  I am new to the forum and do not know if this is where I can post my questions CPU. I recently found in possession of a DC7700 with Pentium D 945 @3. 40 GHz.  I know this is an old PC, but it works very well with Win8.  I was looking

  • is there a rear camera on 6 16 GB ipod?

    is there a rear camera on 6 16 GB ipod?