ListView, don't sort correctly
So I have a file xml with about 100 entries I want my listview to display. It is structured as:
1 Hello world!!! 2 Another comment
I use an attached listview object that sends a request for/comments/the point, however my data is not sorted correctly when there are a large number of these items. I tried to check the ascending sort, I haven't tried not to check it out. I get the same result be it. I'm really confused as to why... I also tried to use a key to sorting and ranking by the number of comments, which is available in my xml but does not either. I'd love to help.
My code for the listview is as follows:
content: Container { layout: AbsoluteLayout {} ListView { id: hnComments dataModel: commentModel maxHeight: 1000.0 layoutProperties: AbsoluteLayoutProperties { positionY: 139.0 } // Add appearance definitions for the list items using the // listItemComponents list listItemComponents: [ // The second ListItemComponent defines how "listItem" items // should appear. ListItemComponent { type: "item" CustomComment { text: ListItemData.text padding: ListItemData.indent leftPadding: 5.0 topPadding: 5.0 } } // end of second ListItemComponent ] // end of listItemComponents list } // end of ListView attachedObjects: [ GroupDataModel { id: commentModel grouping: ItemGrouping.None sortedAscending: false //sortingKeys: ["commentNum"] }, DataSource { id: commentSource source: "bigrss.xml" query: "/comments/item" onDataLoaded: { commentModel.insertList(data); } } ] onCreationCompleted: { commentSource.load(); } }
I don't think that the data of the group model is able to leave your data in the initial order, so if I reason on which you would probably either necessary to add an additional field to control the sort order or change of ArrayDataModel if it will be suitable.
It seems that you have already tried to use commentNum to control the sorting? If so, it probably didn't work because of the treated data as a string. In this case, prefacing the numbers 0 would be a gross way to solve it... e.g. 01, 02, 03, etc (or three digits if you'll > 99 items, so 001, 002, etc.).
Tags: BlackBerry Developers
Similar Questions
-
tab "Search" not don't sort correctly
My topic titles are sort incorrectly in the 'Search' tab. I have included a page, so that you can understand. What controls the sort here?
The title of the topic is the H1 header inside the section. WTH?
Shannon
I finally thought to it! The problem is solved by removing the "" in the
header in HTML format. I replaced by a space. Yellow highlight see below.
-
The Explorer does not sort correctly
I am running Windows 7 Professional, service pack 1. Windows Explorer is not sort correctly (name). I have searched this site and other forums but couldn't find suggestions.
Hello
This is called "Intuitive" rather than the previous "literal" sort. The number 1173 is lower than 10091317, then it will appear first. First of all, this has been implemented in Windows XP.
There is an available tweak which may be closest to your preference.
How to enable or disable digital sorting in Windows Explorer:
http://www.SevenForums.com/tutorials/88153-numerical-sorting-Windows-Explorer-enable-disable.html
Alternatively, you can reverse the sort order by simply clicking on the column name header.
Let us know if it works for you.
Concerning
-
ORDER BY is not sorting correctly. Help, please!
Database:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64 bit Production
PL/SQL Release 9.2.0.4.0 - Production
CORE Production 9.2.0.3.0
I think that the problem is related to the field of OPERATION.
Order By properly sorts if I excluded all other fields except for POINT and EXPLOITATION,
If I order by OPERATION and all other fields in my Order By clause, then the sorting is done correctly. Instead of DESC, it sorts in the order of the CSA.
FIELD INFO:
TRANSACTION is defined as Varchar2 (4)
Published by: NCR March 10, 2009 08:50select dtls.description , dtls.item , dtls.revision , upper(dtls.serial) as serial , dtls.wo_num , dtls.wo_line , dtls.operation , '' as priorOp , dtls.ccn , dtls.mas_loc , dtls.ord_qty , dtls.compl_qty , dtls.lab_seq , dtls.outside , trim(rt.oper_text) as oper_text from ( select unique labor.description , labor.item , labor.revision , case when (trim(labor.serial) is null AND trim(cs.c_ss_serial) is not null) then cs.c_ss_serial when (trim(cs.c_ss_serial) is null AND trim(labor.serial) is not null) then labor.serial else labor.serial end as serial , labor.wo_num , labor.wo_line , trim(labor.operation) as operation , labor.ccn , labor.mas_loc , labor.ord_qty , labor.compl_qty , labor.lab_seq , labor.rtg_seq , labor.bcr_type , labor.outside from ( select trim(head.description) as description , head.item , head.revision , head.serial , head.wo_num , head.wo_line , head.operation , head.ccn , head.mas_loc , head.ord_qty , l.lab_complete_qty as compl_qty , l.lab_seq , '0001' as rtg_seq , 'CUR' as bcr_type , '' as outside from ( select lab.*, sr.serial from ( select i.description, lb.*, wo.item, wo.revision, wo.ord_qty from ( select lt.*, d.operation from ( select c.wo_num, c.wo_line, max(c.lab_seq) as lab_seq ,c.ccn, c.mas_loc from lab_tim c where c.ccn = '1' and c.mas_loc = '1' and c.wo_num not like '%INDIRECT%' and c.lab_tran_date between to_date('3/1/2009', 'mm/dd/yyyy') and to_date('3/10/2009', 'mm/dd/yyyy') --and trim(c.wo_num) = '55302' group by c.ccn, c.mas_loc, c.wo_num, c.wo_line ) lt, lab_tim d WHERE lt.ccn = d.ccn and lt.mas_loc = d.mas_loc and lt.wo_num = d.wo_num and lt.wo_line = d.wo_line and lt.lab_seq = d.lab_seq order by lt.wo_num, lt.wo_line, d.operation asc ) lb ,wo , item i WHERE lb.ccn = wo.ccn and lb.mas_loc = wo.mas_loc and lb.wo_num = wo.wo_num and lb.wo_line = wo.wo_line AND wo.mfg_close_date is null AND wo.REL_DATE is not null AND (wo.ord_qty - wo.scrap_qty - wo.complete_qty) > 0 and wo.STATUS 'C' and wo.STATUS 'U' and wo.item = i.item and wo.revision = i.revision AND ( i.pc ='2050' ) ) lab, ( select distinct i.description , wo.item,wo.revision, it.serial, wo.wo_num, wo.wo_line, wo.ccn, wo.mas_loc from itm_wosr it, wo, item i where it.ccn ='1' and it.mas_loc = '1' and it.wo=wo.wo_num and wo.wo_line = wo.wo_line and it.ccn = wo.ccn and it.mas_loc = wo.mas_loc and wo.status = 'I' and i.item = wo.item AND ( i.pc ='2050' ) group by wo.ccn, wo.mas_loc, wo.item, wo.revision, wo.wo_num, wo.wo_line, it.serial,i.description )sr WHERE lab.ccn = sr.ccn (+) and lab.mas_loc = sr.mas_loc (+) and lab.wo_num = sr.wo_num (+) and lab.wo_line = sr.wo_line (+) and lab.item = sr.item (+) and lab.revision = sr.revision (+) )head , lab_tim l WHERE head.ccn = l.ccn (+) and head.mas_loc = l.mas_loc (+) and head.wo_num = l.wo_num (+) and head.wo_line = l.wo_line (+) and head.operation = l.operation (+) and head.lab_seq = l.lab_seq (+) group by head.description , head.item , head.revision , head.wo_num , head.wo_line , head.ord_qty , head.operation , head.ccn , head.mas_loc , head.serial , l.lab_complete_qty , l.lab_seq ) labor ,c_ss cs WHERE labor.ccn = cs.ccn (+) and labor.mas_loc = cs.mas_loc (+) and labor.wo_num = cs.wo (+) and labor.wo_line = cs.wo_line (+) UNION ALL -----------------------END JUST LABOR ----- -----------------------BEING OUTSIDE PROCESSING ----- select o.* from ( --these are parts that are still in the realm the shipping/receiving department. Select distinct WOs. description, WOs.item, WOs.revision, WOs.serial, WOs.wo_num, WOs.wo_line ,WOs.operation, WOs.ccn, WOs.mas_loc, WOs.ord_qty, WOs.compl_qty , '0000' as lab_seq , '0001' as rtg_seq , 'CUR' as bcr_type , WOS.outside From ( ---Max labor on these (potentially) outside parts select shp.description, shp.item, shp.revision,max(lt.operation) as operation ,shp.wo_num, shp.wo_line, shp.serial, shp.outside, shp.ccn, shp.mas_loc from ( ---Outside Proc Only-----Used to get the Work Orders Of Interest select i.description, i.item, i.revision, wit.serial, wit.wo_num, wit.wo_line, max(wit.operation) as operation , wit.ccn, wit.mas_loc, wit.ord_qty, 1 as compl_qty, '0000' as lab_seq, '0001' as rtg_seq, 'CUR' as bcr_type , wit.outside from ( select wo.wo_num, wo.wo_line,wo.item, wo.revision, wo.ord_qty, ot.ccn, ot.mas_loc, ot.operation ,ot.outside, ot.serial from ( select a.* from ( select c.ccn, c.mas_loc, c.wo as wo_num, c.wo_line, case when trim(cs.operation) is null then '0' else cs.operation end as operation ,case when trim(c.receiver) is null then '(Out)' else '(Rcvd)' end as outside , c.c_ss_serial as serial from c_ss c, c_shipop cs where c.c_ss_serial is not null and c.ccn = cs.pur_ccn and c.mas_loc = cs.mas_loc and trim(c.receiver) is null and c.ccn = '1' and c.mas_loc = '1' -- and cs.dat_shipped > to_date('9/10/2008', 'mm/dd/yyyy') and c.c_shipop_ship_num = cs.c_shipop_ship_num and trim(cs.operation) '290.' -- and trim(c.wo) = '55302' --604ms ) a order by a.wo_num, a.wo_line, a.operation ) ot , wo WHERE ot.ccn = '1' and ot.ccn = wo.ccn and ot.mas_loc = wo.mas_loc and ot.wo_num = wo.wo_num and ot.wo_line = wo.wo_line AND wo.mfg_close_date is null AND wo.REL_DATE is not null AND (wo.ord_qty - wo.scrap_qty - wo.complete_qty) > 0 and wo.STATUS = 'I' order by wo.item, wo.revision, ot.operation ) wit ,item i WHERE wit.item = i.item and wit.revision = i.revision and i.pc 'boogayaagaa' AND ( i.pc ='2050' ) GROUP BY i.description, i.item, i.revision, wit.serial, wit.wo_num, wit.wo_line , wit.ccn, wit.mas_loc, wit.ord_qty, wit.outside order by i.item, i.revision, operation --<--slows query to 13 seconds from 607ms --607 ms )shp , lab_tim lt where shp.ccn = '1' and shp.mas_loc = '1' and shp.ccn = lt.ccn and shp.mas_loc = lt.mas_loc and shp.wo_num = lt.wo_num and shp.wo_line = lt.wo_line and shp.lab_seq < lt.lab_seq and shp.ccn = lt.ccn and shp.mas_loc = lt.mas_loc and lt.wo_num not like '%INDIRECT%' and trim(lt.operation) is not null and trim(lt.operation) '9000' --2/27/09 and trim(lt.operation) '9050' --2/27/09 group by shp.ccn, shp.mas_loc, shp.wo_num, shp.wo_line, shp.operation, shp.item, shp.revision, shp.description , shp.outside , shp.serial )lab, ----*---*---*---*-------*---*---*---*--END OUTSIDE AND LABOR-----*---*---*---*-------*---*---*---*------- ----*---*---*---*-------*---*---*---*-BEING OUTSIDE NO LABOR------*---*---*---*-------*---*---*---*------- ( --Get largest operation sent out select i.description, i.item, i.revision, wit.serial, wit.wo_num, wit.wo_line, max(wit.operation) as operation , wit.ccn, wit.mas_loc, wit.ord_qty, 1 as compl_qty, '0000' as lab_seq, '0001' as rtg_seq, 'CUR' as bcr_type , wit.outside from ( select wo.item, wo.wo_num, wo.wo_line, wo.revision, wo.ord_qty, ot.ccn, ot.mas_loc, ot.operation ,ot.outside, ot.serial from ( select a.* from ( select c.ccn, c.mas_loc, c.wo as wo_num, c.wo_line, case when trim(cs.operation) is null then '0' else cs.operation end as operation ,case when trim(c.receiver) is null then '(Out)' else '(Rcvd)' end as outside , c.c_ss_serial as serial from c_ss c, c_shipop cs where c.c_ss_serial is not null and c.ccn = cs.pur_ccn and c.mas_loc = cs.mas_loc and trim(c.receiver) is null and c.ccn = '1' and c.mas_loc = '1' -- and cs.dat_shipped > to_date('9/10/2008', 'mm/dd/yyyy') and c.c_shipop_ship_num = cs.c_shipop_ship_num and trim(cs.operation) '290.' --and trim(c.wo) = '55302' --604ms ) a order by a.wo_num, a.wo_line, a.operation ) ot , wo WHERE ot.ccn = '1' and ot.ccn = wo.ccn and ot.mas_loc = wo.mas_loc and ot.wo_num = wo.wo_num and ot.wo_line = wo.wo_line AND wo.mfg_close_date is null AND wo.REL_DATE is not null AND (wo.ord_qty - wo.scrap_qty - wo.complete_qty) > 0 and wo.STATUS = 'I' -- in process order by wo.item, wo.revision, ot.operation ) wit ,item i WHERE wit.item = i.item and wit.revision = i.revision and i.pc 'boogayaagaa' AND ( i.pc ='2050' ) GROUP BY i.description, i.item, i.revision, wit.serial, wit.wo_num, wit.wo_line , wit.ccn, wit.mas_loc, wit.ord_qty, wit.outside order by i.item, i.revision, operation --<--slows query to 13 seconds from 607ms --607 ms ) WOs -- outside items WHERE WOs.operation > lab.operation and WOs.ccn = lab.ccn and WOs.mas_loc = lab.mas_loc and WOs.wo_num = lab.wo_num and WOs.wo_line = lab.wo_line and WOs.serial = lab.serial )o order by item, revision, wo_num, wo_line ) dtls ,rtg_text rt where dtls.ccn = rt.ccn (+) and dtls.item = rt.item (+) and dtls.revision = rt.revision (+) and dtls.OPERATION = RT.OPERATION (+) and dtls.rtg_seq = rt.rtg_seq (+) and dtls.bcr_type = rt.bcr_type (+) order by dtls.item, rt.operation,dtls.wo_num desc
Hello
Wow, 441 lines unformatted SQL.
Why do you have several ORDER BY?
Why do you use DISTINCT and GROUP BY at the same time?
BTW,
order by dtls.item, rt.operation, dtls.wo_num desc
Simply means that dtls.wo_num is DESCENDING, rest is GROWING. That means that it is the same as
order by dtls.item ASC, rt.operation ASC, dtls.wo_num DESC
So maybe ORDER BY is sort properly after all? -Just a guess
Concerning
Peter
Published by: Peter on March 10, 2009 08:56
-Added a note on ASC/DESC -
My address book has 106 names. I selected to sort by ascending by display name. But it will not fully sort this way; on the contrary, the names appear as lots, within each of them, sorting is (mostly) correct. When I click on the name above, sort allows to switch between ascendants and descendants, as expected, but the change occurs within each batch apparent rather than global. Also, it seems that in 1 or several lots, the display name is not what I chose, for example first, change or display.
In other words, display is a long list of names, but it's really defined names, which are treated as such. I want to be in a 'set' and properly sorted as such.
If I understand correctly, modules include different ways to add functionality to Thunderbird. They are Extensions, themes and Plugins. So, you could say that the lightning is a part of the extension of a wider selection of modules.
-
Photos can not sort, correct?
Or more precisely, Photos can't be sorted.
When I sort the Albums in a folder, they sort properly. But if I make changes (for example, change the name of an Album) I have to manually inform the Photos to sort through the
Albums in the folder, once again.
In an Album, there is an option to keep things sorted by name, that is to say the photos themselves. (for example)
However, it doesn't seem to be the same option to keep things sorted to Folders.
All of this is correct?
Or I do something wrong? (such as the use of Photos as a way to manage some of my photos)
That is right. When you change the name of an album in a folder the contents of this folder are used.
Given that albums can be sorted manually in a file to change the name of an album are similar. The record sees as Chase you manually sort order. If the original default sorting is desired it should be redone.
-
Edition of contact list not done does not correctly
I imported my list of Contacts of MTS (in Manitoba, Canada) just made a few changes to some of the contacts & removed some institutions. When I checked the list of Contacts, everything seems to have been done correctly... but when I tried to compose a new email & grown up Contacts by clicking on 'To'... the list appears showing my contacts as they were before I did all the editing. What's happened here & how do difficulty she...
Hi wendyweber
I suggest refer you to the links below and check if you can try re-import the list contact (if you have a list of contacts of MTS) and try changing contacts.http://Windows.Microsoft.com/en-us/Windows-Vista/import-export-or-change-the-format-for-contact
http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-Windows-Mailhttp://Windows.Microsoft.com/en-us/Windows-Vista/managing-your-contacts
I hope this helps.
-
program files don't download correctly on my pc
When I go to a website and download files such as (winamp, windows media, cnet player) download bar downloads I put it to record to my downloads folder and it shows finished downloading but when I go to the folder, nothing is there. nothing works when I run or save a file. Anyone know what I can do to fix this?
Windows sometimes has protection files and dumps in a hidden location similar to this one.
"C:\Users\usernamexxxx\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\C\Users\usernamexxx" typed in the box to begin running with the correct user name and the line includes quotes. Discover the subfolders of this location, particularly one called downloads
If no downloads never go away and find themselves in the situation above, read this.
What does Internet Explorer protected mode?
Internet Explorer protected mode is a feature that makes it more difficult for malware to be installed on your computer.
In addition to helping protect your computer from malicious software, protected mode allows you to install wanted ActiveX controls or modules when logged in as an administrator.
Protected mode is enabled by default in the Internet, intranet, Local and sensitive sites areas and an icon appears on the status bar to make you know it is running.
By clicking on 'Protected Mode' (just above and to the left of the clock) allow you to turn it off, but don't forget to re-enable it.
-
Gadgets don't display correctly in Windows 7
My gadgets displayed more correctly after I uninstalled McAfee - I can add to the sidebar, but they appear only as black or colored squares or lines. I tried to delete the windows gadgets and time them, I deleted the settings.ini and nothing works. I don't want to add another user account, I just want one on my computer. What is McAfee doing when he uninstalled from ruin?
You can follow these steps: -.
1. This could be caused because you can hepatitis user account control has changed. If not then
Some DLLs must be re-registered. One of them can help:
http://www.Winhelponline.com/blog/gadgets-not-displayed-correctly-Windows-7-Vista/
http://www.Winhelponline.com/blog/Calendar-Gadget-Sidebar-blank-orange-background/
Restart Windows. And if this is the problem, this could be caused by an extra key created under Zones, by some third party software.
2. click on Start.In search box type regedit and press to enter. Allow the program to run. If it asks you to admin. password enter it.then to \Software\Microsoft\Windows\CurrentVersion\Internet Settings\ [HKEY_CURRENT_USER]areas- and delete it.
Please NOTE farm sidebar.exe in the Task Manager (look for it in the start search box)
I'm sure it will work. Please answer.
-
Things don't display correctly on firefox
Some icons and characters are not correctly on firefox. Works fine on Chrome or safari.
Please see screenshot
Running osx 10.9.5
Have you checked the links I posted?
Start Firefox in Safe Mode {web link} by holding down the < shift >
(Mac options) key and then from Firefox. Is always the problem? -
Themes don't load correctly.
Not sure if it is something specific to the latest version of Firefox (23.1), but the themes do not appear to load correctly. More precisely, it looks like the background image is not repeated correctly to the bottom of the sidebar (all in a Sidebar), as shown here:
http://btb2.free.fr/temp/screw_this.jpg
What's particularly weird, is that he * was * work properly at the start and then just stopped in the middle of a session for no reason apparent and now I can not understand how to operate properly again. Ideally, I would like to find a way to download the theme and edit/store locally, but Google has been surprisingly useful in this area since the first step (download the .jar file) seems impossible for the themes hosted on addons.mozilla.org.
Closing - accidental double post.
-
after upgrade many sites don't display correctly cant connect you to the Bank
IE. works very well, but after an update on 30 December Firefox does not like before, I can't get into my Bank, page locks upwards, web pages have no pictures.
EBay will not correctly display webTry following the steps described here: Web sites look bad or display differently they should
-
Web pages don't display correctly - help
Hello. I have to apologize in advance because I'm not very technical. We have Mozilla Firefox and for awhile now websites have been watch properly. To try to explain, the pages are always white with a base in black font. Some pages also contain black lines in the text. Some graphics appear not as for example the logo of google on google.com/co.uk and others as the "add to basket" on amazon (this chart type) Photos seem to show. Nothing is display quite right with regard to the position on the page etc. Can someone help me solve this problem? I searched online for hours now without success, has contacted the internet provider without answer, cleared the cache, uninstalled and reinstalled firefox, deleted all cookies, checked the page style is correct, check Javascript is working properly, disabled the antiviral software to see if this was the cause... which none have had no effect at all. Anyone any ideas?
Kind regards
SarahHey Sarah, try to follow these instructions: Web sites look bad or display differently they should
-
15 R006TU: some sites don't display correctly in my browser all the
graphics do not plurarite correctly in my browser. Let's take an example. I opened facebook.com.
Then I get this type of photo. Please help someone. Its kinda urgent. I tried many things such as the erasure of memory cache, uninstalling browsers. Can not yet able to resolve
This looks more like a problem of security software that is the cause. In view of all of your browser to do this, you must look at what security software using your.
-
sorting of the column 'To' of windows live mail is not sort correctly
Windows Live Mail email sort problem
I'm trying to sort email in the "To" column, but it does not properly sort by the name of the recipient. In fact, the kind that result is meaningless.
Ask in the Windows Live Solution Center Mail Portal. Brian Tillman [MVP-Outlook]
--------------------------------
https://MVP.support.Microsoft.com/profile/Brian.Tillman
If a response may help, please vote it as useful. If a response to the problem, please mark it as an answer.
Maybe you are looking for
-
Firefox Sync is not synchronize all parameters
Simply set the sync firefox until firefox sync between my Win7 laptop and Tablet Win8, most of the firefox settings * seem to sync and all extensions, but none of the settings related to extensions is present on the win8 tablet. Is that how it should
-
What happened to link previews in Firefox 25.0.1?
Firefox versions prior to the current one (25.0.1 for Windows) displays a pop-up URL when you hover your mouse over a hyperlink in a Web page. This feature seems to have disappeared (or disabled) on my Windows 7 laptop, but it still works on my Win X
-
Windows XP keeps disconnecting
Hello Computer daughter guard disconnection with everything I try to do on the computer, play games that have been installed or while online with IE and Firefox. It brings back me to the screen, click on its name and reconnect so it is not closed, w
-
Photosmart HP 5510 - will not print using black ink
I have problems with my HP Photosmart 5510 all-in-One printer, because it will not print in black. All cartridges are brand new and are genuine HP cartridges. I've never used anything other than HP cartridges, and I believe that I have would be consi
-
Intermittent problems wireless on HP Deskjet 3050 has
Hello I recently bought a HP Deskjet 3050 a J611. The installation was simple and everything seems to work properly. However, after a few hours, the printer was no longer visible on the network (couldn't print unable to connect to the web page of the