Sorting confusion

Okay, this year as I'm trying to get my christmas letters sent out, I ran into sorting problems in address book. When I have it set to sort by first name, everything displays fine. On the other hand, when I have it sort by last name, it's like it doesn't work. Everything is displayed randomly. I did not have this trouble in Leopard, it's the "snow" that messed things up!
Hmm, what can I do to fix this?

Ho! I figured my problem out. My settings under general preferences were wrong.

Similar Messages

  • File Sorting Confusion in Finder in OS X Snow Leopard

    I am about to embark on renaming thousands of image files and want to make sure that once renamed, they all sort correctly. On running some simple naming tests to see how things may look in Finder, I have come up against a perplexing problem, which has utterly confounded me.
    I duplicated a file witht a name consisting of a three digit number, several times. I renamed each duplicate by adding a series of zeros at the beginning consecutively, from one zero to three. These sorted as expected, as below. (I say "as expected", but I didn't know what to expect. They looked "uniform" though!)
    000123.tif
    00123.tif
    0123.tif
    123.tif
    I repeated this using 234.tif, with the same results. However when I tried again with a randomly chosen number of 392.tif, they were sorted like this:
    0392.tif
    00392.tif
    000392.tif
    392.tif
    Two further repeats using 427.tif, followed by 850.tif resulted in different, yet incorrect sorting arrangements to both those as well.
    As if that wasn't confusing enough, I copied and pasted all sixteen files to a new folder. With the exception of the 123.tif and 234.tif series of files, all of them displayed in a completely different sorting arrangement to the originals. Repeating that, resulted in yet another configuration.
    I've tried selecting different sorting arrangements in View and even restarted my Mac, with no success .
    Can someone explain what is happening here?
    Thanks in advance.

    For photos at least, maybe Video also though, GraphicConverter has a powerful tools for many things, like resize...
    http://www.lemkesoft.com/
    Just be sure to save the changed one with a different name to peserve your big original pic

  • IMac or Mac Pro

    I have asked this question before and I'll be honest - I was sorta confused with some of the responses so I am back with what I hope are better thought out questions. I am torn between the iMac 3.06 and the Mac Pro 2.66 4-core.
    I am not a pro but think of myself as a prosumer. I do a lot of Photoshop stuff, editing in iMovie and Final Cut Express - shoot a lot of stills and HD Video. NEVER DO GAME STUFF.....
    Here is my dilemma...
    On the Apple store site I created 3 machines with 8GB of Ram, AppleCare, Wireless Mouse, 1TB Hard Drive.
    (iMac 3.06 - Mac Pro quad 2.66 - Mac Pro 2.66 8-core)
    The iMac comes in at $3,388 with the extra 4GB of Ram. What is with $1,000 for an extra 4GB of Ram. Why so much higher than Mac Pro Ram????? Do I really need 8GB????
    The Mac Pro 2.66 Quad comes in at $4,067 with the extra 2GB of Ram (seemed too reasonable not to add more Ram) and the 24" Monitor. Is this worth the $679 more since neither one can have more than 8GB of Ram?????
    The Mac Pro 2.66 8-core comes in at a whoping $6,097 with the extra 2GB of Ram and the 24" Monitor. This kinda makes the choice between the 1st 2 since the difference of $2,709 appears a bit rediculous between the iMac and the 8-core Pro......WHY THIS MUCH MONEY?? ARE THESE REALLY COMPETITIVE WITH THE DELL ETC??? DO OTHERS EVEN BUILD A MACHINE AT THIS PRICE?
    I know this is long and with a few concerns - thank you for indulging.
    Thanking you in advance for any input I receive.
    Wally

    First of all, don't buy apple RAM. It is extremely overpriced. DO, however, keep the RAM that apple gives you. They won't service your Mac if it has 3rd-party RAM. If you need to have your mac serviced, remove the 3rd-party RAM until they're done servicing it. I would stick with the iMac though, You get more space (no tower). You have the screen built into the price as well. The applications you use don't even recognize the 8-cores of the Mac Pro. Adobe CS4 doesn't take advantage of the better GPU in the Mac Pro either. If you have A LOT of accessories that you connect to your Mac, you might want to consider the cheaper Mac Pro. USB hubs are a pain and they stop working if you use too many. Also, the Mac Pro has MANY FireWire ports, all backwards compatible. The Mac Pro is also more expandable. Overall, I would make it a choice between the 1st Mac Pro and the iMac. Media work will also render faster on the Mac Pro, so the better graphics isn't totally a waste. Also, with Snow Leopard coming up, multiple cores will be utilized more. If you have the money, I would go with the cheaper Mac Pro. If you are buying speakers, I would personally recommend the Bose Companion 2 speakers. They're only $99 so they're not much of a hole in your pocket.

  • Are you guys going to fix the memory leak in version 6

    Hi I was wondering if you guys were going to fix the huge memory leak in Firefox 6. As of now I use windows Vista 32bit Ultimate and Firefox is using 164MB of memory to view www.google.com. I'm sorta confused also on how SLOW the browser is. I never seen F.F act this way since F.F 6. I'm hoping that this will be resolved in version 7 cuz this is not cool so slow in all.

    On the "flip-side", I had the smoothest and quickest iTunes upgrade/install ever.  This was on my Windows 7 Professional, 64bit system.
    That you performed an assumedly 'clean' reinstall of your OS, is not a good sign.  Obviously, iTunes doesn't like something within your system.
    Here are the next steps that I would take if in your position:
    -  Are you absolutely positive that you have the 64bit version of iTunes?
    -  Re-download a new copy of the 64bit version of iTunes 10.5
    -  Try downloading iTunes from one of the 'mirror sites' - FileHippo is good
    -  Call your PC's manufacturer and see if they are aware of any conflicts with your specific machine's build with respect to iTunes
    -  Temporarily use another PC (if available) to get your iPhones up and running
    Best of Luck

  • External Harddrive, time machine issue

    alright im sure this is gonna seem sorta confusing but here it goes. right now i have a 160GB hard drive, and 40 GB of stuff on my 250GB external harddrive. all of it is full. and now i was wondering if i could back up the 200 GB of info (160 on hard drive and 40 on external) onto my external hardrive using time machine because i have i still have 210 GB left on my hard drive. hopefully this makes sense. thanks!

    First, if you have 210 GB of free space and wish to backup 200GB of data, it won't work - the TM backup drive should be about twice as big as what you want to back up to allow for expansion as newer backups are made.
    Second, I'm not totally sure about this, but I don't think you can have a TM backup drive that contains the backups AND other data and have that other data backup as well. In other words you can't have TM backup data from an external drive to the same drive (otherwise it will backup the backups).
    You can have files on your external drive and also use the rest of the external's free space to backup your 160GB internal drive.

  • Using Elements 5 and 8.

    If I install Elements 8, can I still use Elements 5 as my organizer? In another words can I just toggle between the two programs...using my favs from both?    Thanks for any help.

    Thanks again. I have been waiting to install 8 until I had a valid reason 
    to keep the program cuz I have been quite happy with 5. However a few new
    things  in 6,7, and 8 have piqued my interest. I will now hit INSTALL!! 
    Would  you mind answering another question for me? Should I just install the
    Editor in  8 (I don't even know if that is possible) and then uninstall the
    Editor in  5........and not install at all the Organizer in 8 and just keep
    5?  Than  sounds sorta confusing..    If you don't want to take the time to 
    answer I will understand. It's just that you are the only one who answered
    my  first question to my satisfaction., ..which I appreciate. I am fairly new
    to  photo editing so I have lots of questions. (Don't worry, I won't ask
    you to  answer all of them!!     Thanks!!

  • Did I buy the wrong wireless NIC card?

    Hello all .... I have a small home network consisting of 3 laptops and 2 desktops ... They were all connected via a WRT54G router with the one desktop farthest away using a wmp11 wireless NIC ..... this particular desktop is approx 75 - 100 ft away from the router ... so far there's been no problems,  but that one machine always showed EXCELLENT signal strength (when you'd over the cursor over the little wireless icon in the systray) ....
    For some unexplained reason (cause I'm dumb) I decided to purchase a new router, I got the Linksys WRT160N ..... well the machine with the wmp11 wouldn't even boot up any more, let alone communicate with the router. So I ordered a new wireless NIC for it, a wmp600N...which I installed and now at least that machine boots! The machine does connect to my network, and appears to run on the internet fine, however my question is now whenever you check that machines wireless status, it always says signal strengt is "Poor" or "Very Poor". I see now (I don't know why I didn't notice it before) that there is yet another wireless NIC for that router, and am now wondering if I bought the wrong nic card. I'm just wondering why my signal went from always showing EXCELLENT to now showing POOR all the time.
    When I first ordered this router off the Linksys site, I remember distinctly specify "RANGE" as one of my requirements, yet when I received it from Linksys the box was clearly marked it was NOT for range.... so I am sorta confused.

    I guess I am just concerned as there seems to be so many networks (routers) around here, there is always 7 or 8 connections available on the list of avail networks and I am just concerned about that one machine connecting to the wrong router when it is booted up ....
    when I was using the wrt54g, and it always showed "Excellent" and the others always showed poor to very poor (1 or 2 bars) ,,,,,,,
    but now with the new router always showing just one or two bars as well on that one machine .... I worry that it may connect to the wrong thing sometime. This wouldn't be such a worry for me IF there were simply an option to set "Connect to this network ONLY" on the nic,
    but there isn't, just a "Connect to preffered network IF in range" ..........
    Not that it matters here is the whole reason I have these machines and routers on a network is because I am severely disabled with M.S. and getting up and down steps to all my familys machines isn't so easy, and that one machine about 75 feet from me is impossible. So I have them all  networked thru the router, and I use a remote control program (called Radmin) to access the various machines from this one laptop.
    I am starting to wonder if the fact that nothing will work when this router is on 20mhz bandwith at all, is indicative of some sort of problem with the router itself? That is funny as the wrt54g was 20mhz only I beleive, and it worked perfectly!

  • New Pro Apps o.k. on 10.4.11?  And G5 DP PPC?

    Release notes are sorta confusing---on page 3 says 6.0.2 compatable w/10.4.11 & 10.5, but
    nothing says about 6.0.5 and what machines is o.k. on.
    Anybody?
    Thanks,
    p2

    Last week I got a new system drive for my G5 and installed 10.5, ran all software updates, then installed FCS2 and installed all updates. Everything is working except for Motion, which I haven't had time to troubleshoot yet.
    FCP is rock solid.

  • Pre order FAQ question

    In the FAQ section i read this and was sorta confused, perhaps too much wine.
    "Any data on your current phone (including data on your SIM card) will not be transferred to your new iPhone"
    i can't imagine i am to take that literally?
    are the os's that different that data will not transfer?

    just do a backup on iTunes before plugging in your new iPhone. once the backup is complete, plug in your new iPhone and it will promt you to re-install your data over to your new iPhone.

  • Streams don't happen until tab made active?

    I am sorta confused by some behavior I am seeing in an application I am making.
    Basically, I am testing a real time game against myself.  I have noticed if I do it in such a way that both game instances are in different tabs, all the messages I am sending don't happen until I view the tab.  I can run around and do stuff on one tab, then when I switch to the other I see the whole thing happen  rapidly until it catches up.  I don't think it is just the interpolation I am doing, because I send messages indicating a player has been hit and it doesn't happen until I watch the whole thing happen on that screen way later.  Can anyone point me in the right direction about why this is happening?  I want to switch to the other tab and simply have it be in the right spot rather than trying to catch up.  It is probably a rare situation, but it is a symptom of something greater that I need to fix.
    Sorry if I didn't make sense.  It is hard to describe.

    Sir i'm not trying to tell you what to Do but i would call them this Morning they open at 6:00am an tell them they need to Expedite this the Change You are out with both is this Correct if they can't get the ported No. an i would say it's because your land line Company hasn't re-leased it. Verizon needs to get you a Temporary No. So you are not with out a phone. You can't be with out a phone an the C.S.R should of know that.. 

  • UART to DAQ

    Hello,
    I am new to LABVIEW, and I'm currently working on my final year project. 
    So basically I have a stepper motro driver that has a UART port. Now, in order for me to interface the motor with LABVIEW I will need to connect the motor via the driver via the UART port to the DAQ right? So my question basically is how do I do that? Is there are special cable? If yes, can you guys please paste links that could help me choose one. If no, then please help me find a solution to this. I need to get this project done in a week. 
    Also, if you guys know of any tutorials where I can easily learn how to setup a PID controller on LABVIEW and also code my control algorithm (if that's even possible in LABVIEW) please paste those tutorial links here too. 
    Appreciate the help. And God Bless. 
    Peace. 
    Solved!
    Go to Solution.

    Hey guys, I am not sure if I've made myself clear yet. I apologize for the confusion. Also maybe because I am sorta confused. I'm not exactly sure what you guys are talking about lol 
    Anyways, please correct me if I'm wrong and you'll probably have to spell it ou if I am but:
    From what I understand, 
    Inorder for me to connect my driver (that has a UART port) to my laptop, I will need a USB - UART converter. like this one (http://www.cytron.com.my/p-uc00a)
    After doing so, I am assuming that I can now send commands to the motor (via the driver mentioned above) from LabVIEW using the VISA block.
    Is this right? 
    I need to know for sure because I have to buy a converter ASAP and I don't want it to go to waste. 
    Thank you guys for your time. I really appreciate it  

  • Confusion in FILTER and SORT operations in the execution plan

    Hi
    I have been working on tuning of a sql query:
    SELECT SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), 0)),
           SUM(DECODE(CR_FLG, 'C', 1, 0)),
           SUM(DECODE(CR_FLG, 'R', NVL(TOT_AMT, 0), 0)),
           SUM(DECODE(CR_FLG, 'R', 1, 0)),
           SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), -1 * NVL(TOT_AMT, 0))),
           SUM(1)
         FROM TS_TEST
        WHERE SMY_DT BETWEEN TO_DATE(:1, 'DD-MM-YYYY') AND
           TO_DATE(:1, 'DD-MM-YYYY');Table TS_TEST is range partitioned on smy_dt and there is an index on smy_dt column. Explain plan of the query is:
    SQL> explain plan for  SELECT SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), 0)),
      2         SUM(DECODE(CR_FLG, 'C', 1, 0)),
      3         SUM(DECODE(CR_FLG, 'R', NVL(TOT_AMT, 0), 0)),
      4         SUM(DECODE(CR_FLG, 'R', 1, 0)),
      5         SUM(DECODE(CR_FLG, 'C', NVL(TOT_AMT, 0), -1 * NVL(TOT_AMT, 0))),
      6         SUM(1)
      7    FROM TS_TEST
      8   WHERE SMY_DT BETWEEN TO_DATE(:1, 'DD-MM-YYYY') AND
      9         TO_DATE(:1, 'DD-MM-YYYY');
    Explained.
    SQL> @E
    PLAN_TABLE_OUTPUT
    Plan hash value: 766961720
    | Id  | Operation                            | Name                | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT                     |                     |     1 |    14 | 15614   (1)| 00:03:08 |       |       |
    |   1 |  SORT AGGREGATE                      |                     |     1 |    14 |            |             |       |       |
    |*  2 |   FILTER                             |                     |       |       |            |          |       |       |
    |   3 |    TABLE ACCESS BY GLOBAL INDEX ROWID| T_TEST             | 79772 |  1090K| 15614   (1)| 00:03:08 | ROWID | ROWID |
    |*  4 |     INDEX RANGE SCAN                 | I_SMY_DT         |   143K|       |   442   (1)| 00:00:06 |       |       |
    Predicate Information (identified by operation id):
       2 - filter(TO_DATE(:1,'DD-MM-YYYY')<=TO_DATE(:1,'DD-MM-YYYY'))
       4 - access("SMY_DT">=TO_DATE(:1,'DD-MM-YYYY') AND "SMY_DT"<=TO_DATE(:1,'DD-MM-YYYY'))
    17 rows selected.
    SQL>I am not able to understand the FILTER & SORT operations. As there is an index on SMY_DT column, so index range scan is fine. But why a FILTER (Step no 2) and SORT (Step no 1) operation after that ?
    Oracle version is 10.2.0.3 on AIX 5.3 64 bit.
    Any other information required please let me know.
    Regards,
    Amardeep Sidhu

    Sort aggregate tells you that there was performed an aggregate operation which returns one row, in opposite to sort order by or hash group by which indicates you have grouping, and there more than one row can be returned.
    SQL> SELECT SUM(comm) FROM emp;
    SUM(COMM)
          2200
    Plan wykonywania
    Plan hash value: 2083865914
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |     2 |     3   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |      |     1 |     2 |            |          |
    |   2 |   TABLE ACCESS FULL| EMP  |    14 |    28 |     3   (0)| 00:00:01 |
    SQL> SELECT AVG(comm) FROM emp;
    AVG(COMM)
           550
    Plan wykonywania
    Plan hash value: 2083865914
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |     2 |     3   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |      |     1 |     2 |            |          |
    |   2 |   TABLE ACCESS FULL| EMP  |    14 |    28 |     3   (0)| 00:00:01 |
    SQL> SELECT MIN(comm) FROM emp;
    MIN(COMM)
             0
    Plan wykonywania
    Plan hash value: 2083865914
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |     2 |     3   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |      |     1 |     2 |            |          |
    |   2 |   TABLE ACCESS FULL| EMP  |    14 |    28 |     3   (0)| 00:00:01 |
    SQL> SELECT deptno, SUM(comm) FROM emp GROUP BY deptno;
        DEPTNO  SUM(COMM)
            30       2200
            20
            10
    Plan wykonywania
    Plan hash value: 4067220884
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     3 |    15 |     4  (25)| 00:00:01 |
    |   1 |  HASH GROUP BY     |      |     3 |    15 |     4  (25)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| EMP  |    14 |    70 |     3   (0)| 00:00:01 |
    SQL>Edited by: Łukasz Mastalerz on Jan 14, 2009 11:41 AM

  • Formula confused by sorting

    I feel that I may have missed the right page in a manual with this problem.
    I have a table recently imported from XL (with no initial problems). The table has some 3,000 rows and 12 columns. It is a listing of geographic locations, map No. grid reference, and location category and data related to each location. The related data is updated frequently.
    Working with the list requires frequent filtering and sorting (filtered and unfiltered) all of which works fine. Several of the columns require either countif or counta calculations involving all 3000 rows. This also works fine until the rows (selected to avoid header rows and calculation results at the base) are re-sorted. After sorting based on one or two columns the simple formula: Countif(C5:C2943,"Yes") becomes something like: Countif(C345:C496,C5:C125,C1234:C2341) . . .etc. That is, the single array becomes seriously fractured such that it does not produce a numerical result. This occurs whether the cell references in the formula are relative or absolute. How can I prevent this happening and still use what appears to be a quite basic function?
    Q2. Is there a way to permanently define a contiguous range of rows for sorting without having to manually select it before each sort?
    Many thanks.

    Thank you for your reply (and for the unnecessary rapp over my knuckles). I have been searching for several days. The reply you directed me too was seriously over-complicated for what I was wrestling with.
    Instead I have found a very simple answer. All it required was a simple new table to contain the formula, strategically placed to appear correctly in the printed reports. I am very new to Numbers so still addressing the logic/layout differences to XL which I have been using for many years.

  • Will someone PLEASE sort out this confusion.

    A while ago I sent an email to BT regarding clearing up a confusion on my paperless bill. I received the following directly quoted reply which is by no means clear.
    "I have checked your account and confirm that the bill dated 11/08/11 for £30.20. The recent bill dated 12/09/11 is your other monthly bill for £42.41.
    Presently, you are on Broadband option 3 + Unlimited Anytime plan at £28.00 (inclusive VAT) per month and Line rental is on top of this, which is £13.90 (inclusive VAT) per month. So, these are your monthly charges."
    So am I paying 2 monthly payments on 2 seperate bills. Or am I paying £28 for the broadband plus the line rental fee of what appears to be approx £13 or so as ONE monthly bill combined, a total of £42.xxx a month.
    This is starting to get confusing to say the least. Because if I take what has been said by the person who replied to me I am now paying a total of what appears to be £70 odd per month for a service that stated £28+line rental for both bb and anytime calls when I clicked to start it.
    Thanks
    Garry.

    Hi You can  give the Live Chat team a go, you can chat to them by clicking on the banner at the top of the "Bills & Call Packages" board.
    They're open Monday to Friday 09:00 to 18:00.
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • Cannot sort child rows in multilevel tree table

    Hi,
    I originally hijacked a two-year-old forum thread that was vaguely similar to my issue, but a kind forum moderator split my post away
    (and deleted my other hijack post asking this same question)
    so that my inquiry might be viewable on its own.
    Hopefully someone can pay attention to my issue instead of getting it confused with those other old forum threads.
    So, here we go ...
    Is sorting in a treeTable at a particular level possible? Just want to let you I have tried the following approaches to do this. But it dis not work for me.
    I have tree table with 2 levels. I am trying to sort the child rows based on its column say "Display Sequence".
    User can type in number in this column which contains input text. On value change event of the this field, all the
    child rows in the level 2 need to be sorted. This needs to be done without committing the data. On commit it works,
    because it sorts based on order by clause. I want the child rows to be sorted on value change event. Following
    various approaches I tried.
    TreeModel tModel = (TreeModel)treeTable.getValue();
    SortCriterion sortCriterion = new SortCriterion("DisplaySequence",true);
    List<SortCriterion> sortCriteriaList = new ArrayList<SortCriterion>();
    sortCriteriaList.add(sortCriterion);
    tModel.setSortCriteria(sortCriteriaList);
    The above code does not work, As "DisplaySequence" is not available in the parent view object.
    Here is approach no 2
    JUCtrlHierBinding treeTableBinding = null;
    JUCtrlHierNodeBinding nodeBinding = null;
    JUCtrlHierNodeBinding parentNodeBinding = null;
    JUCtrlHierTypeBinding nodeHierTypeBinding = null;
    Key rowKey;
    Object dispSeqObj;
    Number displaySequence = null;
    Map<Key,Number> keyValueMap = null;
    Set<Key> emptyValueKeySet = null;
    Map<Key,Number> sortedKeyValueMap = null;
    DCIteratorBinding target = null;
    Iterator iter = null;
    int rowIndex = 1;
    RowSetIterator rsi = null;
    Row currentRow = null;
    Row row = null;
    RowKeySet selectedRowKey = lookupTreeTable.getSelectedRowKeys();
    Iterator rksIterator = selectedRowKey.iterator();
    if (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    System.out.println("key :"+key);
    treeTableBinding = (JUCtrlHierBinding) ((CollectionModel)lookupTreeTable.getValue()).getWrappedData();
    nodeBinding = treeTableBinding.findNodeByKeyPath(key);
    parentNodeBinding = nodeBinding.getParent();
    //rsi = nodeBinding.getParentRowSetIterator();
    rsi = parentNodeBinding.getChildIteratorBinding().getRowSetIterator();
    keyValueMap = new LinkedHashMap<Key,Number>();
    emptyValueKeySet = new LinkedHashSet<Key>();
    // Gets the DisplaySequence by iterating through the child rows
    while(rsi.hasNext()) {
    if(rowIndex==1)
    row = rsi.first();
    else
    row = rsi.next();
    rowKey = row.getKey();
    dispSeqObj = row.getAttribute("DisplaySequence");
    if(dispSeqObj!=null && dispSeqObj instanceof Number) {
    displaySequence = (Number)dispSeqObj;
    keyValueMap.put(rowKey, displaySequence);
    }else {
    emptyValueKeySet.add(rowKey);
    rowIndex++;
    rowIndex = 0;
    // Sort the numbers using comparator
    DisplaySequenceComparator dispSeqComparator = new DisplaySequenceComparator(keyValueMap);
    sortedKeyValueMap = new TreeMap<Key,Number>(dispSeqComparator);
    sortedKeyValueMap.putAll(keyValueMap);
    rsi.reset();
    nodeHierTypeBinding = nodeBinding.getHierTypeBinding();
    System.out.println("nodeHierTypeBinding :"+nodeHierTypeBinding);
    String expr = nodeHierTypeBinding.getTargetIterator();
    if (expr != null) {
    Object val = nodeBinding.getBindingContainer().evaluateParameter(expr, false);
    if (val instanceof DCIteratorBinding) {
    target = ((DCIteratorBinding)val);
    ViewObject targetVo = target.getViewObject();
    System.out.println("targetVo :"+targetVo);
    targetVo.setAssociationConsistent(true);
    //ri = target.findRowsByKeyValues(new Key[]{rowData.getRowKey()});
    rsi = parentNodeBinding.getChildIteratorBinding().getRowSetIterator();
    //rsi = nodeBinding.getParentRowSetIterator();
    // Rearrange the tree rows by inserting at respective index based on sorting.
    ViewObject vo = nodeBinding.getViewObject();
    iter = sortedKeyValueMap.keySet().iterator();
    while(iter.hasNext()) {
    currentRow = rsi.getRow((Key)iter.next());
    rsi.setCurrentRow(currentRow);
    rsi.setCurrentRowAtRangeIndex(rowIndex);
    //rsi.insertRowAtRangeIndex(rowIndex, currentRow);
    rowIndex++;
    iter = emptyValueKeySet.iterator();
    while(iter.hasNext()) {
    currentRow = rsi.getRow((Key)iter.next());
    rsi.setCurrentRow(currentRow);
    rsi.setCurrentRowAtRangeIndex(rowIndex);
    //rsi.insertRowAtRangeIndex(rowIndex, currentRow);
    rowIndex++;
    rsi.closeRowSetIterator();
    AdfFacesContext.getCurrentInstance().addPartialTarget(treeTable);
    private class DisplaySequenceComparator implements Comparator {
    Map<Key,oracle.jbo.domain.Number> dispSeqMap = null;
    public DisplaySequenceComparator(Map<Key,oracle.jbo.domain.Number> dispSeqMap) {
    this.dispSeqMap = dispSeqMap;
    public int compare(Object a, Object b) {
    Key key1 = (Key)a;
    Key key2 = (Key)b;
    oracle.jbo.domain.Number value1 = dispSeqMap.get(key1);
    oracle.jbo.domain.Number value2 = dispSeqMap.get(key2);
    if(value1.getValue() > value2.getValue()) {
    return 1;
    } else if(value1.getValue() == value2.getValue()) {
    return 0;
    } else {
    return -1;
    In the above code I tried to perform sorting of DisplaySequence values using comparator, then tried to rearrange
    nodes or rows based on sort resurts. But rsi.insertRowAtRangeIndex(rowIndex, currentRow) give
    DeadViewException...unable to find view reference. While setting current row also does not work.
    Approach 3.
    DCIteratorBinding iter1 =
    bindings.findIteratorBinding("childIterator");
    iter1.executeQuery();
    SortCriteria sc = new SortCriteriaImpl("DisplaySequence",false);
    SortCriteria [] scArray = new SortCriteria[1];
    scArray[0] = sc;
    iter1.applySortCriteria(scArray);
    Any help in Sorting Child nodes ADF treeTable is appreciated. Thanks in Advance.
    Abhishek

    Hi Frank,
    Thanks for your reply. I have tried similar approach for sorting tree table child rows based on user specified number and it works. But there is a limitation for this. This sorting works only for read only/transient view object. For updatable view object after sorting, data cannot be saved or updated, as it cannot find the rowid. Here is what I tried
    In the ParentViewImpl class,
    1. overrode the method createViewLinkAccessorRS, so that this method is forcefully executed.
    @Override
    protected ViewRowSetImpl createViewLinkAccessorRS(AssociationDefImpl associationDefImpl,
    oracle.jbo.server.ViewObjectImpl viewObjectImpl,
    Row row,
    Object[] object) {
    ViewRowSetImpl viewRowSetImpl = super.createViewLinkAccessorRS(associationDefImpl, viewObjectImpl, row, object);
    return viewRowSetImpl;
    2. Added the following method, which will be invoked on valueChange of DisplaySequence in child row. Expose this method through client interface. This method accept a parameter i.e. parent row key of the child row.
    public void sortChildRecords(Key parentKey) {
    ViewObject viewObject = null;
    String type = null;
    if(parentKey==null) {
    Row [] row = this.findByKey(parentKey, 1);
    RowSet rowSet = (RowSet)row[0].getAttribute("ChildVO");
    viewObject = rowSet.getViewObject();
    viewObject.setSortBy("DisplaySequence asc");
    }else {
    Row row = getCurrentRow();
    RowSet rowSet = (RowSet)row.getAttribute("ChildVO");
    viewObject = rowSet.getViewObject();
    viewObject.setSortBy("DisplaySequence asc");
    this.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES |
    ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    this.executeQuery();
    For custom sort, lets say all the numbers should be display first in ascending order, and null or empty values to be display at the end need to override the getRowComparator method in the ChildViewImpl class,
    Here is the code for the same
    @Override
    public Comparator getRowComparator() {
    SortCriteria sortCriteria = new SortCriteriaImpl("DisplaySequence",false);
    SortCriteria [] sortCriterias = new SortCriteria[1];
    sortCriterias[0] = sortCriteria;
    return new DisplaySequenceComparator(sortCriterias);
    private class DisplaySequenceComparator extends RowComparator {
    public DisplaySequenceComparator(SortCriteria [] sortCriterias) {
    super(sortCriterias);
    public int compareRows(Row row1, Row row2) {
    Object dispSeqObj1;
    Object dispSeqObj2;
    Number dispSeq1 = null;
    Number dispSeq2 = null;
    boolean compareRow1 = true;
    boolean compareRow2 = true;
    if(row1!=null) {
    dispSeqObj1 = row1.getAttribute("DisplaySequence");
    if(dispSeqObj1!=null && dispSeqObj1 instanceof Number) {
    dispSeq1 = (Number)dispSeqObj1;
    }else {
    compareRow1 = false;
    if(row2!=null) {
    dispSeqObj2 = row2.getAttribute("DisplaySequence");
    if(dispSeqObj2!=null && dispSeqObj2 instanceof Number) {
    dispSeq2 = (Number)dispSeqObj2;
    }else {
    compareRow2 = false;
    if(compareRow1 && compareRow2) {
    if(dispSeq1.getValue() > dispSeq2.getValue()) {
    return 1;
    } else if(dispSeq1.getValue() == dispSeq2.getValue()) {
    return 0;
    } else {
    return -1;
    if(!compareRow1 && compareRow2)
    return 1;
    if(compareRow1 && !compareRow2)
    return -1;
    return 0;
    The above solution works properly, and sorts the child tree rows. But while saving the changes, update fails. I also came to know that in-memory sorting is applicable to read-only/transient view objects from some blogs and also mentiond in this link http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcadvvo.htm
    Is there any way that updatable view objects can be sorted and saved as well?
    Thanks,
    Abhishek
    Edited by: 930857 on May 2, 2012 7:12 AM

Maybe you are looking for