Get two values to a selectedItem in a list

Hi I have a list view and I want to use two of the elements of the selectedItem, ListItemData.coord.lat and ListItemData.coord.lon, that's what I have so far

ListView {
        dataModel: jsonlist.model

        listItemComponents: [
            ListItemComponent {
                type: "item"
                StandardListItem {
                    title: ListItemData.name
                    description: ListItemData.sys.country
                    imageSpaceReserved: false
                }
            }
        ]
        onTriggered: {
            latitude = dataModel.data(indexPath)
            longitude = dataModel.data(indexPath)
            console.debug("Latitude: " + latitude, "Longitude: " + longitude);
            var selectedItem = dataModel.data(indexPath);

I know, it isn't fair, but it's just the idea if you can point me in the right direction, I do strings of two goods, latitude and longitude so I can put the value of the selectedItem and then use in the c add function to insert a new page, so how can I use two values of selectedItem

{To ListView
dataModel: jsonlist.model
        
listItemComponents:]
{ListItemComponent}
type: 'point '.
{StandardListItem}
Title: ListItemData.name
Description: ListItemData.sys.country
imageSpaceReserved: false
}
}
]
onTriggered: {}
Latitude = dataModel.data)
Longitude = dataModel.data (row)
Console.Debug ("Latitude:" + latitude, "Longitude:" + longitude);
selectedItem = dataModel.data (row) var;
            
var createdControl = pageDefinition.createObject)

in your building onTriggered, try the following,

var selectedItem = dataModel.data(indexPath);var latitude = selectedItem.coord.latvar longitude = selectedItem.coord.lngconsole.log("Latitude: " + latitude + ", " + "Longitude: " + longitude)

Tags: BlackBerry Developers

Similar Questions

  • Passing two values to another flash animation

    I have an animation flash with two integer inputs, I want them both another flash animation

    This example http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16243 & sliceId = 2 #lcas2

    outbound moive code:
    Create a new instance of the LocalConnection to send
    calls to a LocalConnection instance in another movie
    var outgoing_lc:LocalConnection = new LocalConnection();

    event handler when the user clicks the Send button
    send_btn.onRelease = function (Void): Void {}

    Send the methodToExecute method in another movie
    LocalConnection to listen to "lc_example".
    outgoing_lc. Send ("lc_example", "methodToExecute", biomarker_txt.text);

    }


    new code of the animation:

    Create a new instance of the LocalConnection to listen
    for calls from an instance of LocalConnection to another movie
    var incoming_lc:LocalConnection = new LocalConnection();

    create a local connection to listen for a connection
    with the name "lc_example".
    incoming_lc. Connect ("lc_example");

    Define a method that is called when a message
    is sent from an instance of LocalConnection to another movie
    incoming_lc.methodToExecute = {function(param:String):Void}
    biomarker_txt. Text = param;


    }

    Never mind, I changed the string passed to get two values

    incoming_lc.methodToExecute = {function(param:String,param1:String):Void}
    biomarker_txt. Text = param;
    background_txt. Text = param1;

    }

  • get the value of two fields in a field

    Hellou,

    I need some new help with javascript

    Currently I use the below code to get the value of one field to another:

    getField("Text35").value = getField("Text1").valueAsString;

    Now, I wonder how to change this code, so I could get the values of two fields in one. I for example field 'Name' and 'name' field, now I want to show in the field 'name '.

    Example, if the firstname field have John value and the value of the lastname field is Doe, I want to show in the field name as "John Doe".

    I hope that u understand what I want

    Thank you for helping me!

    getField("Text35").value = getField("Text1").valueAsString + "" +.

    getField("Text2").valueAsString;

  • How to get the values of two points separated in Javascript checkbox

    Hello

    I want to get the values of an element of the checkbox as a form of separted from the colon as what we get in the database. For example '10:11:12 '.

    When I tried to write a code like this it does not work. Please tell me where I'm wrong.


    function getValues (pcheckbox) {}
    cb_name = html_GetElement(pcheckbox+'_0').name;
    cb_array = document.getElementByName (cb_name);
    var val_str =': ';
    for (i = 0; i < cb_array.length; i ++)
    {
    If (cb_arraychecked)
    {
    val_str += cb_array [i] .value + ':';
    }
    }
    html_GetElement (P206_TEXT) .value = val_str;
    }



    I try to call the function getValues ('P206_CHECK');

    Thank you and best regards,
    Vikas Krishna

    Hi Vikas,

    Try this-

    (1) create a checkbox element called PI_CHK
    (2) in the Option of the attributes of the form element, type onclick = "getValues () '"
    (3) create a named text field point PI_TEXT

    Enter the HTML of the Page Header Section

    
    

    Concerning

    Paul

  • Get the value of select Combobox data

    Hi all

    I have a major issue while trying to get the value of the items selected through the change event in a combobox control.  Here is my code... I really need help ASAP... Thanks in advance

    public var test:ArrayCollection = new ArrayCollection([
                { Id:"one", Amount:2000 },
                { Id:"two", Amount:1000 },
                { Id:"three", Amount:200 } ]);

    protected function regionCB_changeHandler(event:ListEvent):void
                   {
                      Alert.show(//tried so many things here to acces the items amount field.. nothing is working
                   }
    <s:ComboBox change="regionCB_changeHandler(event)" dataProvider="{test}" labelField="Id" id="regionCB" visible="false" />

    Have you tried selectedItem.Amount?

  • Why can I get two different results from the same coefficients?

    I get two different results of the evaluation of the polynomial function.

    For the first, I get the coefficients of a polynomial function to adapt.  I feed the coefficients of the function made the function Eval Poly and get the correct 12.8582 result when I evaluate 49940.

    For the second, I create constant array of values that have been returned by the polynomial Fit function (I typed in).  However, I get an incorrect result of - 120.7913 when I feed the constant table the function Eval Poly when I evauate 49940.

    How this can happen when I use the same values in table?

    A picture of what I explained is attached.

    Hi Altran,

    are you sure about using the 'same '?

    You compare them? Do you have (at least) set them to 17 digits display properties?

    Please attach a VI instead of an image...

  • Take the time between two values

    Hi people,

    I have a problem and I know idea how to solve... I need help.

    The problem is I want to take the time between two values max as you can see in the chart.

    For example, in the image that I have add

    4.5 - 1 840 = 2.66

    And enter this value in the 'time between mostra '.

    It's that I want...

    But what I think is very complicated, because I don't know how to take the time correctly and does remove...

    Thank you very much

    Any solution?

    Hi jocuma,

    I tried something and hope that helps u.

    Just create two arrays of temperature and voltage. First of all, I'll get the value of the voltage when it is more of a certain value and that same index to get the value of time and store in the shift register.

    When I get the second higher than the limit value, I'll get time and subtract the previous value.

  • Cannot get the value of the session variable (using row wise initialization).

    Hi all

    I have a scenario where I'm trying to get the value of the variable session of two columns.

    Table of database consists of the name of USER, Country_Region, columns Country_SubRegion.

    For example: ChadraKanth, Americas, America West is the data.

    I wrote a Sql query in the block of session initialization:

    Select "CR", Country_Region, Country_SubRegion

    of row_wise_init

    where USERID = ": the USER"

    When I test the RPD code gives the result like this:

    CR WesternAmerica of Americas.

    In my report I have two columns, a region and an another subregion.

    When I try to filter with the session variable "CR" for the column region his error giving: session variable is not initialized with

    This is the default.

    Question:

    1. session variable is contains several values in the column?

    2. how to filter the report on columns of region and sub region?

    Please suggest me.

    Kind regards

    Chandra Khalil.

    Hello

    A session variable cannot store more than one column, 1 variable = 1 value (column 1), horizontal initialization allows to store several lines, multiple values in the same variable.

    If to a user, you have several lines with multiple values, you need horizontal initialization, but it cannot store in the variable the value of the region and subregion.

  • Getting a value from selectonechoice

    Hello

    I use Jdeveloper 11.1.1.6

    My requirement is as below

    I have a component selected only one option, which displays a list of values.

    The user selects a value from the list of value and clicks the command button, and then the input field should be updated with the

    the value that is selected in the list.

    To do this, I wrote the code (no components company involved / only ADF faces) below

    I am able to get the list of values and post it on my page. For the rest of the game, I am not able to guess.

    I put selectoncechoice partialtriggers for buttons and the text in field

    All I need is the java code for getting the selected value and by attaching it to the text field.

    Can you help or guide me on this...

    Bean:

    The list < SelectItem > tempList.

    {} public void settempList (list < SelectItem > tempList)

    this.tempList = tempList;

    }

    public list < SelectItem > gettempList() {}

    If (tempList == null) {}

    tempList = new ArrayList < SelectItem > ();

    tempList.add (new SelectItem ("t1", "Item 1"));

    tempList.add (new SelectItem ("t2", "Item 2"));

    }

    Return tempList.

    }

    USER INTERFACE:

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

    " < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"xmlns:f =" " http://Java.Sun.com/JSF/core "

    ' xmlns:af = ' http://xmlns.Oracle.com/ADF/faces/rich "> "

    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

    < f: view >

    < af:document title = "listPage.jspx" id = "d1" > "

    < af:form id = "f1" >

    < af:panelGroupLayout id = "pgl1" layout = "vertical" halign = "center" >

    < af:spacer width = "10" height = "10" id = "s1" / >

    < af:selectOneChoice label = "Custom List" id = "soc1" contentStyle = "make weight:" BOLD "; color: Green; ">

    < f: selectItems value = "#{Valuesbean.tempList}" id = "si1" / > "

    < / af:selectOneChoice >

    < af:outputText value = "Output text" id = "ot1' partialTriggers ="soc1"/ >

    < af:commandButton text = "Change" id = "ot1' partialTriggers ="soc1"/ >

    < / af:panelGroupLayout >

    < / af:form >

    < / af:document >

    < / f: view >

    < / jsp:root >

    Hello

    If you see:

    You must set a value for the selectOneChoice component. You add a new variable in your beans to use it to store your selectedItem. Then your output text should also reference the same attribute in its value field.

    Try to add in your bean:

    String mySelection;

    public String getMySelection() {}

    return mySelection;

    }

    {} public void setMySelection (String, string)

    mySelection = string;

    }

    value = "#{ValuesBean.mySelection}" label = "Custom List" id = "soc1" contentStyle = "make weight:"BOLD"; color: Green; » >

    and value = "#{ValuesBean.mySelection}" id = "ot1' partialTriggers ="soc1"/ >"

  • Is it possible to return the largest (highest) value in a range of values (not only the higher of the two values)?

    HI -.

    waiting for the Maximum()< x >, < y >) function to have the ability to determine the largest more of two values.

    EG - Maximum()< x > < y >, < z >)

    Is there another way to do this (without a custom function)?

    Thank you, James.

    With independent attributes (i.e. X, Y and Z are not the values of the attribute even through a set of entities), each attribute must be explicitly referenced and the simplest solution is to nest calls to competition.
    For example: Maximum (, Maximum (,))

    Do the same with an arbitrary number of values of attributes associated with the same entity (i.e. 'age in years' as an attribute of 'person') you can use the InstanceMaximum or equivalents of natural language that returns more high/more recent value of an attribute from entity level all instances of the entity.

    InstanceMaximum (, )

    who is the most recent for all [of]

    who is the greatest for all [of]

    last of all for

    the largest of for (all of | all | )

    There are also the following to constrain the set of instances of entity to a subset based on a condition and get the most out of this subset (i.e. ' age where the person is a woman')

    InstanceMaximumIf (, , )

    who is the most recent for all [of] for which it is true that

    who is the greatest for all [of] for which it is true that

    the largest of for (all of | all | ) for which it is true that


    A similar feature exists for at least and the sum.  See the Guide to political use of automation for details and examples.

  • SOAP API - get the value of an external entry of default user Interaction

    Hi guys,.

    I'm trying to get the default value of an external input of User Interaction.

    My Testworkflow has a beginning and end, in the Middle it is a "user interaction" with two external entrances. Among the external references entered through presentation with a default value.

    This default value is what I want to get via SOAP for Scripting

    All I can understand with the "getWorkflowInputForWorkflowTokenId" method is the following:

        [getWorkflowInputForWorkflowTokenIdReturn] => stdClass Object
            (
                [id] => 2c961dc145ccc05e0145e0baae600c7a
                [workflowTokenId] => 2c961dc145ccc05e0145e0baadd40c77
                [name] => myWorkflowName : TestInteraction
                [description] => Description der Interaction
                [parameters] => stdClass Object
                    (
                        [item] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [name] => externalInputString
                                        [type] => string
                                    )
    
                                [1] => stdClass Object
                                    (
                                        [name] => externalInputNumber
                                        [type] => number
                                    )
    
                            )
    
                    )
    
                [attributes] => 
                [state] => 0
                [creationDate] => 20140509132501+0200
                [xmlContent] => 
    

    Is it possible to get this value? (even with the REST API? < = I don't find as well)

    Thank you

    Marc

    Hi Marc,

    "xmlContent" property must contain a similar XML content to:

    
       
    ...
       
    
    

    User interaction, including the default, settings must be inside the element 'presentation '.

    Hope this helps,

    Ilian

  • How to get the value to help trigger the poster or y at - it another option.

    Hello

    I have two tables emp and dept in the two table it is last_updatedatetime of column dating from stores over time, and there are a few more columns in both the table and the deptno is common in both table

    Then, I created a view using this table with readonly.

    now, I wanted to get these value from view if last_updatetime change in the base table and wanted to store only the data in a temporary table.

    Please help me to solve the above problem

    Thanks in advance

    I don't know y at - it another way, other than the triggers to audit changes. I wonder how a READ ONLY view (just SELECT the operation) could help fill some other temp table because you can't keep questioning the view at regular intervals. Instead, I would say, is to create a DML trigger on the table DEPT_EMP. Inside of the trigger call a stored procedure to control the corresponding State (WHERE the d.empno = e.empno AND e.emp_p_ind = 'Y').

  • Count the number of records between two values of keys (BTREE)

    How can I count the number of keys between two values?

    I use python driver and BTREE access method.

    = >

    Ideally, what I want is a set of whole time series data (intervals may change) to a given number of points on average. The keys are timestamps and the values are the data that it takes on average. I need to count the number of records between two timestamps so that I can divide this figure by the number of points I need and data on average. What is the best way to do it?  Or should I keep the timestamp constant intervals and use the RECNO access method?

    Thank you
    (first post btw... and why is there not a lot of people at stackoverflow that answering the questions of Berkeley DB?)

    BDB is an integrated db and there no internal counters or statistics you might grap to use for this.    You will have to do it manually.

    You can create a cursor, grap the records you want, whenever you get the next card that you bump a counter.

    If you are using RECNO, you can use a slider to obtain the number of registration (DB_GET_RECNO), and if all that you data is in

    sequentail records with no missing documents, you can find the total number of take the last rec #-original rec # + 1 to get a count.

    If you pass the SQL API, you can issue a SQL query to give you a count.  Select count (*) where...

    As you enter the data anyway, so better perhaps to count records as you go along.

    Thank you

    Mike

  • How to use Ajax get multiple values in an array?

    Hi All-

    I am using AJAX to get multiple values in a table using example of Denes Kubicek in the following link-

    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606:NO:

    Basically, I want to use the drop-down list to fill the rest of the values in the form.

    I created the example (Ajax get several values, 54522 application) on the Oracle site.

    http://apex.oracle.com/pls/apex/f?p=4550:1:0:

    Workspace: iConnect

    Login: demo

    password: demo

    I was able to reproduce his example on page 1 (homepage).

    However, I want to use system generate a table to complete this example and was not able to complete the data correctly.

    Page 2 (method 2) is that I'm struggling to fill the column values. When I checked the item application values in the Session, and values seems to be filled properly.

    That's what I did on this page:

    1 create an Application process on-demand - Set_Multi_Items_Tabular2:

    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
    
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
    
      OWA_UTIL.mime_header ('text/xml', FALSE);
      HTP.p ('Cache-Control: no-cache');
      HTP.p ('Pragma: no-cache');
      OWA_UTIL.http_header_close;
      HTP.prn ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    
    
    
    
    
    

    2. create two objects application - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2

    3. put the following text in the Page header:

    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
    }
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);    
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                }
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
                    }
                }
            }
        }
        get = null;
    }
    </script>
    
    
    Add the follwing to the end of the above JavaScript:
    
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    {
     var s = filter.id;
     var item = s.substring(3,8);
     var field2 = list2 + item;
     
     f_set_multi_items_tabular2(filter, field2);
    }
    
    
    
    
     
    
    
    

    4 query in the form:

    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    
    
    
    
    
    

    5. in the column of Book_ID_DISPLAY attribute:

    Add the following code to the attributes of the element: onchange = "javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#'); »

    Changed-> onchange = "javascript:setLOV(this,'f03'); »

    Now, T_ROWNUM2 returns the value as f03_0001. But TEMPORARY_APPLICATION_ITEM2 returns in the form [object HTMLSelectElement]...

    Please help me to see how I can fill the data in the tabular presentation format. Thank you in advance!

    Ling

    Updating code in red...

    Ling

    LC says:

    Application Item Value Item Name
    54522 3 TEMPORARY_APPLICATION_ITEM2
    54522 f03_0003 T_ROWNUM2

    No T_ROWNUM2 should be 0003.

    I made a copy of your page to make corrections.

    There are several problems.

    First you where submiting T_ROWNUM2 whereas you would use: t_rownum in the pl/sql code.

    I changed the name of the element in the f_set_multi_items_tabular2.

    Secondly you where now affecting the rownumber f03_0001 for the first line.

    Resulting XML returned as follows.

    this xml genericly sets multiple items
    CSS Mastery
    22
    Andy Budd
    1
    
    

    I changed the following text in the show_lov.

    var point = s.substring (4.8);

    var Field2 = item;

    I also had a compilation of pl/sql code error, there was a); missing the end of the last item. Fixed that too.

    But why do you think lpad won't work for lines 10 and more.

    LPAD ('10', 4, '0') will give "0010"

    LPAD ('100 ', 4,'0 ') will give "0100"

    LPAD ('1000 ', 4,'0 ') will give '1000'

    So unless you have more than 9999 lines you would have no problem.

    Nicolette

  • Get the value based on the column names for the custom of the Webcenter content metadata field

    University Complutense of MADRID, I created a custom text metadata field.  I then activated optlist this area.  I fill the optList values, I use a view.  The view has three columns.  Let us call their ID, Key, Value.  OptList shows keys in its list.  I then create content (Content ID: MyContent) Webcenter content and choose the OptList values for my new field of metadata (MyField).

    WebCenter portal, I'm filling a selectOneChoice with MyField values in the content ID: MyContent.  Remember the previous step, the values entered in selectOneChoice lists them selected values from the field MyField optList.  The optList is filled from view.  After the user selects a value in selectOneChoice, in Javascript, I need to alert a message in this format "selected value - matching value from the view of the optList that fills MyField.

    In my opinion, only an example will be useful:

    This is a view that I created in Configuration Manager applet in Webcenter content Admin cmdlets :

    ID | State | Capital

    1. North Carolina | Raleigh

    2. California | Sacramento

    3. Illinois | Chicago

    Then I create a custom field (name: MyField).  MyField is an optList values are filled with view created above.  Internal value and the display value are the two State.  Then I have a new content with Content Id Check-In: MyContent.  To MyContent, I select these values in OptList MyField: {North Carolina, Illinois}.

    In my portal Webcenter application, I create a Taskflow presenter content.  I have set up as single content item presenter.  I attribute as content ID MyContent.  Then, in templateView, I get all the values of MyField in MyContent and display as selectOneChoice.  I created a javascript function that would get the value that the user selected in selectOneChoice.  In the view created in the Webcenter content Configuration Manager (see above), there is a value corresponding to each displayed value.  So, for the selected value, I need to get the corresponding Capital and display in my alert message.

    Starting from Javascript, how can I get the value of the Capital, since I have the status value.

    Hello.

    The idea to reach your requirement is planned:

    • Create an Assistant manage bean that will appeal as access map: #{stateUtil ['Calofironia']} (it will return Raleigh). This value will get calling GET_SCHEMA_VIEW_VALUES IDC service using RIDC in your managed bean.
    • Pass the result of #{stateUtil ["statename"]} to your JavaScript function to help

    I hope this information help you.

    Kind regards

Maybe you are looking for

  • Mail going offline

    I use an iMac and a relatively new Macbook Pro.  Both computers are set up the same and use the same network.  My Mail from Apple often goes offline on my Macbook Pro.  I have to turn off and then back on my wifi.  I also do when my internet (using S

  • Y at - it an Apple app that opens Excel spreadsheets?

    I need to open a bunch of Excel spreadsheets. I don't have Office 365. Is there an alternative? Thank you.

  • Windows 8 Pro and Cyber Media DVD/Blu Ray software?

    Just upgraded my HP DV7 to win 8 pro, looking through the HP site on win 8 upgrade and it mentions software multimedia cyber and the fact that it must be downloaded again and reinstalled.  How are you going to download this software by HP and if not

  • LaserJet m225dn mfp pro: printer freezes up, power cord wrong or bad grounding?

    Hello.  We have an ongoing problem with this gel printer (backlight on).  I can say that it's okay if it passes in the standby mode.  If after the default, sleep, standby fails, it is always locked and requires a reboot. It comes with the power suppl

  • Update video card to run the Sims 3

    I'm on a Dell Latitude D505 and need to update my video card to run the sims 3.  I have no idea how to proceed.  Is this somehting that I can download?