How Textfield text on another page qml property access

Hello

I started 10 BB development recently and need help. I searched this forum but could not find some information exactly related to my problem (unlike only), or I missed something from basically. My main.qml, I want to access the text property of the textfield of the InputControl.qml to be used as a parameter in my SQLQuery (attached object). I tried to use the fieldname method alias property, but it does not work. I can't feature outside. Here is my code:

hand. QML

import bb.cascades 1.4
import bb.cascades.datamanager 1.2
import bb.system 1.0
import bb.data 1.0

Page {

    id: root 

    titleBar: UIControls {
    }

    //! [0]
   content: Container {

        leftPadding: ui.du(2)
        rightPadding: ui.du(2)
        topPadding: ui.du(2)
        bottomPadding: ui.du(2)

        InputControl {
        }

        // The ListView that's used to display the artist data
        //! [1]
        ListView {
            id: myListView

            //property variant dq: defaultDataQuery
            // Associate the list view with the data model that's defined in the
            // attachedObjects list
            layout: StackListLayout {
                headerMode: ListHeaderMode.Sticky
            }
            layoutProperties: StackLayoutProperties {
                spaceQuota: 1.0
            }
            horizontalAlignment: HorizontalAlignment.Fill
            verticalAlignment: VerticalAlignment.Fill

            listItemComponents: [

                ListItemComponent {
                    type:  "item"

                    Container {
                        Label {
                            text: ListItemData.Japanisch
                            layoutProperties: StackLayoutProperties {

                            }
                            topMargin: 5.0
                            textStyle {
                                base: SystemDefaults.TextStyles.TitleText
                                fontWeight: FontWeight.Bold
                                color: Color.create("#7a184a")
                            }

                        }
                        Label {
                            text: ListItemData.Lesung
                            textFit.maxFontSizeValue: 9.0
                            textStyle {
                                base: SystemDefaults.TextStyles.TitleText
                                fontWeight: FontWeight.Normal
                                color: Color.create("#ff1818e9")
                            }

                        }
                        Label {
                            text: ListItemData.Deutsch
                            textStyle {
                                base: SystemDefaults.TextStyles.TitleText
                                fontWeight: FontWeight.Normal
                            }

                            multiline: true
                            textFit.maxFontSizeValue: 8.0
                        }
                        Divider {}
                    }// Container
                }
                // Use a standard list item to display the data in the model
            ]    

        } // end of ListView

    }//![1]

    attachedObjects: [
        //! [2]
        // One of the default provided DataModel's

        GroupDataModel {
            id: dataModel
            grouping: ItemGrouping.None
        },
        DataSource {
            id: dataSource

            // Load the data from an SQL database, based on a specific query
            source: "WadokuJT.db"
            //query: "select Japanisch, Deutsch, Lesung from WadokuJT where Deutsch like '%Wasser%'"
            query: "select Japanisch, Deutsch, Lesung from WadokuJT where Deutsch like '%" + stext + "%'";

            onDataLoaded: {
                // After the data is loaded, insert it into the data model
                dataModel.insertList(data);

            }
            type: DataSourceType.Sql
        } // end of DataSource      

    ]//! [2]  

    actions: [
        //! [8]
        ActionItem {
            title: qsTr("Search")
            imageSource: "asset:///images/ic_search.png"
            ActionBar.placement: ActionBarPlacement.Signature
            onTriggered: {
                myListView.dataModel = null
                dataSource.load()
                //myListView.dq = defaultDataQuery
                myListView.dataModel = dataModel 

            }
        },

        ActionItem {
            title: qsTr("Settings")
            imageSource: "asset:///images/ic_settings.png"
            onTriggered: {

            }
        },

        ActionItem {
            title: qsTr("Help")
            imageSource: "asset:///images/ic_help.png"
            onTriggered: {

            }
        }                           

    ]//![8]

} // end of Page

And here is my InputControl.qml

import bb.cascades 1.4

 Container {
     property alias stext: txtSearchText.text

    Label {
        id: lblSearchText
        text: "Searchtext\r\n"

    }

    TextField {
        id: txtSearchText
        layoutProperties: FlowListLayoutProperties {

        }
        hintText: "Enter Searchtext"
    }
}

Any help is greatly appreciated. Thank you.

Give InputControl an id (in main.qml), for example someId.

Access the variable an alias like someId.stext

Tags: BlackBerry Developers

Similar Questions

  • to access the variables in a page in another page qml

    Hey gang,

    I've been watching some of the other problems autour to access the variables from one page on another page qml qml, and I can't get this to work.

    I have a page, main.qml with a NavigationPane.  The NavPane has a Page and some containers.

    I have a property defined in the NavigationPane like this:

    NavigationPane {
        id: mainNav
        backButtonsVisible: true
        property int customInt: 2
    
        onCustomInt: {
            console.log("  -------------> App: customInt");
        }
    

    I have a ComponentDefinition for next page, called SettingsPage.qml.  In the settings, I have two drop-down lists and a slider.

    Page {
        actionBarAutoHideBehavior: ActionBarAutoHideBehavior.HideOnScroll
        id: pgSettings
    
        ScrollView {
            id: pageScroller
            scrollViewProperties.initialScalingMethod: ScalingMethod.AspectFit
            Container {
                topPadding: 25
                bottomPadding: 25
                rightPadding: 25
                leftPadding: 25
                Label {
                    text: "Settings"
                    textStyle.fontSize: FontSize.XLarge
                }
            Container {
                id: dropDown1
                topPadding: 25
                bottomPadding: 25
                rightPadding: 25
                leftPadding: 25
                DropDown {
                       id: ddOption1
                       title: "Option 1"
                       verticalAlignment: VerticalAlignment.Center
                       horizontalAlignment: HorizontalAlignment.Center
                      Option {id: o1o1; text: "One"; }
                      Option {id: o1o2; text: "Two"; }
                      Option {id: o1o3; text: "Three"; selected: true; }
                      Option {id: o1o4; text: "Four"; }
    
                    onSelectedIndexChanged: {
    
                        switch (selectedIndex){
                            case 0:
                                //
                                console.log(" -->App: Option 1 Selector, On");
                                customInt = 0;
                                break;
                            case 1:
                                //
                                console.log(" -->App: Option 1 Selector, Off");
                                customInt = 1;;
                                break;
                            case 2:
                                //
                                console.log(" -->App: Option 1 Selector, Top (default)");
                                customInt = 2;
                                break;
                            case 3:
                                //
                                console.log(" -->App: Option 1 Selector, Bottom");
                                customInt = 3;
                                break;
                        }
                    }
                }
            } }
    

    I look forward to the the statement will change the level property NavPane, called customInt, but it doesn't.

    the output of the console shows that the ' App: Option 1 selector "gets selected in the dropdown list selected index changes, but the onCustomInt() funtion slot never gets called.

    I tried "mainNav.customInt = X" too, but the parameters cannot solve the mainNav.  I get "unknown symbol 'mainNav'" error with alittle bulb.

    what I am doing wrong?

    When you call the second page, SettingsPage.qml, set it as an object.

    Don't do the following:

    attachedObjects: [
    
        ComponentDefinition {
            id: settingsPageDefinition
            source: "SettingsPage.qml"
        }
    ]
    

    Follow these steps:

    attachedObjects: [
        // Definition of the second Page, used to dynamically create the Page above.
        ComponentDefinition {
            id: settingsPageDefinition
            Settingspage{
    
            }
        }
    ]
    

    Then the second page main navigation page in the IDE.  I had the same problem with a multi-page application, I created.

  • How to redirect to another page in a dialogListener?

    Hi all

    I use JDeveloper 11 g with ADF BC.

    How to redirect to another page of a < af:dialog > dialogListener?
    I have a page with a button [delete] on this subject. When the user clicks on the button Delete, a confirmation dialog box appears asking "are you sure? [Yes/No] ». If the user answers [Yes], I will delete the current record and go to another page. Can I call a linking operation in the dialogListener, but I don't know how to go to another page.

    {} public void handleDeleteDialog (DialogEvent dialogEvent)
    OperationBinding operationBinding = bindings.getOperationBinding ("Delete");
    Object result = operationBinding.execute ();
    If (! operationBinding.getErrors () .isEmpty ()) {}
    }

    Redirect to another page?

    }

    Kind regards
    Samson Fu

    Hi Samson,.

    Check the following link corresponding to your query: -.

    Re: account page navigate to the next page when you click the button on the shortcut menu

    You can also make use of Navigation handler invoke the action of navigation in your workflow as

    FacesContext facesCtx = FacesContext.getCurrentInstance ();
    NH NavigationHandler = facesCtx.getApplication () .getNavigationHandler ();
    nh.handleNavigation (facesCtx, "", "ActionNameInTaskFlow");

    Vikram

  • Oracle of the MAF: How get text of a page from the amx and show them in another page of amx

    I created a simple form using amx as below:

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < amx:view xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "

    ' xmlns:amx = ' http://xmlns.Oracle.com/ADF/MF/AMX "xmlns:dvtm =" http://xmlns.Oracle.com/ADF/MF/AMX/DVT ">

    < amx:panelPage id = "pp1" >

    < amx:facet name = "header" >

    < amx:outputText value = "Header" id = "ot1" / >

    < / amx:facet >

    < amx:facet = "primary" name >

    < amx:commandButton id = "cb1" / >

    < / amx:facet >

    < amx:facet = "secondary" name >

    < amx:commandButton id = "cb2" / >

    < / amx:facet >

    < amx:panelFormLayout id = "p1" >

    < amx:inputDate id = "i1" label = "Date" / >

    < amx:selectBooleanCheckbox id = "s1" label = "CheckBox" / >

    < amx:selectBooleanSwitch id = "s2" label = "Switch" / >

    < amx:selectOneRadio id = "s3" label = "Radio button" >

    < amx:selectItem id = "s4" / >

    < / amx:selectOneRadio >

    < amx:inputText id = "i2" hintText = 'enter something '.

    Label = "Edit Text" > < / amx:inputText >

    < amx:inputText id = "text1" label = "" enter password: ""

    secret = "true" / >

    < / amx:panelFormLayout >

    < amx:commandButton id = "c1" text = "Send" action = "getFormDetails" > < / amx:commandButton >

    < / amx:panelPage >

    < / amx:view >

    I want to extract the text entries, check box, option button, and display them in another page of amx. Please help me.

    Hello

    Here is an example.

    Assuming that there is a taskflow (as feature) which uses two activities with the name View1 and view2, with a case of View1 to View2 control flow is getFormDetails.

    code View1.AMX:

    "http://www.w3.org/2001/XMLSchema-instance" xmlns:amx ="http://xmlns.oracle.com/adf/mf/amx"

    xmlns:dvtm ="http://xmlns.oracle.com/adf/mf/amx/dvt" >. "

    value="#{pageFlowScope.TestBean.userNameValue}"/ >

    code View2.AMX:

    "http://www.w3.org/2001/XMLSchema-instance" xmlns:amx ="http://xmlns.oracle.com/adf/mf/amx"

    xmlns:dvtm ="http://xmlns.oracle.com/adf/mf/amx/dvt" >. "

    TestBean.java (which is located in pageFlowScope).

    mobile plan;

    public class TestBean {}

    private String _userNameValue;

    Private boolean _checkboxValue;

    public TestBean() {}

    }

    {} public void setUserNameValue (String _userNameValue)

    This ._userNameValue = _userNameValue;

    }

    public String getUserNameValue() {}

    Return _userNameValue;

    }

    {} public void setCheckboxValue (boolean _checkboxValue)

    This ._checkboxValue = _checkboxValue;

    }

    public boolean isCheckboxValue() {}

    Return _checkboxValue;

    }

    }

    Arun-

  • Cannot access textfield value in another page

    Hello, I thought it would be simple and straightforward, but I hit a wall.

    I can't access the values from another page in a script.

    I'm trying to set a value of a text field to the value of a text field which is in another page.

    I have the click event (just to test):

    eApp.ENB - 7-07 - CAGAIN_Page_5.a3z_data_AdditionalInfo::click - (JavaScript, client)

    this.rawValue = eApp.ENB - 7-07 - CAGAIN_Page_4.AccountNumber.rawValue;

    He does not get the value.

    But if I copy create a field on the same page (page 5 here) with the same information, I can access

    with this.parent.AccountNumber.rawValue;

    I can make it work, by copying the textfields on the page and in hiding, then using their value.

    but it seems dirty and useless.

    I just want to be able to access the fields on another page, I thought it would be as easy as form.page4.accessthisvalue

    Any help is VERY appreciated, been banging my head for a moment loong.

    Hello

    It should not be a problem doing this, you can reference a field anywhere on the form.  You get script errors?  My first guess would be to rename the ENB-7-07-CAGAIN_Page_4 field so that it doesn't have the dash inside character, he might try to subtract 7 variable he thinks is called BNB.

    Concerning

    Bruce

  • How to link to another page in the same application?

    I think I have right now a brain fog. Cause I can't understand this.

    I would like to make a link to another page in the same application through just an arbitrary word in a paragraph.

    I'm not trying to spend all the values. I do not use a button or a text element.

    How can I make a link to a Word?

    Thank you very much
    Maggie

    Hi Maggie!

    I imagine me, that you have a html text and you want to have a hyperlink to another page in your application.

    For example, you have a text like: "I want to create a hyperlink to a page.

    Now, if your mouse passes the word 'hyperlink', you want to see this magic 'hand '.

    First copy the URL of the target page: something like this-> "http://127.0.0.1:8080/apex/f? ' p = 100:2:3122716493255005:NO:

    Changing your text to html in this way:

    I want to create a hyperlink to a page

    I hope it helps

    Gerhard

  • How to run to another page in a select list

    Hello

    I am newbie to APEX. Our version of the APEX is 5.0.2. Currently, I have a 7 page, which displays a selection list, of which user selects an element of value and then supposed to be directed to another page 8.  But nothing happens once I've selected only one item, say, he's not going anywhere.  Please let me know how I can fix the problem.  Thank you very much!

    Page 7, I turned "Go To Page 8" as:

    page7.PNG

    And then to page 8, I have:

    page8.PNG

    Best regards

    Hello

    Since you've already done this job, you probably realized that you need to add p7_study_name to Page elements field to submit and create a dynamic action related to this item (change), which updates the State of the list of sites.

    If you want to go to another page, when you select the item in the list, follow these steps:

    (1) create a dynamic action on p7_study_name, the Change event.

    (2) create a real action, Action: submit the page, button of request/name MY_REQUEST (or whatever you want).

    3) go to the processing Section and create logic to your page target Condition: Type Request = value, value MY_REQUEST

    Hope that helps.

    Pavel

  • How to navigate to another page when I press the button

    Hello

    I want to know how to navigate from one page to another when I press the button.

    I want to condition function so I want to sail from bean managed for this action of button.

    can someone tell me please how to do?

    also how to throw error manually if assume that any condition in the get method of failure.

    Thanks in advance,
    SAN

    Hi user,

    as we have, you have requested a post on the connection,

    so I guess that since your post make a connection

    http://kohlivikram.blogspot.com/2008/10/how-to-create-simple-login-page-in-ADF.html

  • How to link to another page anchored using the tool?

    Hello

    I use the point (arrow tool) to post a link to anchors in my current page.  Is there a way of linking to anchors with the tool in another page (in other words I do not work on) or must it be done manually?

    Thank you

    Jake

    In the field of link in the properties panel, you must type the name of div ID or anchor in manually, preceded by a sign #.

    Link: some_page.html #ID

    Nancy O.

  • How to redirect to another page Using JavaScript in ADF Faces?

    Hi guys,.

    I have a case of user UI that has an af:menu which contains mutiple af:goMenuItem. When the user clicks on the menu, the menu slides down and the af: goMenuItem presents itself. As we know, you can set page destinations in af:goMenuItem to go to another page when the user has clicked, but af:menu itself cannot be redirected to another page. Well, the case of the user wants the menu itself could be redirected if the user clicks on it.

    So I think that the use of JavaScript to do this: when you click on the af: menu, redirect to another page. BUT, I've looked over the ADF Faces Javascript API and wasn't able to find this piece of code to do this. Any help?

    Another work around to the user scenario is to use the brands of HTML + CSS/JavaScript instead of af: menu and af:goMenuItem, but this changes the scope of the technology although it is not hard to do

    Any other idea to make the case of the user other than what I could think?


    Thank you guys!

    Jay

    Hello

    1. you can have a control hidden element to the navigation based on a case of control flow. In this case, you access the JavaScript command component create a new ActionEvent and he queued
    2 - JavaScript can use an af:serverListener to call a server side managed bean method to perform the navigation

    There is no JavaScript API for navigation in ADF Faces because navigation in JavaServer Faces is an event-driven framework and we do not support the developers of fight against the framework.

    Frank

  • How to pass a value of text to another page?

    If you have a text input and a button to the page 1 how to make that value available on page 2 after clicking on the button. I created a flow of the page by clicking on the button brings me to page 2 but not sure where you get the value of input text that was on page 1.

    Thank you.

    As you can see in the code I added an inputText and a CommandButton on page1.
    I use setActionListener to pass the value of page1 page2 declaratively.
    In faces config, I created a stream of page 1 to page 2. The value 'of result' as the action attribute of the commandButton control.
    I created with an outputText page2.
    Everything you enter in page1 should appear in page 2 when you click on the CommandButton.
    Yet, you can't make it out, let me know your email id, I will send you the sample application.

  • How to load a new page qml with a click on a button and the current destory

    I would like to have a transaction to a TabbedPane page a navPane and they are in two files different qml. I would like to have a button to triger this. How can I do?

    Thanks in advance!

    I think that the simplest approach creates a TabbedPane from the start (you may use of stunts TabbedPane model when you create a new project) and displaying the login in a sheet on the creation page, then close and eventually destroy the leaf when it is no longer necessary or reuse later.

    You can also disable peek for sheet so that the user does not look in TabbedPane.

    An example of code:

    http://supportforums.BlackBerry.com/T5/Cascades-development/registration-screen-handling/m-p/1899939...

    http://supportforums.BlackBerry.com/T5/Cascades-development/registration-screen-handling/m-p/1958219...

    Replacement of the scene is another approach, but it will not be animated and must be done in C++. No doubt it is not necessary in this case.

  • How to navigate to another page?

    Hello

    I want to navigate through my page to another when I click the button, here is my code:

    SerializableAttribute public class Page1 extends Sprite
    {
    public var page2age2.
    public void Page1() {}
      
    var btn:Button = new Button();
    var lab: Label = new Sun;
       
    Lab.Text = "Click";
    btn.addChild (lab);
    btn.setPosition (10.50);
    btn.addEventListener (MouseEvent.CLICK, dothis);
    addChild (btn);
    addChild (log);
    stage.nativeWindow.visible = true;
       
    }
    public void dothis(event:Event):void {}
    Page2 = new Page2();
    addChild (log);

    }
    }

    But it has not worked out. Help, please?

    OK there was some compile errors in your class page 2. but no worries, I got em. Here's the code corrected for class Page1:

    package
    {
        //Remember to import all of the classes that you
        //are using
        import flash.display.Sprite;
        import flash.events.MouseEvent;
    
        import qnx.ui.buttons.LabelButton;
    
        // The following metadata specifies the size and properties of the canvas that
        // this application should occupy on the BlackBerry PlayBook screen.
        [SWF(width="1024", height="600", backgroundColor="#FFF000", frameRate="30")]
        public class Page1 extends Sprite
        {
            private var page2:Page2;
    
            public function Page1()
            {
                //initiate new object here to use later
                page2 = new Page2();
    
                var labButton:LabelButton = new LabelButton();
    
                labButton.label = "Click";
                labButton.setPosition(10,50);
                labButton.addEventListener(MouseEvent.CLICK,dothis);
    
                addChild(labButton);
    
                //addChild(log); //dont know where you declared this so commented out
                stage.nativeWindow.visible = true;
            }
            //change the event to MouseEvent since that is what you
            //are listening for
            public function dothis(event:MouseEvent):void {
    
                addChild(page2);
                //addChild(log); //dont know where you declared this so commented out
    
            }
        }
    }
    

    and here's the code fixed to your class page 2:

    package
    {
        import flash.display.Sprite;
    
        import qnx.ui.buttons.LabelButton;
    
        public class Page2 extends Sprite
        {
            public function Page2()
            {
                var label:LabelButton = new LabelButton();
                label.label = "Welcome to Second Page";
                addChild(label);
            }
        }
    }
    

    in your first class Page1 I combined the label and the button in the class LabelButton() of QNX. This code should now work correctly (tested and it went well).

  • Copy the text of form field text box on another page

    Hi all

    I'm designing a document using Muse who, in a wizard-esque fashion, get the user to fill the fields of the form, and then the text entered in form fields is automatically filled fields of text on other pages so that a customized document can be printed.

    However, research, I made, I have not found anything I can use other than using PHP code style but I can't juxtapose that to bring the value of text to another page instead of an email.

    Any help would be greatly appreciated.

    Thank you, in advance.

    You need to add a custom to your form code to achieve this.

    These links will give you the correct answer:

    http://StackOverflow.com/questions/18474499/auto-populate-field-base-on-what-was-entered-i n - one other-field-simultaneously

    http://StackOverflow.com/questions/11660395/how-to-Autopopulate-an-HTML-form-and-submit-it - instantly

    http://icode4you.NET/website-forms-use-JavaScript-to-auto-fill-one-field-with-the-values-f rom-two-others-fields.

    If you use Adobe server for hosting your site, this document will allow:

    Customization of Web Forms

    Thank you

    Sanjit

  • Move the text block to another Page

    Hey,.

    I'm new to InDesign scripting, and I've been browsing the docs for quite awhile, but can't find how to move a block of text to another page.

    The closest I came was a .parentPage, but it is read-only.

    I have my frame on the first page of the document, how can I move, let's say, on page 5?

    myFrame.move (myDestinationPage)

    Substances

Maybe you are looking for