List different with JSON types

I created a flat list using the group view: no technique mentioned here:

http://supportforums.BlackBerry.com/T5/Cascades-development/ListView-no-header/TD-p/1737097/HIGHLIGH...

I'm changing my list to display differently depending on the type, as indicated in the JSON.  My first category in my JSON is kind, but I can't seem to get that list appears correctly.

for example.

{'type': 'image', 'url': "http://whatever"}

I was able to do it in XML, but cannot do it in JSON.  Someone at - it suggestions?

Another method in QML is to do the following

var chosenItem = dataModel.data(indexPath);
return chosenItem.type

Tags: BlackBerry Developers

Similar Questions

  • Initialize the cluster with data types different (lots of data)

    Hello

    I have data, which are composed of different data types. First of all, I have initialize cluster with these types of data and then "print" to light (photo). In case of photo data carries 8 characters than ja 4 floats. It was easy to initialize, but here's the question: How can I do this even if I have data that look like this (interpreter):

    floating point number

    name char [32]

    Short value [16]

    What I create loooong cluster which have a fleet of 32 characters, 16 short films? Or I can create these 'paintings' in a different way?

    THX once again

    -Aa-

    I suggest using the table-cluster and configuration of the cluster size to match the size of your berries, then package these groups together.  In terms of storage of LabVIEW, there is no difference between a group of

    floating point number

    Name1 tank

    name2 tank

    ...

    short value1

    short value2

    ...

    and a bunch of

    floating point number

    -> cluster shipped from

    Name1 tank

    name2 tank

    ...

    -> cluster shipped from

    short value1

    short value2

    So you can use the cluster table to get the right sizes rather than individually create all these values in a single giant cluster.

  • Report - a list of all instances of FglAM with versions & type o/s

    I have not found any KB article, community or previous Commons on this subject.

    The Web Console. Host agent dashboard lists all FglAM ' assets/market' with their OS version/type & version FglAM.
    I have difficulties to create a report that lists all of the FglAM that have already been created with their versions & type o/s.

    FglamClientInstance & RemoteClient toplogies have "null" displayed for the field version so don't know where we can get this value.

    This simple query lists all FglAM and the last updated field:

    sb = def "<>
    #! FglamClientInstance # .getTopologyObjects () .each {}

    SB< 'host:="" '="">< it.name =""><   '="" last="" updated:'="">< it.lastupdated=""><>

    }
    return of sb

    RESULT:
    Host: alvbchan2k8-562 (fglam) last updated: 2013-06-20 10:07:10.375

    Host: loriw2k8r2f55 (fglam) last updated: 2013-06-20 10:07:10.375

    Host: loriw2k8r2f555 (fglam) last updated: 2013-06-20 10:07:10.375

    Examination of the application of the hosts of the Agent dashboard, seems, it gets these values from root of the Administration Server. all_agent_hosts.

    See attachment.
    So that won't work because we are interested in all THE FglAM whether they are active or not.

    Any help appreciated to generate a report similar to the table edge, but for all FglAM that have already been deployed with version & type o/s; No active and active.

    Thank you
    Rick

    Currently on FMS version 5.6.7, version FglAM is not stored in the FglamClientInstance or the RemoteClient types of topology.  FAM-5227 was generated to request the FglAM version to be stored in FglamClientInstance.

    The code following groovy lists currently active FglAMs and their versions:

    output = new StringBuilder()

    EOL = System.getProperty ("line.separator");

    fglams = server. RemoteAgentManagementService.findAllRemoteClients)

    fglams.sort ({IT. GetHostName()})

    output< "hostname,="" ,="" type,="" version,="" os="" name,="" os="" version,="" os="" arch"=""><>

    {fglams.each ()}

    output<>

    output< ",="" "=""><>

    output< ",="" "=""><>

    output< ",="" "=""><>

    output< ",="" "=""><>

    output< ",="" "=""><>

    output<>

    }

    return output

    RESULT:

    HostName, Type, Version, name of the OS, OS Version, OS Arch

    alvrstoner, FglAM, 5.6.2.2, windows, 5.1, ia32

    alvbchan2k8-562, FglAM, 5.6.7, windows, 5.2, x86_64

  • LabVIEW:EXE generates the error 1003 calling plugin with the type definition

    Hi all

    I am running LV 2012 on a Win 7 machine. I had this same problem with LV 2011, so I'm sure that's not associated with version/upgrade.

    Go to a LV-built EXE, I try to call a dynamically loaded Subvi. I did it several times with success before, so I think I know how. I prefer to use the call by reference, but I get the error 1003 Open Ref VI (with the type specifier). If I use the type specifier, can I open the Subvi, but the State is listed as 'bad '. Then, I went to recursively through all the subVIs (~ 25 in total) and concluded that the only item with a status of 'Bad' was a type definition.

    I checked several times, several different, that all ways the subVIs (and the definition of Type 'bad') are available to the Subvi dynamics. I did that the type definition is correct. I have also made sure the subVIs are stored as .VI files in the same directory and not within an EXE file. When I try to run the VI run call node, I still get the error 1003. I checked the path that displays in the error dialog box is the exact path for the Subvi (it would be for other VI properties and methods working properly).

    Why can't I run a sub - VI loaded dynamically from an executable if it has a type (a group of 3 trails) as output parameter definition?

    I just tested an idea: rename the library from project to project A create script. Now when it loads, it does not disturb what he must internally with externally called Subvi (dynamic). It worked the first time!

  • All of a sudden, the Yahoo homepage is different with Firefox. How to bring back the old home page? I prefer the one that is always displayed on Internet Explorer

    All of a sudden, the Yahoo homepage is different with Firefox. How to bring back the old home page? I prefer the one that is always displayed on Internet Explorer. I deleted Firefox and re-installed but the rest of the problem. Help, please.

    Well, it's a problem in your Firefox. To me this https://www.yahoo.com/ page looks like the screenshot of IE.

    Many issues of the site can be caused by corrupted cookies or cache. To try to solve these problems, the first step is to clear cookies and cache.
    Note: This will be you temporarily disconnect all sites, you're connected to.
    To clear the cache and cookies to do the following:

    1. Click the menu button

      , choose historic, then on clear recent history...

    2. Under "Time range to clear", select "all".
    3. Now, click the arrow next to details to toggle the active details list.
    4. In the list of details, see the Cache and Cookies and uncheck everything.
    5. Now click the clear now button.

    More information can be found in article to clear your cache, history, and other personal information in Firefox .

    This solve your problems? Please report to us!

  • Display problems with all types of terrain and graphic

    Hello

    I have display problems general with all types of chart, graph or plot that I try to use, on two different machines, both with NVIDIA graphics cards.  A machine is a MacBook under XP SP2 in bootcamp and the other a Dell T3400 workstation (or something similar) under XP SP3.

    I posted this thread earlier which Ben replies to the weird graphic behavior.  Ben suggested that I try to simplify my code as much as possible while keeping the bad behavior and by submitting to the NC and the forum, because it is others have had problems of graph.  I tried, but in vain.  Display problem continues and continues and continues and then they just go and I can't get back by unscrewing the last stage of reduction or simplification of code.  But at some point during the reconstruction of the code, which I cannot determine, returns the bad behavior.

    So, I was set up with graphics looking for shit, until recently, when I thought I'd try some suggestions of other messages to a XY-plot function as a graph by creating a buffer and using nodes of ownership of land for the range control.  Things seemed promising, until my "XY table" started getting shit, too.  This time, the issue was with the grid lines becomes all chopped, attached images.

    I am out of resources here.  I think I'm running out of options to display graphic data in an acceptable manner.  Do I have to display data by using an Excel chart in an ActiveX container in Labview?  I'm not skilled enough to do it again.  I like Labview, it is the only programming language that I am competent even remotely help, but it's just inferiorating.

    Any suggestions would be much appreciated.  Thanks for reading.

    -Greg

    Greg,

    is there a particular reason why you use the bar plots - view superior graphic style? Try activating the legend of the plot, go to the bar plots and select the first track of the Bar Style. Your chart is displayed very well after that.

    See you soon,.

    Cerati

  • ¿Printer 3d list different compatible Photoshop is possible in Photoshop?

    ¿Printer 3d list different compatible Photoshop is possible?

    The list of 3d printers are too expensive in Europe, I live across from the self-assembled...

    Excuse mi English I don't practice this time of the language.

    Thank you very much

    Hi jesusr,.

    Photoshop supports currently the following local 3D printers:

    • MakerBot Replicator 2
    • MakerBot Replicator 2 x
    • Polychrome ZCorp
    • Mcor Iris
    • MakerBot Replicator 5th generation

    In addition, Photoshop supports several profiles Shapeways.com and Sculpteo.

    Note: the USB direct print with the printer MakerBot Replicator profile 5th generation is not yet supported. You can export the files you want to print on a USB and then print them locally.

    Source:- print objects 3D in Photoshop

    Kind regards

    Assani

  • MAF: Using rest with JSON

    Hi all

    I use jdev 12.1.3

    While practicing the CRG, I am facing a problem with the help of rest with JSON response.

    I followed this: https://blogs.oracle.com/adf/entry/simple_get_operation_with_json

    A slight difference is that I already have a Restful services with JSON response I have hace created in Oracle Apex.

    Following the example, I followed the steps but when I open the application in the Android emulator after deployment, I don't get all the lines, I dropped the data as MAF List View control.

    I don't get all the lines and I am showing 0 in the first row.

    Please let me know what could be the problem.

    Kind regards

    KP

    See your json output you can't edit it directly to the employee object.

    First you must get the json object, then json for the elements array, then one by one, you must create the Employee object.

    In addition, you see 0 because for a PGE no integer, the default value is 0 because the data are not filled the json output.

    Try the code below and your question should get solved:

    answer = restServiceAdapter.send("");

    JSONObject jsonObj = new JSONObject (response);

    JSONArray empList = (JSONArray) jsonObj.get ('items');

    int size = empList.length ();

    ArrayList empArray = new ArrayList();

    for (int i = 0; i)

    try {}

    Employee emp = new Employee();

    JSONObject result = empList.getJSONObject (i);

    String empno = (String) result.get ("empno");

    Ename string = (String) result.get ("ename");

    emp.setEmpno (Integer.parseString (empno));

    emp.setEname (ename);

    empArray.add (emp);

    } catch (System.Exception e)

    {}

    Employee [] e = (Employee []) empArray.toArray (New Employee [empArray.size ()]);

    e return;

    Your method signature must be:

    public employee [] fetchEmpDetails()

    With the signature above you return an employee table which can be used for a list view.

    Let me know if it helps.

    Kind regards

    Deepak

  • Firefox crashes in typing or by clicking check box or the radio button, even with all the plugins / extensions removed. Check with many types of malware scanners.

    Firefox crashes in typing or by clicking check box or the radio button, even with all the plugins / extensions disabled, then deleted. Sometimes it hangs for five minutes. I checked the PC with several types of scanners of evil-ware, but none to be found. All hidden and deleted cookies, all DELETED & extension plugins. Remove all instances of Firefox PC and registry, then restored to bookmarks. The only thing that I did not is to remove and reinstall not my favorites.
    Windows Vista (yes I know) and FF 13.0.1

    Try disabling hardware acceleration in Firefox.

  • Can anyone help please if a drop-down list box with this dpdCategory.Items.Insert (0, "user")?

    can someone please help if a drop-down list box with this dpdCategory.Items.Insert (0, "user"); If I choose the user then after clicking the button, it will redirect to this page & also, others using if else statement

    Please ask this question in one of the Windows Apps development forums:

    http://social.msdn.Microsoft.com/forums/en-us/category/windowsapps

  • How can I add a program to my list 'open with '?

    On my XP, I right click a file and clicking 'open with '.

    The list of programs does not include Frontpage.

    How can I include Frontpage, I use frequently on my list 'open with '.

    Thank you very much.

    A big thank you to everyone who helped me to solve this problem.

    I followed this path - opens My Documents - selected a file that happened to have the extension .mht. > Click right file > openwith > choose program > Browse > Program Files > Double click Microsoft Office > Double click Office11 > Double click Frontpage.Exe. I now have Microsoft Frontpage on my 'open with' drop-down list.

    I can't tell you how much it is great to have succeeded because of the help that I received from you all.

  • Can I use a different with my HP Pavilion 17 19v PSU

    Can I use a different with my HP Pavilion 17 19v PSU?

    You have the adapter 45 watts:

    45 W HP Smart AC adapter (NFPC, RC, 3-wire, 4.5 mm, nslim) 741727-001

    A card eBay auction:

    http://www.eBay.com/ITM/original-OEM-HP-45W-smart-cord-charger-Chromebook-14-c011nr-741727-001-notebook-/221431899726

    The connector dimensions: 4.5 mm × 3.0 mm, with pin inside

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • What happens in Windows Mail? I can not send attachments with any type of graph.

    Unreal

    What happens in Windows Mail? I can not send attachments with any type of graph. People receiving my email with attachments receive between 60 and 70 copies. I called my provider, my safety, send the computer for a week for a Tech and no one can answer this problem for me. If I don't get this problem resolved I will never use Microsofts again e-mail programs.

    Tools | Accounts | Mail | Properties | Advanced. Uncheck the box: "Break apart messages...". ».
    If this isn't the cause, try to compact and repair the database.
     
     
     
  • I get videos from cell phones of the people with a type of file like 3GP. I need to know how to save and change the format so I can open them.

    I get videos from cell phones of the people with a type of file like 3GP. I need to know how to save and change the format so I can open them.

    Trying to convert to the. WMV format:

    There are many converters available on the net... some
    free... some detail.

    The following freeware converter is just one example:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Format Factory (freeware)
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster download)
    (the file you want to download is: > FFSetup295.zip<>
    (FWIW... installation..., you can uncheck
    ('all' boxes on the final screens)
    (Windows XP / Vista / 7)

    First, you will need to decompress the file or just open the
    Drag > FFSetup295.exe< out="" of="" the="">
    and drop it on your desktop. To install left click.

    Next, after the download and installation of Format
    Factory... you can open the program and
    left click on the toolbar, the "Option" button and
    "Select an output folder to" / apply / OK.
    (this is where you find your files after they)
    are converted)

    Drag and drop your video clips on the main screen...

    Select "all to WMV" / OK...

    Click on... Beginning... in the toolbar...

    That should do it...

    Good luck...

  • Why my device USB LocationInformation value is different with Win XP on Win Vista?

    Hi Sir,

    Now, we encounter a problem once we have installed our drivers of USB devices.
    Our is a composite USB device. After we installed the drivers from the host for it on Win Vista, we check the LocationInformation value to the registry [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_xxxx & Pid_xxxx & MI_xx\6 & 22884364 & 0 & 0000].
    We found that the value of it is '0000.001d.0007.003.000.000.000.000.000 '. It's different with the value that we put in our USB device.
    But on Win XP this value is identical to the value that we put in our USB device. Why this difference? And what is the average of the Vista LocationInformation value?
    Thank you!
    Kony

    Hi, Joseph Kony.

    http://msdn.Microsoft.com/en-us/library/ms806396.aspx

    The beginning or the beginning of the answer is that the Windows XP drivers work in kernel mode and drivers Vistan and Win 7 processor user mode. Thus, each needs different informatrion to set the os driver for the system behavior. See the link above for some detalid. See the drivers for Vista or Win 7 for more information on user-mode drivers.

    Hope that helps.
    Tom

Maybe you are looking for

  • Calibrate both screens thunderbolt

    Hey everybody. I need help on how to match the calibrations of color on the two thunderbolt screens that are right next to each other. I hope that I can use the calibration of Apple. I really want to spend the money on the calibration tools. All grea

  • TestStand code in xml report review

    I want that my reports TestStand to contain the information on which version of the sequence of generated file the report. For now, I created a FileGlobals.CodeVersion string variable, and I add to the header of the report in the ModifyReportHeader c

  • Problem connecting Windows _

    Gina Logon: application to 0X17e8884 referenced to winLogon.exe error0X74726C88 memory could not be read. If I click OK or cancel, the reboot of the machine over and over again untilI click the F8 key and choose one of the options there.  I ran RegCu

  • Unable to connect to access point

    Like others my device cannot access my wireless router, when I turn on my camera it found my network and my network connection comments.  But I can't connect to networks using my device, it connects to all Free WiFi but not my network.  The attempts

  • HP 2350eo p6: I can't understand how successfully do a factory restore on my win 8-&gt; computer 8.1

    I tried to do a factory restore, and it just doesn't work. I can't start to the top of the recovery screen.I tried restarting and pressing F11. Because Windows is not normally start, he's clearly trying to do what I want it to, but it does not work.