The icon based on a condition in QML

Hello. I have a ListView when an option is the 'current' and I want to show an icon on this option. Fill out the model of the ListView by using a property and it works fine. The current option is also a property of C++. My code qml is:

ListView {
    id: lwLicencia
    horizontalAlignment: HorizontalAlignment.Fill

    dataModel:  app.licenciaModel
    listItemComponents:
        ListItemComponent {
            type: "item"

            StandardListItem {
                imageSource: (ListItemData.num_licencia == app.currentLicencia) ? "asset:///images/ic_03.png" : ""
                title: ListItemData.desc_licencia
                description: ListItemData.num_licencia
            }
        }
}

However, the icon is not displayed. QML supports this syntax (at least it does not give a message error or warning)?

Sorry,

https://developer.BlackBerry.com/Cascades/reference/bb__cascades__qmldocument.html#function-defaultd...

I spelled wrong memory.

Tags: BlackBerry Developers

Similar Questions

  • How to upgrade the lines based on multiple Conditions

    Hello

    I create a table Ename, Empno and sex as the columns. In my table of 100 records are there. Some records having sex "Male" and others are "female". How can I update all records if sex is "Male", then it will be updated as 'Female' vice versa. How to achieve this requirement? /

    --

    Thank you and best regards,

    Badr Hari

    One way:

    UPDATE my_table

    SET sex = DECODE (kind, ' Male ',' female ', 'female ', ' male', gender);

  • How to display the image in the table based on certain conditions

    Hi all

    I have a table of search results which has a column as error.
    The data that appears in this column after research is 1 or 0.

    I want to display an image of success for "1" and a picture of error to the '0' value in the table.

    How to get there?

    TIA,
    Bob

    You must use the af:switcher component - http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_switcher.html

    For example








  • How to get the columns of the table based on different conditions in one column?

    Hello

    I have two sql queries-

    Select sum (col1) sum1 Tab1
    where join_date > (sysdate - 1).

    Select sum (col1) sum2 of Tab1
    where join_date > (sysdate-4)

    I need to use a single query to get sum1 and sum2 data in a single line.


    Can someone help please how?

    Like this?
    
    select sum(case when join_date > (sysdate - 1) then col1 else null end) sum1
         , sum(col1) sum2
      from tab1
     where join_date > (sysdate - 4)
    
  • Remove duplicates based on a condition

    Hi all

    I need help on a query to remove the duplicates based on a condition.

    For example, my table is

    FE CC DATE FLAG
    ----------------------------------------
    FE1 CC1 10/10 FB
    FE1 CC1 FB 9/10
    FE1 CC1 11/10 AB
    FE1 CC2 9/10 AB
    FE1 CC2 10/10 FB
    FE1 CC2 11/10 AB

    I want to delete all duplicate rows FE and CC, based on the sub condition:
    DATE < MAX (DATE) WHERE FLAG = "FB".

    This means I want to remove the FB 9/10 FE1 CC1 line
    but not lines
    FE1 CC1 10/10 FB
    and
    FE1 CC1 11/10 AB
    as only the FE1 CC1 line 9/10 FB has date < MAX (DATE) WHERE FLAG = "FB".
    Similarly, I want to keep
    FE1 CC2 10/10 FB
    FE1 CC2 11/10 AB
    but not
    FE1 CC2 9/10 AB

    Thank you very much.

    Can be like that...

    delete from  t
    where dt < ( select max(dt) from  where fe=t.fe and cc=t.cc and flag='FB' )
    
  • Enable and disable the item based on the Condition

    Hi Experts,

    I work in the form of 10g, I conditionally.

    I have the block master detail.

    Master block contains sub elements.

    CUSTOMER

    Address (read only) - no database element

    PRODUCT GROUP (read only) - no database article

    Note: The CUSTOMER is LOV, when I select the customers, I'm failing address and product group.

    Block detail contains sub elements.

    DATE OF START OF BLOCK

    DATE OF END OF BLOCK

    REASON

    Note: when I opened form all fields of retail blocks are enabled

    Requirement:

    1. when I created new record, at the time where I select the customer name, Bill and product group will be by default, in the block of detail - I want to activate and deactivate the block start date based on the value of the product group.

    2 if I erase block master, I need to activate the block_start_date like back when the new form is opened

    3. when I search the data also, block start date must be enabled and disabled based on the value of the product group.

    Could someone help me the best approach to achieve so that she will have no side effects.

    Thank you

    801619 wrote:

    Hello

    Thank you for your response... I have tried code trigger after change of category of products below.

    If: blockname.product_group = "Aviation" then

    set_item_property ('block.block_start_date', enabled, property_false);

    On the other

    set_item_property ('block.block_start_date', enabled, property_true);

    end if;

    1. it is disable the Group field when I put the cursor inside if the product category is "Aviation", but I want it to be automatic at a time where it will default to the value of product category.

    2. If the master clear record, is not allowing return product group

    3 suppose that if enter new record category of products "Aviation", once I put the cursor inside, it's debilitating, let's say if I erase the main recording without saving the changes, it not again allows the Group of products, it is now status (disable) previous.

    4. in query mode, it is not disabling or enabling from a group of products.

    Help, please.

    Thank you

    Ok.

    1. put your code on this trigger after changing point that fills the default value in the product category.

    2. remove the trigger after change of product group.

    3 put the same code to trigger once - new - Record - Instance of the main block.

    Hope this helps

    Hamid

  • Merge the queries based on the conditional

    Apex 4.2

    I have a pretty complex question. I have a page that will have a selection list on the data entry form. The selection list contains a list of both 1) Active only or 2) active and inactive areas. We show the active areas when we create a new record (P101_ID IS NULL), we appear active and inactive sectors when you edit a record (P101_ID IS NOT NULL). I have therefore two separate queries to account for each case. Simple so far.

    Problem I am seeing that create two lists of selection on the page and put a separate condition on each one (hiding one of selection lists depending on the case the ID IS NULL or the ID IS NOT NULL) does not work. So I was wondering if there was a way to combine queries for that to work based on a conditional statement. I did experiment with the instructions box and unions, etc., but my questions are a bit complicated. They are as follows:

    LIST OF ASSETS SECTORS (P101_ID is NULL)

    Select unique
    ISEC.inspection_sector_name,
    ISEC.inspection_sector_id
    From
    INSPECTION_SECTORS ISEC
    left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id
    Where (ISEC.hurricane_protection_flag = :P157_IS_HURR and ISEC.river_protection_flag = :P157_IS_RIV) AND
    ISEC.superseded_date is null AND
    ISEC.commenced_date is not null AND
    ISEC.inspection_sector_id not in (
    Select ISEC.inspection_sectors_id
    From INSPECTION_SECTORS ISEC
    left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id
    Where SCH.high_water_event_id = :P157_high_water_event_id AND
    SCH.inspection_date = :P157_inspection_date)
    OR ISEC.inspection_sector_id = :P157_inspection_sector_id AND
    ISEC.superseded_date is null
    Order by inspection_sector_name
    

    LIST ACTIVE AND INACTIVE SECTORS (P101_IS is NOT NULL)

    Select inspection_sector_name, inspection_sector_id From (
    Select ISEC.inspection_sector_name, ISEC.inspection_sector_id, '0' as this
    From dual, INSPECTION_SECTORS ISEC
    left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id
    Where (ISEC.hurricane_protection_flag = :p157_IS_HURR and ISEC.river_protection_flag = :P157_IS_RIV) AND
    ISEC.superseded_date is null AND
    ISEC.commenced_date is not null AND
    ISEC.inspection_sector_id not in (
    Select ISEC.inspection_sector_id
    From inspection_sectors ISEC
    left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id
    Where SCH.high_water_event_id = :P157_high_water_event_id AND
    SCH.inspection_date = :P157_inspection_date)
    OR ISEC.inspection_sector_id = :P157_inspection_sector_id AND ISEC.superseded_date is null
    UNION
    Select unique
    ISEC.inspection_sector_name|| ' [CLOSED]', ISEC.inspection_sector_id, '1' as this
    From dual, INSPECTION_SECTORS ISEC
    left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id
    Where ISEC.superseded_date is not null and ISEC.commenced_date is not null AND
    ISEC.river_protection_flag =:P157_IS_RIV and ISEC.hurricane_protection_flag = :P157_IS_HURR AND
    ISEC.inspection_sector_id not in (
    Select ISEC.inspection_sector_id
    From INSPECTION SECTORS ISEC
    left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id
    Where SCH.high_water_event_id = :P157_high_water_event_id AND
    SCH.inspection_date = :P157_inspection_date)
    OR ISEC.inspection_sector_id = :P157_inspection_sector_id NAD ISEC.superseded_date is not null
    Order by this, inspection_sector_name asc
    

    If the requests are quite complex. I tested the times and they work in APex, separately from the course. Forgive me if I have mispeled anything. But any help on this would be greatly appreciated. Thanks in advance.

    Thank you for taking to your friend Frank. You are a bird-guy (my attempt at sarcasm). Nobody has questioned whether its knowledge base; more so in the way he responded to my original post did not «do» Like the people who come on this forum looking for help to those who have greater knowledge, it would be nice to be greeted a little more friendly, lol. Just my thoughts. But, feel free to correct my spelling test, grammar and syntax in my sentences so (the effort once again to emphasize that I misspelled 'AND', and that the request would not be performed--> of course... smh... you are funny)

    Apparently I failed to explain the issue in its entirety. I should start by saying... "I have two separate petitions that I tested and already working and am looking to put on a list of selection (at the top) with a conditional execution statement one or the other, through the conditional statement, but again, I was looking for more so for syntax and structure." I'm sorry, I forgot to mention that.

    Anyway, enough of this. I found a solution to my problem:

    Within the Apex 4.2, you can have a list of selection as a page element. I want to display different results depending on whether Yes or no P101_ID is set to Null or NOT NULL

    P101_ID is a primary key for a table.

    P101_ID is not the exact name I use in my application / request however.

    In addition, you don't need to include double; It's not make or break the query. Something that I forgot to omit them.

    In addition, something along the lines of

    Select inspection_sector_name, inspection_sector_id From (
    .....all the stuff in query 1.......)
    Where P101_ID is null
    UNION
    Select inspection_sector_name, inspection_sector_id From (
    ....all the stuff in query 2.....)
    Where P101_ID is not null
    

    will work on a selection list in the APex. So problem solved. Thank you for all your wonderful insight, of words and thoughts. Thank you.

  • Insert data into the same table based on certain conditions

    Hello. I'm new to this forum.
    I have to write a stored procedure to insert data in a table MYTABLE say, having a structure like:

    Col1 Col2 Col3... TotalInstallments CurrentInstallment PaidAmount MonthYear
    I have to insert all the data that it is in the same table (MYTABLE) except change some fields based on certain conditions:

    1. if PaidAmount > 0 & & CurrentInstallment < TotalInstallment then

    CurrentInstallment = CurrentInstallment + 1

    2. in the field MonthYear I have data ex. 01/2012, 11/2012 formate(month/year)...

    So, I have to insert data by incrementing the month and year. for example:

    If currentdata is 11/2012 next data will be 12/2012

    But following will be 01, 2013
    I have to select all records that belongs to the previous month (across the field MonthYear) and put the audit on each record selected and insert data and then turns them into table (MYTABLE) even.

    How to achieve that?

    Thank you.

    978184 wrote:
    Hello. I'm new to this forum.
    I have to write a stored procedure to insert data in a table MYTABLE say, having a structure like:

    Col1 Col2 Col3... TotalInstallments CurrentInstallment PaidAmount MonthYear
    I have to insert all the data that it is in the same table (MYTABLE) except change some fields based on certain conditions:

    1. if PaidAmount > 0 & CurrentInstallment

    CurrentInstallment = CurrentInstallment + 1

    2. in the field MonthYear I have data ex. 01/2012, 11/2012 formate(month/year)...

    So, I have to insert data by incrementing the month and year. for example:

    If currentdata is 11/2012 next data will be 12/2012

    But following will be 01, 2013
    I have to select all records that belongs to the previous month (across the field MonthYear) and put the audit & on each of the selected data record and insert then turns them into table (MYTABLE).

    You can do this way:

    This is not tested, but if you can provide the example of table structure and data (IN create table and insert scripts), it can be put to the test.

    insert into your_table
    (col1, col2, col3...current_installment, month_field)
    select col1, col2, col3..,
           current_installment +
           case when paidamount > 0 and current_installment < total_installment then
            row_number() over (
                                partition by column1, column2,.. columnn      -->You may choose partition if you want the
                                                                              --Increment of Current_installment to reset after particular combination ends
                                order by primary_key        -->Order the Increment, you may choose to add more columns to order by
                              )
          else
            0                                               --> if condition is not met, then Add 0
          end curr_installment,
          add_months(to_date(month_field, 'MM/YYYY'), 1) nxt_month
      from your_table;
    
  • How to enable or disable a paragraph based on a condition in the BIPS

    Hello reading,
    <? country? >
    How to display a line based on a condition in the DARK...
    I have a tag as a country that has the value zero or in India, I shouldn't show paragraph
    para should be included
    and also, I don't want the line below to access his location

    How can I do this...
    pls help

    I sent you the code to achieve this. Take a peek inside.

    Thank you
    BIPuser

  • Cannot change the size of the icons in the Windows Vista-based computer.

    Original title: Silent Storm, a prophet of Jesus.

    My windows Vista is no longer able to change its icons of iconic sizes appropriate; How can I fix it, because it always gives me small looking icons missed upward?

    Hello

    You can see the article provided below for more information on the change in size of the icons in Windows Vista.

    Expand your computer screen: 6 ways to make it easier to see

    http://www.Microsoft.com/athome/Setup/magnify.aspx

    See also:

    Change the screen resolution

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-screen-resolution

  • Restrict the records in the CSV, based on condition

    Greetings. I searched the forum for my problem and have not found an answer or the right search terms. I'm under APEX 4.1.1

    I have a report on a page. I show all the records to a SQL query given in my table, but in the 'export to CSV' I need limit the output based on one of the fields. Thus, for example, if I had a report such as:

    SELECT x, y, Z
    FROM Table1

    I would like to export to CSV format for this table to limit the output such as:

    SELECT x, y, Z
    FROM Table1
    WHERE Z = 1

    Is this possible?

    Thank you!
    John

    Hi John,.

    I tested the connection now and works above for interactive report only and for the classic report, you need to do something like that because the demand is set to a different value

    SELECT x, y, Z
    FROM Table1
    WHERE ((Z = 1 and nvl(:REQUEST,'X') like 'FLOW_EXCEL_OUTPUT%') OR nvl(:REQUEST,'X') not like 'FLOW_EXCEL_OUTPUT%')
    

    See this example of work http://apex.oracle.com/pls/apex/f?p=46417:25

    When you export to CSV you'll get 10 dept records

  • cannot access the icons and files in windows xp

    I write on behalf of the client. Customer is unable to access his files in his computer based on Windows XP and icons.

    Hello

    • Did you change your computer before this problem?
    • You receive an error message during the access, the icons and files?

    This problem occurs when one or more of the following conditions are met:

    • The registry values that are associated with the file name extension are corrupted or missing values.
    • The computer is infected with a virus.

    You can view these methods:

    Method 1:

    Let us check in SafeMode if the problem persists.

    A description of the options to start in Windows XP Mode
    http://support.Microsoft.com/kb/315222

     

    Method 2:

    Here is an article that will guide you in the process of fixing the issue:

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows

    Cannot open files with extensions such as.exe, .com, and.lnk on a Windows XP-based computer

  • How to change the icon of an extra folder in the sidebar?

    I just downloaded Sierra, I have a mac mini and I want to change the icon of a folder that I created, I already changed it, but in the sidebar, there is no icon, so I need help to change to the icon I want.

    If you had already created a folder named & then hung out in the

    Docking station, a change in this file might have to replace one in the Dock; so

    If this is the case, do drag the earlier version of Dock, replace with new.

    Of course, when you drag the icon of the old dock, it will go "poof!"

    {Are you referring to the dock as a 'side bar' on the desktop?}

    Files and web links, etc. can be slid in the side bar (Dock)?

    on the side of the bulkhead the nearest trash. Only applications or utilities

    can be moved to the other side.

    Here is an example of a file with a custom icon to the dock, put in place to

    be considered a list, arranged by name; used to launch additional items that

    otherwise could not fit well on the dock. There are also the Alias of elements:

    The alias or the symbiotic relationship that you create in the Dock is always based on the presence

    the original (a custom, etc folder) or on the icon element can become a '? Mark '

    or blank if the original is no longer available. I put the original in my user folder.

    If you already know how to copy a new icon to a folder (else, etc.)

    or make a new graphic icon and paste it into the folder to replace original;

    so if I understand this issue, the rest should be easy.

    Unless you try to accomplish something else...!

  • Impossible to click on the icons on a Web site

    Hi when I am on the site Ozsale, I am unable to click on the icons to point of sale. I hover over with the mouse, but when I click nothing happens it used to open. It was working OK, the other day, but now I have this problem. Would there be a problem with firefox, or may have changed middle. Could you please help, regards, Chris

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

  • HP 2540: Cannot sweep on 2540. Analyze the icon option on HP s/w not stay appear

    2540 and HP s/w on my laptop installed with success at home on WiFi.  Then I moved everything to my RV... which means put PCs and the 2540 on a different network.   Had to uninstall HP desktop s/w (on Toshiba Win8.1 64) and DELETE the printer and then reinstalling s/w to achieve the ability to print on my WiFi based on RV (the process included via a USB port).  I can print now, but cannot scan.  Even ran doctor printing/scanning HP with no satisfaction.

    Once again: I can't scan.  The s/w HP does not offer this as an option as it did in my original installation of 'home '.  When I click on HP desktop icon now, I am prompted with "do you want to allow the following program to make changes?  I proceeded to YES several times.  No help.

    In addition:

    Under control panel / printers & devices, there are two HP icons: series of readings (1) HP Deskjet 2540, others (2) reads the same but includes the word "driver"... and 'pilot' is the default icon and is functional for printing.  The icon (1) cannot be made by default, and when you click on to, the new screen reads "no task is available on this page.   FWIW, I can't scan during an attempt of web page IE directly to the IP address of the HP.

    At home, I had a HP icon on the desktop , when you click on it, took me to a HP screen which included "Scan."   The current /same icon compels me now to 'Do you want to install more s/w'... and if 'yes', I have 2 viable options, but him 'add more software' is printing in black (can't click on it).  To the right of this 3rd option, if I choose 'Visit HP.com', I am overwhelmed at what HP wants me to then (spending money, is clearly the purpose of the screen).  No help there.

    Several times, I tried to remove all the HP s/w and printers and everything I could imagine... and then re-located to the s/w time from the CD and via the web.

    Signed: Really frustrated.

    I'm now printing/scanning OK... but not with the s/w which is here on data CD that accompanies the 2540... a package of s/w that I used quite happy.

    After HOURS of frustration trying to get the data loading on my laptop CD (never did it), I found the executable "HpSupportSolutionsFramework 12.0.26" on the HP site which (when run), load a new piece of s/w on my laptop Win-8.  No user manual.  No help screens.  No reasoning why the old s/w has been is no longer supported.  Without explaining why the s/w which charge a year ago would not now charge.  Ideally, the HP web site should have an assignment that my 'old' s/w has now been replaced by new ones.   Lack of communication on the part of HP.

    CBR

Maybe you are looking for

  • Help on upgrading 10.7.5 El captain in MS Office and other possible issues

    Hello! I have a Mac Book Pro December 2011, OS X 10.7.5. I struggled with the implementation of php and many other issues and have been repeatedly invited to improve my OS. As a newbie in CS, I frankly scared - it's the only computer I have, and I ca

  • Dance touchpad / mouse C satellite series

    Hi and Hello to all, I'm tring to reinstall Windows 7 but the mouse pointerkeeps "blinking in the upper left corner. As this is a new instalation can not go in setings etc. Tried to connect an external monitor, but can't getlaptop to show on I (not n

  • Tecra A6 - need XP disks system problem?

    I'm asking this for a friend who is not where I'm here slight inaccuracy A friend has a Toshiba Tecra (probably A6, but not sure). When she starts, she gets a message: * Windows XP could not start because the following file is missing or corrupt: \WI

  • Migration to Vista from another laptop

    I had a200-23u with vista home pro is installed and many other software. Then I had gave him another man, but before, I had made the disk image, which includes vista also. Now, I bought with vista home pro a200-23u too. I know that the oem versions c

  • several mode sequential slave modbus w/r

    Hello Looking for a few good tips. I use the library or labview modbus RTU mode, using a USB converter to 485. The library works very well as expected and performs all read/write operations that are implemented in the library. I'm trying to design an