pop, a page on the button click

In my main qml Iam having a component of Naviagtion. She pushes another Qml called details page. I removed the back of the navigation pane button

Main.QML

import bb.cascades 1.0
NavigationPane
{
    property alias nav: navPane
    id: navPane
    onPopTransitionEnded: page.destroy()
    Page
     {
          Container
             {
                background: Color.White
                ListView {
                    id: howToList
                    dataModel: XmlDataModel {
                        source: "models/data.xml"
                    }
                    layout: StackListLayout {
                    }
                    listItemComponents: [
                        ListItemComponent {
                            type: "listItem"
                            HowToDu_CustomListItem
                            {
                                title: ListItemData.title
                            }

                        }
                    ]

                    onTriggered: {
                        var page = DetailPage.createObject();
                        navPane.push(page);
                        list1.select(indexPath)

                    } //on trigged
                } //list view        

       } //main container

    }    //page

    attachedObjects: [
        ComponentDefinition
        {
            id:DetailPage
            source: "DetailPage.qml"
        }
    ]
    backButtonsVisible: false

}//nav

My question is:

In the text of the page, I have a button and the click of a button I have to burst the main qml.

DetailPage.qml

import bb.cascades 1.0

Page {

            Container {

                ImageButton
                {
                    defaultImageSource: "asset:///images/backArrow.png"
                    onClicked:
                        {
                          mainPage.nav.pop();
                        }

                }

           }
    attachedObjects: [
        ComponentDefinition {
            id: mainPage
            source: "main.qml"
        }
    ]
}//page

I tried the above code. But it's not working

What I did is:

(1) in the main qml created an alias of the navigationPane property

(2) in the text of the page, I added the main.qml as long as the object attached

(3) in the click of a button detail page I used the code to jump to the page main qml below

onClicked:
                        {
                          mainPage.nav.pop();
                        }

Someone help me please

                    onClicked:
                        {
                          mainPage.nav.pop();
                        }

Here, you can just use:

                    onClicked:
                        {
                          navPane.pop();
                        }

Tags: BlackBerry Developers

Similar Questions

  • Passing a value of item to another page via the button set to redirect to the page

    Hello

    I'm new to APEX and I develop an application to manage Oracle database user accounts.  I have a (8) page that has text elements for the user name and the database name.  I have a submit button (this works very well) who deliver... the ALTER USER statement to reset his password and unlock the account.  I have another button that if:

    1. get the value of username - P8_USERNAME
    2. assign to an element of application - FIND_USER_IN_DB
    3. redirect the page application - page 11

    The issue is that FIND_USER_IN_DB does not get filled and page 11 which is a simple report with the following query:

    SELECT *.

    OF valid_db

    WHERE username =: FIND_USER_IN_DB;

    How to achieve this?

    Thanks for your help.

    Steve

    A page redirect is actually nothing more than the rendering of an anchor tag or call apex.navigation.redirect. The link provided by these is generated when the page is rendered. Thus, when the page is rendered (in charge) and P8_USERNAME session state is NULL, then the link will be an empty value. There is nothing sad about the fact that when you change the value of the element on a page that session state will not change automatically and it's just about understanding session state.

    Let's say that you will present the session before the redirection if status point. Would it change anything? N ° the link, as I pointed out, has already been made, and no substitution of session state not be made on a redirect.

    You'd better be off by submitting the page via the button instead of a redirect. This will set the session state of your object to the desired value. You can then use a branch to redirect to the correct page setting the value of an element whose state of session of P8_USERNAME. You can even choose to use a process or a calculation to set the value of the application instead of by a link element, so that you can keep the application not manipulable by the user element.

  • Avoid the button clicks duplicated in the structure of the event

    Hello

    I have an apparently easy problem that I can't solve. I enclose a VI that illustrates my problem.

    My problem is this: when an event runs, the OK button is disabled, but if the user clicked the event is pending, and when the process is finished, another will start immediately. The only reason why I turn off the button is to avoid this queuing event. The mechanical action of the button is set to the switch until release (so that the button just get after that I have let go of it).

    How can I avoid this?

    Thank you!

    First of all, your mechanical action seems wrong.  By releasing latch and then move the button in the case of the event.  Currently, you use the switch to exit which is contagious stocks on the top and to the bottom of the query.

    Second, do not check the box that says 'Lock Front Panel until the end of the matter for this event'.  Notice that it has parentheses that say "reporter treatment of the actions of the user" which means he waits until the case ends (the date at which the button was reactivated).  You are basically defeating the entire purpose of the deactivation of the control because defer you the intervention of the user until the button has been reactivated.

  • Change the color of the text on the button click

    Hi, how I would change the text with color while the application is running?

    For example, when the user clicks a button, how can I change the color of the editfield with already inserted text?

    I realize that I could add the editifled with different colors, but I was wondering if there is a way to do this without adding new editfield - like refreshing the editfield with different text color.

    Help is very appreciated!

    First, create your own custom class that extends EditField.

    It can be as simple as this:

    public class MyEditField extends EditField {
      private int _color = Color.BLACK;
    
      public void setFontColor(int color) {
        _color = color;
        invalidate();
      }
    
      protected void paint(Graphics g) {
        int prevColor = g.getColor();
        g.setColor(_color);
        super.paint(g);
        g.setColor(prevColor);
      }
    }
    

    Once you have this class, you can use it like this:

    final MyEditField textEntryArea = new MyEditField(...); // any EditField constructor can be used
    
    ...
    FieldChangeListener buttonListener = new FieldChangeListener() {
      public void fieldChanged(Field field, int context) {
        if (field == setToRedButton) {
          textEntryArea.setFontColor(Color.RED);
        } else if (field == setToBlueButton) {
          textEntryArea.setFontColor(Color.BLUE);
        }
        // etc.
      }
    };
    ...
    setToRedButton.setChangeListener(buttonListener);
    setToBlueButton.setChangeListener(buttonListener);
    ...
    

    Edit: fixed a few typos.

  • Warning Dialogues - cannot capture the button clicks

    Now that I can finally connect to the Simulator with the debugger, I can come back and work on my app!

    I'm trying to be on the QNX Dialogue class... specifially the AlertDialogue, that I will use for the warning of use of data like most of you...

    I looked at the example code, but for some reason, I can't click on the events of the Dialogue...

    Here is my code:

    package com.content.modal{  import flash.display.Sprite;  import flash.events.Event;    import flash.events.MouseEvent;
    
     import qnx.dialog.AlertDialog;    import qnx.dialog.DialogSize; import qnx.display.IowWindow; import qnx.events.DialogEvent;
    
      public class AirtimeUsageModal extends Sprite {
    
           private var alert:AlertDialog;
    
          public function AirtimeUsageModal()       {         init();       }
    
           private function init():void      {         alert=new AlertDialog();          alert.title="MY TITLE";           alert.message="MY BLURB HERE.";           alert.addButton("Quit");          alert.addButton("Acknowledge");           alert.dialogSize=DialogSize.SIZE_SMALL;           alert.addEventListener(DialogEvent.DIALOG_BUTTON_CLICKED, alertButtonClicked);            alert.show(IowWindow.getAirWindow().group);
    
          }
    
           private function alertButtonClicked(e:DialogEvent):void       {         trace("Button Clicked Index: " + e.target.selectedIndex);         trace("Button properties Object"+e.target.getItemAt(e.target.selectedIndex));         trace("e.responseBtn" + e.responseBtn);
    
             if (e.responseBtn == "Quit")          {             quitApp();            }         else if (e.responseBtn == "Acknowledge")          {             this.dispatchEvent(new Event("startApp"));            }     }
    
           private function quitApp():void       {         stage.nativeWindow.close();       }
    
       }}
    

    My problem is that I can't capture the click event... my tracks in alertButtonClicked never fire... When I click on a modal button disappears... And I get this in the output:

    Response of dialogue show null null
    Receipt of RESPONSE from the server: @control 1
    BaseDialogService.receiveResponse

    Any ideas what's happening here?

    This is a known bug. Please use EVENT. SELECT a workaround until this has been resolved.

  • Disable a button until all the buttons clicked

    Hello

    I have a menu of 7 buttons on a slide that launch the .xml files from 'Success show script' and show the checkmark. I've got this works well, but I want the button 7, certificate, remain disabled until all 6 user buttons were clicked in order any.

    I wrote various advanced conditional actions, and I can't do things.

    I created 6 variables called topic1, topic2, topic3, etc., defaults to 0.

    The cert of the Action set to move to the slide but I was testing just the IF statement, it does not jump to slide either haha.

    What I'm doing wrong!

    Thanks for advance-METZ

    cap1.pngcap2.pngcap3.png

    Yes, I explained that the first decision should look like in my previous answer.

    First decision "always."

    IF 1 is equal to 1

    Assign Topic1 with 1

    Show... or open a URL of what you wanted to do with the standard action

    Second decision ' CheckComplete

    IF Topic1 is equal to 1 AND

    Topic2 is equal to 1 AND

    ...

    7 turn on the you will need to disable start with, since you say that you do not leave the slide, this can be done with the action on enter

  • Change the background on all pages with the buttons

    I created buttons to change the background of my site to give the visitor the possibility of which is more easy for them to read. But I'm not able to do it for all pages at the same time and maintain the setting. Does anyone have an idea how to do that?

    HTML

    < div align = "center" >

    < form >

    < input type = "button" value = "Beige" onclick = "newbg ('Beige'); "> < br / >

    < input type = "button" value = "Blue" onclick = "newbg('#b0e0e6'); "> < br / >

    < input type = "button" value = "Gray" onclick = "newbg('#dedede'); "> < br / >

    < input type = "button" value = "Green" onclick = "newbg('#bedfc4'); "> < br / >

    < input type = "button" value = "Lavender" onclick = "newbg('#e6e6fa'); "> < br / >

    < input type = "button" value = "Rose" onclick = "newbg('#ffe4e1'); "> < br / >

    < input type = "button" value = "Tan" onclick = "newbg('#f5deb3'); "> < br / >

    < input type = "button" value = "White" onclick = "newbg('#ffffff'); "> < br / >

    < input type = "button" value = "Yellow" onclick = "newbg('#ffffe0'); "> < br / >

    < / make >

    CSS

    a: {background

    color: newbg;

    }

    Google stye sheet switcher scripts with cookies.

    Nancy O.

  • Want to keep track of the button clicks

    Hi, I'm new to Flash and I use CS4.

    What I want to do is to collect a user's comments, and whenever they click a button of some, in this case the button YES, I would like a number added to the var such as partition ++. In this way, I can use a case statement at the end to guide the user to the right product.

    However, my code does not work, so if someone could take a look, I would be grateful.

    Thank you

    var score:Number = 0;
    var score_txt:TextField = new TextField();
    score_txt.x = 150;
    score_txt.y = 125;
    score_txt.width = 100;
    addChild (score_txt);
    
    yes1_btn.addEventListener(MouseEvent.CLICK, yes1);
    function yes1(event:MouseEvent):void {
         soundControl1 = sound1.play();
        gotoAndStop(6);
    }
    
    if (yes1){
         score++
    }
    score_txt.text =  + score +  " total score"
    

    Try to move the lines after the function in the function, even if you don't need the conditional...

    function yes1(event:MouseEvent):void {}
    soundControl1 = sound1.play ();
    gotoAndStop (6);

    Note ++;

    score_txt. Text = + mark + "total score".
    }

  • the button click scroll to anchor in the parent page

    Hello world

    I have a file of edge integrated in my html as a banner page.

    I have a button in the file edge I want to control the parent page with.

    How can I get onClick in the file edge to scroll the page relative to the anchor position.

    I would do this without reloading the page as well.

    Any help is greatly appreciated.

    Thank you

    I didn't know that you load your Edge project in an iframe!

    Well, you can use this code to control the parent of the inside of the iframe:

    $(«_html,_body,_window.parent.document).animate ({scrollTop: $(«_#align_orthodontics_blog_»,_window.parent.document).offset () .top}, 2000)

    concerning

    Zaxist

  • Request does not close when the button click Finish

    Hello friends,

    I am facing a serious problem. When I'm clicking to the end key (red button) my request is not quick closing device. He completes his task first, and then exits.

    What I do is. I call a web service and the download of the data on the server. Take some time to download. I'm creating a background thread that calls the web service. At this point I'm pop-up screen display to show progress.

    When the download is complete, the pop-up screen also deletes.

    Now what I want to do, when the popup screen, want to click on the end button or close the application using the menu close to point. But I'm not able to do this.

    Please help me for this problem.

    Thank you best regards &,.

    Manesh

    This is false:

    UT UploadThread = new UploadThread(); app.invokeLater (ut);

    You do not start a thread with the help of invokeLater. This method places the work in the thread of events - exactly the opposite of what you want to do.

    You start the thread like this:

    UT. Start()

    Please take a look at the Thread class.

  • Run a process without the button click

    Hi guys,.

    I've created a report using a simple Select statement.

    Select ID_FACTURE,
    ID_NUM
    ....

    invoice

    In report attributes , I edited ID_FACTURE and in the link column I put this:
    Link text: < img src = "" #APP_IMAGES #delete.png ";" border = "0" >
    Target: Page in this Application - 58
    Item1: P58_ID_FACTURE value: #ID_FACTURE #.

    Therefore, my report shows me the way I want. When I click in the img to remove the item P58_ID_FACTURE is to get the right value.

    I have created a process (Type: * PL/SQL anonymous block *) delete the row that I want.

    But it doesn't, because it meant to be a single button.

    Anyone knows how I can cheat Apex to do?

    Thank you

    Hello

    What is your point of process?
    You know that your link do not submit page, this link will redirect you to the place.

    Kind regards
    Jari

  • Simulate the button click in panels of void

    Hi all

    I want to simulate click for buttons (with an action mechanical latch) located in sup VI Panel in order to trigger its action. But I could not do this in the way I can simulate a click for all other buttons in the main VI. I have attached a sample program to explain my problem, please let me know what is my mistake.

    Thanks in advance,

    Roger of S.G.Sree.

    just a small mistake.

    Jim you missed it.

    You can go there.

  • Change the color of text on the button click

    I found many ways to fill out / change the box around a field (both types) but not a way to change the color of the font.

    I tried:

    Form1. Page1.wTextField1.TextColor = ['RGB', 0.5,0.5, 0];

    Form1. Page1.wTextField1.textColor = color.black;

    All hope?

    Try

    Form1. Page1.wTextField1.font.fill.color.value = "0,0,0";

    Steve

  • Unable to see the second page on the navigation

    Hello

    I have created two pages. The button, click on I m navigating to another page.

    Another page with following components:

    1. background image

    2. the title bar image

    3. text title bar.

    4. the icon on the title bar image

    4. scroll the display with label inside.

    but I can only see title bar image and the text in the title bar.

    Kind regards

    Ajay Sharma

    Yes, you can display a third page, usually by calling the navigationPane.pushPage function, for example in your button onClicked method.

  • Click on the buttons as disconnect the top 2 inches of the page does not? Solution?

    Have used firefox for years. Done nothing wrong. Recently, if I use firefox to access web pages such as the market data of the bbc enterprises, the page appears but do not activate the buttons click at the top of the page, but not further down the page. No problem with other web browsers!

    The top of the Firefox window is unresponsive, inadmissible toolbars - see also the problematic extensions

Maybe you are looking for

  • Tecra A4 is unbootable

    Hi people I have a tecra A4 and began to experience problems starting after a stop. the laptop takes 15 minutes to allow me to restart it if I started right after that I stopped him. When I press the button to start it would take 2-3 seconds then sto

  • HP Mini 1000: HP Mini 1000 reset password

    Hello. Van someone help me with my old problem laptop? Can someone pls generate a password for my HP Mini 1000. Tounsiiaa.

  • Cannot pin or loose most of the things from the taskbar / / Win7

    Hi people, I have an apparently strange issue where I can't PIN or loose most of the things in my taskbar. The generic search has many similar situations but none of them seemed exactly the same and none of the listed solutions worked for me or seeme

  • Size different InDesign pages aligned on the top edge.

    I want to do a layout with different page sizes. So far so good. If I put these pages side by side, they should be about the same on the top edge. Now, they are lined up in the middle. What can I do?

  • Still need to Flash CS6 sometimes but test movie in Flash shows blank results

    I have CC, I am using the latest version of Flash, but sometimes I need to use CS6 and files in 10.3 and more in this edition.Here's my problem: when I go to CONTROL > TEST MOVIE > TEST (with in Flash Professional checked) or command + enter. I get a