How to sort the Selectitemlist of a dropdownList

Is there a easy way to sort the Selectitemlist of a dropdownList? So the values show up in the dropdown will be alphabetically sorted? Thanks.

Hi
There is no feature to sort on Dropdown once the values are loaded on to dropdown. We need to have our own logic to sort the ArrayList before loading the values into dropdown. There are APIs to sort Arrays but did not find any o ArrayList.
Thanks
Creator

Similar Messages

  • Custom Search portlet : how to sort the result in sequence (Portal 10.1.4)

    With a Custom Search portlet how to Sort the Result By Sequence. i.e. by respecting arrangements of the items in the page of contents?
    Actually the Results Options "Order By" are : Create Date, Author, Creator, Date Updated, Display Name, Last Update by, Publish Date, Score.
    Is there an action to add the "Sequence" Order By result Option?
    Great thanks for your kind help.
    Best regards

    No, I agree that it is functionality that should be added to the product, but it
    is not a bug because it was not written to do this.
    It is a short coming of the product.
    Cheers,
    Ersan

  • Custom Search Portlet : How to Sort the Result By Sequence (Portal 10.1.4)

    Customer request: With a Custom Search portlet how to Sort the Result By Sequence. i.e. by respecting arrangements of the items in the page of contents?
    (Like it's possible in MyOracle)
    Actually the Results Options "Order By" are : Create Date, Author, Creator, Date Updated, Display Name, Last Update by, Publish Date, Score.
    Is there an action to add the "Sequence" Order By result Option?
    Great thanks for your kind help.
    Best regards

    No, I agree that it is functionality that should be added to the product, but it
    is not a bug because it was not written to do this.
    It is a short coming of the product.
    Cheers,
    Ersan

  • How to sort the data in JSP using stylesheet sorting?

    Hi, i extracted data out in and display them <%=data%> in the jsp, but how to sort? do i have to provide a drop down list that gives different sorting options, and when user clicks on one option, say sort by title, the collection of results are sorted out on the same jsp page? so all in all, only one jsp page is needed or do i need to create xml files, etc?
    i have no idea how to integrate the xml sorting into the jsp page, even after seeing online help, cos there is no example of a jsp page with sorting to refer to. PLease help, thanks alot!

    im getting the data from beans, but one of the requirements was that i cant use the database to sort and display but i have to use xslt to do the sorting in the jsps, so i have no idea how to do so. possible to give an example? thanks

  • How to sort the alv

    what is the process to sort in alvs report  the output is in  decending and accending order without using standard buttenens in the output list .
             i am asking how to sort bydefault when we are executing the report ,
             output list  will automatically in sort order.
    could u plz explalin clearly with comments
    and code

    Hi
    Add this to your alv reporting
    Add Default Sorting to ALVgrid report  
    In order to display an ALV report with specific columns already sorted by default you will need to build a
    sort catalogue. This is fairly straight forward and is done in the following way:
            Step 1. Add data declaration for sort catalogue
            Step 2. Add code to build sort catalogue table 
            Step 3. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include parameter 'it_sort'
    ALV data declarations
      data: it_sortcat   type slis_sortinfo_alv occurs 1,
            wa_sort like line of it_sortcat.
    perform build_sortcat.
    *&      Form  build_sortcat
          Build Sort catalog
    FORM build_sortcat .
      wa_sort-spos      = 1.
      wa_sort-fieldname = 'EBELN'.
    gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
      wa_sort-spos      = 2.
      wa_sort-fieldname = 'EBELP'.
    gd_sortcat-tabname
      APPEND wa_sort TO it_sortcat.
    ENDFORM.                    " build_sortcat
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE' 
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    Thanks
    Shiva

  • How to sort the fields in ABAP query.

    Hi all
    I am not able to drag the fields in Sort tool box.
    Please help me how to add the fields in Sort tool bar.
    Regards
    Gangi

    In SQ01, when we are creating a query, we can define the default sort sequence & Totals also.
    This can be done when defining the basic list.

  • How to sort the new records when you input them in a Forms bloc?

    Hi,
    I have a multi-record data block, how can I do to sort the records in this block when you enter some new records? for instance, you have a table(emp), 3 coloumns(empid, empname, deptno). when you enter new records, how can you do to make records order by deptno? not in quiry status.
    Thanks. Please help me!

    I think Steve has answered your question and I doubt that what Frank is suggesting is what you are actually trying to do.
    However,
    from the top of my head I don't know if you can set the order by clause on a datablock dynamically <<-Yes you can set it with set_block_property. You don't really want to put it in the where clause because if the user enters query criteria in database fields, they will get appended after the order by and the query will fail.

  • How to sort the messages in Browser Console by time

    In the Browser Console the messages are sometimes out of order. This can be confusing when debugging an application. Is there an easy way to sort the messages by the timestamps?
    See also: https://bugzilla.mozilla.org/show_bug.cgi?id=854435.
    It seems this has been the case for some time. I am seeing it in version 26.0. I can copy the messages to a spreadsheet and sort them there, but that's a bit tedious.

    Thanks cor-el. I notice this in the interleaving of Net and Logging messages. I haven't yet noticed a case where Net or Logging messages alone are out of order. Separate threads with different latency to posting messages makes sense.
    From my perspective, hiding the timestamps isn't a solution. It obscures the problem rather than fixing it. I noticed the problem before I looked at the timestamps carefully. When I'm debugging, the order of events is sometimes essential to a correct understanding of what is happening. So, I hope that in addition to giving people the option to hide the timestamps, an option to sort the messages by timestamp will be added. If it were my choice, sorted by timestamp would be the default.

  • How to sort the members by alias names

    I am trying to create dimension build rule whicl will sort the dimension members in an ascending order, but it has to be based on the alias name instead of the member name.
    I have tried both Parent-CHild and Generation reference but it doesn't work.
    For example
    for the city members PSE ( alias name Purchase), and USALB ( alias Albany) needs to be sorted by alias names
    the current order is
    PSE(Purchase)
    USALB(albany)
    but the requirement is to be
    USALB( Albany)
    PSE(Purchase)

    Even with presorting the input, you still have work to do. By default, Essbase will add new members to the bottom of the list of membrers, it does not insert them into an existing hierarchy in the right places. If your trying to update existing hierarchies and are going the SQL route, you will need two rules (or 1 rule and a flat file). You also need to specify remove unspecified as part of the dimension build process.
    HAve a dummy input (either sql or file) that gets loaded the first time. IT will basically wipe out all the members of the dimension, then your second rule (or same rule calling your SQL) can reload the dimension sorted in alias order.
    IT is important that these two rules be done together (either in MaxL using comasin a single statement) or in a BSO cube in the outline before the outline is saved. Otherwise you will have deleted any data that existed in the database. It would be impartant that your SQL also pulls all members (including any special members)
    Edited by: GlennS_2 on Jan 6, 2010 9:48 AM
    You say you are going to change the stored procedure. That is not necessary, you could put an order by clause in your sql extract statement

  • How to sort  the arry value in ascending order

    I have a string array where i need to sort the below values in ascending order in the same format...can anyone give me clue on this?
    9.3
    3.1
    9.1
    19.1
    19
    9.4
    9.1.1
    the sorted order should be
    3.1
    9.1
    9.1.1
    9.3
    9.4
    19
    19.1

    You may have easier luck writing your own comparator for this. These are headings in a table of contents, right?
    Write a comparator that tokenizes a string on the '.' character, or use a StringBuffer to remove them, and then order the elements according to the combined numbers. Since alphanumeric would order this list as you want it anyway you could just order that way once the '.' are removed.
    In other words your comparator would do this in the "compare" method:
    public class MyComparator implements Comparator, java.io.Serializable {
    private static Comparator stringComparator = java.text.Collator.getInstance();
    ...constructor(s), your own private "instance" variable of type MyComparator, a getInstance() method of your own, yadda yadda...
    public int compare(Object item1, Object item2) {
    try {
    value1 = removePeriods((String)item1);
    value2 = removePeriods((String)item2);
    if (value1 == null) {
    return (value2 == null) ? 0 : (-1);
    return compare(value1, value2);
    } catch (ClassCastException cce) {
    System.err.println("Wrong Object Type, JackAss!");
    protected int compare(String str1, String str2) {
    return MyComparator.stringComparator.compare(str1, str2);
    private String removePeriods(String value) {
    StringBuffer sb = new StringBuffer(value);
    int decimalIndex = value.indexOf('.');
    while (decimalIndex != -1) {
    sb.delete(decimalIndex, (decimalIndex + 1));
    }

  • How To Sort the Table Through Push Buttons (ASC & Desc)???

    Hi,
    I am facing a problem with regard to 'Push Buttons' that I have created on
    my Form. I want the 'Push Button' to sort the table with respect to a
    specific column in 'Ascending order' on first push and then in 'Descending
    order' on second push and then again in 'Ascending order' on third push and so
    on...
    please help me to achieve this
    regards,
    .

    Hello,
    You could try something like this:
    Declare
         LC$Order Varchar2(128) := Get_Block_Property( 'EMP', ORDER_BY ) ;
    Begin
         If Instr( LC$Order, 'DESC' ) > 1 Then
               Set_Block_Property( 'EMP', ORDER_BY, 'EMPNO ASC' ) ;
         Else
               Set_Block_Property( 'EMP', ORDER_BY, 'EMPNO DESC' ) ;
         End if ;
         Execute_Query ;
    End ;     Francois

  • How to sort the alpha numeric character into number?

    Hi Good day!
    I have here a sample data as shown below that needs string manipulation to sort the metric sizes numerically.
    Select MetricSize From Sizes Order By MetricSize; which yields the following result:
    10 x 5.5 x 2
    125 x 95 x 13.5/21
    1264.01 x 1200 x 22.23
    130 x 105 x 12
    210 x 180 x 15
    28 x 16 x 15.2
    28 x 16.8 x 6/7.5
    52 x 25 x 10
    52 x 25 x 7/7.5
    52/58 x 25 x 7
    52/59 x 25 x 10/15.5
    55/61 x 35 x 11.5/16
    74.2/78.2 x 56 x 8/10.5
    74.5/79.5 x 45/42.5 x 12/13.7
    But the requirement is to sort this sizes numerically so that the output would be look like this:
    10 x 5.5 x 2
    28 x 16 x 15.2
    28 x 16.8 x 6/7.5
    52 x 25 x 7/7.5
    52/58 x 25 x 7
    52/59 x 25 x 10/15.5
    52 x 25 x 10
    55/61 x 35 x 11.5/16
    74.2/78.2 x 56 x 8/10.5
    74.5/79.5 x 45/42.5 x 12/13.7
    125 x 95 x 13.5/21
    130 x 105 x 12
    210 x 180 x 15
    1264.01 x 1200 x 22.23
    By the way the format for these sizes is composed of Outside Length x Inside Length x Thickness. But there are some sizes that contains slash '/' which is considered as special sizes.
    So one of my solution is to separate the numbers into 3 columns so that I can sort it by outside, inside length and thickness.
    Select MetricSize,
    Convert(Numeric(18, 2), Left(SubString(MetricSize, PatIndex('%[0-9.-]%', MetricSize), 100),PatIndex('%[^0-9.-]%',
    SubString(MetricSize, PatIndex('%[0-9.-]%', MetricSize), 100) + 'X')-1)) As Outside,
    Substring(MetricSize, charIndex('x', MetricSize) + 2, charIndex(reverse(Left(SubString(reverse(MetricSize),
    PatIndex('%[0-9.-]%', reverse(MetricSize)), 100),
    PatIndex('%[^0-9.-]%', SubString(reverse(MetricSize), PatIndex('%[0-9.-]%',
    reverse(MetricSize)), 100)))), MetricSize) - 4 - charIndex('x', MetricSize)) As Inside,
    Convert(Numeric(18, 2), Reverse(Left(SubString(reverse(MetricSize), PatIndex('%[0-9.-]%', reverse(MetricSize)), 100),PatIndex('%[^0-9.-]%',
    SubString(reverse(MetricSize), PatIndex('%[0-9.-]%', reverse(MetricSize)), 100) + 'X')-1))) As Thickness
    From Sizes Order By Outside , Inside, Thickness
    It is almost there but the result is not yet the exact result that I really wanted. There's a problem if the sizes contains slash '/' especially on the middle or the last portion of the character, which give me headache for a several minutes/hours. :)
    I need help for this problem. Your help will be greatly appreciated.
    Thanks in advance.
    Hardz

    create table #t (col varchar(100))
    insert into #t values ('10 x 5.5 x 2')
    insert into #t values ('125 x 95 x 13.5/21')
    insert into #t values ('1264.01 x 1200 x 22.23')
    insert into #t values ('130 x 105 x 12')
    insert into #t values ('130 x 95 x 12') --added
    insert into #t values ('210 x 180 x 15')
    insert into #t values ('28 x 16 x 15.2')
    insert into #t values ('28 x 16.8 x 6/7.5')
    insert into #t values ('52 x 25 x 10')
    insert into #t values ('52 x 25 x 7/7.5')
    insert into #t values ('52/58 x 25 x 7')
    insert into #t values ('52/59 x 25 x 10/15.5')
    insert into #t values ('55/61 x 35 x 11.5/16')
    insert into #t values ('74.2/78.2 x 56 x 8/10.5')
    insert into #t values ('74.5/79.5 x 45/42.5 x 12/13.')
    ;with mycte as (
    select col,
    parsename(Replace(replace(col,'.','*'),'X','.'),3) col1
    ,parsename(Replace(replace(col,'.','*'),'X','.'),2) col2
    ,parsename(Replace(replace(col,'.','*'),'X','.'),1) col3 from #t)
    ,mycte1 as (
    Select col,
    Cast(ISNULL(Replace(parsename(Replace(col1,'/','.'),2),'*','.'), Replace(parsename(Replace(col1,'/','.'),1),'*','.')) as Decimal(6,2)) col11
    , Cast(Replace(parsename(Replace(col1,'/','.'),1),'*','.') as Decimal(6,2)) as col12
    , Cast(ISNULL(Replace(parsename(Replace(col2,'/','.'),2),'*','.'), Replace(parsename(Replace(col2,'/','.'),1),'*','.')) as Decimal(6,2)) col21
    , Cast(Replace(parsename(Replace(col2,'/','.'),1),'*','.') as Decimal(6,2)) as col22
    , Cast(ISNULL(Replace(parsename(Replace(col3,'/','.'),2),'*','.'), Replace(parsename(Replace(col3,'/','.'),1),'*','.')) as Decimal(6,2)) col31
    , Cast(Replace(parsename(Replace(col3,'/','.'),1),'*','.') as Decimal(6,2)) as col32
    from mycte )
    Select col from mycte1
    Order by col11,col12,col21,col22,col31,col32
    drop table #t

  • How to Sort the report by clicking the column_header at runtime?

    Hi,<br /><br />Im New to Crystal Reports.<br /><br />Im Using Crystal report server XI. and JSP<br /><br />I need to  <strong>Sort</strong> the report by clicking the<strong> column_header</strong> at runtime.<br /><br />How to implement this ?<br /><br />Please help me.<br /><br />- Venkat.<br />

    <p>Hi Venkat</p><p>I don&#39;t believe there is a way to do this out of the box.  I believe you would have to do a custom code solution so that when you click on the header the report is re-run with a different sort order.  This may not be that easy to implement.</p><p>I&#39;m going to check with the new WebElements custom functions that were released on this site.  They may provide for this functionality. <br /></p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

  • How To sort the values of a OVS result table?

    Hello,
    I'm trying (because i'm new je je), to implement an OVS for an inputfield in my WD app. Now i know for sure that my sophisticated value help do the search of the object and stuff, but i'm wondering if i can "sort" or include the sort method in my result table that is show in my OVS rendered view? Plis if you guys could give me some tutorials or info that would be great
    Kisses
    MC

    ok that's another idea that i had in mind, built a new window, but my issue was how call that window fron the table cell, just like an OVS? wich UI Element help me with that, no link to action, no button, it most be something like an inputfield, how did you do that?
    Kisses
    MC

  • How to sort the content of a query

    HI guys,
    I need to know how can i short the result of a query.
    Here is my code.
    DATA qs     TYPE REF TO cl_crm_bol_dquery_service.
      DATA qr     TYPE REF TO if_bol_entity_col.
      qr ?= qs->get_query_result( ).
    i have seen that on the if_bol_entity_con there's a method but it's not implemented.
    Do i have to implement it.
    Thanks
    Jon

    hi,
    Please, use markup to explain your source   
    after, try just to call the method
    qr->IF_BOL_BO_COL~SORT(...)
    Rgds

Maybe you are looking for