Selection of tableSelectMany with sorting correct behavior or bug?

Hello,
I came across this behavior, looks like a bug to me. So I just wanna check if anyone else knows an answer, solution or workaround to this.
- I build af:table by drag and drop DataControl onto the page.
- assume that table as 2+ plus columns. the 1st column is an ID column.
- assume that currently there are 10 rows displayed with ID 1 to 10
- if I select the 2nd row (ID = 2), then click sort on the 1st column 2 times (so that it sorts ID descending.)
- I will see that the 2nd row (which is now ID is 9) is selected.
I'm kindof see the logic that adf treat this selection thing using position of the rows, not ID of the record represent in that row.
Is there anyway ADF can keep track using ID instead? or we have to build that logic ourself?
I came across this thread Re: tableSelectMany in combination with sorting
but there's no end to it.
Thanks in advance.

Hi Frank,
Thank a bunch for shading light to my life. This document is really helpful ;)
Modified:
additional to already great document by Frank, My colleague found another thread related to the same problem with a different way to deal with this problem. I'll just post the link here, so that we have more and more ways to fix the problem. ;)
Re: ADF Faces: selection incorrect after sorting af:table
CJ
Edited by: CJ@FPI on Jun 8, 2009 5:08 PM

Similar Messages

  • SELECT query - problem with SORT

    Hi,
    Same select query behaves different way on development and quality server
    on Development it returns unsorted and Quality returns sorted
    it can be resolved by SORT but why does it behave differently
    Do you know what is setting in database
    thanks

    From F1 on SELECT:
    Orders the records in a SELECT statement. Without the ORDER-BY clause, the order
    in which the selected lines are supplied is undefined. This means that two similar SELECT
    statements may produce lines in a different order.
    Rob

  • Within Music Library can anyone please explain why when I select the option to sort 'Album by Artist' a number of tracks are being treated as separate albums?  How can I correct this?  I have tried to 'drag and drop' but that doesn't work.

    Within music Library can anyone please explain why after I select the option to sort 'Album by Artist' a number of tracks are being treated as separate albums?  How can I fix this?  I have tried to manually correct by 'drag and drop' individual tracks but that doesn't work.  My music library includes a number of repeat album artwork images simply because not all tracks are being listed under the one album making my library more difficult to use than it should.  Any advise would be appreciated.

    See Grouping tracks into albums.
    tt2

  • Purchased iTunes songs don't sort correctly with imported CD...

    Specifically, the last three songs of Bonnie Raitt's Nick of Time album had skips after I imported them into my iTunes library.
    So, I deleted them and downloaded the same songs from iTunes, and the 9th song, "I Will Not Be Denied", will not sort correctly in the Album tab of iTunes library, no matter what I do in the song info field.
    Any ideas?
    Thanks.
    Bucky
    iMac G4 20-inch flat panel   Mac OS X (10.3.9)   Wife's 30GB iPod; my 60GB iPod, both 5th Gen models

    Please disregard. Moving this to iTunes for Mac forum.

  • Editable DataGrid won't sort correctly

    This is the weirdest behavior I've ever seen...
    I am working on a datagrid (editable="true"), and for some reason the thing does not want to sort correctly. It is a basic datagrid with itemrenderers for each column so that we can edit in the grid. Sorting should happen on a header-click, but if you click the header, it seems to simply select the first row, or another random row, and doesn't sort. It does fire the "itemEditEnd" event. However, if you click anywhere but the header, drag the mouse to header and then let go,  (mouseUp on the header), then it sorts perfectly fine (and doesn't fire that event). If I take the "editable=true" off the datagrid, it sorts fine on header-clicks, but then the datagrid won't save.
    Does anyone have any ideas? There isn't any custom behavior on the header, though I could add some if it would help. I've tried everything I can think of, but nothing seems to help.
    This seems to be somewhat related to this (unsolved) issue.
    http://bugs.adobe.com/jira/browse/SDK-18302
    Thanks,

    I have noticed in the livedocs under, "Working with item renderers" (currently as I type this post the livedocs is unavailable, so I am able to give you a URL) there is a Datagrid that functions incorrectly when the user clicks on header columns.  I am not sure why they haven't fixed this yet, but is this similar to what you are experiencing?  I believe on the same page, they mention about the differences with creationComplete and dataChange.  Are you listening to any of those events?  creationComplete is rarely used in an itemrenderer.   dataChange is used more often which I have noticed that a conditional statement is needed to prevent strange behavior (perhaps the same as you mentioned).

  • TV shows from iTunes are not sorted correctly on iPod

    I bought episodes of a TV show from the iTunes store and all of a sudden nothing is sorted correctly anymore. They're completely fine on iTunes but on my iPod Classic (it's the newest one, 160 GB) it just doesn't seem to want to work. I've tried restoring it a few times but so far, no change. And I've checked all the tags and everything so it shouldn't be wrong but I'm thinking the issue is with my iPod, not iTunes.

    I had the same issue with this. what I did to fix it was select the shows in the TV playlist, then apple - i to get info, click on the video tab, select "TV Show" from the "video kind:" pull down menu.
    Resync the touch. You should see the files in the video playlist on the Touch. I'm not sure why they let you sync tv shows if they don't appear on the Touch. In any case, the above work around should work for you.
    Good luck.

  • Synced photos from iTunes not sorted correctly

    I have around 300 pics that I took with my iphone that I moved to a local folder on PC.
    I want to put those pics back on the iphone to use in a timelapse video.
    I enabled Photo sync on itunes and chose that folder, and synced.
    All synced OK, but these pics are not sorted correctly on the iphone.
    The file names on the PC are exactly as iphone assigned them when taken, and according to date taken.
    It is very important that they are sorted in ascending file name; any ideas how I can correct the sorting?
    Thanks.

    For those in this discussion concerned with the "Sort" order, the criteria is in the "metadata" date that changes when you adjust the photos.
    The directions below apply to Lightroom
    To keep the order you created you must make an adjustment to "ALL" photos at the same time such as increasing the contrast by (1) point.
    First select and change the contrast in the first photo in your collection, then select the remaining photos, click "Sync" The "Metatdata" date will change on all photos selected and will then import in the prper order.
    I should mention that I have renamed all photos so they have a name that is sequential but I don't know if that matters

  • Numbers Not sorting correctly?

    I am trying to sort on a field that has both alpha and numeric characters.
    ergo: I expected a sort to give me
    1a
    1b
    1c
    1d
    1e
    1f
    1h
    1i
    2a
    but received a sort of:
    1h
    1d
    1a
    1b
    1c
    1e
    1f
    1i
    2a
    Justifying the field left or right makes no difference
    if I insert a hyphen between as in 1-a 1-b etc it sorts as expected.
    I also tried inserting a decimal between instead of the hyphen ergo 1.a etc but  when I did that as in (1.h) Numbers (automagically) removed the decimal (same with 1.d)
    Any ideas?  Bug? (An Inverse Semi Hex Sort With Left hand English?)
    Thanks

    Hi C,
    Interesting spelling of your username. I'd always associated this type with dogs, not with hearts.
    I think you may have discovered a bug (or perhaps more accurately  generously, an artifact—an overlooked effect of automation).
    On copying your (sorted) list, pasting it in (column B), randomizing it, then resorting in ascending order, I got the same results you did.
    When I typed a copy of the list into column A and sorted it, I got the same results again.
    Column C is a list of random numbers, generated by formula, and offering a column on wdich to randomize the sort of the table.
    Columns D and E contain the formulas below, which pick off the first and last characters of the pair in column B, then rejoin them, in one case placing a period/full stop/decimal point between them, in the other, simply concatenating them into a two character text string.
    Sorting on either of columns D and E produced the expected sort:
    A light was beginning to glow. Entered directly, or by copy/paste, into an unformatted column, the items sorted 'incorrectly'. Reformed into text strings, with or without a constant intervening character, they sorted as expected.
    One further test: Column F was added, preformatted as Text, and the values entered into it. The table was randomized (sorted on column C), the re sorted on column F, with the expected ('correct') results.
    One more check. I selected column B, where the original list had been pasted, and set the formatting to Automatic:
    AHA!
    Text is automatically aligned to the left side of cells. The two misbehaving items were not being interpreted as text, but as a numeric or quasi numeric value.
    Numbers sees both of these as duration values—1d = one day, 1h = one hour.
    Sorted in ascending order, one hour is less than, and comes before one day, and all numerical and quasi numerical values come before alphabetical (text) values.
    Numbers is sorting the list correctly, using its interpretation of each value. To make it sort correctly in our view, you'll need to force numbers to see those values as text, most easily done by formatting the column as text before typing or before pasting, using Paste and Match Format, in the Edit menu.
    Thanks for that question; it was an interesting one.
    Regards,
    Barry

  • Why do books sort correctly in iTunes but not in iBooks?

    I've filled in all necessary info on the sorting tab and, while all my books sort perfectly in iTunes, on syncing my iPhone and iPad, iBooks does not display the books in the correct order no matter what selections are made.
    My intent is to have the books in my library, be grouped together by series and displayed in the correct order one would read the series.  I'm using Sort Name with a series name and series position designation number along with Sort Author as Last, First.  But no luck.  I've tried reading through other threads and have yet to come upon a fix. Any suggestions?
    Thanks.

    The organizing capabilities of iBooks are described in this Apple note in the Features section:
    http://support.apple.com/kb/HT4059
    You can ask for improvements via
    http://www.apple.com/feedback/

  • Multiple selection causing issue when sorted

    I have an issue when using multiple selection along with sortable column. If certain rows are selected and then a column is sorted, selected rows remains as it is but data changes. Moreover sorting happens within the rows in the page and not across the table. Please provide me solution. Thank you
    <af:table value="#{bindings.CntTypecntItem.collectionModel}"
    var="row"
    rows="#{bindings.CntTypecntItem.rangeSize}"
    first="#{bindings.CntTypecntItem.rangeStart}"
    emptyText="#{bindings.CntTypecntItem.viewable ? 'No rows yet.' : 'Access Denied.'}"
    width="860" id="tblSearchIcLcResults"
    binding="#{SearchNAssign.tblSearchIcLcResults}">
    <f:facet name="selection">
    <af:tableSelectMany required="false"/>
    </f:facet>
    <af:column sortProperty="ctry"
    sortable="true"
    headerText="Country">
    <af:outputText value="#{bindings.countryName.inputValue}"/>
    </af:column>

    Hi,
    if you are on a POJO business service, make sure the primary key attribute is set for the PK attribute in the generated data control XML file. So if your entity is "Employees" then select "Employees.xml", open the Structure Window (ctrl-shift-s) and select the attribute that is the PK. In the property inspector,set he PrimaryKey property to true
    Frank

  • Problem with sorting involving user defined types and reports

    Hello!
    I have a problem with sorting involving Reports and user defined objet types.
    I have created the following object types
    CREATE TYPE type_balance_compte AS OBJECT
    NUM_CPT_SEQ NUMBER(8)
    ,NUM_CPT VARCHAR2(35)
    CREATE TYPE TB_type_balance_compte IS TABLE OF type_balance_compte
    At the reports query I use:
    SELECT ...
    FROM table(cast(test_pkg.balance_comptes(:P_num_soc) as TB_type_balance_compte)) c
    The procedure balance_comptes will retrieve data from various tables into the type.
    The report is ordered by a certain string field that usually contains characters and numbers.
    I need to have numbers always before characters, meaning the data should come in this order in the report for example:
    0
    1
    A
    B
    So, before the report query, I have placed a call to DBMS_SESSION.SET_NLS( 'nls_sort', 'binary' ) to guarantee NLS_SORT in case it is originally set to FRENCH.
    The problem here is that even after this call, I have the report ordered like this
    A
    B
    0
    1
    And not the numbers before as it should be.
    To try and find out where the problem was, I have created a table to use instead of the object type described above. In this case, it worked correctly. So all I know by now is that is has something to do with the type or cast, but what exactly? Does anybody now how to solve this without using a table?
    Many thanks
    Ariadne

    I have placed a call to DBMS_SESSION.SET_NLS( 'nls_sort', 'binary' ) why not order directly then:
    SQL> select *
          from table (sys.dbms_debug_vc2coll ('A', 1, '5', 'C', 'a'))
    order by nlssort (column_value, 'NLS_SORT = binary')
    COLUMN_VALUE                                                                   
    1                                                                              
    5                                                                              
    A                                                                              
    C                                                                              
    a                                                                              
    5 rows selected.?

  • Ensure List/Menu populate my update form with the correct data before update

    Hello,
    Please how do I ensure my update form is populated with the correct data before update?
    On my update page I have text fields and select fields (dynamic list/menu). When I open my profile page to make updates, I see the field well positioned in the text fields but in the select list/menu fields, I see "Select from list" instead of the value that was initiated selected
    Correct Values before update
    Wrong values during update
    As you can see from the images below, when I open the update page, the list automatically populate the select fields with the last values in the list instead of the Initial values that where selected by the user before the update.
    Can anyone please review and let me know where I have gone wrong.
    Thank you
    Mike

    Hello All,
    Once more thank you. I have sorted the issue out.
    I observed that I was selecting the wrong field. I selected the field matching the record set of the select instead of the field matching the record set of the table I am working as seen on the image belew
    I was selecting this - This is the record set of the table that hold values for the city select list
    Instead of this. This is the record set of the table behind the form I am working on
    My issue is now re-solved.
    Mike

  • Can no longer print selected iPhoto photo with HP printer

    iPhoto 09. Cannot print selected iPhoto photo with HP printer. I select the photo from iPhoto Library, go to File>print. The screen for Print comes up with another one on top of it that is blank but with text "Print...Processing 1..OK".  Clicking OK prints from that screen "Print, Processing page 1" (on correct 3x6 photo paper in black!).
    I have run Apple Software Update. Run Permissions with problems (one: "Permissions differ on Library/Printers/h...". Have reinstalled iPhoto which has left one icon on Dock and 3 on desktop: iPhoto 07-27-19.app; iPhoto.app; iPhoto Library that I don't know what to do with with them, so just use the one on the dock which opens iPhoto Library.
    Believe I read that after reinstalling iPhoto, a plug-in (possibly third party plug-in for HP?) must be installed. I have updated my HP printer to latest driver.
    Would you advise how I can print photos in my iPhoto Library again, and also get those iPhoto icons off my desktop which only confuse me.  Thank you for your prompt attention.
    Out-of-patience Great Gramma

    Make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    OT

  • ITunes Sorts Correctly, iPad Doesn't?

    Short Version: In iTunes, my albums show up in proper alphabetical order when I'm using custom Sort Album tags, but in my iPad, a few of the albums show up out of order.  Anyone have any ideas?
    The Long Version: I listen to my music almost exclusively by genre--when I sit down to listen, I don't usually know exactly who or what album I want to hear, but I know the kind of music I'm in the mood for.  Since my iPad doesn't give me any decent way to sort by genre (I know it's in the Music app, but it doesn't fit the bill for me), I went through my iTunes library and changed the "Sort Album" tag for each track to be the genre, followed by the album name.  So, all the tracks from the "Superman" soundtrack have a Sort Album tag of "Film Score - Superman 1"; the tracks from "The Right Stuff" have a Sort Album tag of "Film Score - Right Stuff, The", and so on.  I used a script from Doug's AppleScripts to automate the retagging (though in my troubleshooting, I've redone these by hand as well.)
    And this all works just fine in iTunes--albums show up in alphabetical order by the Sort Album tag.  But when I put all of these tracks on my iPad (3rd gen 64GB Wi-Fi only, just updated to 6.0.1 but the problem was present in 6.0), I find that a few albums--"The Abyss", the three "Back to the Future" scores, "Rudy", "SpaceCamp", and "WarGames"--all sort alphabetically at the end of the F's.  They've all got the same tag structure ("Film Score", space-hyphen-space, album title) as the other albums tagged as "Film Score" in Sort Album.  I've tried blowing out all of the tags and redoing them by hand with no luck.  Changed the cover art, renamed them, everything I could think of.  If I change the tag from "Film Score - Abyss" to "Falm Score - Abyss", the "Abyss" title does move to the head of the list in my iPad, but once I change it back, it drops back down to the end of the list, and to the exact same location it'd been in before.  I even tried exporting one of the albums, saving all of the tracks as new files through my sound editor, then reimporting them as a "new" title; when I added the Sort Album tag, it still sorted wrong.
    I've checked this in the iPad Music app, as well as my primary music player, Track 8; both show the same sorting problem.  I've changed every single tag I could find on these tracks, with no luck.  Again, these titles do indeed sort correctly in iTunes; "The Abyss" shows up at the top of my Film Score list, but in iPad, it's at the very bottom.  Anyone have any ideas as to why iPad would sort "Film Score - Abyss" after "Film Score - Willow"?
    (For the record, each time I've changed tags in an attempt to fix this, I have been making sure to remove the tracks from my iPad, then restore the new versions; I have iTunes set to only sync checked items, so when I change tags, I uncheck the tracks I've modified, sync my iPad and watch the tracks disappear from it, then recheck the tracks and resync and watch the files copy back over.)
    Any help would be most appreciated!  Thanks!!!

    Have you tried troubleshooting steps on this article?
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368

  • Print Issue with Sorted ALV Grid

    Hi Team,
    I am using ALV display for my Program. Iam using REUSE_ALV_GRID_DISPLAY. Also i have a Sorting condition for my ALV grid. So iam filling the Sort table & passing it to the Function module. The data is displayed correctly with Sorting as required in the Output.
    Now the issue is with: Print from this ALV. When we try to print the data, The requirement is that the Print should be same as how it is displayed in the ALV. "Grouped Columns"..... But now, the Print is that all the data is filled in all the columns. But user wants the Print also to appear  same as it is shown in a Sorted ALV display.(With some similar column data missing in succeding sort columns until new entry starts)
    Please suggest a solution to acheive the same.
    Thanks & regards,
    Chaitanya

    Look at Q#19 in the note 1009650. Merging functionality is available only for ALV grid display.
    Related Note: 447055
    Work around would be to display the excel in the SAP window (Excel in Place)  and print it from Excel. Read the following thread to make the necessary settings to make it work. Download Report exactly same as seems with Layout set !!
    Edited by: Jeevan Sagar on Jan 19, 2012 12:38 AM

Maybe you are looking for

  • Error while creating service tickets

    Hi all, we are facing the followin error when we try to create a service ticket in WEB UI. Version CRM 7 with EhP1 installed. Please find the error details Context initialization failed in view ICCMP_BTPARTNER/PartnerTable of UI Component ICCMP_BTPAR

  • Need chapter help, too

    I have a chapter problem, too. My students are making individual & team basketball highlight DVD for the players. We used FCP and added chapters and named them according to the team we played. I thought the chapters would magically appear once I drag

  • Calendar year is wrong

    My calendar is showing 2755 BE. How can I change it to this year?

  • Apache SOAP 2.2 and WL 6.1

    When trying to use Apache SOAP 2.2 with WL Server 6.1, I get the following error when attempting a call.invoke(): "Unable to resolve namespace 'SOAPSDK3'" I can successfully make the SOAP call using a stand-alone application (not inside weblogic). I

  • Import Folders As Projects Broke?

    When I click on import folders as projects nothing happenes.  It is as if this feature does not work at all.  I have tried to reinstall Aperture but this does not fix the issue.  Also, when I import files into aperture I dont get the Destination pop-