BC4J: problems creating view object with multiple entity objects

Hi,
I working with a view object which contains two entity objects with parent-child relationship like this:
ViewObject - ParentEntityObject - PId
PAttribute
CId (FK)
(- ParentChildAssociation)
- ChildEntityObject - CId
- CAttribute
The 'Read Only' and 'References' options are checked for the association in the view object.
I'm creating a new row using this view object. The parent object should be created new and the child object already exists in the database, so I'm setting only the attributes of the parent object (including foreign key).
After creating the row I display it in a jbo:DataTable and only those attributes coming from the parent object are displayed. The attributes of the child object are not set. After a commit all attributes appear.
The problem is, that I want to display the new row with all attributes to the users BEFORE they commit.
I tried to set the child attributes, but they are read only by definition and even when I unchecked the 'Read Only' option and set the attributes to 'Always Updateable' in the view object it is giving me
JBO-27008: Attribute set for CAttribute in view object ViewObject failed.
Is there a way to make all attributes of the child object visible in the view object without committing changes?
(JDev 9.0.2.822)
Any help would be appreciated.
Regards,
Christian

Once again the structure, sorry.
ViewObject
|-ParentEntityObject
..|-PId
..|-PAttribute
..|-CId (FK)
|-ParentChildAssociation
|-ChildEntityObject
..|-CId
..|-CAttribute
Christian

Similar Messages

  • Implement a View Object with multiple entity objects

    Hi
    In 'How to' section on the 'otn.oracle.com' (Jdeveloper) web site is tutorial how to implement a View Object with multiple updateable dependent entity objects.
    It allows user to insert an employee and a department at the same time.
    But I would like to change this example to insert a new department only if it does not already exist. How to change this sample?
    Is there any other way to this?
    Thanks
    Regards
    Gorazd

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • Possible?Multi-Entity View Object with one Entity Object that is Read-only.

    I know this sounds crazy, but I would like to create a multi-entity view object, where one entity object is based on a table in my application (we'll call it "Users", which basically stores the primary key for the person from the institutional people database), and the other table is a entity object based on a view of the institutional people database table (read only access), which we can call "People".
    I know that since no updates will be done to the People table, it really should be a read-only View Object, but I would lose the ability to sort on attributes like Last Name, Hire date, etc, since those would be transient attributes in my ViewObject for the Users. By having People as an entity object, I can then create a multi entity view object and have the ability to join Users to People and be able to sort on the above mentioned fields (like Last Name).
    The problem is that when I use the JDev (I'm currently using 10.1.2.1) AppModule BC4J tester, when I click on the multi-entity view object that I added to the AppModule it gives me an error:
    oracle.jbo.RowCreateException) JBO-25017: Error while creating a new entity row for People.
    ----- LEVEL 1: DETAIL 0 -----
    (java.lang.InstantiationException) null
    I have tried to change all the attributes to updateable in my entity object, but no create method, and I have tried to make them all read-only, but no effect, I get the same error (probably because the People view is read-only in my schema).
    Is there a way to change the entity object so that it will not try to create a new row when it runs the Tester? So that the multi entity view object behaves more like a view link, but gives me the added bonus of being able to sort on the Last Name column from the People table?
    Thanks for any help on this subject...at worst, I will have to use the view link method to get the job accomplished, but it would be "cooler" if this would work!
    Jeremy.

    Steve, thanks for your quick response to my question.
    To answer your questions, I was trying to create the Multi-entity View Object to give me more flexibility when working with my User table, and my People view. The flexibility I desired was that I would be able to sort my Users based on attributes in the People view. This is not possible when the there is only one Entity in my VO, and the People view data are all transient attributes, because they are not in the SQL statement.
    Ultimately, after working with one of my colleagues, we decided to use the approach that you mentioned by creating a read-only VO with the SQL query we want to display to the user (contains both User and People data fields), and then use a different ViewObject when performing other actions on the User Table (such as inserts/updates/deletes). By using the setWhereClauseParam() method in the handleLifeCycle() for the JSP page, we should be able to navigate between the different View Objects, so that the user does not see any difference.
    Thanks! Oh, and by the way, I have read your article you included before, and I have used it many times before to tune my View Objects! Thanks!

  • Create View table with multiple table

    I want to create View table with relation with multiple tables.
    for ex
    table 1
    mrnno
    mrnqty
    table 2
    mrnno
    issqty
    table 3
    mrnno
    retqty
    want to create view table where i can see the sum (mrnqty), sum(issqty),sum(retqty) group by mrnno
    sandy

    Hi
    CREATE OR REPLACE FORCE VIEW my_view AS
    WITH t1 AS
    (SELECT mrnno,
                      SUM(mrnqty) sum1
    FROM table_1
    GROUP BY mrnno),
    t2 AS
    (SELECT mrnno,
                      SUM(issqty) sum2
    FROM table_2
    GROUP BY mrnno),
    t3AS
    (SELECT mrnno,
                      SUM(retqty) sum3
    FROM table_3
    GROUP BY mrnno)
    SELECT mrnno,
                    sum1,
                   sum2,
                   sum3
    FROM t1,t2,t3
    WHERE t1.mrnno = t2.mrnno
    AND       t1.mrnno = t3.mrnnoCheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Two View objects with one Entity object

    Hi
    I have such a requirement that, I need to take some mandatory attributes of one table in one page and the remaining in following page. After clicking Submit in the second page, i need to insert data in to the table.
    How to proceed with this ? When i click on next button of first page it is validating for all mandatory fields.
    Regds,

    Use custom DataAction for the first page:
    package controller;
    import oracle.adf.controller.struts.actions.DataAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class Class1 extends DataAction
      protected void validateModelUpdates(DataActionContext actionContext)
         //super.validateModelUpdates(actionContext);
          // put you custom validation here
    }http://www.oracle.com/technology/products/jdev/collateral/papers/10g/ADFBindingPrimer/index.html#usingdataaction
    Message was edited by:
    Sasha
    Message was edited by:
    Sasha

  • Problem with using multiple Entity Objects in a view Object.

    Hi
    Thank you for reading my post
    I have create 3 Business components for 3 of my database tables and now
    I must add 3 tables in a View object so i used Jdeveloper Wizard to create the View Object.
    -I Add Entity Objects which are business components to this view (In Step 2 of the Create Vview Object wizard).
    -In step 3 that I add Attributes all my attributes are marked as Transient
    Can some one explain why it happens?
    I need one of those tables to be updateable and two other tables are not updateable.
    What should should i do to achieve this?
    I should say that tables does not have any database relation (Foreign Key I Mean).
    Thanks.

    Hi user505214
    When you created your VO, on selecting the second EO, you'll note at the bottom of the same page on the wizard/editor, checkboxes for updatable or by reference. By default reference is checked and this will make your second EO's attributes transient.
    In the JDeveloper Developer's Guide for 4GL/Forms programmers, the following sections outline the difference between updatable or by reference:
    7.5 Including Reference Entities in Join View Objects
    27.9 Creating a View Object with Multiple Updatable Entities
    Make sure to read 27.9 if updatable is what you want as it indicates you may need to add some additional code.
    Hope this helps.
    CM.

  • Creating Views on multiple entity-objects

    Dear Forum,
    Is it possible to make associations and lookups based on multiple entity-objects.
    I made a custom view, say view1 based on two entity-objects, say entity1 and entity2.
    I used some fields from entity1 and some from entity2. There's a 1 to 1 association between the index of entity1 and entity2.
    Now I want to make a master-detail between entity1 and view1. I tried to make links and associations, but that didn't work.
    Any ideas?
    Kind regards,
    Arjen

    Arjen,
    I am a bit confused by what it is you need. It appears you may have Entity Object and View Objects mixed up. Entity Objects are one-to-one with database tables. So, for every table one Entity Object, and the other way around. Associations are, pretty much, one-to-one with foreign keys on the database. So, if two tables have a foreign key between them, the two Entity Objects will have an Association between them. In that respect, Entity Objects and Associations are usually 'strictly defined' by the database model.
    The layer of View Objects and View Links is where you 'get design control' in the Business Components arena. A View Object can be based on zero, one or more Entity Objects. Viewlink, defining 'Master-Detail' relationships between View Objects (and NOT Entity Objects!!) can but don't have to be based on Entity Associations (i.e. foreign keys), but can be based on any attribute in the 'Master' view to any attribute in the 'Detail' view.
    In this respect, your statement that you want to "make a master-detail between entity1 and view1" makes no sense. It sounds like you need to create a View2, and then make a View Link between View1 and View2.
    Kind regards,
    Peter Ebell
    JHeadstart Team

  • Implementing a view Object with Multiple Updateable Dependent Entity Objects

    Hello,
         I want to implement view object with multiple updateable entity object,
         i have refered this link its good https://forums.oracle.com/thread/63721
         here they have explained with 2 table,
         but when we have more then 5 tables and each table have Primary keys , Foreign key , Sequence and  trigger created on it. Then whats steps should i want to fallow.
         if possible some please provide the link or some one help me out how to do this .
         thanks in advance
         cheers

    Has the Advanced View Object Techniques been referred?

  • Sharing same entity object with multiple viewobject problem.

    Dear All,
    I have a common entity entity object, that i am using in 4 different vo(only the where clause is different),
    I have created 4 af:table from corrosponding vos, when i am inserting some records in any of the vo then all the vo is showing the same records.. even through each vo is having separate where clause,
    But when i do this with separate eo for each vo then it works fine..
    Here i just want to do with the single eo being shared by different vo of same kind.. except where clause, Also i want to know why this issue is comming on insert? is it normal expected behaviour ? If yes then how to overcome this problem..? Pls provide any good suggestions if you have..
    Thanks & Regards.
    Santosh.

    Hi Sacha,
    Thanks.. i read it and found following
    You can globally disable this feature by setting the jbo.viewlink.consistent to the value false in your configuration. Conversely, you could globally enable this >feature by setting jbo.viewlink.consistent to the value true, but Oracle does not recommend doing this. Doing so would force view link consistency to be set >on for view objects with secondary entity usages that are not marked as a reference which presently do not support the view link consistency feature well.Now i am thinking to set it false.. but as doc says but Oracle does not recommend doing this. Doing so would force view link consistency to be set on for view objects with secondary entity usages that are not marked as a reference which presently do not support the view link consistency feature well,
    With what option should i go...?
    go with separate eo and vo..?
    Regards,
    Santosh.

  • Problem with database schema objects in the entity object wizard

    Hi All,
    When creating a new entity object, I am facing a problem with database schema objects in the entity object wizard, database schema objects (check boxes for tables,synonyms...) are disabled. Actually I am using a synonym but I am not able to select the synonym check box.
    Can any of you folks tell me how to enable the database schema objects (check boxes for tables,synonyms...).
    Thanks in Advance.
    Raja.M

    Make sure your using rite version of jdeveloper..
    Make sure your using apps schema and check whether your able perform DML operations in the schema vis sql developer.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                           

  • Problem in creating Maintenance Order with multiple operations

    Hello all,
    I am facing problem while creating Maintenance Order with multiple operations and sub-operations. I am using BAPI : BAPI_ALM_ORDER_MAINTAIN.
    For single operation it is working fine,but i am unable to create MO with multiple operations and sub-operations.
    Please, provide me the inputs required,
    I have used methods :
    ORDER        CREATE,
    OPERATION CREATE
    and SAVE.
    Regards,
    Siddhartha

    Hi,
    The FM you are using is a perfect one. This FM is bit tricky to use. You need to perfectly pass the Reference number field. which links various input table parameters of this FM.
    Thanks & Regards,
    Navneeth K.

  • How to create AD contact object with multiple proxyAddresses?

    Hello,
    I need to create AD contact with multiple proxyAddresses to be used in mail routing.
    How can I accomplish this using Java?
    I can create an AD contact with single value fine. But I don't know how to populate a multivalue attribute.
    proxyAddresses: smtp:mytestuser@Domain1
    proxyAddresses: SMTP:mytestuser@Domain2
    Also, how do I update a multivalue attribute? When first name and/or last changes, the proxyAddresses will need to be updated?
    How can I do this?
    Thanks
    Khanh

    This error is no longer coming up, it is now saying that it has an unsupported class version error. I believe this may be because the class file and library files have been complied under different versions, is there a method to check this?

  • Best practice for linking fields from multiple entity objects

    I am currently transitioning from PHP to ADF. I'm looking for the best practice for linking data from multiple entity objects.
    Example:
    EO 'REQUESTS' has fields: req_id, name, dt, his_stat_id, her_stat_id
    EO 'STATUSES' has fields: stat_id, short_txt_descr
    'REQUESTS' is linked to EO 'STATUSES' on: STATUSES.stat_id = REQUESTS.his_status_id
    'REQUESTS' is also linked to EO 'STATUSES' on: STATUSES.stat_id = REQUESTS.her_status_id
    REQUESTS.his_status_id is independent of REQUESTS.her_status_id
    When I create a VO for REQUESTS, I want to display: REQUESTS.name, REQUESTS.dt, STATUSES.short_txt_descr (for his_stat_id), STATUS.short_txt_descr (for her_stat_id)
    What is the best practice for accomplishing this? It appears I could do it a few different ways:
    1. Create the REQUESTS VO with a LOV for his_stat_id and her_stat_id
    2. Create the REQUESTS VO with the join to STATUSES performed within the query for the VO. This would require joining on the STATUSES EO twice (his_stat_id, her_stat_id)
    3. I just started reading about View Links - would that somehow do what I'm looking for?
    I also need to be able to update his_status_id and her_status_id through the by selecting a STATUSES.short_txt_descr from a dropdown.
    Any suggestions on how to approach such a stupidly simple task?
    Using jDeveloper 11.1.2.2.0 if that makes a difference in the solution.
    Thanks ahead of time,
    CJ

    CJ,
    I vote for solution 1 as it's just your use case. As you said you what to update the his_status_id and her_status_id through the by selecting a STATUSES.short_txt_descr by a drop down. This is exactly the LOV solution.
    ViewLinks are used fro master detail navigation (which you don't do here) and Joining the data make it difficult to update (and you still need a LOV for the drop down box.
    Timo

  • Object with multiple states and slider in folio are rasterized, settings seem correct.

    I am having trouble keeping An object with multiple text states from being rasterized, as well as a slider that is also rastering.
    I have read that you are supposed to set the folio and article up to be .pdf and that the slider should have the vector option chosen.
    I haven't found anything for the multi state object to for these settings.
    What happens is when I output the folio to Adobe Content Viewer, only the text in those items is rasterized. All other text is crisp. Tested on both iPad Mini and iPad Retina and the both are blurry.
    Is there a way to force the vector option? It seems even with the correct options selected it is still rastering the test in interactive elements.
    Thanks!

    Here is the MSO with the folio.
    Here is the Slider with folio overlays panel.

  • How to create a table with multiple select on???

    Hi all,
            I am  new to webdynpro and my requirement is to create a  table with multiple selection on.I have to add abt 10 rows in the table but only 5 rows should be visible and moreover a verticalscroll should be available to view other rows.Can anybody explain me in detail how to do that.Please reply as if you are explaining  to a newcomer.Reply ASAP as i have to do it today.
                                                                           Thanxs

    Hi,
    1. Create a value node in your context name Table and set its cardinality to 0:n
    2. Create 2 value attributes within the Table node name value1 and value2
    3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
    you have created a table and binded its value to context
    Table UI properties
    4.Set Selection Mode to Multi
    5.Set Visible Row Count to 5
    6.ScrollableColCount to 5
    In your implemetaion, you can add values to table as follow:
    IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
    ele.setValue1(<value>);
    ele.setValue2(<value>);
    wdContext.nodeTable().addElement(ele);
    The above code will allow you to add elements to your table node.
    Regards,
    Murtuza

Maybe you are looking for

  • Package api.jar in WebLogic 10.3

    Hi, in Oracle WebLogic 10.3 (windows xp release) the package api.jar in WL_HOME\wlserver_10.3\server\lib is just 1 kb and has no classes inside (just a META-INF directory). Is this a bug in weblogic installation because in WebLogic 10.0 the api.jar i

  • Introduction of XML

    The Extensible Markup Language (XML) is a general-purpose specification for creating custom markup languages. It is classified as an extensible language, because it allows the user to define the mark-up elements. XML's purpose is to aid information s

  • RAW not opening in PS when triggered from within LR

    When I select a RAW image in Lightroom, right click and select "edit in" –> "Edit in Photoshop CC 2014", Photoshop launches but does not open my image. I would expect that it takes me to the Camera RAW module or at least throws me a comprehensive err

  • Can i generate dynamic variables

    hi guys can we generate varibles in a plsql block dynamically ..viz i have some varibles in the data base that are entered by the user and the values are to be calculated at the run time based on some of those varible eg in database code formula (var

  • What is an NIC? Help!

    I've just moved house, and our lovely landlord hasn't provided us with a phoneline. So I was looking at the telewest blueyonder broadband website and they say that with an apple computer you have to have an NIC, or network interface card. What is tha