On click sorting icons lost  in UI table

Hi All,
I want to implement sorting in my UI table. I followed the following steps:
1. Created a context attribute of "TableSorter" type (used TableSorter.java)
2. Created an Action "Sort" and have written the below code in its event
wdContext.currentContextElement().getTableSorter().sort(wdEvent, wdContext.<node>);
3. In wdDoModifyView have written the below code
     if(firstTime){
         IWDTable table = (IWDTable)view.getElement(<tablename>);
         wdContext.currentContextElement().setTableSorter(new TableSorter
         (table, wdThis.wdGetSortAction(), null));
4. Assigned "Sort" action (created in step 2) to the Sort Event of the table.
After deploying the code, I can see the sort icons in the column headers but after clicking on that, its not sorting the table, also the icons are lost after their click.
Not sure what I missed in this. Please help me out.
Thanks in advance.

hi
this may be the reason.
check once the table id you specified here.
IWDTable table = (IWDTable)view.getElement(<tablename>);
Regards
sowmya.

Similar Messages

  • How can I display sort icons of an af:table column permanently

    Hello all,
    I'm using JDEV 11.1.1.5. Is there a way using skinning or any other mean to make the sort icons of a column in a af:table to be displayed permanently and not only after a mouse over on the column title?

    Can you try with skinning?
    Check the forum post:
    Column Sort image display permanent
    Thanks,
    Navaneeth

  • Unable to capture the adf table column sort icons using open script tool

    Hi All,
    I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.
    1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.
    2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.

    Hi keerthi,
    1. I have pasted the code for the first issue
    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
         }

  • After upgrading to Lion, Preview (5.2.2) appears to have lost the facility to run a slide show by using my mouse to click an icon in the visible menu bar, as I could in the previous version.  Can I retrieve that icon and thus that facility?

    After upgrading to Lion, Preview (5.2.2) appears to have lost the facility to run a slide show by using my mouse to click an icon in the visible menu bar, as I could in the previous version.  Can I retrieve that icon and thus that facility?

    Unfortunately not. Lion has made many adjustments to the previous system. Try opening your pdfs in keynote.

  • Webdynpro Table: Column Header sort icon not visible

    In design time in NWDS, my table headers have this up/down arrow icon that is visible to indicate sorting.
    At runtime it is not displayed.  How come?

    Hi KF,
    According to the Node Structure
    Employee
    |----
    name
    |----
    no
    |----
    sal
      public static void wdDoModifyView(IPrivateEmployeeView wdThis, IPrivateEmployeeView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
    if (firstTime) {
               IWDTable sortTable = (IWDTable) view.getElement("Put the table id here");
    <b>
               wdContext.currentContextElement().setEmployeeTableSorter(new TableSorter(sortTable, wdThis.wdGetSortEmployeeAction(), null,
               new String[]{"name","no","sal"})); </b>
    //Instead of column id passes the attribute name of the node that is bound with the table.
    //EmployeeTableSorter is the context attribute of type …….utils.TableSorter
      public void onActionSortEmployee(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSortFundID(ServerEvent)
         wdContext.currentContextElement().getEmployeeTableSorter().sort(wdEvent, wdContext.nodeEmployee());
        //@@end
    Table Sorter : table not getting sorted
    Regards,
    Mithu

  • Af:table column sort icon does not appear

    Hi,
    if I use the declarative way to handle column sorting the tablecolumn gets a icon which indicates sorting.
    For one column I have to set the sorting programmatically by using CoreTable's setSortCriteria method .
    In this case the sort icon doesn't appear!? Is that right?
    regards, Florian

    thanks Frank!
    It's not a question of enable/disable the sorting feature of the table column.
    It's about the requirement to sort the column like in this sql statement:
    select c1 || c2 || c3 as c123
    from myTable
    order by c1, c2, c3 asc;
    The column is sortable by default (column data is concatenated like in c123).
    I use following code in the SortListenerMethod to enable the sorting for the requirement above:
    CoreTable ct = this.getMyTable();
    List<SortCriterion> critlist = new ArrayList<SortCriterion>();
    boolean sortOrderAsc = true;
    critlist.add(new SortCriterion("c1", sortOrderAsc));
    critlist.add(new SortCriterion("c2", sortOrderAsc));
    critlist.add(new SortCriterion("c3", sortOrderAsc));
    ct.setSortCriteria(critlist);
    using this always prevent the sortIcon from showing.
    On the other hand my sortIcon comes up using the declarative way.
    Or is there a way to accomplish the sorting above by using other ways?

  • Sorting of data in a Table

    Hi
    I am displaying some data in a table, but when i sort any column of the table output, it is giving preference to the rows which are in Capital letter then it is considering small.
    Eg:
    A
    B
    C
    a
    b
    c
    Is there any work around to make the sort as:
    A
    a
    B
    b
    C
    c
    Regards,
    Trikanth

    Hi Trikanth,
    Ok by default you can not sort it like you wanted. A workaround could a function module which sorts it like you want. When a user click on the sort function (table header) then it sorted based on ASCII that's correct. I'm sorry to say that it is not possible to disable the default sort function. This is something which I also need for some apps.
    Another question. Which data service returns you the data? If it is a RFC you can modify it, so that the data sorted as you want or otherwise you can modify the data, e.g. that everything is in lower case or in caps, therefore you can use a VC function UPPER().
    Best Regards,
    Marcel
    If this question is answered for you please mark the question as answered and reward points, otherwise ask me again.

  • ADF FACES: how to preserve the sort criteria for an af:table

    How can I preserve the sort criteria on an af:table across page invocations? I've searched all through the forum and I don't see anything on this topic.
    I simply want the sort criteria (from when the user clicks on a column header) to be remembered across multiple uses of the page. I know that the control handles this itself for multiple invocations of the same page (like when you page through the table). But I need to preserve the sort order so I can install it again when someone leaves the page and then returns to it.
    I've tried various attempts using a SortListener to record the sort criteria, but I can't figure out how to reinstall the criteria without generating exceptions from the table control.
    Any pointers on how to do this would be greatly appreciated.
    Thanks.
    Larry.

    Ok, I've solved the problems with the odd behavior by always creating a new model when the table data changes and copying the sort criteria into the new model, like this:
            // Construct our own CollectionModel from this result set
            if(_model == null) {
                // Construct the initial data model and set the starting sort criteria
                ListDataModel m = new ListDataModel(results);
                _model = new SortableModel(m);
                // Set the sort criteria to last name
                ArrayList criteria = new ArrayList();
                criteria.add(new SortCriterion("lastName", true));
                _model.setSortCriteria(criteria);
            } else {
                // Construct a new model so the table "sees" the change
                ListDataModel m = new ListDataModel(results);
                SortableModel sm = new SortableModel(m);
                sm.setSortCriteria(_model.getSortCriteria());
                _model = sm;
            }But, I end up with one final thing that doesn't work. In the "then" clause above, I try to set the initial sort criteria for the table - it has no effect. When the table is rendered, it is not sorted in any way.
    How can I specify an initial sort order for the table? Why is it ignoring the sort criteria on the model?
    Thanks.

  • My Fire Fox is just gone! I click on Icon and NOTHING.

    My Fire Fox is just gone! I click on Icon and NOTHING. Tried to re-download and it keeps telling me Fire Fox is running it can't download until I close it. BUT there is nothing open! I have shut my Lap Top down and re-started ,then tried download again. Still the same message. Nothing is working. Please help

    Can you check something for me please?
    Restart your PC. after the PC restarts, bring up your Task manager, and go to the "Processes" tab. Click "Image name" to sort the processes alphabetically.
    Now try to launch iTunes.
    Does an itunes.exe process appear? If so, does it vanish after a second or so, or does it persist in the Processes tab (even though iTunes itself never shows up)?

  • Sort Icon/option in ALV tree repot using classes and methods

    Hi all,
    I have done an alv tree report using the class cl_gui_alv_tree
    and i need to let users re-sort the report by using a sort icon(as visible in a normal alv report).Is there any possibility to create an icon and set the functionality such that the entire tree structure gets resorted depending upon the sort criteria?Please give me an example of doing so if there is an option.

    if u want without classes then i can  give an example of Sort Icon/option.
    example:-
    DATA:   wa_sortinfo TYPE slis_sortinfo_alv.
           i_sortcat TYPE slis_t_sortinfo_alv.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program     = report_id
                i_grid_title           = ws_title
               i_callback_top_of_page = 'TOP-OF-PAGE'
                is_layout              = wa_layout
                it_fieldcat            = i_fieldcat[]
                it_sort                = i_sortcat
                i_save                 = 'A'
                it_events              = i_events
           TABLES
                t_outtab               = i_reportdata1
           EXCEPTIONS
                program_error          = 1
                OTHERS                 = 2.
      IF sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      PERFORM sortcat_init CHANGING i_sortcat.
    FORM sortcat_init CHANGING i_sortcat TYPE slis_t_sortinfo_alv.
      CLEAR wa_sortinfo.
      wa_sortinfo-fieldname = 'EBELN'. (sales order)
      wa_sortinfo-tabname = 'I_REPORTDATA1'.
      wa_sortinfo-spos = 1.            " First sort by this field.
      wa_sortinfo-up = 'X'.            "   Ascending
      wa_sortinfo-subtot = 'X'.        " Subtotal at Name1
      APPEND wa_sortinfo TO i_sortcat.
      CLEAR wa_sortinfo.
      wa_sortinfo-fieldname = 'EBELP'.
      wa_sortinfo-tabname = 'I_REPORTDATA1'.
      wa_sortinfo-spos = 2.            " Sec sort by this field.
      wa_sortinfo-up = 'X'.            "   Ascending
      wa_sortinfo-subtot = 'X'.        " Subtotal at Name1
      APPEND wa_sortinfo TO i_sortcat.
    ENDFORM.                    " sortcat_init

  • JTable - custom JTableHeader with UP, DOWN sorting icon

    This is my code to create a custom JTableHeader.
    class MyHeaderRenderer extends DefaultTableCellRenderer {
    public MyHeaderRenderer() {
    setIcon(new ImageIcon("1.png"));
    setHorizontalAlignment(SwingConstants.CENTER);
    setBackground(Color.YELLOW);
    RowSorter<TableModel> sorter = new TableRowSorter<TableModel> (tableModel);
    table.setRowSorter (sorter);
    table.getColumnModel().getColumn(2).setHeaderRenderer(new MyHeaderRenderer());After setting a custom header renderer, the default UP and DOWN sort image
    is not displaying in the table header. How can I show those images.
    Thanks in advance.

    Hi Ashish,
    In Table properties once you map any method to onSort event, the sort icons will appear automatically. But in your case its not working. I suggest you check the portal theme you are using.
    If you manage to get the icon deom some where
    To set the icon go to Theme Editor >Complex Elements>Tables--> Under Sort Icons you can browse for the icons and set it.
    Where you can find the icon ?
    Under Theme Editor --> Theme Transport --> Under Export theme. You can download your theme from here, unzip and look for the icon under "YourThemeFolder\ur.zip\common\tableview"
    Please try this if you are unble to find the icon, let me know
    Regards,
    Shibin

  • Automatic Sort on dataTable affects other tables

    Hi everybody,
    I'm struggling a little bit with JSF as I have a special requirement - I need a dynamic display of some independently sortable dataTables below each other.
    It works quite well, but the problem is, that if I sort one of the shown tables, it affects the other tables as well.
    Hav a look on my page content:
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:view>
    <html>
    <body>
    <h:form id="frm">
         <t:dataList value="#{bean.tablelist}" var="table">
                   <t:dataTable value="#{table.data}" var="tablerow"
                             width="500" border="1"
                             sortable="true" sortColumn="#{table.sortColumn}"
                             sortAscending="#{table.sortAscending}"
                             preserveSort="false">
                        <t:column>
                             <f:facet name="header">
                                        <h:outputText value="column1"  />
                                    </f:facet>
                             <h:outputText value="#{tablerow.col1}"/>
                        </t:column>
                        <t:column>
                             <f:facet name="header">
                                        <h:outputText value="column2"  />
                                    </f:facet>
                             <h:outputText value="#{tablerow.col2}"/>
                        </t:column>
                        <t:column>
                             <f:facet name="header">
                                        <h:outputText value="column3"  />
                                    </f:facet>
                             <h:outputText value="#{tablerow.col2}"/>
                        </t:column>
                        <t:column>
                             <f:facet name="header">
                                        <h:outputTextvalue="column4"  />
                                    </f:facet>
                             <h:outputText value="#{tablerow.col4}"/>
                        </t:column>
                        <t:column>
                             <f:facet name="header">
                                        <h:outputText value="column2"  />
                                    </f:facet>
                             <h:outputText value="#{tablerow.col5}"/>
                        </t:column>
                   </t:dataTable>
         </t:dataList>
    </h:form>
    </body>
    </html>
    </f:view>I have checked the table.sortColumn value, it is changed just in one table, but it affects somehow the display of the others, too.
    Just an example:
    I have Table1, Table2 and Table3 that are displayed each inside of the dataList.
    Every table has the same columns (column1 to 5).
    By default, each table is sorted by column1.
    If I click on the column2 header of Table2 to sort just Table2 by column2, Table1 and Table3 also get sorted by column2 (but have still the small arrow indicating that the sort is by column1).
    It's a bit tricky to describe :)
    I appreciate any help, maybe just a workaround.
    Edited by: coppermine on Jul 10, 2008 4:13 PM

    I have checked the table.sortColumn value, it is changed just in one table, but it affects somehow the display of the others, too.
    alizia
    [Wide Circles|http://www.widecircles.ca]

  • Displaying icon in tow in table control

    Hi experts, I need help on how to display icons in every row in my table control which will be displayed via SAP GUI not Web.
    Did anyone have successfully done this?
    Thank you in advance guys..

    Hi,
    Check these links.It can help you.If so,kindly reward points by clicking the star on the left of reply.
    Re: Showing a status icon column on a table control
    Re: How to show icon(traffic lights) into table control in dialog program?
    http://www.sapdesignguild.org/resources/MiniSG-old/from_develop/norm_status_icons.htm#positioning_4

  • Firefox has randomly stopped working.... i have uninstalled and reinstalled and click on icon at bottom of desktop and circle starts then stops and nothing.

    I used firefox when I turned my computer on. Played a few games on facebook and got off firefox..... forgot do check my email 10 mins later and firefox wouldn't work. It has done this many time before but I just would restart my computer and it would start working.... I did just that and when I click the icon at the bottom of my desktop the firefox emblem lights up and the blue circle starts to turn for about 5 seconds and then the circle disappears and the emblem fades and nothing ever happens... I uninstalled it and went to the webpage and downloaded the newest one and reinstalled it and still the same problem... not sure what is happening and im sure i lost all my cookies and bookmarks but i just want firefox to start working again...........................................

    *[[Firefox hangs or is not responding - How to fix]]
    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/viruses/disinfection/5350 Anti-Rootkit Utility - TDSSKiller]
    * [http://general-changelog-team.fr/en/downloads/viewdownload/20-outils-de-xplode/2-adwcleaner AdwCleaner] (for more info, see this [http://www.bleepingcomputer.com/download/adwcleaner/ alternate AdwCleaner download page])
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one. Windows 8 has antivirus [http://www.microsoft.com/security/pc-security/windows8.aspx#antivirus built-in] already.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • How to Sort single column in webdynpro table

    Hi all
    I have requirement as follows.
    i have webdynpro table with the following columns like Date,firstname,lastname,address etc.
    now when i run the the application the table is populating the data at runtime that is fine.
    i need as soon as table is loaded , Date field in the table should be displayed the values in the decending order...i have the requirement as follows...
    how to sort the single column in table ...by default the values of the column displayed with decending order as soon as table displays at runtime....i dont want to click any button specific button to do the sort for that column
    Regards
    bindu

    Hi, I solved the same problem by modifying the sort() method in the default TableSorter class so that it takes a column id and direction rather than an event.
    I assume you have read the TableSorter tutorial.
    Like this. (This was done on nw ce 7.1 btw but may work on older versions as well.
    Oh and then you just call the sort method right after you have made the request
    //Code that goes into controller/view to execute sorting
    wdContext.currentContextElement().getPensionplanTableSorter().sort("MyColumnId", "Up", wdContext.nodePensionPlan());
    //Part of TableSorter.java
    //The original method that needs an event. Now it just calls the new method
    public void sort(IWDCustomEvent wdEvent, IWDNode dataSource) {
         // find the things we need
         String columnId = wdEvent.getString("selectedColumn");
         String direction = wdEvent.getString("sortDirection");
         sort(columnId, direction, dataSource);
    //This is the new method.
    public void sort(String columnId, String direction, IWDNode dataSource) {
         if (columnId == null || direction == null ) {
              return;
         IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
         NodeElementByAttributeComparator elementComparator =
    (NodeElementByAttributeComparator) comparatorForColumn.get(column);
         if (elementComparator == null){
         //not a sortable column
              column.setSortState(WDTableColumnSortDirection.NOT_SORTABLE);
              return;
         // sorting
         elementComparator.setSortDirection(WDTableColumnSortDirection.valueOf(direction));
         dataSource.sortElements(elementComparator);

Maybe you are looking for