Strange caching on a paging enabled data table when sql-command changes

Got some strange results when changing the command property of a JdbcRowSetXImpl. To reproduce:
- create new jsp page
- drag a table from Data Sources onto the page design grid
- put a DataTable on the page design grid
- bind DataTable to the RowSet for the table from step 2
- enable paging on the DataTable; make sure the page is smaller than the number of items in the table. Also add the page navigation buttons
- add a read-write property 'query' to SessionBean1
- add a button to the page design grid
- double click button and add
getSessionBean1().setQuery("SELECT * FROM <table> ORDER BY <someColumnName>"); // replace <> strings with appropriate names
- change the command property / query string for the table in the page backing bean to getSessionBean1().getQuery();
- run application
- click on button with query change code 'behind it'
- click on '->' next page button
- click on '<-' previous page button
Notice that one page is sorted, the other not. All pages that have been displayed before the 'query change' button was pressed remain in the 'old' sort order.
I have tried to call xxxRowSet.execute(), dataTable1Model.getDataCache().reset() on several places, to no avail.
The only hack I found to be working was adding a private static int hackCounter, and changing the ctor to dataTable1Model.setDataCacheKey("com.sun.datacache.bug.xxxRowSet" + hackCounter++);
Clearly there must be a better solution.

did u try dataTable1Model.execute();
you didn't mention that you did.
I have had datatables that didn't update only to find I didn't do dataTable1Model.execute();
Regards
Jonathan

Similar Messages

  • Datas deletion from Global Temporary table  when clear command is given

    Dear All,
    How to Delete datas from global temporary Table when clear command is given in forms
    Suggest me syntax..
    Pls help..
    Regards,
    Gokul.B

    http://psoug.org/reference/gtt.html
    Francois

  • Crystal Reports XI does not allow to change Table to SQL command?

    I have report that has Table in Datasource and this table used in report and all fileds are mapped. I need to change table to SQL Command with the same result set of collumns. When I try to Update in Set Datasource Location - it does not work. CR XI allow to update Command to table but Table to Command just do nothing.
    What I have to do or how I can do it?

    Alexander,
    That's probably the "Best" way to do it, and long term you'll want to start adding BOE to your work flow.
    If you want to get around it, here how:
    1) MAKE A COPY OF YOUR REPORT AND WORK FROM THE COPY!!! This involves some a good deal of destruction before you get into reconstruction.
    2) Once you have created your command, remove the table.
    3) Now the fun part... Go through report and manually change all references to the 1st table...
       report fields
       formulas
       selection criteria
       groups
       the whole 9 yards...
    A short cut for the future... If you make all of your formula copies of all of your fields ( fCustomerName = {Table.CustomerName} ) and then only use the formula version of the field in the reports, you can make these changes very easily. (All you have to do is update the one set of formulas.)
    Also as a side note before you get started... You may want to think twice before you mix commands with tables. You loose the server side filtering and grouping on the tables when you do that.  So if you have several tables, you are better off doing the whole thing in one SQL command, do all of your filtering and sorting there and use it to replace ALL of your tables.
    Basically, Graham's way is the easy way... Assuming you have access to the BOE.
    Jason

  • JSP Data table - Rendering for command buttons.

    Hi All,
    We are designing a JSP page where results from table have to be thrown on a data table. (h:dataTable)
    Based on one column value on the data table, we need to render a command button for each row of data table.
    For example, I select the employees from a table and throw it on data table.
    Only for those employees where address is not present, I need to enable an "Update address" command button.
    (Command button "Update address" is also part of data table.)
    Is it possible to accomplish this on a data table?
    If so how should we code the "rendered" tag of the command button in data table.
    Any help would be greatly appreciated.
    Thanks.

    Sounds like the JSF forum would be a closer alignment, but in general
    - retrieve your information from the database into a list of Employee beans.
    - Have your h:dataTable use the list of Employee beans as a datasource
    - have the rendered attribute of your update button depend on the value of employee.address maybe #{empty employee.address}
    cheers,
    evnafets

  • Delete table in SQL command

    Hello,
    As part of my report I populate a table then reference it in several following subreports.
    The issue I'm having is that I need to clear all the data from my table after using it to allow the report to run again (and not get multiple results)
    To do this I have tried to add a sub report at the very end (and start) of my report with the SQL command truncate table <tablename> or delete <tablename> or delete <tablename> where 1 = 1.
    When I try truncate I get an error saying that I don't have permission (despite granting it but hey...) which is why I switched to delete, this runs fine but the table doesn't get deleted...
    Any thoughts as to why this isn't working/how I can clear my table? I have thought of setting up a separate scheduled job to delete the table contents however I do also need to run the report several times with different parameters so this isn't an ideal solution.
    I have tried adding a select after my delete statement as I thought if it had something to display on the report it would have to look at it but this didn't make any difference.
    Any help will be much appreciated!
    Thanks
    Chris

    Thanks for that!
    I have had a go at this and I can see how it will work although I have limited access on the Crystal userid I have so will need to have the SP created as part of our nightly refresh script I think.
    Is there no way of getting crystal to run my delete statement otherwise?
    Thanks again
    Chris

  • Converting Crystal Date Group to SQL Command

    When selecting the option to group on the server, I found that there are requirements in addition to selecting the option.
    I have a date grouping in Crystal like the following:
    dateadd("d", - weekday({table.date}, crMonday)+1,{table.date})
    Can this be converted to a SQL command?

    Hi Mark,
    Jyothi had given  an excellent query for you,  Congrats Jyothy!!
    But she didnt mantioned 'From clouse' on that.
    Let me correct that query with an example,
    My TableName: Invoice
    Primary Key: InvoicePID
    Date field:InvoiceDate
    Here the query will be
    select InvoicePID,  Dateadd(d,-(CASE  WHEN DATEName(dw,Invoice.InvoiceDate ) = 'Monday' THEN 1
                            WHEN DATEName(dw,Invoice.InvoiceDate ) = 'Tuesday' THEN 2     
                             WHEN DATEName(dw,Invoice.InvoiceDate ) = 'Wednesday' THEN 3
                             WHEN DATEName(dw,Invoice.InvoiceDate ) = 'Thursday' THEN 4
                             WHEN DATEName(dw,Invoice.InvoiceDate ) = 'Friday' THEN 5
                             WHEN DATEName(dw,Invoice.InvoiceDate ) = 'Saturday' THEN 6
                             WHEN DATEName(dw,Invoice.InvoiceDate ) = 'Sunday' THEN 7
    END
    )+1 ,Invoice.InvoiceDate)
    from Invoice
    You can change the tablename and field with respect to your DB.
    regards,
    Salah.

  • Optional Date parameters in SQL Command

    I'm using Crystal Reports 2008. I want to make the start and end date parameters optional and have them default to the beginning and end of the previous month. Unfortunately, I'm using an SQL Command, rather than filtering in the Record Selection Formula, and I can't see any way to pass the computed start and end dates into the query. Is there any way to get the results I want short of omitting the date parameter in the query and doing all the filtering on the front end? Thanks.

    The way I have gotten around this problem is to make the date parameters strings, and allow mnemonics such as PM for prior month, PD for prior day, PQ for prior quarter, etc.  I then wrote Crystal and database functions that convert these mnemonics to actual dates, which are then used where necessary.  This is also useful for scheduling the same report to run weekly (for the prior week), monthly (for the prior month) and quarterly (for the prior quarter)...
    Also, remember that an SQL command in Crystal is basically the equivalent of a stored procedure, so you can do a lot of logic in them before returning your data set.  So, in your SQL, you could set a variable to either the parameter value or a calculated prior month dependent on if the date parameter is null (assuming Crystal allows no entry for the parameter, which I think 2008 does [I'm on XI R2]).
    HTH,
    Carl

  • Data Conversion or Sql Command

    We are importing mdb data to SQL Server and require data type casting. Which is better to use and gives better performance?
    - Data Conversion
    - SQL Command (with casting)
    Thanks,
    Darren

    Using the sql cast will give you a performance benefit over using the data conversion transformation.  We should probably shelve the transformation unless if we are in a situation where we can’t return the data with the type we would like for the destination
    (ex. flat files or stored procedures).
    Check this short and sweet article :
    here
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • Data lost when sql is very time-consuming

    Hi,
    I use sql statement as a data source,
    When the sql statement is very time-consuming(1 hour for example),
    the exported data as pdf file  was incomplete:
    only the first page exported when it's supposed to be three pages.
    thanks for your reply.

    You need to optimize your SQL statement. Use a Stored Porcedure or something Server side rather than Client side.

  • Paging a data table with input text fields

    I've created a datatable with input text fields so that contents can be edited. I have 'save' and 'cancel' buttons on the page so that changes can be saved or abandoned. That seems to work fine.
    However, I have a problem with paging. If I modify an input text field, page to the next page in the datatable and then page back, the modified input text field reverts to the original entry in the database. Does anyone know how I can preserve this change (without issuing a commit) until the user clicks on the save button?
    Here is a snippet of jsp with datatable.
    <h:dataTable binding="#{DocTypeDetail.doctypeMetadataTable}" headerClass="list-header" id="doctypeMetadataTable"
    rowClasses="list-row-even,list-row-odd" rows="5" style="left: 240px; top: 312px; position: absolute"
    value="#{DocTypeDetail.doctypeMetadataTableModel}" var="currentRow">
    <h:column binding="#{DocTypeDetail.column2}" id="column2">
    <h:inputText binding="#{DocTypeDetail.textField1}" id="textField1" value="#{currentRow['name']}"/>
    <f:facet name="header">
    <h:outputText binding="#{DocTypeDetail.outputText5}" id="outputText5" value="Name"/>
    </f:facet>
    </h:column>
    <h:column binding="#{DocTypeDetail.column3}" id="column3">
    <h:inputText binding="#{DocTypeDetail.textField2}" id="textField2" value="#{currentRow['value']}"/>
    <f:facet name="header">
    <h:outputText binding="#{DocTypeDetail.outputText8}" id="outputText8" value="Value"/>
    </f:facet>
    </h:column>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header"/>
    <f:facet name="header">
    <h:panelGroup binding="#{DocTypeDetail.groupPanel1}" id="groupPanel1" style="display: block; text-align: center" styleClass="list-paging-header">
    <h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_firstPageAction}"
    binding="#{DocTypeDetail.doctypeMetadataTableHeaderFirstButton}" id="doctypeMetadataTableHeaderFirstButton"
    image="resources/paging_first.gif" immediate="true"/>
    <h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_previousPageAction}"
    binding="#{DocTypeDetail.doctypeMetadataTableHeaderPreviousButton}" id="doctypeMetadataTableHeaderPreviousButton"
    image="resources/paging_previous.gif" immediate="true"/>
    <h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_nextPageAction}"
    binding="#{DocTypeDetail.doctypeMetadataTableHeaderNextButton}" id="doctypeMetadataTableHeaderNextButton"
    image="resources/paging_next.gif" immediate="true"/>
    <h:commandButton action="#{DocTypeDetail.doctypeMetadataTable_lastPageAction}"
    binding="#{DocTypeDetail.doctypeMetadataTableHeaderLastButton}" id="doctypeMetadataTableHeaderLastButton"
    image="resources/paging_last.gif" immediate="true"/>
    </h:panelGroup>
    </f:facet>
    </h:dataTable>

    I know by now you must have figured it out. If not you might want to try keeping the backing bean in session instead of request scope.
    Hope that helps,
    HeMan

  • Name of date table when Stock level falls below Reorder level

    Hi,
    I want to know is there any table where we can find the date when stock level falls below the recorder point(View - MRP1(MRP Procedure))?
    Please update.
    Thanks
    Dipak

    Not answered.

  • How to populate data in the data table on combo box change event

    hi
    i am deepak .
    i am very new to JSF.
    my problem is i want to populate data in the datatable on the combo box change event.
    for example ---
    combo box has name of the city. when i will select a city
    the details of the city should populate in the datatable. and if i will select another city then the datatable should change accordingly..
    its urgent
    reply as soon as possible
    thanks in advance

    i am using Rational Application Developer to develop my application.
    i am using a combo box and i am assigning cityName from the SDO.
    and i am declaring a variable in the pageCode eg.
    private String cityName;
    public void setCityName(String cityName){
    this.cityName = cityName;
    public String getCityName(){
    return cityName;
    <h:selectOneMenu id="menu1" styleClass="selectOneMenu" value="#{pc_Test1.loginID}" valueChangeListener="#{pc_Test1.handleMenu1ValueChange}">
                        <f:selectItems
                             value="#{selectitems.pc_Test1.usercombo.LOGINID.LOGINID.toArray}" />
                   </h:selectOneMenu>
                   <hx:behavior event="onchange" target="menu1" behaviorAction="get"
                        targetAction="box1"></hx:behavior>
    and also i am declaring a requestParam type variable named city;
    and at the onChangeEvent i am writing the code
    public void handleMenu1ValueChange(ValueChangeEvent valueChangedEvent) {
    FacesContext context = FacesContext.getCurrentInstance();
    Map requestScope = ext.getApplication().createValueBinding("#{requestScope}").getValue(context);
    requestScope.put("login",(String)valueChangedEvent.getNewValue());
    and also i am creating another SDO which is used to populate data in datatable and in this SDO in the where clause i am using that requestParam .
    it is assigning value in the pageCode variable and in the requestParam but it is not populating the dataTable. i don't no why??
    it is possible that i may not clear at this point.
    please send me the way how my problem can be solved.
    thanks in advance

  • Data Table module enabled script is not visible in Oracle Test Manager

    Hi,
    Data Table module enabled script is not visible in Oracle Test Manager (OTM)
    Steps to reproduce:
    1.     Create new script (Oracle EBS/Forms)
    2.     Enable Data Table module (Script--->Script Properties-->Modules) and save.
    3.     Try to add the script in Oracle Test Manager.
    Environment details:
    Windows 7
    OATS Version: 12.1.0.2 Build 58
    IE 9
    Thanks
    -Pops

    Hi Deepu,
    I'm trying to add Data Table enabled script in Oracle Test Manager.
    Data Table Module enable script is not visible in OTM.
    In OATS 12.3, also i'm facing the same issue.
    Thanks,
    POPS

  • DSO activation: Data in new data table but missing in active data table?

    we use an end routine in transformation to populate a data field in DSO.
    it works as we can see the value populated in new data table.
    when we activate (activation) DSO, we see the value is deleted from this data field.
    why?
    this data field is set as an characteristic info obj in the data field portion of the DSO.
    we are using 2004s, I forget to check the SP level.
    George

    good job ,thanks for the update and good luck.
    I saw it late on this, else i never miss OSS notes
    Chetan
    @CP..

  • How to identify a specific object that changed in a data table?

    I have a data table in my jsf page which populate by myList (a property of type List<myObject> in myBean) that contains a list of myObject objects.
    Within data table, the 'amount' property of myObject is in a h:inputText named 'amountText'.
    How can I recalculate another property (for example 'cost') of the specific myObject within one of the
    data table rows whenever user change the value of 'amountText' ?

    Hi Roger,
    I guess, it is up to your choice about design how you want to implement.
    you have two ways....
    1) Use valueChangeListener attribute of the text field, as it will be called for the row of the database on which the bind property value is actually changed.
    2) Not prefered, but you can use setterMethod of amount in the your object, and can compare its new value with the old one and can decide the consequence.
    Please let me know, if it solves your concern or you have a different concern.

Maybe you are looking for

  • Storing pdf file in sql database

    currently i am working on my last semester project.I am using visual studio 2010 to design front end and sql server 2008 for database. I that case i want to store the pdf file in sql server 2008 databae and want retrieve it back as and when required.

  • Unable to connect to report server - on Win 8.1 and SQL Server 2014

    unable to connect to report server on  Win 8.1 and SQL Server 2014 version Microsoft SQL Server 2014 - 12.0.2000.8 (Intel X86)     Feb 20 2014 19:20:46     Copyright (c) Microsoft Corporation     Express Edition on Windows NT 6.3 <X64> (Build 9600: )

  • Session/application info programatically

    Hello, I'm using OC4J (Oracle9iAS (1.0.2.2.1)) I'd like to receive useful information about number of active sessions per application, or whether the server is up and running / or down __programmatically__ this would be an app for administrator, noti

  • Color correction canon D7

    I just shot a commercial  on a Canon D7 1920x1080 24p. I have a Panasonic BT1700W. My colors on the monitor differs more with my apple screen than when I use my Varicam2700. What color bar settings do I have to use in FCP to correct as best as possib

  • Change number of rows in table in PCUI

    Hello, is there any way to increase the number of lines displayed in a table in PCUI? My customer asked whether it was possible to display more than 5 products in the application Sales Order on the General Data tab, and so far I have not found a way