Row.refresh() applicable to Entity based VO's?

Hi!
Is Row.refresh() only applicable to ViewRows of VO's with Updateable Entities?
How about ViewRows of ReadOnly VO's. In my application, I called a stored procedure which updates an attribute of a table(TABLEA) on the database. Now I the attribute which the procedure updated is displayed on my JSF page through a ReadOnly VO. So Naturally, after I clicked on the button to call the stored proc, I would want the attribute updated as well on my screen. So as soon after the call to the stored proc, I called the Row.Refresh() on the current Row. But sad to say the attribute is not updating.
Only when I search for that row again, will the attribute be updated.

Well, I had it fixed. I just needed to re-execute the View after the call to the stored proc inside an AppModule method which is exposed to clients:
serviceMethod() {
callableStatement.execute();
readOnlyVO.executeQuery();
}the code that I have above would yield the same result as re-executing the iterator that the UI is bound to, right?
And I just want to make sure/confirm Row.refresh() is only for Entity Based VO's so I can stop using that function on Read Only VO's.
Im using the BC, ADF bindings, and ADF Faces.

Similar Messages

  • Entity based VO not showing all the rows

    Hi, I am having a entity based VO in a page. When we run a page from Jdeveloper the table shows all 1300 rows. But in Front end it shows onli 1001 rows

    Hi ,
    Or instead of setMaxFetchsize see By Johny  explain setAttribute in OAF?
    if it is helpful to you..

  • Trying to delete a record from an entity-based VO in ADF

    We are using J-Developer 9.0.5.2
    This is a web app using struts and ADF BC
    Click the link below to view part of the struts diagram that relates to this question
    http://home.earthlink.net/~katie1les/images/delete.gif
    1. We have a DataPage that displays a list of items (catalogItemLIsting.jsp). This is a view of all items in a particular category based on the ItemsVO. Each item has a delete icon beside it.
    2. The user clicks the delete icon which forwards to the bindDeleteItem DataAction that will bind that item number (through custom method in the AM) to an entity-based DeleteItemVO (the only record that will be in the DeleteItemVO is the item they selected to delete). This step corresponds to the deleteItem Data Page as seen in the image link above).
    We do this step (step 2) because we want to show the user a confirmation page with additional item information before they actually delete the item. Otherwise, we could just perform the delete from the original page.
    3. On the deleteItem data page there is a Delete (">Select</a>) link beside the single item in the view that when clicked should set the current row (the only row in the view object) and forward to the setDeleteItemDA Data Action.
    4. I dragged the setCurrentRowWithKey method from the DeleteItemVO onto the setDeleteItemDA data action.
    5. I forwarded that data action to the deleteItemDA data action where I dragged the Delete method from the DeleteItemVO.
    6. This action forwards to a deleteItemDP data page where I dropped a Commit action from the AM which owns the DeleteItemVO.
    The result of executing these steps brings it back to itself (deleteItem.do) and tries to rebind the single record view object producing a ORA-01008: not all variables bound error and not forwarding to the setDeleteItemDA data action.
    Are we using the right approach here?
    I tried following the example located at: http://otn.oracle.com/products/jdev/collateral/tutorials/9050/bizcomp_jsp_tut.html#delete, but there are some differences between the two. We are using data pages and a single view object, while the example is using regular jsp pages and a master detail view relationship.

    Thanks Steve for the reply. We dowloaded the following example (http://otn.oracle.com/products/jdev/tips/muench/DeleteEmpWithConfirm.zip) and tried to make it work for us. We set everything exactly the same (as far as we could tell). There is one difference though between what you have in this example and ours and that is that the VO that is dropped on the first data page is first bound by a custom method through a preceeding data action. When the page is rendered we see the item we choose (and that was bound in the data action) correctly on the page.
    The problem comes in when we click on the delete link on that page, it does not seem to be posting back properly - it appears to be ignoring the "confirmDelete" event, which is part of the url (and it's corresponding forward named the same) and instead ends up trying to rebind the VO on the same page which produces a "not all variables bound" error. Error listed below.
    Why is the Datapage seeking to rebind the VO again, when it was already bound previously? Shouldn't the setCurrentRowKey method simply set the current row on the VO without having to requery the VO again?
    *** error page ***
    You must correct the following error(s) before proceeding:
    JBO-29000: Unexpected exception caught: oracle.jbo.SQLStmtException, msg=JBO-27122: SQL error during statement preparation. Statement: SELECT DeleteItemInfoEntityObject.RETAILER_NUMBER, DeleteItemInfoEntityObject.AUTH_ITEM_CODE, DeleteItemInfoEntityObject.UPC, DeleteItemInfoEntityObject.ITEM_DESCRIPTION, DeleteItemInfoEntityObject.PACK, DeleteItemInfoEntityObject.RETAIL_SIZE, DeleteItemInfoEntityObject.UNIT_COST, DeleteItemInfoEntityObject.AWI_DEPT_NAME, DeleteItemInfoEntityObject.RETAILER_CATALOG_NAME, DeleteItemInfoEntityObject.RETAILER_CATEGORY_NAME, DeleteItemInfoEntityObject.RETAIL_PRICE, DeleteItemInfoEntityObject.QUANTITY_AT FROM DELETEITEMINFOVIEW DeleteItemInfoEntityObject WHERE AUTH_ITEM_CODE = :1 AND RETAILER_NUMBER = :2
    JBO-27122: SQL error during statement preparation. Statement: SELECT DeleteItemInfoEntityObject.RETAILER_NUMBER, DeleteItemInfoEntityObject.AUTH_ITEM_CODE, DeleteItemInfoEntityObject.UPC, DeleteItemInfoEntityObject.ITEM_DESCRIPTION, DeleteItemInfoEntityObject.PACK, DeleteItemInfoEntityObject.RETAIL_SIZE, DeleteItemInfoEntityObject.UNIT_COST, DeleteItemInfoEntityObject.AWI_DEPT_NAME, DeleteItemInfoEntityObject.RETAILER_CATALOG_NAME, DeleteItemInfoEntityObject.RETAILER_CATEGORY_NAME, DeleteItemInfoEntityObject.RETAIL_PRICE, DeleteItemInfoEntityObject.QUANTITY_AT FROM DELETEITEMINFOVIEW DeleteItemInfoEntityObject WHERE AUTH_ITEM_CODE = :1 AND RETAILER_NUMBER = :2
    ORA-01008: not all variables bound
    *** error ***
    Les, here's a minimal working sample:
    http://otn.oracle.com/products/jdev/tips/muench/Delete
    mpWithConfirm.zip
    It uses just two data pages and leverages the
    built-in event-handling features of ADF described in
    the ADF Data Binding Primer and ADF/Struts Overview.
    The pages use the post-back pattern to handle their
    own events before forwarding.
    http://otn.oracle.com/products/jdev/collateral/papers/
    0g/ADFBindingPrimer/index.html

  • ADF - Row.refresh()

    Hi all,
    I've been using Row.refresh() to undo uncommitted edits to VOs, but using this method does not undo newly created rows (left blank due to user cancellation).
    I tried using REFRESH_REMOVE_NEW_ROWS, REFRESH_FORGET_NEW_ROWS, REFRESH_WITH_DB_FORGET_CHANGES flags and still the new row stays in the VO.
    The only way I could get the rows to be cleared was with ViewObject.clearCache(); Is this the proper way of getting rid of new rows?
    Thanks very much,
    J

    Hi
    Can you pls tell how you managed to refresh the Entity Cache. I am having a modified row in my EO cache and whenever i issue a COMMIT its updating that row in database. I have to prevent it. So please tell me how i can clear the EO cache before issuing the COMMIT.
    Even i have tried using transaction.clearEntitycache() but its not working.
    Thanks.
    Praveen

  • Hide multiple rows in a dynamic table based on the row value.

    Hi,
    I need to hide multiple rows in a dynamic table based on the specific value of that row.
    I cant find the right expression to do that.
    please help

    Go to the Row Properties, and in the Visibility tab, you have "Show or hide based on an expression". You can use this to write an expression that resolves to true if the row should be hidden, false otherwise.
    Additionally, in the Matrix properties you should take a look at the filters section, perhaps you can achieve what you wish to achieve through there by removing the unnecessary rows instead of just hiding them.
    It's only so much I can help you with the limited information. If you require further help, please provide us with more information such as what data are you displaying, what's the criteria to hiding rows, etc...
    Regards
    Andrew Borg Cardona

  • [BC4J] how to revert the value in an entity based table after exception

    Hi,
    I'm running BC4J 9.0.4.3.
    I have a JTable with an AttributeListBinding to an entity based ViewObject.
    I added an Validation to a setter method of an entity which throws a RuntimeException.
    THe Framework correctly displays the errormessage, but the Table keeps the new entered invalid value.
    What I want is that the value displayed in the table is revertet to tha last entry.
    How can I do that?
    bye
    TPD
    Edited by: T.PD on 14.12.2010 13:58
    Meanwhile I found out, that pressing ESC does what I want...

    Hi Peter
    Thank you for your suggestions, both of them are interesting but unfortunately they do not solve my problem, or at least I don’t know how.
    I will try to better explain my problem
    I have te table DBTABLE and another related table called DBDATES with colums(C1,DT1,DT2,TARGET) where I record periods of time and desired target. For instance my DBDATES table could have the following records
    ONE; 01/01/2012; 31/01/2012; 100
    ONE; 01/02/2012; 29/02/2012; 90
    ONE; 01/03/2012; 31/03/2012; 95
    TWO; 01/01/2012; 31/01/2012; 140
    Exist a FK between both tables in the C1 column.
    I have created an EO for the table DBTABLE with the tree persistent attributes (C1, N1, D1) an transient attribute (T1). The (C1,D1) is my DB primary key.
    When I create a new record in the DBTABLE and based in the actual date I need to query the DBDATES table to check which is my TARGET and the valid target dates. For Instance if a record for person ONE is created on February 12, my TARGET is 90 from 01/02/2012 to 29/02/2012.
    At the same moment I need to check the total amount of items record to the person ONE during the full target period.
    Select sum(N1)
    From DBTABLE
    Where D1 between V2 and V3
    And C1= V1;
    Bind variables:
    V1 = ‘ONE’;
    V2 = ‘01/10/2012’ – queried from DBDATES
    V3 = ‘03/10/201’ – queried from DBDATES
    In resume, for a determined person when I create a new record in the DBTABLE I need to know their target for the actual period and how much as been record until now.
    I don't know if is possible to solve this without using the View Objects, because I need to query the DBTABLE for a time frame and with bind variables.
    Thank you in advance for your help.

  • How to add row in multiple view object based on common entity object.

    Hi ,
    I have
    Jdeveloper version - 10.1.3.3.0
    Oracle Database - 11g R2
    I have a situation where i have to show data from one table in three adf tables on jsf page depending on a flag value in a column in table. For this purpose i have done the following steps
    a) Created an entity object on the database table .
    b) Created three view objects on this entity object and edited the view object's SQL and included the where clause
                       WHERE  A.USER_PERSONAL_NO = :P_USER_PERSONAL_NO AND
                           A.AUTH_TYPE = 'LF'
                       The auth_type cloumn decided in which view object the data will be shown
    Now, when i query the data from database by executing the query of these view objects the data is shown correctly in all three view objects. Till here there seems every thing ok
    Now , i have to provide the logic to add records in the adf tables for this i have provided add button in action facet of all three tables which are binded to methods in managed bean,
    when i add a record in a adf table by add button the new row which is created is shown in all three tables . I cant understand why this is happening , please help me to solve this problem.
    How can i make it possible so that the record appears only in that adf table in which the record is added.
    The method for adding record is
                Row rw = currentAM.getWfRecommAuths().createRow();
                rw.setAttribute("UserPersonalNo",this.getQuery_personal_no().getValue());
                rw.setAttribute("AuthPersonalNo","");
                rw.setAttribute("AuthType","LX");
                currentAM.getWfRecommAuths().last();
                currentAM.getWfRecommAuths().insertRow(rw);
               Please help , thanks in advance.

    Hi,
    have a look at polymorphic view objects
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvvo.htm#CEGDCCCB
    Frank

  • New Row refresh problem

    Hi All,
    I am creating a new row in table /panel form layout using vo.createRow.I am saving the contents entered by user by calling an pl/sql api in doDML method of EOImpl class.
    I am refreshing the table/panel form layout using vo.executeQuery().If the data is not saved properly then the new row created is visible in the UI even after refreshing it through vo.executeQuery().
    My requirement is that if the data is not saved I should get a message that record not saved and the added row should not be visible.
    Please provide suggestions to resolve this issue

    Hi,
    try removing the entity row from entity cache by calling getEntityCache on the entity and then remove it. Do you use PLSQL for data retrieval as well ?
    Frank

  • Updating a Multi Entity view object to add row only to child entity

    I have a View object VO1 made of multiple entities e.g. EO1 and EO2 which have a composition association with cardinality 1 is to many EO1 being the entity corresponding to parent table and EO2 is the child table. All the entities in the association are updatable.
    The data is displayed using VO1 on the page. So for each row in child table, parent table attributes are dispalyed correctly due to the join condition.
    If I create a new record on the VO1 iterator using the create operation binding and save it, it correctly saves a new record in header table and related child table.
    Now I need to provide with one more create operation on the page such that when user can add a child row for the existing header row using the same screen.
    Essentially I need a create operation which, on selecting a row from the displayed table which is based on VO1 , creates a new row in the VO1 iterator such that the EO1 attributes are pre filled with the header table information from the selected row and the child attributes can be added by the user and submitted.
    Tried Using create with params on VO1 by passing the header information, this lets me enter the data on screen just the way its required ,but this obviously only tries to add a new record to header table with the existing primary key itself and the operation fails on save giving duplicate key error for the header table.
    Unable to figure out where to change the default behavior to fetch a exisitng entity rather than create a new entity in the header table entity object for this multiple entity VO1.

    Hi ,
    So how do i send in the sample. Do i send in the code base don HR schema ..
    Or just explain the above with emp dept tables.

  • Entity Based View Object ROWID

    Hi,
    This might be a little hard to explain, but I have an entity object, and a view object that is based off of that EO. The EO is using a ROWID for its primary key. Now, the view object I have is querying a view in the database, but when I do not include the ROWID attribute in my view object, the LOV using the view object works.
    However sometimes I get this error:
    "oracle.jbo.PersistenceException, msg=JBO-26028: View object SponsorVwView does not include a primary key attribute RowId of entity base SponsorVw."
    And in the view object I get:
    "The attributes that represent the primary key of SponsorVw are missing from your query"
    So when I add the ROWID which is the primary key the LOV does not work.
    Does anyone have any ideas?

    Tullio:
    Sorry but I don't understand the workaround : if I
    insert my row in both VO I'll find it 2 times when I
    commit.You won't. The view row from the second VO will point to the same entity row as the row from the first VO. When you commit, we will only insert one database row.
    Thanks.
    Sung

  • Refresh data in SWF based on excel file saved from SAP BW workbook

    Hi, is there a way to get data refresh in SWF dashboard from excel file as a data source. SAP BW workbook report will be saved as an excel file daily and placed in somewhere. I would like to create a dashboard which can connect to the excel data source and refresh on load.
    Appreciate your advice and help. Thank you.
    I am using Xcelsius 2008 and SAP BI 7.0

    Thank you.
    If I understand correctly from your advice, that is I should create QaaWs to pull data from SAP BI, which will return data in tabular format. Map the data in the cell range of a hidden tab, re-arrange and format the data into the row?
      Another concern: I need to display data for 4 quarters (Q1, Q2, Q3,Q4) in the dashboard, but QAAWS will only pulls data when the data is available in the database.
       Eg. Only data for 3 quarters are found in the database, QAAWS will return data for Q1, Q2,Q4.
             This will mess up the position fixed in the xcelsius. Do you have any suggestion on this?
       Sorry to bother u for the simple questions.
       Thank you.

  • Is it possible to validate a table row as a single entity?

    JDeveloper - 11.1.1.6
    WLS - 10.3.5
    I have a requirement to validate a row in a table as a single entity. A database procedure will be passed the values from a given row and several validations performed. There are some field-level validations in the row as well. I had planned to expose an AM method that calls the procedure and then highlights the bad fields.
    How can I fire this row validation when the user has completed their edits (clicked off of the current row)? Is there some event I can listen for?
    I guess I can have a selectionListener that saves the current row key and when the current row key is different from the saved row key call the validation procedure for the saved row?
    Thanks!

    That certainly seems much more straight forward.
    Thinking more about this more, would it be best to call the validation method from prepareForDML? Or would overriding the validate method and calling from there be a better option?
    I am still fairly new to ADF and still trying to grasp some concepts.
    Thanks.
    Edited by: errodr on May 15, 2013 5:45 AM

  • How to get selected Row Index in a table based ona  VO?

    Hi All,
    I'm writing an ADF form wherein I use a VO based on a SQL query. I'd like to know how to get the index of a selected row. I havea selection Listener in place where I can print the selected Row's data using getSelectedRowData().toString() on the table.
    How can I get certain Attributes from this selected row.
    One solution I thought of is to get the row index and then read attributes. But I cant seem to figure out how to get rowIndex for a selected row. Any sugestions?
    Using JDeveloper 11g.
    Thanks
    P.

    If your selected row is marked as current row you can use
    // Get a attribute value of the current row of iterator
    DCIteratorBinding iterBind= (DCIteratorBinding)dcBindings.get("testIterator");
    String attribute = (String)iterBind.getCurrentRow().getAttribute("field1");Where 'testIterator' is the name of the iterator you use for the table and 'field1' is the name of an attribute you want to get.
    Or you can iterate over the selected row keys (even if it's only one):
    // get  selected Rows of a table 2
    for (Object facesRowKey : table.getSelectedRowKeys()) {
    table.setRowKey(facesRowKey);
    Object o = table.getRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)o;
    Row row = rowData.getRow();
    TestRow testRow = (TestRow)((DCDataRow)row).getDataProvider() ;
    }Where TestRow is the row type of the VO of your table.
    Timo

  • ADF BC - Refresh VO reference entity

    Hello,
    I have a view object with an updateable entity and a reference entity. I want to enter the 1st entity attributes (including foreign key) and have reference entity attributes populated automatically after some button click. I don't want to issue commit.
    What should the button action look like? Will the view object currentRow.refresh(...) do the job?

    It definitely doesn't have to be this complicated.
    Simply write a method on your application module that does everything you want inside that method. Then, invoke that method from the view/controller layer.
    Due to the ADF BC active data model, the page will automatically update to show the refreshed foreign key information -- though you may need to correctly setup your Partial Page Rendering "Partial Triggers" properties to get the UI to repaint the updated values.
    Let me know if you still have questions.
    If you do still want to do it from the view/controller layer in your backing bean, you have to set the value of the binding, you could use a helper class like this:
    package demo.view.util;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    public class EL {
       public static boolean test(String booleanExpr) {
         return Boolean.TRUE.equals(get(booleanExpr));
      public static String getAsString(String expr) {
        return (String)get(expr);
      public static Object get(String expr) {
        FacesContext fc = FacesContext.getCurrentInstance();
        ValueBinding vb = fc.getApplication().createValueBinding(expr);
        return vb.getValue(fc);
      public static void set(String expr, Object value) {
        FacesContext fc = FacesContext.getCurrentInstance();
        ValueBinding vb = fc.getApplication().createValueBinding(expr);
        vb.setValue(fc,value);   
    }Then from your backing bean, assuming your attribute binding for the primary key attribute is named "MyPKAttr", you could write:
      EL.set("#{bindings.MyPKAttr}", newValue);However, I repeat, if you are writing code that invokes an application module method to get a result, and then you pass that result back to another application module method, this is a signal that you should just encapsulate all of those details inside the service itself instead of having to do it in multiple steps.
    See Chapter 8 in the ADF Developer's Guide for Forms/4GL Developers for a number of tips about creating custom methods in your application module.

  • Issues with Infoview data refresh on Crystal Reports based on BW BeX query

    Hi all,
    We applied the Business Objects XI3.1 fix pack 3.1 with Integration toolkit fix pack 3.1 in our environment.
    After that we started having trouble with Crystal Reports based on BeX queries that use manual input variables.
    The data refresh would not work in Infoview.
    The data refresh would work using the Crystal Reports designer gui on local machine.
    regards,
    Abhishek

    Hi all,
    This thread is for the benefit of all the BW/BO people who faced issues with BO reports not working after certain fix pack installations.
    After lot of time spent in debugging this and researching and some help from SAP, we found that BASIS had missed a step in the BO patching. This step was relating to applying some BW transports in the BW system related to the new Integration toolkit.
    Please use below notes for the BW transport task of patching BOE Integration toolkit.
    Refer to Note#1472104 which explains about loading the
    transports when we install BO Service Packs or Fix Packs. Also please refer to the Note#1271751 for the advice on transports for BW systems.
    Please go through page 206 (Configuring transports) in the SAP Integration Kit installation guide. You can download this document at below link.
    https://websmp106.sap-ag.de/~sapidb/011000358700000559912010E/xi31_sp3_bip_sap_inst_en.pdf
    Refer to Note#1345919 which explains about the process of loading transports for SAP IK.
    regards,
    Abhishek

Maybe you are looking for