Data Grid Sort Within Portlet

I have a portal with a portlet that contains a search form and a data grid. I have set the sortable attribute on the column to true. The sort action gets the filter service and passes it to the DB control.
I cannot seem to get the sorting to work. The output from getSortFilterService().getDatabaseFilter(getGridName()).getOrderByClause() is always empty no matter which column I click.
Is there something special I have to do because of the portal/portlet?
Can someone give me a tip (or two). I realize this is a novice question but I am learning as I go and would appreciate any help.
Edited by markml at 09/20/2007 9:41 PM

I figured it was locking up the browser. I submitted a bug ticket several months ago concerning the same issue. If you have "enableviewstate" set to true on a datagrid and you are using the PT web controls, then the browser will lock up. It all depends on the number of rows and columns you have in the datagrid; unfortunately, I don't know the fatal number.
However, what causes it is how Plumtree manages the viewstate itself for a datagrid. In a nutshell, they have to remember the viewstate for each single item in the grid. And the algorithm they use is extremely slow. The browser's scripting engine basically locks up because of the length of time it takes.
Unless you absolutely need it, I would just turn off the viewstate. It disables some fancy features of the datagrid, but you can still build workarounds.
Hope this helps/clarifies things for you!
--JasonFTN Financial

Similar Messages

  • Advanced Data Grid Sorting / Grouping Collection

    Ok, basically here's the issue..
    I have an advanced data grid with a tree view. It goes two
    levels deep
    so:
    Report Type
    |-------------------- Company
    |--------------------------------------- Report 1
    |--------------------------------------- Report 2
    |--------------------------------------- Report 3
    |-------------------- Company 2
    |--------------------------------------- Report 1
    |--------------------------------------- Report 2
    |--------------------------------------- Report 3
    Report Type 2
    |-------------------- Company
    |--------------------------------------- Report 1
    |--------------------------------------- Report 2
    |--------------------------------------- Report 3
    |-------------------- Company 2
    |--------------------------------------- Report 1
    |--------------------------------------- Report 2
    |--------------------------------------- Report 3
    etc..
    Report and Company are Nodes (folders) and are being sorted
    alphabetically by default.
    The individual reports (Report 1,2,3, etc..) are not being
    sorted in any way that I can figure out. I need to sort them by
    date, but no matter what I've tried I can't get it to work.
    I tried a SortCompareFunction on the advancedDataGridColumn
    that displays each report, and it works *IF* I click the header...
    but if I dispatch the header_release event via AS3, nothing
    happens.
    I even set up a test:
    dg.addEventListener(AdvancedDataGridEvent.HEADER_RELEASE,heard);
    dg.dispatchEvent(
    new AdvancedDataGridEvent
    AdvancedDataGridEvent.HEADER_RELEASE,
    false,
    true,
    0, // The zero-based index of the column to sort in the
    DataGrid object's columns array.
    null,
    0,
    null,
    null,
    0
    function heard(e:Event) {
    trace("I HEAR IT!");
    trace(e.type);
    I set that up on a button so I can dispatch the event with a
    click. Every time I click the button, the header release event
    listener goes off, but the actual advanceddatagrid remains
    unchanged until I actually click on it's header..
    Any help would be *GREATLY* appreciated... I've been stuck on
    this problem for two days now :(

    "AnakinJay" <[email protected]> wrote in
    message
    news:[email protected]...
    > Ok, basically here's the issue..
    >
    > I have an advanced data grid with a tree view. It goes
    two levels deep
    > so:
    > Report Type
    > |-------------------- Company
    > |--------------------------------------- Report 1
    > |--------------------------------------- Report 2
    > |--------------------------------------- Report 3
    > |-------------------- Company 2
    > |--------------------------------------- Report 1
    > |--------------------------------------- Report 2
    > |--------------------------------------- Report 3
    >
    > Report Type 2
    > |-------------------- Company
    > |--------------------------------------- Report 1
    > |--------------------------------------- Report 2
    > |--------------------------------------- Report 3
    > |-------------------- Company 2
    > |--------------------------------------- Report 1
    > |--------------------------------------- Report 2
    > |--------------------------------------- Report 3
    > etc..
    >
    > Report and Company are Nodes (folders) and are being
    sorted alphabetically
    > by
    > default.
    > The individual reports (Report 1,2,3, etc..) are not
    being sorted in any
    > way
    > that I can figure out. I need to sort them by date, but
    no matter what
    > I've
    > tried I can't get it to work.
    >
    > I tried a SortCompareFunction on the
    advancedDataGridColumn that displays
    > each
    > report, and it works *IF* I click the header... but if I
    dispatch the
    > header_release event via AS3, nothing happens.
    >
    > I even set up a test:
    >
    dg.addEventListener(AdvancedDataGridEvent.HEADER_RELEASE,heard);
    >
    > dg.dispatchEvent(
    >
    > new AdvancedDataGridEvent
    > (
    > AdvancedDataGridEvent.HEADER_RELEASE,
    > false,
    > true,
    > 0, // The zero-based index of the column to sort in the
    DataGrid object's
    > columns array.
    > null,
    > 0,
    > null,
    > null,
    > 0
    > )
    >
    > );
    >
    > function heard(e:Event) {
    >
    > trace("I HEAR IT!");
    > trace(e.type);
    >
    > }
    >
    >
    > I set that up on a button so I can dispatch the event
    with a click. Every
    > time I click the button, the header release event
    listener goes off, but
    > the
    > actual advanceddatagrid remains unchanged until I
    actually click on it's
    > header..
    >
    > Any help would be *GREATLY* appreciated... I've been
    stuck on this problem
    > for
    > two days now :(
    Check the compareFunctions here
    http://flexdiary.blogspot.com/2008/09/groupingcollection-example-featuring.html

  • Sort on views in data grid (ORA-00904)

    Can anyone else confirm that this happens, or has been highlighted previously:
    1. Connect to any schema containing views
    2. Expand the views tree
    3. Click on any view
    4. Click on the data tab to display the data grid
    5. Click the sort button
    6. Select any column (must not exist in view selected later)
    7. Click "Apply Sort"
    8. Now click on any other view that does not contain a column of the same name as the one chosen as the sort column previously.
    I receive an ORA-00904 error. The only way I can clear this is to close down the data grid tab item, and re-open it.
    Cheers
    Carl
    DBA - Dunfermline Building Society

    Yes.
    Login as a DBA.
    Go to Other Users - SYS - Views - More - Filter - %% - OK
    Click on DBA_USERS - DATA - Sort - USERNAME - Apply Sort
    Click on DBA_USTATS
    --> ORA-00904 "USERNAME". invalid identifier.
    Notice that the columns in the data view have not changed.
    Close the tab and click on DBA_USTATS fixes the problem (no data anyway).
    Click on freeze view (the push pin) and click on DBA_USTATS fixes the problem.
    These are two easy workarounds, but it is confusing the first time you encounter it.

  • Data grid within advanced data grid (Hiding and showing columns)

    Hi,
    I have a dta grid within advanced datagrid. When the row of advanced data grid is expanded, the datagrid opens up.
    I want to control the columns of datagrid based on the value of a field in advanced data grid. I want to show all the columns of the datagrid if the field value of advanced data grid is "X" else I want to show only few columns of the data grid.
    I will set the id for all the columns of the datagrid. Then I think I can write some code in a method to set the visibility of the columns and assign the function to item opening property of the advanced data grid.
    Please give me some ideas.
    Regards,
    Mahee   

    Hi,
    Please go through following links:
    http://www.cflex.net/showFileDetails.cfm?ObjectID=553
    http://flexmusings.wordpress.com/2009/08/03/hide-row-column-datagrid/
    http://www.java2s.com/Code/Flex/Grid/HidinganddisplayingDataGridcolumns.htm
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Data Grid Control +JSP+Sorting

    Hi,
    Can any one help me regarding In JSP by using Data Grid Control to sort columns in table and displayed in same JSP.

    Yes! We can help! Do you have any other questions?
    Edited by: SoulTech2012 on Sep 20, 2008 11:51 AM

  • Advice on rendering multiple data grids based on 1 array

    What is the best way to render the following screen ?
    There is 1 array collection that is sorted (in this example) by category. The screen lists by category and then prints a datagrid (perhaps) of the items within the category. Each time the category changes, a new header and data grid is rendered.
    Hot Dogs (Category Description... the could be n number of categories)
    Item Product           Brand      Grade      Price
    1      mini hot dogs   mayer     supreme   8.00
    (there could be n number of lines)
    Beef
    Item Product           Brand      Grade      Price
    1      mini beef        mayer     supreme   8.00
    (there could be n number of lines)

    Use XML data and then you can use e4x syntax to extract the data you need by filtering by category in e4x syntax.
    See these LiveDocs links:
    http://livedocs.adobe.com/flex/3/html/help.html?content=13_Working_with_XML_03.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=13_Working_with_XML_01.html

  • Data Grid Recommendation

    We are looking to add data grid functionality to our Apex app and am looking for any suggestions. Ideally it should be able to sort, resize, re-arrange and hide/show columns as well as load data asynchronously using the results of an AJAX request. Being able to resize the entire grid would also be nice.
    I have seen references to integrating ExtJS into Apex but also have seen comments that it is written for an older version. Does anyone know if this is still correct?
    I have also been looking at stand-alone jQuery plugins but am not sure how much work will be involved integrating this with Apex. Does anyone have experience with this?
    Any help, pointers, suggestions, gotchas, etc would be appreciated.
    Thanks,
    Mark

    Below is all of the JavaScript code. I found that, because Apex does not follow the standard method for passing parameters (sounds more like something Microsoft would do) you have to override the method used to send the data to the server. Also, since there is no way to change the content-type response header from 'text/html' (as far as I can find) you must also parse the resulting JSON string. Both of these actions are performed within the getPromoData function.
    I haven't done more than get the table to display with pagination working so there may be other issues I run into along the way. I shouild also note that we are using Apex 4.0 and I understand there have been improvements in AJAX processing in Apex 4.2, so that may change things (hopefully for the better).
    <link rel="stylesheet" type="text/css" media="screen" href="&WORKSPACE_IMAGES.ui.jqgrid.css" />
    <script src="&WORKSPACE_IMAGES.grid.locale-en.js" type="text/javascript"></script>
    <script src="&WORKSPACE_IMAGES.jquery.jqGrid.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    * Manually retrieve JSON data due to Apex parameter handling
    function getPromoData(pdata) {
      $.ajax({
        type: 'POST',
        contentType: 'application/json; charset=utf-8',
        url: 'f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:APPLICATION_PROCESS=Promo_Item_Query:::P70027_TABLE_PAGE,P70027_TABLE_ROWS,P70027_TABLE_SORT_INDEX,P70027_TABLE_SORT_DIR:' + pdata.page + ',' + pdata.rows + ',' + pdata.sidx + ',' + pdata.sord,
        success: function(data, textStatus) {
          try {
            var json = eval('(' + data + ')');
            $('#promoTable')[0].addJSONData(json);
          catch(e) {
            alert('Error parsing data.\n' + e);
        error: function(data, textStatus) {
          alert('Error retrieving data.\n' + textStatus);
    * Initialize the grid
    jQuery(document).ready(function(){
      jQuery("#promoTable").jqGrid({
        datatype: function(pdata) {
          getPromoData(pdata);
        mtype: 'POST',
        colNames: ['Id', 'Create Date', 'Promotion Name', 'Description', 'PH Promo Ranking'],
        colModel: [
          {name: 'id', index: 'id', width: 55, align: 'right'},
          {name: 'createDate', index: 'creation_date', formatter: 'date', align: 'right', width: 90},
          {name: 'name', index: 'name', width: 200},
          {name: 'description', index: 'description', width: 500},
          {name: 'ranking', index: 'ranking', width: 110, align: 'right'}
        pager: '#promoPager',
        rowNum: 5,
        rowList: [5, 10, 20],
        sortname: 'id',
        sortorder: 'desc',
        viewrecords: true,
        caption: 'General Promotion Setup'
    </script>

  • Hiding Column in Data Grid

    Is there is way to hide a column in data grid column?
    Is it possiblo to reorder the column like in excel . I know its not possible bcoz it <table> tag ...

    Select the column within the table and in the property window uncheck the visible. You can also include visible="false" in the jsp page within the column tag.

  • SQL Developer 1.1.0.21: Issues with Data Grid and SQL syntax checking

    In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion.
    Is there any option to change this behavior?
    Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check.
    I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql.
    Manish

    "In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion."
    In the "Results" tab, Click Ctrl & Tab keys (at the same time) or with mouse click on any cell other than the first column (a sequence or rownum), you will be able to navigate using the arrow keys.
    "Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check."
    The 0.0134 seconds could be the result of the most recently executed successful statement. Check the Script Output tab for errors. Use F5 (Run Script option) instead of F9.
    "I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql."
    On the SQL statement (or code), Right Click -> Format SQL (or press Ctrl & B), proper formatting would help.
    I use version 1.0.0.15.57 and seems to be working allright.
    - Babu Rangasamy

  • Reading a csv file and bind to a data grid

    hi. doing a school project and been searching. the application reads a csv file from c:\stocklist.csv, and then this in a button called btnLoadData, and now need to read in a data control called DmgDisplayData. do i put the code in the button, or in the
    data grid. been searching, but cannot seem to find any thing. so, where do i put the code, in the data control, and does any one have an example code how to read into the data fields. also need to have one field, able to edit, the other three or four fields,
    read only. can any one help me out. never covered this in the subject, but did do file streams a few years ago in vb, but usin g c#,a dn the help in visual studio, not that helpful, with a blind person using a screen reader, jaws for windows from http://www.freedomscientific.com,
    and using visual studio 2013 community edition. can any one help me out, been searching and trawling about 15 to 20 pages so far, and did try a couple of sites, but could not find, any help. thanks. the application is to read a csv file from a button, and
    load into a data grid, then have a message box, saying file load successful, then have one field, order on as edit, but the other fields, read only, so do i need the navigator buttons, for next, back, previous, etc, and how do i code that as well. not to do
    it for me, want to learn, but maybe some sample code, did do navgiator controls, years ago for a vb project, but need the c # example for that, thanks. then you have a button, Save data, that saves the csv file in the data grid. so can google for that. then
    have a toolbar, with a button saying, Sort Items, a tool strip, and when you click on that button, you have a drop down list, of three items, then a sort button, which will then sort the array in the data grid. so, do i need another form, or just do the combo
    box as an invisible control, then just refrence, that in the toolbar. so need to use th file class and an array, learnt about single and multi arrays. any ideas. thanks.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

    Hi Marvin,
    -->where do i put this, in the data grid click event. or in the form load event. thanks.
    You could use this code after you initialize the DataGridView. you could put it in the form load event.
    -->what about how get the tool bar and the combo box and another button, then sort from the combo box on the array for the collumns, for to set focus to the first read collumn for the data grid. how do i do that, close the parent form, and have another
    form on the toolbar.
    Since this is another issue of this thread, I would recommend you posting it with
    another thread. We will focus on that thread to help you. Thanks for your
    understanding.
    BTW, Before you asking questions, I suggest you could learn to make it by yourself. You could begin to learn winforms in MSDN articles:
    https://msdn.microsoft.com/en-us/library/dd30h2yb%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396. Or Google it, you will get many answers. In that way, you will learn more from the questions.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Is it possible to return a data grid in sql developer from package?

    Hi, I am in need of some help in returning a datagrid rather than just a list from a package. This is my package:
    CREATE OR REPLACE PACKAGE BODY C_1
    as
    PROCEDURE COUNTING1 (C_YEARFROM IN NUMBER, C_TABLE_NAME IN VARCHAR2) is
    yearCount NUMBER;
    c_sql long;
    BEGIN
    execute immediate 'SELECT COUNT(DISTINCT SPECIES) FROM '||C_TABLE_NAME ||' WHERE year >2007' into yearCount;
    dbms_output.put_line('Distinct species count: ' ||yearCount);
    end counting1;
    end c_1;
    Is it possible to get the results of these in a table or data grid in sql developer, e.g. I would like to sort results etc rather than just a flat list? Something a bit more elegant then dbms_output.put_line?
    Thanks

    yes, I copied the wrong code into the example - what I actually want to display in a grid is the following:
    CREATE OR REPLACE PACKAGE RSET_CURSOR IS
    cursor rs_cursor is select species, location from ot;
    r_c rs_cursor%rowtype;
    end;
    create or replace package rset_cursor2
    is
    procedure printSpecies;
    end rset_cursor2;
    create or replace package body rset_cursor2
    is
    procedure printSpecies is
    begin
    open rset_cursor.rs_cursor;
    loop
    fetch rset_cursor.rs_cursor into rset_cursor.r_c;
    exit when rset_cursor.rs_cursor%notfound;
    dbms_output.put_line(rset_cursor.r_c.species);
    end loop;
    close rset_cursor.rs_cursor;
    end;
    end;
    I have also just noticed the list I am getting is only including one column of data where it should include 2, have I omitted something?
    Thanks

  • Custom System Data Grid

    Hi!
    I need a custom data grid, explaining:
    I need to made custom list of specific files, in the System data grid I can use the drag and drop files to desktop, but how I made the drag and drop work in the custom data grid of list of files?
    I tried to show in the data grid the path of the file, and drag this, but the error is:
    "Data for file list format must be an array of Files"
    But, how I made a "array of files"?
    Sorry to my bad english =)
    Thanks a lot! =)

    Hello chhavs,
    If you listen to the DataGrid's headerRelease event, the event has a property columnIndex to let you know which column the user wanted to sort. So you don't need 10 functions, just one with a switch statement, which is reasonable.
    private function handleHeaderRelease(event:DataGridEvent):void
    var sort:Sort = new Sort();
    var field:SortField;
    switch (event.columnIndex)
    case 0:
    field = new SortField("fieldA");
    break;
    case 1:
    field = new SortField("fieldB");
    break;
    case ...
    sort.fields = [field];
    masterRecords.sort = sort;
    masterRecords.refresh();
    Thanks,
    Philip

  • How to click on linkbuttons in the rows of a data grid

    I'm trying to write automation test cases for a flex application using Flex Selenium.
    The flex selenium API provides only 2 click events: click(String objectId) and click(String objectId, String optionalButtonLabel)
    There are no click events for rows or columns for a data grid.
    The application has a  DataGrid with 2 linkbuttons in a column for each row (besides other columns).
    The linkbuttons have an id. But clicking it only clicks the one in the first row.
    Now, I have to perform these tasks:
    - Click on the link buttons in any row
    -  Click on any row
    -  Click on column  header to sort
    How can I accomplish these?

    Hi Suman,
    thanks for your prompt reply.
    I am trying it but it doesn't work. I started to run the query for a while but it is still running and there is no result for it. I still see the variable popup I filled after the first running of the query.
    Any other idea?
    Kind regards,
    Ali

  • Who will have access to data grid

    do end user can have access to Data Grid.
    general who will have access to data grid i.e both end user and hfm developer can access to the data grid in real time.
    Can any one pls tell
    Thanx

    Access to datagrids is controlled by the "Security Class" which is selected when saving the datagrid. By default this value is [Default]. Security classes are defined within shared services, and users or groups are subsequently given rights to security classes.
    A user can access a datagrid if he has "Read" or "All" access level on the datagrid's security class.
    Different kinds of users, whether end users, power users, key users, developers etc, are given access to grids (and other hfm objects like forms, documents, reports, dimension members etc) according to the above mechanism.
    Kostas

  • Adding row to Data Grid

    Hi,
    I would like to add rows(more than one) dynamically to my data grid in list tile.
    Pls let me know if any work have work on this.
    Thanks in advance.
    Harish

    Hi,
    depending from the scenario you better add these new business objects to the business collection which is the underlying BCOL of the grid anchor.
    Do you want to have this working for bound objects (like BOCAPGEN) or unbound objects (e.g. fields to calculate/display a sum within the grid)?
    Regards,
    Wolfhard

Maybe you are looking for

  • Get metadata with Document ID

    Hello, Can we use Document ID and some SharePoint API to get information about document? I find solution - use SharePoint Fast search service, but this solution suggests that I will crawl content source before. Also i find DocumentId.FindUrlsById met

  • Linking Deliveries to a particular Driver

    Hi. 1) I created a 'Route Sales' order (No. 25) and completed the order by generating:        a) Delivery Number (No.100),        b) Shipment Number (No. 2001).        This transaction can be linked back to the driver for payment of commission throug

  • Simple BPM question ...

    I created a BPM in design builder. I brought it into config in order to create a Integration Process service. If I change the BPM design again in the design tool, what do I need to do in order to refresh it so that I can pick the new IP in the config

  • How to solve

    Hi Experts   loop at itab1.     move-corresponding itab1 to it_final.     collect it_final.   endloop.   I am facing the following error when i try the above code. An internal table field is too short. CX_SY_ARITHMETIC_OVERFLOW' The name of the field

  • Cannot import from camera

    I've got 2 cameras, a Canon EOS 30D and SD 550. Ever since upgrading to version 1.5.1 of Aperture the cameras do not show up as import options. The cameras are recognized in the system profiler and will open Aperture when plugged in and turned on, bu