Allow users to click on a Column Heading and sort

Hi All
I created a master Detail table using the BC4J tags, My users are able to search and return results to the DataTableQueryComponent but the would like to click on the column and sort by it.
How do I achieve that
Thank you

With JSF and the ADF Faces table it's easy and built-in, you can right click the table and in the properties on the third tab you can specify for each column if it is sortable.
In JSP I think you'll have to call a method that will set the order by for the view object and rexecute the query.

Similar Messages

  • How do I sort songs in the iTunes store?  You used to be able to click on the column header to sort the column (ie Popularity)?

    How do I sort songs in the iTunes store?  You used to be able to click on the column header to sort the column (ie Popularity)?

    It seems this is a "backwards" upgrade from Apple in their iTunes 11 release....like you, I used to use that function in the iTunes store to sort through and decide which song version to purchase.   (For a large returned list of songs...see all...then sort by any of the headers, including Popularity...this functionality is now gone.)  
    The iPad always suffered from this...was never able to sort on those same column headers with an iPad.   It seems, this new iTunes release killed that functionality on the Mac as well.
    Just one of the few things that went wrong with number 11!
    Better luck next time,

  • How to sort data in descending order when user clicks on the column heading

    Hi
    I have a report called "Top customers", which shows the top customers for a specific product line. It displays the customer name and one column with the total amount spent in the period for each product line. By default, the leftmost product line is sorted in descending order.
    If the user wants to know who are the top customers for another product line, they simply click on the column heading to sort the list by that column.
    The problem is that when you click for the first time on a sortable column heading, Apex sorts it in ascending order; you need to click on the same column heading again to sort in descending order.
    Is it possible to change this behaviour and sort the data in descending order in the first click? So the users don't have to click twice...
    Thanks
    Luis
    PS: Apex 3 running on Oracle 10.2.0

    Luis,
    See: Can I "catch" a click on a sortable column header of a report?
    Take a look at Anton Nielsen's answer with regards to hiding a column and displaying its value instead of the sortable column.
    Asumming the following simple report query:
    select product,sales
    from <table>
    Change that into:
    select product
    ,sales*-1 as reverse_sales -- Select this one as an extra column
    ,sales -- Hide this column
    from <table>
    In your report column attributes (of column reverse_sales), html-expression, type #sales#. It then displays the normal sales. However apex will generate a 'order by 2 asc' for the first time. The '2' will refer to the sales*-1 value: sorting it asc, is the same as sorting sales descending...
    Toon

  • Image mapping - capability to allow users to click on to open diff reports

    Hi,
    I want to display an image with the capability to allow users to click on it to open different reports... e.g, let's say I have an image with one section showing year 2012 and another section showing 2013. now if user click on 2012 then it should show report for 2012 and when user click on 2013 then it should show report for 2013.
    can you please guide me as how can I accomplish it
    Thanks

    Hi,
    >
    <img src="#WORKSPACE_IMAGES#Image.gif" border="0" width="1167" height="468" alt="" usemap="#reportsmap">
    <map name="reportsmap">
    <area shape="rect" coords="146,292,252,342" href="f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:">
    <area shape="rect" coords="312,251,403,296" href="f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:">
    </map>
    3) created report based on a parameter P2_YEAR
    Step 4 Require Assistance: may I know how to set P2_YEAR to 2011 when 2011 section is clicked and set 2012 when 2012 section is clicked.
    >
    you can fill the page item using the URL syntax http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_url.htm#BEIJCIAG
    <img src="#WORKSPACE_IMAGES#Image.gif" border="0" width="1167" height="468" alt="" usemap="#reportsmap">
    <map name="reportsmap">
    <area shape="rect" coords="146,292,252,342" href="f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.::::P2_YEAR:2011">
    <area shape="rect" coords="312,251,403,296" href="f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.::::P2_YEAR:2012">
    </map>regards,
    Erik-jan

  • Sort by clicking on the column heade with LIFO

    Good morning!
    I would like to sort by last entry is first (LIFO) in my report.
    To do that, I have to un check in sort:
    Home>Application Builder>Application ***>Page 1>Report Attributes*(Otherwise APEX shows: "Your query can't include an "ORDER BY" clause when having column heading sorting enabled.")*
    When I follow the APEX suggestion, my report lost feature to sort by clicking on the column header.
    I still want to keep sorting ability on any column just by clicking on the column header.
    Thanks in advance,
    Sam

    Sam,
    First remove the order by clause from your query and then try to set the sorting using the sort sequence. Thanks.
    Regards,
    --Manish                                                                                                                                                                                                                                                                                               

  • Changing the Column Header and Hiding the Column dynamically???

    Hi friends..
    I'm new to OBIEE field. I'm working in a OBIEE project that requires to dynamically change the column header, and dynamically hide the column depending on the prompt value.
    I know we can dynamically change the table header using the presentation variable but I couldn't do that same thing with column header.
    I searched some forums that suggest to use java script for this purpose but I'm not able to do the same also. If anyone had same issue before please help.

    toony, I'm not sure it's possible to do all that you want exactly the way you want, but here are some ideas you can pursue.
    To dynamically change column headers without javascript, check this blog out...
    http://oraclebizint.wordpress.com/2008/01/25/oracle-bi-ee-101332-dynamic-column-headers-using-presentation-variables-sets-and-conditional-formatting/
    As far as dynamically hiding a column, I don't think you can do this, but since you don't provide any details on how the PV is supposed to hide a column based on the value, are you talking about hiding a column for one PV value and another (different) column for a different PV value? Or are you talking about hiding one column when a PV has certain values and displaying it when the PV has a different set of values?
    I have managed to create both scenarios via a work-around, but the procedures require some writing so I don't want to put both. Please detail how you want your PV to "hide" a column or columns.
    P.S. I don't think column selectors will do the trick for you. Basically column selectors work like this: Say you have a report using Sales Region ID, Region Name, and Sales. Now let's say you want the user to choose if he/she wants to see annual sales, or quarter sales or weekly sales, etc. The column selector view would allow you to put the various columns (Year Sales, Quarter Sales, Weekly Sales) as an option the user can select. Once selected, the sales figure will change for the time period selected. For an example of how this is done, check out the section in this "Oracle by Example" link.
    Waited too long to publish this... Madan beat me to it, so there is some overlap here...
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/saw/saw.html
    Edited by: LC143 on Oct 27, 2008 9:21 AM

  • JTable - Check box in column header with sorting

    Hello
    I have 3 problems/questions.
    1. When adding sorting to a table with
    setAutoCreateRowSorter(true);and you click on a column header, normally a sorting arrow will appear, and indicate in what direction its sorting,
    but in the column head with the checkbox, even though the sorting works, the arrow will never appear. Is there anyway to fix this?
    2. Is there anyway to get the checkboxes in the table cells to be aligned left (I dont mean the columnheader checkbox, but the ones below)?
    3. When you click on the columnheader to either sort or check the checkbox, you will have to wait about a second between each click, or else it won't react and won't sort. sometimes you will have to click twice for it to react. If you click a lot of times fast, then it won't react until you stop for a second, and click again, though it will react only on the first click, but not the secont, third, fourh, and so on, until you stop for a second. Is there anyway to fix this, or atleast make it have a better reaction time?
    This is the code for creating the table:
    public class Example extends JFrame{
        private Container container;
        private JTable exampleTable;
        public Example(){
            container = getContentPane();
            ExamleTableModel examleTableModel = new ExamleTableModel();
            exampleTable = new JTable(examleTableModel);
            TableColumn tc = exampleTable.getColumnModel().getColumn(0);
            tc.setCellEditor(exampleTable.getDefaultEditor(Boolean.class)); 
            tc.setCellRenderer(exampleTable.getDefaultRenderer(Boolean.class)); 
            tc.setHeaderRenderer(new CheckBoxHeader(new MyItemListener()));
            container.add(new JScrollPane(exampleTable), BorderLayout.SOUTH);
            exampleTable.setAutoCreateRowSorter(true);
            setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );       
            this.pack();
            setSize(500,500);
            setVisible(true);
        }This is the code for the checkboxheader:
        class MyItemListener implements ItemListener 
                public void itemStateChanged(ItemEvent e) { 
                    Object source = e.getSource(); 
                    if (source instanceof AbstractButton == false) return; 
                    boolean checked = e.getStateChange() == ItemEvent.SELECTED; 
                    for(int a = 0, b = exampleTable.getRowCount(); a < b; a++) { 
                        for(int c = 0, d = exampleTable.getRowCount(); c < d; c++) { 
                            if(exampleTable.getColumnName(c).equals("")){
                                exampleTable.setValueAt(new Boolean(checked),a,c);
        class CheckBoxHeader extends JCheckBox 
            implements TableCellRenderer, MouseListener {
            protected CheckBoxHeader rendererComponent; 
            protected int column; 
            protected boolean mousePressed = false; 
            public CheckBoxHeader(ItemListener itemListener) { 
                rendererComponent = this; 
                this.setHorizontalAlignment(JLabel.LEFT);
                rendererComponent.addItemListener(itemListener); 
            public Component getTableCellRendererComponent( 
                    JTable table, Object value, 
                    boolean isSelected, boolean hasFocus, int row, int column) { 
                if (table != null) { 
                    JTableHeader header = table.getTableHeader(); 
                    if (header != null) { 
                        rendererComponent.setForeground(header.getForeground()); 
                        rendererComponent.setBackground(header.getBackground()); 
                        rendererComponent.setFont(header.getFont()); 
                        header.addMouseListener(rendererComponent); 
                setColumn(column); 
                rendererComponent.setText("");
                setBorder(UIManager.getBorder("TableHeader.cellBorder")); 
                return rendererComponent; 
            protected void setColumn(int column){this.column = column;} 
            public int getColumn(){return column;} 
            protected void handleClickEvent(MouseEvent e) { 
                if (mousePressed) { 
                    mousePressed=false; 
                    JTableHeader header = (JTableHeader)(e.getSource()); 
                    JTable tableView = header.getTable(); 
                    TableColumnModel columnModel = tableView.getColumnModel(); 
                    int viewColumn = columnModel.getColumnIndexAtX(e.getX()); 
                    int column = tableView.convertColumnIndexToModel(viewColumn); 
                    if (viewColumn == this.column && e.getClickCount() == 1 && column != -1) { 
                        doClick(); 
            public void mouseClicked(MouseEvent e) { 
                boolean active=true;
                JTableHeader header = (JTableHeader)(e.getSource()); 
                switch (e.getID()) {
                case MouseEvent.MOUSE_CLICKED:
                case MouseEvent.MOUSE_PRESSED:
                case MouseEvent.MOUSE_RELEASED:
                    JTable tableView = header.getTable();
                    TableColumnModel columnModel = tableView.getColumnModel();
                    int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                    int column = tableView.convertColumnIndexToModel(viewColumn);
                    Rectangle bounds = tableView.getCellRect(-1, column, false);
                    if (e.getX() > bounds.x + 16) { // only if one the checkbox
                        if (e.getID() == MouseEvent.MOUSE_CLICKED) {active = false;}
                    }else{active=true;}
                if(active){
                    handleClickEvent(e); 
                    ((JTableHeader)e.getSource()).repaint();   
            public void mousePressed(MouseEvent e){mousePressed = true;} 
            public void mouseReleased(MouseEvent e){} 
            public void mouseEntered(MouseEvent e){} 
            public void mouseExited(MouseEvent e){} 
    }If you want the code for the ExamleTableModel, I will post it if you ask (having trouble with the character limit).

    What are you supposed to cast it to? I might have tried to cast it to something wrong.
    I tried
    TableCellRenderer tcr = table.getDefaultRenderer(Boolean.class);
    ((DefaultTableCellRenderer)tcr).setHorizontalAlignment(SwingConstants.LEFT);and that gave me a ClassCastException. But I might have been trying to cast it to the wrong thing.

  • Download internal table data into excel sheet with column heading and data

    Hi,
      I am having one internal table with column headings and other table with data.
    i want to download the data with these tables into an excel sheet.
    It should ask the user for file name to save it on their own name. They should give the file name in runtime and it should be downloaded into an excel sheet.
    Can anyone tell what is the right function module for downloading these two internal table data with column heading and data.
    what we have to do for storing the file name in runtime.
    Can anyone help me on this.
    Thanks,
    Rose.

    Hi Camila,
        Try this
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                        = PATH2
       FILETYPE                        = 'XLS'
      TABLES
        DATA_TAB                        = IT_DATA
       FIELDNAMES                      = IT_HEADINGS
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22

  • How to check if a user has clicked on a digital control and changed its value?

    Greetings !!!
    I am looking for a simple way (without using Windows messages)of knowing if an user has clicked on a digital control and changed its value.
    I have tried the key focus property; but I have to click twice to make it work.
    If somebody knows a better solution; please let me know.
    Thank you in advance for your help

    If you just want to know if the value has changed you can put it in a while loop and use shift registers to see if the value has changed.
    Brian
    Attachments:
    Changed.vi ‏22 KB

  • When I have a pdf file open, I used to be able to click on "Bookmarks" tab on left side and allow me to click on each individual page and delete if I needed to.  Now when I click on the Bookmarks tab, that section is empty.  How can I get it to show each

    when I have a pdf file open, I used to be able to click on "Bookmarks" tab on left side and allow me to click on each individual page and delete if I needed to.  Now when I click on the Bookmarks tab, that section is empty.  How can I get it to show each page again?

    Hi chrismarks1,
    I think you may be confusing bookmarks with thumbnails. If you click the Page Thumbnails icon (the one above the Bookmarks icon), then you can delete a page by clicking its thumbnail, and clicking the Delete Pages icon (the trashcan icon). Just make sure that you're viewing the PDF file in Acrobat (rather than Acrobat Reader), as you can't delete pages from Reader.
    Best,
    Sara

  • How to avoid/hide column header and ---- in sql command output

    Dear Friends,
    I have a script to get the list and delete datafiles
    script is : (del.sql)
    spool d:\del.bat
    select 'rm -r '||name from v$datafile;
    spool off;
    script output (del.bat)
    'RM-R'||NAME
    rm -r C:\ORACLE10GDB\ORADATA\TEST\SYSTEM01.DBF
    rm -r C:\ORACLE10GDB\ORADATA\TEST\UNDOTBS01.DBF
    rm -r C:\ORACLE10GDB\ORADATA\TEST\SYSAUX01.DBF
    rm -r C:\ORACLE10GDB\ORADATA\TEST\USERS01.DBF
    I don't want to have the column header and ---- which is present before the rm -r commands in my output spool file (del.bat)
    how can i do it?Please suggest
    Regards,
    DB

    I have a script to get the list and delete datafiles Yikes, what are you doing here?
    Can you use rm on Windows?

  • Allowing user to click check boxes in any order

    Hi,
    I'm using Captivate 5.5 to create a training session with our software. On a particular page, our trainer wants me to instruct the user to click every check box on a page. Since there are 10 check boxes, I would like to let the user click all the check boxes in any order, as opposed to clicking them in the same order that I did using the normal training recording.
    I've been trying to insert click boxes and assign variables, but then I run into the problem of not being able to show the checkmark when the check box is clicked.
    Has anyone run into this problem or tried to created a page where the user can click multiple object in no particular order?
    Thanks!

    Hello,
    This is perfectly possible with the checkboxes widget, and will be a lot less work than messing with images and click boxes. The big advantage of the checkboxes widget is that it is static, so you do not need to worry about rewinding the playhead which would be the case if you are working with interactive objects. However if you want to offer a 'reset' to the user, or perhaps to return to the slide with the widget, I warmly recommend to download the free enhanced checkboxes widget created by Jim Leichliter, because it allows you to control the variables associated with the widget.
    I will not explain extensively how to use it, bit in a hurry because I have to teach in a couple of minutes. But here are some links: first a link to Jim's widget, than to a blog post where I explain the use of the Default Checkboxes widget, and third the explanation of the enhanced version.
    Checkboxes Enhanced
    Widgets and Custom Questions - part 1
    Extended widgets ...
    Just one last warning: I did not check the maximum checkboxes supported by the widget (you need 10), if necessary however you can insert the widget twice. However never duplicate a widget, nor have them in the same space on the stage.
    Lilybiri

  • How to fix the table column header and resize the width of a table column?

    Hi all,
    I have the following two requirements,
    1) I need to wrap the table column header into two rows. I mean the header must be displayed in two rows.
    2) I need to to able to resize the width of the column. i.e The user should be able to drag the column width according to his requirement.
    Is this possible. Any help would be appreciated!
    Regards
    Kishan

    Hi Kishan,
    Refer to these links.They may ne useful for you.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80d81237-b780-2a10-d398-cc33af6bd75c
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30291df2-b980-2a10-0884-839c4f7f147e
    Regards,
    Sumangala

  • Converting column header and a single record into rows

    Lets suppose the table with only one record
    col1 col2 col3-----Column Header
    d1 d2 d3
    i want it in following manner
    column_name Column_data----Column Header
    col1 d1
    col2 d2
    col3 d3
    for this i have written the query as
    select column_name,column_data from (select * from XXX where col1=123)
    MODEL RETURN UPDATED ROWS
    dimension by(col1)
    measures (col1,0 column_name,0 column_data )
    ignore nav
    rules ITERATE(167)
    column_name[iteration_number]=cast( iteration_number as varchar2(3)),
    column_data[iteration_number]=cast( iteration_number as int)
    here i am just assigning iteration_number but i want to assign name of the column and its value;
    Note:--table contains nearly 200 columns

    Something like (using one of my own tables):
    select column_name colname,
           decode(column_name,'RUN_NO',to_char(run_no),
                              'SEARCH_ID',to_char(search_id),
                              'PROCESSING_START_DATE',to_char(processing_start_date,'DDMMYYYYHH24MISS'),
                              'PROCESSING_END_DATE',to_char(processing_end_date,'DDMMYYYYHH24MISS'),
                              'NO_OF_MATCHES',to_char(no_of_matches),
                              'ERROR_DETAILS',error_details,
                              'ADVREP_TIMESTAMP',to_char(advrep_timestamp,'DDMMYYYYHH24MISS')
                  ) colvalue
    from partial_search_history, (select rownum r, column_name
                                  from user_tab_columns
                                  where table_name = 'PARTIAL_SEARCH_HISTORY')
    where run_no = 356You can build the decode by doing
    SELECT ''''||COLUMN_NAME||''',TO_CHAR('||COLUMN_NAME||'),'
    FROM user_tab_columns
    where table_name = 'PARTIAL_SEARCH_HISTORY'A decode on DATA_TYPE field would allow you to add a format mask for DATE fields if necessary.

  • Allow user to select up to 5 answers and enter a ranking

    Hello,
    I ahve a multi page form created with LiveCycle 10.0.2.201. On one page, there is a grid of goals presented to the user. There are 33 of these goals in 3 columns of 11.
    Here is a link to an image of the grid. (For some reason I cannot get the image to upload to this posting)
    http://i.imgur.com/TYM3JVY.jpg
    What I want to have happen is for the user to select up to 5 goals and those selections show the order of importance from 1 to 5.
    Any thoughts on how to accomplish this?
    Thanks!
    Joe
    ***Added: I suppose it would be necessary for some sort of warning to pop up if the user selected a) more than 5 and b) if they had made a selection twice.

    Try the LCD forum.

Maybe you are looking for

  • PLEASE help with multi-cam edit issue (head about to explode...)

    PLEASE believe me when I say I've watched 20 YouTube videos on the subject, read the manual, reinstalled FCS on a new machine (in the event that the install or my last MBP was at fault), etc., etc.... JUST can't get FCP to make the cuts for me when I

  • Parts

    i have an older router but am missing power cord and installation disk. How much faster are newer models. Model # DI-624. How fast is this model?

  • Total of Quantity coloum In SAP B1

    Hello My friends I have a problem about inventory , it is how to view the total of quantity , when the UOM is same for all item for the GRN, delivery, A/P Invoice, A/R Invoice.... ect ( I red similar Questions regarding this, but it was not help full

  • Impossible to recharge my iPhone since new IOS 4.3

    I've started to receive push telling me that "this accessories wont be able to charge the iphone" but I had the phone in my hand and it wasn't plugged to any cable or device. Even when I've plugged it in the wall outlet with the apple cable, I was re

  • Can anyone send me IZ0-042 dumps

    I am preparing myself for Oracle 10g Administration-1. can anyone send me dumps regarding this course