Action items get duplicated - why?

Hello

I have this code to add the point of action on my page:

...

    actions: [
        ActionItem {
            title: "Action 1"
            ActionBar.placement: ActionBarPlacement.OnBar

            onTriggered: {
                myLabel.text = "Action 1 selected!"
            }
        }
    ]

....

} // end of Page

In the preview QML, action that an item is displayed as above - but when I run the application, there are two copies of the action above element. Anyone has any idea why? Thank you.

Refer to this post: http://supportforums.blackberry.com/t5/Cascades-Development/Duplicate-actionbar-buttons/m-p/2157969#...

Tags: BlackBerry Developers

Similar Questions

  • Action items all duplicated

    I have a cascades app that has a toolbar action and elements of overflow. Randomly, once I built and ran it they all came twice. It's been like that since. I'm running on the 10.1.X.1020 Simulator.

    This issue is explained in a good amount of detail in this post:

    http://supportforums.BlackBerry.com/T5/Cascades-development/duplicate-ActionBar-buttons/m-p/2157969#...

  • Several views of web with a set of action items

    I am currently working on an app that has three different webviews and there is a drop down to switch between the three different webviews. Each webview is located in a different container and the list drop-down leather / reveal containers but my action points are: back, Forward and Refresh

    I managed to get the update to work with the three webviews action item:

    onTriggered: {
                        if (container1.visible == true) {
                            webView1.reload()
                        } else if (container2.visible == true) {
                            webView2.reload()
                        } else if (container3.visible == true) {
                            webView3.reload()
                        }
                    }
    

    However, I can't seem to replicate the same functionality with the back and the points of action forward

    enabled: webView1.canGoBack || webView2.canGoBack || webView3.canGoBack
                    onTriggered: {
                        if (container1.visible == true) {
                            webView1.goBack()
                        } else if (container2.visible == true) {
                            webView2.goBack()
                        } else if (container3.visible == true) {
                            webView3.goBack()
                        }
                    }
    

    Pressing the follow-up activity will backward for the first webview and will not work for the other two.

    The three webviews are all on one page so if anyone knows a way to get the action element back working with the views of three web, then that would be great

    I assume that you have 3 WebView side-by-side and that they can be visible or not, so at some point, you have all 3 on the same screen and hitting return should make all go them back, right?

    If so, in the onTriggered section, remove any occurrence of "else".

    It should look like this (sorry for the formatting, I'm on mobile):
    If {(container1.visible)
    webView1.goBack)
    }
    If {(container2.visible)
    webView2.goBack)
    }
    If {(container3.visible)
    webView3.goBack)
    }

    If I was mistaken in my understanding of your application and you have 3 single WebView appears at once, then your code looks good to me, but you can change your formula activated as long as the rear action can be activated, even if the visible WebView can not go back.

  • Tabs and action items as in the hub

    Hi guys,.

    I'm trying to get a TabbedPane working with action on bar points and overflow as you can see in the hub, but I can't get the two working together. If I use a TabbedPane followed do not appear on bar or overflow. If I use a NavigationPane action items work, but I can't use the tabs...

    This is an image I found in the native BlackBerry documentation. Here, you see the button on the tab on the left, three elements of action on bar and the overflow action items opener.

    Can someone please give me a hint or example?

    Kind regards

    Jan

    You must add the ActionItem to the Page, as follows:

    import "Webview"
    import "Account"
    
    TabbedPane {
        tabs: [
            Tab {
                title: qsTr("A Tab")
                Page {
                    Label {
                        text: "Hello World"
                    }
                    actions: [
                        ActionItem {
                            ActionBar.placement: ActionBarPlacement.OnBar
                            title: "An action item"
                        }
                    ]
                }
            }
        ]
    }
    
  • How to dynamically create action item?

    Hi, I want to dynamically create point.

    Before I want to create using qml, but does not seem possible

    http://supportforums.BlackBerry.com/T5/Cascades-development/how-to-create-action-item-of-page-dynami...

    So maybe better to use C++ to create dynamically,

    I'm already try but are still not

    So I have a custom control qml (a Navigation pane)

    name List.qml

    the structure is like this:

    NavigationPane {}

    {Page}

    objectName: myPage

    {Of container

    ....

    }

    }

    }

    How to add action item to this .qml?

    I'm already try that, but failed

    C++ :

    Engine QDeclarativeEngine;

    QDeclarativeComponent component(&engine,QUrl::fromLocalFile("List.qml"));)

    QObject * object = component.create ();

    Page * myPage = object->findChild ("Edit");  Maybe, on that note, I'm wrong implemented? -> not found?

    ActionItem * action1 = ActionItem::create () .title ("first action");

    my page-> addAction (action1, ActionBarPlacement:nBar);

    Remove the object;

    How to create this dynamic Action item?

    Help, please

    Thank you

    Hello

    QML, the object name must be included between "" marks.

    Name of the object of your Page will be:

    objectName: "myPage"
    

    You can reach any CPP QML object like this:

    This excerpt comes from YourProjectName.cpp

    // create scene document from main.qml asset
    // set parent to created document to ensure it exists for the whole
    // application lifetime
    
    QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
        // create root object for the UI
        AbstractPane *root = qml->createRootObject();
        // set created root object as a scene
        app->setScene(root);
    
    //and here comes the findChild method
    Page* qmlPage = root->findChild("myPage");
    

    After this, you can create any object on the side of C++ QML, as your own code:

    ActionItem* action1 = ActionItem::create().title("First action");
    myPage->addAction(action1, ActionBarPlacement:nBar);
    

    Don't have no need to create a QObejct, or declarative stuff.

  • Point for the action Menu spacing: set an action item to appear in the menu of the action at the bottom?

    How do you define an action item to appear in the menu of the action at the bottom? As the point to delete shown here:

    https://developer.BlackBerry.com/Cascades/documentation/Getting_started/porting/mapping.html

    You would most likely want to start with https://developer.blackberry.com/cascades/reference/bb__cascades__deleteactionitem.html and discover the parent class.

    The text suggests that the title and icon appear in the standard only if you do not specify your own when you add the element, so there is hope, you can fake it.

  • jpg, tiff... Cannot zoom in or they get soft, why?

    jpg, tiff... Cannot zoom in or they get soft, why?

    PC, PP cs5.5, 6-core, 32 GB ram...

    I tried jpg, TIF, 30 mg, 3 meg files, 72cpi, 300 dpi, deinterlacing, nothing helps.

    Once I have a 120% zoom or more the GET photos soft & blown. At least that's how they appear on my computer screen & my orders the PP monitor program is correctly set to Hi quality to the two reading & again. I have not issued anything on dvd again to see if it is correct that way.

    Any thoughts? Is there some parrameters PP needs I forget? I have 3 systems & it is the same on all 3.

    You have default image on size scale? If so, turn it off. Then re-import images.

  • Dynamic action to get the value of the item page

    Hello

    I have user 4.2 APEX with DB11g, I have a dynamic action with 2 real action:

    • 1 (value) in a State of variable defined on page like this
    BEGIN
      IF lecture_pkg.is_guest_submit_poll ('PUSH') THEN
        :P0_URL := 'http://www.google.com';
      ELSE
        :P0_URL := 'f?p=&APP_ID.:504:&APP_SESSION.::::P504_POLL_TYPE:PUSH';
      END IF;
    END;
    

    • 2nd (Execute the JavaScript Code) for javascript with setting of sending call which set step 1 "P0_URL" , for example to draw attention of:
    alert('&P0_URL.');
    

    the problem is in the 2nd step, displaying alert is displayed with the null value

    Note that i 1st stage i chose the option "wait for result"

    Any suggestion

    Step 1:

    Items affected

    Selection type - point

    Objects - P0_URL

    Step 2:

    Alert ($x('P0_URL').value);

    Please, make these changes and see if you get what you want.

  • Dynamic action - item value passed is null

    Hello

    I use 4 Apex and having a problem with a DA. I need to get a new registration, based on a category number.

    Here is the code:
    begin
    wwv_flow_api.create_page_da_event (
      p_id => 4693110888588071 + wwv_flow_api.g_id_offset
     ,p_flow_id => wwv_flow.g_flow_id
     ,p_page_id => 2
     ,p_name => 'Get Next Scheme Number'
     ,p_event_sequence => 5
     ,p_triggering_element_type => 'ITEM'
     ,p_triggering_element => 'P2_SCHEME_CAT_CODE'
     ,p_bind_type => 'live'
     ,p_bind_event_type => 'change'
      );
    
    wwv_flow_api.create_page_da_action (
      p_id => 4693422739588087 + wwv_flow_api.g_id_offset
     ,p_flow_id => wwv_flow.g_flow_id
     ,p_page_id => 2
     ,p_event_id => 4693110888588071 + wwv_flow_api.g_id_offset
     ,p_event_result => 'TRUE'
     ,p_action_sequence => 10
     ,p_execute_on_page_init => 'Y'
     ,p_action => 'NATIVE_SET_VALUE'
     ,p_affected_elements_type => 'ITEM'
     ,p_affected_elements => 'P2_SCHEME_NO'
     ,p_attribute_01 => 'FUNCTION_BODY'
     ,p_attribute_06 => 'return SR.GET_NEXT_SCHEME_NO (:P2_SCHEME_CAT_CODE);'
     ,p_attribute_08 => 'Y'
     ,p_attribute_09 => 'N'
     ,p_stop_execution_on_error => 'Y'
     ,p_wait_for_result => 'Y'
     );
    null;
    end;
    /
    The function call connects to the DB and here is the result indicating that a NULL value is passed:
    Timestamp        Package          Unit                     Typ Log Message
    ---------------- ---------------- ------------------------ --- ---------------------------------------------
    20.00.29.067     SR               GET_NEXT_SCHEME_NO       I   Begin - 1
    20.00.29.068     SR               GET_NEXT_SCHEME_NO       D   Get next scheme no for:
    20.00.29.068     SR               GET_NEXT_SCHEME_NO       E   NDF: Could not find a sequence for scheme prefix
    Just so you see that it works:
    sr:plj-Bld@XE> select sr.get_next_scheme_no('SchCatSub') from dual;
    
    SR.GET_NEXT_SCHEME_NO('SCHCATSUB')
    ----------------------------------
                                213501
    
    1 row selected.
    And the newspaper:
    Timestamp        Package          Unit                     Typ Log Message
    ---------------- ---------------- ------------------------ --- ---------------------------------------------
    20.22.09.532     SR               GET_NEXT_SCHEME_NO       I   Begin - 1
    20.22.09.534     SR               GET_NEXT_SCHEME_NO       D   Get next scheme no for: SchCatSub
    20.22.09.534     SR               GET_NEXT_SCHEME_NO       D   Returning: 213501
    20.22.09.535     SR               GET_NEXT_SCHEME_NO       I   End - 1
    Any ideas why Apex does not pass the value of the element to the function call?

    Thank you
    P

    You must set 'Page to present' to be 'P2_SCHEME_CAT_CODE '.

    This takes the value from the browser and affects it in session state, which makes available to your PL/SQL

    Kind regards
    Scott

    blog: [base url - oracle.com] base - oracle.com
    Twitter: [url twitter.com/swesley_perth]@swesley_perth

  • To access the page defined by a dynamic action item

    I have a page element that is defined by a dynamic action. However, if I try to access this page anywhere else on the page element, it is null. Y at - it a specific method to dynamically reference the value of page elements, other than the usual & p2_page_item. reference. TIA.

    Hello!

    Where do you reference point? In another DA, process page?

    & NOM_ELEMENT. the syntax is only for the static text and it will be avoided in SQL and PL/SQL. It will get only value when the page is loaded.

    If you are referencing the element DA or JS, you can get its value with the function $v (for example $v('ITEM_NAME'). If you reference the process item, you can get its value with the standard bind variables syntax (: nom_element) or with the function v (for example v('ITEM_NAME'). If this process is inside the dynamic action, value of the item must be saved before session state.

    BR,
    Marko

  • dataGroup rendered action item selected

    OK, I must be missing something.

    I have a (inches) Panel which has a dataGroup inside.  I also have another Panel (viewPanel) that has a tag of the image in it.  The idea is that the user clicks on an element of rendering in the 'thumb' Panel to show a larger image which will be displayed in "viewPanel. Items in the "thumbs" Panel are rendered by a custom converter.  In the item converter, I have a function of action script called getImage that is supposed to load specific data of the dataGroup in the viewPanel-> Image tag (bigView).  But I have an access of undefined property bigView FB4.  What Miss me?

    itemRenderer = >

    <fx:Script>
              <![CDATA[
                   //This getImage function will handle a click event when user clicks
                   //on thumbnail to get a bigger image to show in viewer panel
                   protected function getImage(event:MouseEvent):void {
                        bigView.load(event.currentTarget());
                   }
              ]]>
         </fx:Script>
    
         <s:states>
    
              <s:State name="normal"  />
              <s:State name="hovered"  />
              <s:State name="selected"  />
    
         </s:states>
    
         <s:BorderContainer top="5" width="100%"
                   height="100%" borderWeight="0">
    
              <s:layout>
    
                   <s:VerticalLayout horizontalAlign="center"  />
    
              </s:layout>
              <s:Label paddingTop="5" text="{data.shortName}"  />
              <s:Image maxWidth="100" maxHeight="100"
                        horizontalAlign="center" verticalAlign="middle"
                        source="{data.imageFile}" click="getImage(event)"  />
    
         </s:BorderContainer>
    

    Is there a better way to do this type of action?

    Tony

    Check out these tutorials http://www.adobe.com/devnet/flex/videotraining.html

    start of day 2 and 3 are on the events

    but well worth watching all the

  • Action Script gets ignored when the object is not Visible

    I spent days trying to get help for that so I'll seriously be happy if someone has the answer.
    I have a simple drag and drop of the game user drop off items in a bag and they disappear obtaining or losing points as they.

    THE PROBLEM!
    Is not a little funny flash where it does not update the variable "score" (action is not all the script) because the object no longer exists! I tried to do without making objects disappear when dropped on the bag and updates the score normally.

    Someone at - there a way around this? I thought I'd put as a button that checks all the visible objects and establishes points in this way but I do not know where to start on this.

    Here is the code I put on each object...

    on {(press)
    StartDrag("");
    }

    on (release) {}
    If (_droptarget == 'Bag') {}
    setProperty (root.rangerssocks, _visible, 0);
    score = score + 1
    }
    on the other
    {
    StopDrag();
    }
    }


    Make sure that the score is a level _root variable and update that way. as you now, score is on the dragged item so it's a question of importance. in frame 1 of the movie root, add

    score = 0; (at the beginning that initializes your score to 0)

    then press the buttons make a
    _root.score += 1;

  • When click the "back" button after filling out web form, I can't, a message says that Firefox must send information that will be rpeat any action... Why can I go back?

    My current Firefox is version 9.0.1 update
    "when I click on the"back"button after filling web form or make payment online etc, I can't go back to my homepage, if I press the BACK BUTTON (arrow) a message said.
    "Firefox must send information that will repeat any action (for example, a search or order confirmation) that was carried out earlier.

    I don't want to re - order or repeat the process over. The only thing I can do is to leave Firefox and start again which is very painful.

    Any solution will be appreciated.

    Older Firefox had this coming message in case you have used the back to go to a page that is requested from the server with the POST data specific to a form previously sent.

    You receive an alert to send POST data if you return to a page or refresh a page that was requested in advance from the server by submitting form via a (hidden) MESSAGE form data.

    Firefox can only make sure to get the same page send this POST form.

    Firefox doesn't know what it means shape data, so Firefox asks for confirmation before sending the form data so action can you take to repeat an action and buy another article or post a message once.

    A way to prevent that pop up is not to use the back button, but to open the links on a page that have been requested from a server by sending a MESSAGE form in a new tab (window) with a middle click or a Ctrl + left click.

    Then you can close the tab or window to go back.

  • "set the restart target action" does not work, why?

    There is an element of "set the restart target action" in the SDF file. I put it to "run a system definition.

    But it does not work. I don't know why. It seems that when the project is canceled, the SystemDefinitionData.nivscfg file is deleted.

    Cancel the deployment of will stop the configuration and mark idle.

    If you restart the RT target by HW button or through the channel "System of command channels", while the configuration is active, it will start the Setup again after the reboot.

    Jiri K.

  • Try Powershell Copy-Item, get the message "there is not enough space on the disk.

    I'm using Powershell 2.

    I'm trying to copy a file, not very complicated.

    Copy-item D:\Outgoing\tsc.sqb D:\Incoming

    I get this:

    Copy-Item: there is not enough space on the disk.
    On line: 1 char: 10
    + Copy-item<  d:\outgoing\tsc.sqb="">
    + CategoryInfo: NotSpecified: (:)) [Copy-Item], IOException)
    + FullyQualifiedErrorId: System.IO.IOException, Microsoft.PowerShell.Commands.CopyItemCommand

    If I replace Copy-Item by Move-Item, everything works fine. I didn't ' t want to move the file, however, simply copy it.

    Any ideas? Files is 230 KB or more.

    Hi BarryFreeman,

    You can ask your question in the TechNet next to all the script help forum:

    http://social.technet.Microsoft.com/forums/en-us/categories/

Maybe you are looking for

  • iPhone 7 more lightning helmet problem

    Here and there, whenever I make a phone call from my iphone 7 more with the headset connected, the person on the other end could not hear my voice. I noticed it mainly to use facetime audio also. I was wondering if someone else has the same problem,

  • Tecra A7 PTA71E - Win XP BSOD

    Hello Since 2007, I have my Tecra. I bought it with win XP. Until the middle of 2011 OS works OK, but not later. When I turned toward the top of the computer, it starts and when the Office was running, I just started with the trackpad or USB mouse on

  • Large external screen on satellite 1900 is not displayed correctly

    Nice dayRecently, I got myself a big 19 "screen and hooked it up to my satellite S 1900-102, a slightly older laptop.The problem is that I can't run to the desired screen resolution, so text and graphics seem blurry.The card inside the machine is an

  • Software installation problems.

    Following a new installation of Windows XP Edition family, I'm unable to install the software for my Logiteck Quickcam Pro 9000. (qc1180.exe) I have had no other problems of installation before or since. The error is 1406.  After many suggestions, Mi

  • C7180: How to change the printer directs c7180

    Printer heads are dirty and need to be cleaned or changed. So far I was able to clean up.