Pushing committed rows in entity to all view objects

I have a Entity object EO1. I have two view objects VO1 and VO2, both based on EO1.
Assume User 1 and User 2 logged into the application.
User 1 -> creates one row in VO1 and commits the data.
User 2 -> he is viewing VO2, can he see the newly created (without re-executing the view object VO2). I mean the newly created row is pused to VO2 ? (is there any solution to resolve this?)

check section <b> Implementing Database Update Notification Using ADF BC</b>
in this book link:
http://my.safaribooksonline.com/book/databases/oracle/9780071622547/active-data-services/ch20lev1sec5

Similar Messages

  • Applying authorisation across all view objects

    I am using the authentication filter to secure my application and following the section in the developers guide on "authorization rules" was successfully able to retrieve the userid that i logged on with and restrict the records returned for a view object by adding/overriding methods in view object
    My question is - i want to be able to do this for every view object in my application - is there an easier way than repeating this same code in each view object ??
    Thanks,
    Brent

    Brent,
    You can create an application-level superclass for your ViewObjects: <YourApp)ViewObjectImpl. In this class you can put the methods to restrict the query.
    All your ViewObjectImpl's should then subclass your application-level ViewObjectImpl class.
    You can also configure BC4J to automatically use your superclass for newly created View Objects. You do this in Tools -> Preferences ->Business Components -> Base Classes.
    Steven Davelaar,
    JHeadstart Team.

  • How to Remove the Entity usage from View object at runtime

    Hi,
    A ViewObject can be created dynamically based on the Existing ViewObject Defintions. The newly created dynamic ViewObject will have all the defintion including Attributes, its structure along wtih Entity usage of the existing ViewObject definition.
    My requirement is i don't want to have the Entity usage alone whereas Remaining structure need to be retained.
    Can any body suggest on how to do it.
    regards.

    Hi,
    design time or runtime? At designtime, have you tried to just remove the entity reference? Given the disadvantage of removing the entity (and the changed behavior associated with it) what is the use case for which you want to disable the entity reference?
    Frank

  • How do I query changed view object attribute in another view object

    Jdeveloper 10.1.3.4
    My requirement is that I want to be able to query a view object (based on entity) on a non-key attribute where the value I am searching on may either be in the database on an existing record or, have just been recorded by updating a different view object based on the same entity (and yet to be committed).
    When querying the second view object for a value just updated via a different view object, the second view object always returns no rows. I had expected the process to be :
    EntityA
    ViewObjectA based on EntityA
    ViewObjectB based on EntityA
    ViewObjectA - query row with key = 123. update attribute Y with value 456 (attribute Y in database null). Entity cache for EntityA, key 123, atttribute Y updated with value 456
    ViewObjectB - query row with attribute = Y. expect record in EntityA cache just updated to be returned. Instead, nothing is returned
    Here is the code I was using (where RandScheduleEdit and RandScheduleSearch are identical view objects based on entity object RandSchedule)
      public static void main(String[] args) {
        String        amDef = "test.cache.model.AppModule";
        String        config = "AppModuleLocal";
        ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
        ViewObject rsEdit = am.findViewObject("RandScheduleEdit");
        Key rsKey = new Key(new Object[]{40});
        Row[] rsEditRows = rsEdit.findByKey(rsKey,1);
        Row rsEditRow = rsEditRows[0];   
        rsEditRow.setAttribute("SId", new Number(7827));
        ViewObject rsSearch = am.findViewObject("RandScheduleSearch");
        rsSearch.setWhereClause("S_ID = :SId");
        rsSearch.defineNamedWhereClauseParam("SId", null, null);
        rsSearch.setNamedWhereClauseParam("SId",new Number(7827));
        rsSearch.executeQuery();
        Row rsSearchRow = rsSearch.first();
        Configuration.releaseRootApplicationModule(am, true);
      }Why does rsSearch not find the record S_ID = 7827 ? It seems to only be querying new records in the database and ignoring the cached record just updated ?
    Any help greatly appreciated.
    Cheers,
    Brent

    rsSearch.setNamedWhereClauseParam("SId",new Number(7827));This might help:
    rsSearch.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    rsSearch.executeQuery();

  • How to put validation between attributes at View Object level in BC4J

    Hi,
    Is it possible in BC4J to put validation between attributes at View Object level?
    I know that I can do it at Entity Object level in validateEntity method, but I have several View Objects connected with one Entity Object and don't want to have the same validation logic for all View Objects.
    Thanks for any help!

    It returns errorWhat error does it return?
    John

  • Separate App Module, View Object based on Select not EO: Best practice?

    Hi,
    I have a list of base tables(parameters) that are used everywhere in my application for selection components (List, Combo, Radio).
    I'm considering creating a separate app module with a view object based on query for each table.
    I have created a BaseTableAM application module for managing those tables, Entity objects and View Objects in update mode.
    Those tables are rarely changed.
    Example of table:
    ItemType
    item_type_id = primary key
    name = description
    In the BasetableAM:
    ItemTypeEO entity object
    ItemTypeVO updateable view object based on related entity object.
    Now in my project I will create combo boxes for selection of the item_type_id.
    Separate application module:
    SelectionViewAM composed of View Objects based on Select statements and not on Entity Objects.
    Example of view object ItemTypeViewVO:
    SELECT ItemType.ITEM_TYPE_ID,
    ItemType.NAME
    FROM ITEM_TYPE ItemType
    All view objects in this application module will be read-only and for selection only.
    By basing all those View Objects on select statements not based on Entity Objects I suppose there will be no locking and "value changed" management => less overhead.
    Is this a good practice?
    Being read-only I could have based those View Object on Entity Object with flag updateable set to no, what would you recommend?
    By creating a separate Application Module for those selection view objects, I know that update will not be possible.
    Thank you for your advice.
    Frederic

    See this article for View Object tuning tips:
    http://www.oracle.com/technology/products/jdev/tips/muench/voperftips/index.html
    Are you planning to use this AM as a nested AM inside other application modules?
    If you don't the "selection AM" will have its own, separate database connection/transaction.
    If you do, it will share connection, transaction with its containing "root" AM.
    It may not be relevant to your application, but just realize (which is explained in the article I point to above) that view objects that are not related to entity objects do not "see" pending changes in the current transaction. That feature depends on the VO/EO cooperation. It's fine to build VO's without an EO -- in fact we've made it easier to do this in 10.1.2 in the Design Time wizards -- but you just want to make sure you realize what features it's giving up. If you don't need those EO-related features, then by all means create an Expert Mode VO that's not related to EO's.

  • How to use SPEL for Dynamic View Objects?

    Hi Gurus,
    In Benefits Self Service particularly in the Designate Beneficiaries page, we have a requirement to set the row for Self designation as Read Only. What this means for any plan that you're eligible and that requires beneficiary designation, you are not allowed to designate yourself. Unfortunately this is an intended functionality and the only way to achieve our requirement is thru Personalization. I was able to accomplish this successfuly thru the SPEL functionality. However the view object corresponding to each plan that requires beneficiary designation is somewhat dynamic. For example, Plan A corresponds to BeneficiaryPeopleVO1, Plan B corresponds to BeneficiaryPeopleVO2, Plan C corresponds to BeneficiaryPeopleVO3, etc. The Personalization Page only allows me to use the SPEL for only one view object at a time. So if an employee is eligible for 3 plans that require beneficiary designation and my SPEL points to BeneficiaryPeopleVO1, it will only set the Read Only in Plan A. Plan B and Plan C would still allow self designation. Is there a way I could use the SPEL to work for all View Objects?
    Thanks,
    Ronaldo

    jeanluca wrote:
    I've seen things like this in scripting languages, so I was wondering if things like this are possible in java. Here is an not working example:
    Is something like this possible ?AFAIK, it is only possible in a very limited way as noted above and is nearly always not recommended and definitely not necessary. The variable name has little importance, but OTOH the object reference has great importance. Instead learn about arrays, Lists, and Maps.

  • Does 10g App Server timeout AppModule or OC4J View objects

    Hi,
    My occasionally/AD/struts web application is running on the 10g server. If I keep the app open for a while (~10minutes) and then hit some of the control buttons on the
    web page, I occasionally get the the error JBO-29000 "unexpected error during
    framework operation - null pointer" error. The stack trace shows that when I ask
    for OC4J view objects from the AppModule, the view objects being delivered are null. The rows are not null, the view object itself is null.
    Is OC4J timing out my view objects or my AppModule?
    What can I do about this?
    Thanks Very Much, JK

    Sounds like a 'collective' error message. You need to look at errors in the stack trace.

  • DataControl and View Object

    Do all View Objects appear in the Data Control ? I presumed so. Anyway I migrated my application to TP4. I created a new view and it does not show in the DataControl. Is there anything I need to do for this ? Other view objects are appearing.

    Ignore this. I closed and restarted JDeveloper and it shows now.
    Do all View Objects appear in the Data Control ? I
    presumed so. Anyway I migrated my application to TP4.
    I created a new view and it does not show in the
    DataControl. Is there anything I need to do for this
    ? Other view objects are appearing.

  • New view object row does not get committed to DB

    Hi guys,
    on a taskflow with a new transaction I have a form to enter a new record on an entity-based view object.
    Before the page is called I call the CreateInsert Operation to create the new record on that view object.
    There are quite a few attributes that have default values which I determine in the ViewRowImpl's create method (using populateAttributeAsChanged to set the values).
    Now if none of the inputValues in the form is filled manually and I want to save the data (default values are sufficient to save the record) the taskflow return action commit does not commit the data to the db. As soon as I manually enter one value into any field the same return action commits the record correctly to the db. There is no error message and the new record is visible in the application because it is inserted into the view's iterator...
    Is there any way to mark the new row as changed/insert if only the default values are filled? Or am I doing something wrong?
    Using JDev 11.1.1.5
    Achim

    Add the following method in your RowImpl class:
    public void setNewRowState(byte b) {
         if (b != Row.STATUS_INITIALIZED ||
             getNewRowState() != Row.STATUS_NEW) {
             super.setNewRowState(b);

  • 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

  • Accessing all rows in Entity Object

    Hi All,
    I have a master-child relationship with ChildVO based on entity object. When user hits on save after making some changes, I would like to pass all rows in master view object and all fetched rows in entity object to a pl/sql api which takes pl/sql table datatypes. I would call this API in AM. So is there any way to access all entity rows of child view object?I tried to use view link accessors but it returns null. I can think of the following way:
    for each row in master view object
    loop
    set current row for master view object. This would execute child vo for that master row.
    then fetch all rows from child vo. populate pl/sql table
    move on to next master vo row.
    end loop;
    Drawback with above approach is that we would excute child object query for every master row. Is there any direct way to access rows in entity object in AM? Any pointers on this would be of great help.
    Thanks in advance,
    Murari

    "and all fetched rows in entity object"
    is not a correct statement to make, EO will always represent a single row of the database record.you will get all the fetched rows in the VO, not the EO.
    Tapash

  • 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.

  • Error while Insert new Row in Entity Base View Object

    Hi,
    can someone tell me the reason of following problem? :
    There is a Entity Base View object, which is Binded as ADF Table in a JSFX Page.
    I took the standard operations from the Control Panel: CreateInsert, Commit and Rollback.
    Places them a ADF Buttons.
    Whenever i am trying to insert a Row, after commit i am getting the ORA Error: ORA-01410: invalid ROWID.
    By the way: The Entity Object is using the RowID as Primary Key.
    When i press commit a second time, the the Row is inserted in the Database.
    Any Idea, how to workarround this ORA Error?
    Thank You!

    n by default if you had no pkconstrainst in db,
    in jdev default rowid as prim key.
    as john said make the key as proper.
    and do it.
    if you have db constrainst in db.
    it can be achived by dbconstrainstname with ora.
    what am saying dbconstranist name will map it ora.
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvgen.htm#BABEFGCI

  • Programatically inserting rows of a view object trouble

    Hi,
    I'm using JDev 10.1.3.3. I'm trying to use the application module specific to my app to create rows in a viewobject. User is on page "view", goes to page "new" and fills out a form which upon submit sends the data to an Application Module method I've exposed to the client. What doesn't happen, is when I add the row of the view object programatically in my view object, it doesn't display on the "view" page until a commit is done (when navigating back from the "new" page".
    Here is some sample code of the insert into a composite (not composition) viewobject. When I insert in the new page, it returns to the view page... and the row doesn't show up until commit happens:
    //in my application module
    public void doiIt2(String name, String badge, String item){
    UserItemViewObjRowImpl row = null;
    row = (UserItemViewObjRowImpl)getUserItemViewObj1().createRow();
    row.setBadge(badge);
    row.setBadge1(badge);
    row.setItem(item);
    row.setName(name);
    row.setNewRowState(Row.STATUS_NEW);
    getUserItemViewObj1().insertRow(row);
    getUserItemViewObj1().executeQuery();
    Does anybody know how to get this row to pop in, like using a "creation form" to a table in a view page? What am i doing wrong??? Do I need to do something special in my pagedef of the "view" page?
    Thanks,
    Dan

    Chris,
    Thank you for looking at my problem. The row is not inserted into the table (on the view page) with the code I shared. The criteria for the table's VO is simply a select all, with no where clause, so I don't think I'm excluding it... Upon hitting a commit button, the new row does pop in to the table witch is further evidence that the criteria for the VO isn't excluding the new row.
    I have tried insertRowAtIndex(), even before I posted this with no luck.
    BTW, if I add to the bottom of the code I shared, getDBTransaction().commit; or getDBTransaction().postChanges(), the row does pop into the table when the "view" page is navigated to.
    Am I doing something wrong with my construction of my ViewObject? It is a composition (I got that wrong in my initial post) between two entities. The Item entity is updateable, and not a reference using an association between the two entities on the Badge attribute.
    I am trying to have new composite VO rows always show up as the first item in a table. I've read that the Row.STATUS_NEW will always do this... so I'm trying to avoid posting/committing the new row. I'm also not above inserting at a particular location, but some of the pages I hope to use this pattern with re-execute the VO every time the page is rendered, instead of just rebinding the Iterator with the VO rowsets. I'm being led to believe that if a Row is posted or committed, re-executing the query will resort all rows based on 'order by', etc.
    Also, I have setup a similar yet even more complicated example using three entities. I was able to make this work as expected. The difference is that I was using an ADF Creation Form. ( I did have some work in the model to make all the keys line up though.... posting order... etc.).
    I have gotten similar things like this to work with single entities VOs. I'm just having trouble when I do composite VOs. That is supported, isn't it?
    Dan

Maybe you are looking for

  • How to delete all items in download folder under bookmark in the shortest time?

    I understand that all downloads from internet and yahoo/google mail are stored in the "Download" folder which I see under bookmark when I want to delete. I think that if the download folder is never emptied, then my mac will slow down. Therefore I wa

  • Transferring photos from new Macbook Pro to older laptop

    My new MacBook Pro has Thunderbolt and 800 Firewire and I need to back up 26 GB of photos to an older laptop MacBook with Firewire 400.  I dont want to do it over the network which is too slow for this much info.  Any suggestions?

  • Problems with my new iPad Mini

    My iPad Mini shuts off randomly and reboots, now it won't turn on at all, and when we bought it, it had a defective front facing camera. What do I do? Can I bring it in and get a new one? Right now the iPad turns on, but shuts off during the process

  • Size of a dimension

    Can someone explain the following 1. A Dimension table with 10 characteristics consists of 900,000 records 2. The multiple of the SID for all of the characteristics i.e. SID1 * SID2 * ... * SID10 is much greater than 900,000 How is this figure of 900

  • SunMC 3.0 and 3.5 - E450 and ultra10 black splat problem

    Hi all, Don't know if this is the right forum, but if not, then I am sure you will re-direct me. I have just recently configured up all of our Sun servers, ranging from 3800's Exxx and new SunFire 210's 240's 880's 440's etc. All are now working fine