Pass a variable value set to the selector to the Listview

This was probably picked several times on the forum, but I'm going crazy with research and try to do things with my code.

Everything I'm doing is to expose the variable rssmobileEnabled defined in the SELECTOR, so that I can go and test it in my LISTVIEW onSelectedValueChanged IF statement, according to the code below.

I did the variable in "BOLD" below to indicate. This must be a simple solution, after all how it can be difficult to just define a global variable...

The SELECTOR code:

 Picker {
    id: picker
    title: "Select Feed"
    dataModel: XmlDataModel {
     source: "models/blackberry.xml"
    }

      pickerItemComponents: [
          PickerItemComponent {
                type: "rsslink"
                content: Container {
                layout: DockLayout {
                }
                     Label {
                         multiline: false
                         text: pickerItemData.text
                         textStyle {
                              base: SystemDefaults.TextStyles.SubtitleText
                         }
                      }
                  }
             }
        ]

   onSelectedValueChanged: {
       var rsslinktext = (dataModel.data([ 0, picker.selectedIndex(0) ]).text);
       var rsslink = (dataModel.data([ 0, picker.selectedIndex(0) ]).rssSource);
       var rsslinkquery = (dataModel.data([ 0, picker.selectedIndex(0) ]).rssQuery);
       var rssmobileEnabled = (dataModel.data([ 0, picker.selectedIndex(0)]).mobileEnabled);

        //Load the selected feed
        dataSource.load();
   }
} // Picker

Code of the LISTVIEW:

            ListView {
                id: myListView

                // Associate the list view with the data model that's defined in the
                // attachedObjects list
                dataModel: dataModellist
                layout: StackListLayout {}
                listItemComponents: [
                    ListItemComponent {
                        id: header
                        type: "header" //"item"

                        //custom components used instead of standardlistitem
                        Container {
                            Label {
                                id: emptytextheader
                                text: ""
                            }
                        }
                    },
                    ListItemComponent {
                        id: item
                        type: "item" //"description"

                        Container {
                            layout: DockLayout {}
                            //custom components used instead of standardlistitem

                            Container {
                                id: itemdetails
                                Label {
                                    id: title
                                    text: ListItemData.title
                                    //textStyle.fontWeight: FontWeight.Bold
                                    multiline: true
                                    textStyle.color: Color.Cyan
                                }
                                Label {
                                    id: pubdate
                                    text: ListItemData.pubDate
                                    textStyle.color: Color.create("#ff00c200")
                                    textStyle.fontSize: FontSize.XSmall
                                }
                                Label {
                                    id: description
                                    text: ListItemData.description
                                    textStyle.fontSize: FontSize.Small
                                    multiline: true
                                    textStyle.color: Color.Yellow
                                    maxHeight: 130.0
                                }
                            }
                        }
                    }
                ]

                onTriggered: {
                    var feedItem = dataModel.data(indexPath);
                    var page = detailsPage.createObject();

                    if (rssmobileEnabled == "y")
                        {
                            .....
                        }
                }
            }

Hello

"var rssMobileEnabled" declares a local variable, is not available in onTriggered.

Declare it as a property instead:

TopLevelItem
{
   property bool rssMobileEnabled
   (or 'property string' if it's a character)

reference it without prefix "var":

rssMobileEnabled =...

You can also declare the property on another element (not necessarily higher level) and reference it by id:

elementId.rssMobileEnabled

Tags: BlackBerry Developers

Similar Questions

  • How to pass a variable value to a Manager click for a function of ACEs?

    I wish I could click a button, pass a value to a variable, then pass this variable to assess within the case routine.

    MXML:

    Click = "someClickHandler (Event);    <!- like the variable to prepare you with the click-> handler

    AS:

    public void genericFunction(event:MouseEvent):void

    {

    Switch (VariableName)

    {

    CASES1:

    action;

    Action2;

    break;

    CASE2:

    action;

    Action2;

    break;

    .

    .

    .

    caseN:

    action;

    Action2;

    break;

    }

    }

    Thank you.

    The click handler is your function to set how you want.

    MXML

    a click = "someClickHandler (event, 5).

    AS

    public function someClickHandler (event: MouseEvent, someVar:int): void

    {

    switch (someVar)

    ...

  • Value set with the table type

    Hi all
    I use R12.1.3 EBS. I want to create a value set with the posting type "Table". But I must specify what application will be set and the table to use. I want to refer to an another diet/no apps. Is this possible? I have the link of database between this regime to receivables / via SQL Developer, I'm able to query or manipulate the data.

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    "CORE     11.1.0.7.0     Production"
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    Thanks in advance,
    Bahchevanov.

    Create a custom view in the schema of APPS that points to the table in the remote database, and you should be able to create a validated set of values from table based on the custom view. This will require you to create a link of database on the remote database (or a private database link in the APPS schema)

    HTH
    Srini

  • How to pass a dynamic value to display the criteria

    Hello

    I have a requirement to indicate the hierarchy. Here, I want to spend the connected in the id of the Manager to the view criteria so that the hierarchy can change based on the connected Manager.

    Can anyone help how can I accompolish this.
    Can I use the binding variable to pass the value to display the criteria?

    If you get the Director based on the user id, you can run the display criteria based on the user, as follows:
    http://jobinesh.blogspot.com/2010/10/how-to-set-bind-variable-values-at.html

    Ensure that the method is executed until the viewer of the hierarchy is responsible.

    Thank you
    Nini

  • How to pass a variable value into a hyperlink?

    Hello

    I put a variable value by using <? xdoxslt:set_variable ($_XDOCTX, 'tstview', concat ((xdoxslt:get_variable($_XDOCTX,'env_url')), (xdoxslt:get_variable($_XDOCTX,_'testpage')))? >)
    I am able to the value of the variable is displayed correctly. I would use this value to create a hyperlink by specifying {$tstview} {ID} in the text of the hyperlink box. However, when I do that, I get the error message: Undefined Variable: "tstview."

    How can I pass the value of the variable to create a hyperlink? Is there another way to do this? I want to be able to build the hyperlink in a dynamic way. Please let me know.

    Thank you!!
    
    

    or try

    {xdoxslt:get_variable($_XDOCTX,'env_url')}{ID}
    
  • Value set for the Variable

    Slide enter, I want to set the variable _ExpirationDate equal to cpInfoCuirrentDate + 365 days (1 year).  Somehow, I am out of the syntax, or maybe I'm trying to assign it to the wrong place.  How would you accomplish this?  Thank you!!!

    Hello

    Looks like it is possible but will be on the tricksy. Basically, you need to use the three variables:

    • cpinfoCurrentMonth
    • cpinfoCurrentDay
    • cpinfoCurrentYear

    You create a variable and configure to match the year. Then you increment this variable by one.

    Click here to see an example of manipulation of the variable

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • The Variable value based on the results of SQL query

    With the help of OBIEE 11.1

    Is it possible to set the value of a variable presentation of the results of a SQL statement?

    Scenario:

    I have 2 topics.

    SubjectArea1

    Text1

    Date1

    SubjectArea2

    Field1

    Field2

    UpdateDate

    I have an analysis that uses only the SubjectArea2.

    Using a dashboard quickly, the user must be able to select Text1 in the other topic area (SubjectArea1).

    Assuming that selection will be stored in a variable of presentation (SelectedText),

    The filter in the analysis should be something like

    Upper UpdateDate to @{SelectedDate}

    How can I set a variable (SelectedDate) using a SQL statement?

    Something like this:

    SELECT "Date1" TO "SubjectArea1" WHERE "Text1" = @{SelectedText}

    So the command prompt text selection should give a date that is used to filter the second review?

    If so:

    The prompt on SA1.textCol

    hidden analysis who is invited on SA1.texCol has SA1.dateCol in the criteria

    Analysis SA2.dateCol is filetered on basis of the results of another analysis (any value analysis hidden SA1.dateCol)

  • [ADF, JDev12.1.3] How to pass an Integer value sets to a workflow, and then it reads a bean?

    Hallo,

    for a test, I need to set the value of an entry of a stubborn workflow used as dialog...

    Then in the bean that is associated with a known fragment of the btf, I need to read the value, so I used this code...

    Integer protocol = (Integer) AdfFacesContext.getCurrentInstance().getPageFlowScope().get("protocol");
    

    This exception triggers...

    javax.el.ELException: java.lang.ClassCastException: java.lang.Long cannot be cast java.lang.Integer

    What's wrong?

    Thank you

    Federico

    If I remember correctly, in JSF that EL has Long type so this probably also applies to ADF.

    For example, you can cast a Long or you can use the type field (from some managed bean) an integer as an input parameter.

    Dario

  • Replace a string variable value (replace '&amp;' in the string at 26%)

    Hi all... I have a question... .we form a url that has a field of string with "&" in its value example: ST & G... the url is slightest mistake out. However, if we replace this value by ST % 26G it works as expected. I tried to replace ('ST & G', '&') it asks to enter the value of substitution and exit ST not what I need... I need the output to % 26G ST. Please suggest.

    There is an API for this task: UTL_URL

    However, the parameter that handles the reserved characters unescaping is Boolean data type and is false by default, so you can call it only of PL/SQL:

    SQL> begin
      2    dbms_output.put_line( utl_url.escape('ST&G', true) );
      3  end;
      4  /
    
    ST%26G
    
    PL/SQL procedure successfully completed.
    
  • Can I pass a variable (file path) in the Clipboard system windows7?

    Whenever I need to correct an image that I have to download on the net work with an internal application, that I use. I'm using CS5.

    I need to 'stick' the place where the image is in the network (for example z:/abc/user/images/fegvfb.jpg) and I have already a saving code that already has this variable.

    After I recorded the image, I have to go into the system (windows7) where the image is on the network and 'copy' file path and paste it into the application (I use this app)

    Because I managed to deal with hundreds of images every day, I wonder if it is possible to copy to Clipboard th image windows7 course I already as a variable when I save any image.

    If I managed to do it, I can go directly from photoshop to my application (avoiding go to windows system).

    You could do something like that...

    var str = "/z/SS12/Spinnaker.Women_3736/BURBERRY.BRIT/Photo/_v_10151022-BURBERRY. BRIT.3792285.62b.25000.TRENCH.Cotton/Photoshop Retouched/web";
    var Drive = str.substr(1,1);
    str= decodeURI(str).substr(2);
    var cmd = Drive.toUpperCase()+':' +str.replace(/\//g,'\\') + '\\';
    system( "echo " + cmd+ " | clip.exe");
    
  • How do I pass a variable from the edge animate to an external JS?

    I need to pass a variable value of edge animate to an external JS file. How can I do?

    Not sure if this is the best way, but works

    The value of the variable as a property of a global variable

    As

    SET

    window.myVar = 'your value. "

    AdobeEdge.myVar = 'your value. "

    Read

    window.myVar

    AdobeEdge.myVar

  • Required emergency aid: restore the value assigned to the previous session variable

    Restore the variable value assigned to the previous session.

    I'm looking to restore the value assigned to a variable in the previous session. I learned that I don't put any value in the field of the value of the variables, captivate will automatically restore the value assigned to the variable in the previous session. Captivate stores interrupt the data value.

    Also, I could find a good example with source and the file published by Jim Leichliter. However, if it is downloaded the file published to Moodle, it works fine. But if it is open the file source Captivate 5 publish without making any changes and transfer to Moodle. It does not work.

    Any thoughts or ideas are appreciated.

    This should work for both.

  • at Oracle variable not set correctly

    Hi all

    I have two houses of oracle, 11.2.0.3, and 11.2.0.4

    We do not use 11.2.0.3. When I connect Oracle for linux, my oracle home and the path is 11.2.0.3, not 0.4.

    When I run with 11.2.0.4 oraenv correct home, it defines path and oracle home to correct value.

    What should I change in order for the permanent change in oracle home and path to 11.2.0.4, then these variables are set to the correct value in the journal on?

    Thank you

    attaches with a change in the .base_profile file.

  • Save as not fill not custom metadata value defined by the rule of the world

    I created a global rule to set the default value for the date of creation of custom as the date metadata field current system. This rule works fine for normal recording but when I use check in a similar feature of the AAU, the value created is is filled with metadata value of original content instead of the default value defined by the rule. Is it possible to fill the date of creation as default value defined by the rule even when checking in a similar role.

    Thanks in advance!

    Published by: 906120 on January 5, 2012 04:42

    Similar check-in does not script in the field "use defaultvalue", since it must copy the metadata values. However, you can add the script to the "derived field" as well. Don't use dprDefaultValue but dprDerivedValue =
    This script will be evaluated before the check-in operation and any value contained in the metadata field will be replaced by the value set by the script.

    Kind regards
    Boris

  • programmatically set the bind view variable value of object that showed to the query Panel

    Hello

    I have a case in 11.1.1.7 Jdev, I deploy my application on BPM 11.1.1.7.

    I have a VO that three attributes of it was put in a viewcriteria... Let's attribute A1, A2, and A3. the view criteria is any condition "AND".

    and then I create a variable binding in the VO named b. my vo also query using this variable B.

    in the jspx, I create a query panel based on the viewcriteria. then in the A1, A2, A3 and B query pane shows.

    I can reset the Panel request programmatically using this tutorial http://www.jobinesh.com/2011/04/programmatically-resetting-and-search.html

    but unfortunately he didn't succeed for A1, A2, A3 because they are in the display criteria, but B can't reset.

    I tried to put the value programmatically using queryModel, queryDescriptor, setNamedWhereClauseParam, but this failed and it starts to makes me crazy...

    anyone here seen cases like me? and found the workaround? pls throw some light.

    Thank you

    Have you tried with VariableValueManager? http://www.jobinesh.com/2010/10/how-to-set-bind-variable-values-at.html

    Dario

Maybe you are looking for

  • Repeatedly vibrate if you please!

    Is anyway to STOP the vibration on the Cliq XT by typing/text? It's really very annoying and I have tried everything, including "unchecking" vibrate to press the button function... This feature is mandatory with the phone?

  • HP Envy 7640: Unable to set the scanning resolution

    Have been unable to set the resolution of scan during the scanning of the glass in a computer file (pdf, jpg). Guide the user to the HP page 47 7640 said: "● If you want to adjust the size of the scan, output type, scan resolution, or file type and s

  • Qosmio G10 - fan on after 5 min indefnitely.

    I plan to get rid of this machine if I can't do something about it. Having a fan to kick in a homogeneous heat when windows is idle before the machine seems upward and never turn off seems weird, I have to stay with my M60 who has no problem fan. The

  • After I had my computer repaired, I am told that I have to buy a license for Windows XP.

    I had this type of computer difficulty my Tower more than a month and he said it was difficult and able to go online. He assured me that my grandchildren could go online with it. ? It says nothing about me having to buy a license for it. was that, up

  • Rule of the Tomcat host State

    Alarms Tomcat host unrecoverable state and Normal are now show the following: "'UnclusteredTomcatHosts' / 'localhost'": Tomcat host unrecoverable state "and"Tomcat host 'localhost' in 'UnclusteredTomcatHosts' cannot run. " "Please use the following U