Controlling Post Order of Multiple View Objects

Hi ,
Here is the scenario:
I have a use case of "Creating an Abstract"
Steps:
step1 ) (Page 1) Author presents the details of the abstract (Details goes to 2 tables ABSTRACT & ABSTRACT_CONTENT tables). For the 2 tables i have 2 entities. I use a view here called CreateAbstractView from both the tables( here i control the post order of the entities ....code from jdeveloper 11g guide)
Step 2)(Page 2) Author presents details of Additional Authors. I use the view (*AdditionalAuthorDetailsView*) (Details goes to 2 tables AUTHOR & ABSTRACT). Here in the abstract table i have a parent key(parent abstract id) So all the additional authors has a record in Abstract table with parent_abstract_id from step1. ABSTRACT table also has a foreign key (author_id) .Here also i control the post order of the 2 entity object using the code from jdeveloper 11g guide.
I also have a link from CreateAbstractView to AdditionalAuthorDetailsView (abstract_id in Abstract table from CreateAbstractView to parent_abstract_id in Abstract table from AdditionalAuthorDetailsView )
If i have a commit on both the pages , i don't see a problem.
But i want to have a commit process at the end so that the user can review the information. So when i try to add a commit process at the end , i get a exception (Parent Key not found exception) which i came to understand that commit from AdditionalAuthorDetailsView is happening first which is trying to insert a record into ABSTRACT table and cannot find the parent_abstract_id.
How do i control the post order for multiple view objects in such scenarios?

Hi!
Please take a look at the dev guide. It comes down to controlling the posting order on entity level.
http://download-uk.oracle.com/docs/html/B25947_01/bcadveo007.htm#CEGJAFCF
Sascha

Similar Messages

  • How to share a bind variable across multiple view objects?

    Hi, Can someone tell me if it's possible to share a bind variable among multiple view objects within an application module? My web page displays data from different VOs on different regions. But all data should be controlled by the same bind variable, which appears in all queries. How can I achieve this?
    Please help.

    Best to state your JDev version, and technology stack (eg. ADF BC) when posting.
    I can think of 2 approaches.
    1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
    2) Create a AM client interface method that programatically sets the bind variable in each VO.
    Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
    CM.

  • ADF BC - unable to control posting order

    Hello,
    we have big troubles with controlling entity posting order when deleting entities.
    For simplicity consider this example:
    - you have Dept (master) and Emp (detail) entities
    - then:
    a) change some attribute in current Dept row
    b) remove all Emps in current Dept
    c) remove current Dept
    - then postChanges
    You will get JBO-26048 (oracle.jbo.DMLConstraintException - ORA-02292: integrity constraint violated - child record found)
    I would expect (as my operations are in correct order) that it will be posted to database without problem. It isn't.
    Explanation:
    First change of Dept entity (point a) will put this entity to the first place in transaction list of object waiting to be posted to database. It is ready for update now. Point b) will put all removed Emp entities in posting list from 2nd ... N-th position.
    Then point c) - Dept remove - instead of putting the Dept to (N+1)th posting place will change Dept state from modified to deleted because it is already in the list on the first place. Now Dept is 1st and in deleted state.
    It means first post operation will be Dept (master) deletion => constraint violation.
    Our real situation is much more complicated. We cannot just omit Dept update.
    We tried to post the Dept update first and then post removings afterwards but posting order is not cleared after postChanges. The only solution we found (very bad solution) is to clearEntityCache between postings - this also clears transaction posting list (it means: update Dept, postChanges, clearEntityCache, remove Emps, remove Dept, postChanges)
    Is there another solution how to solve this problem.
    Is it possible to postChanges after Dept update and to have transaction posting list empty and ready for another independent operations.
    Thank you.
    Rado

    Hi Sascha,
    yes I have.
    The problem is that entity accessors wil not return data when entity is in deleted state.
    In my example dept.getEmps() returns RowIterator with row count = 0 when it is used in postChanges method.
    I tried to workaround this with own ArrayList in master collecting deleted details. As a master (Dept) mustn't know its detail is going to be deleted, it is job for Emp to aks its master to store it into its temporary array of deleted Emps. Then in Dept postChanges I can iterate through the array not through accessor row iterator.
    The weakness of this solution is that remove operations and post operation mustn't be in one request. So it is not guaranteed the temporary array will survive. Therefore it must support passivating and activating. And I think it is very complicated for so "simple" problem.
    For now steps:
    1. update dept
    2. postchanges
    3. clearentitycache
    4. delete emps
    5. delete dept
    6 postchanges
    work for me.
    Rado

  • 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

  • Controlling transition timing in multiple multistate objects

    How can you control the timing of multiple multistate transitions in DPS? If you have two slideshows with a single button telling each to go to a particular state, the transitions go in sequence rather than simultaneously. Can you adjust the timing so each transitions at the same time and for the same duration?

    At this time, you can't run two button actions simultaneously.

  • One pair of radio buttons to control multiple text objects - Designer 8.0

    Greetings - a big thank you in advance for any assistance. I have often found answers to my problems on this forum, but have been unable to find an answer to the following.
    The short of it - is it possible to make a pair of radio buttons control the visibility of multiple text objects with the same name(I have had success in manipulating only a single text object with one pair of buttons)?
    The long of it - I am trying to make a form bilingual based on the value of a radio button group to control the visibility of the text object in the selected language. When the user selects the language they wish to see, all the text objects in the form switch to that language. I am working with a dynamic PDF.
    I have succeeded to a very limited extent in manipulating one text object by overlaying text objects in both languages, setting one object to "invisible" as default, and controlling that text objects visibility with the following JavaScript in the click event of the radio button group:
    ----- form1.#subform[0].ENG_JPN::click: - (JavaScript, client) -------------------------------------
    if (ENG_JPN.rawValue == 1)///1 equals the value of on
    {English.presence = "visible";}
    else
    {English.presence = "invisible";}
    if (ENG_JPN.rawValue == 2)///2 equals the value of on
    {Japanese.presence = "visible";}
    else
    {Japanese.presence = "invisible";}
    endif
    The problem is I need to manipulate the visibility of all text objects with the same name on the form with a single radio button group. I have tried writing the code as one does for the sum of a repeating field, ie. English[*].presence etc. however I get a C++ error in preview.
    Any ideas are greatly appreciated. I am truly stumped - thank you for your time.

    To access objects with the same name you need to deal with occurance numbers. If your object is called TextField then the 1st occurance will be TextField[0], the second occurance will be TextField[1] etc.....
    The issue is that the [] in javascript are interpretted as an array element so you have to use the syntax: xfa.reolveNode("string") to get to your object names. In your case you would use:
    xfa.resolveNode("TextField[1]").presence = "visible"
    This string syntax allows you to use a var to hold the index number and is very useful with for loops where you want to set large numbers of objects. So if the index was held in the var i then your syntax would be:
    xfa.resolveNode("TextField[" + i + "]").presence = "visible"
    If the objects are in a repeating subform then the occurance numbers are on the subform and not the object. You can always get the expression to use by app.alert(objectname.somExpression). This will return the expression that you need to create.
    Make sense?

  • [SOLVED] Row level view object validation (cross-field/multi-field)

    Hi,
    I'm trying to implement a validation rule across multiple view object fields in ADF 11g (11.1.1.2.0). I have 4 fields that the user needs to either leave all blank or there are some pretty complicated rules around which fields should be specified in combination. I'm having trouble using standard expression type validation rules because:
    - The validation rule is always attached to a particular field
    - The validation rule is not executed if the field is left blank. I need it to.
    - I can't control which field the validation message shows in (it always shows in the field on which the rule is attached).
    Is there any way I can hook into the v
    I've found the following example that seems to tackle similar problems:
    +107. Displaying ADF BC Mandatory Field Errors Using UI Hint Labels+
    http://blogs.oracle.com/smuenchadf/examples/
    It's fairly long and complex solution though, which quite a lot of code to be written. This example is from 10g (in 2007). Does anyone know of a more elegant way to achieve this in 11g (in 2010 :) )?

    Thanks John! I didn't realise you could define entity-level rules - now found it in the Business Rules section of the entity properties.
    One more question: is there any way that I can specify which field is in error when an entity-level validation fails? It would be nice if my error message was attached to the field that is in error.

  • ADF - Multple View Objects in one ADF table - Jdeveloper 11g

    Hi,
    I'm using Jdeveloper 11g, is there a way to use multiple view objects in one ADF table? And if so, do you have an example?
    In my case the view objects are not based on a database table they were created based on an ESB wsdl, one is for person and one is for address.
    Any information or pointers you could provide would be appreciated.
    Thanks!

    Hi,
    That would be a good solution, however, I'm supposed to see if there is a way to use the VOs that were created for person and address. Even better if the solution requires little coding.
    Is it possible to combine these two VOs into a single VO to use with an ADF table or to use both of them in a single table? Or is there some other solution that would enable me to use the person and address VOs in a similar manner?
    Thanks!

  • View objects referencing the same entity

    The behaviour occurs in every version of jdeveloper ADF BC i have tried so far (10g, 11g).
    I have 2 updatable view objects referencing the same entity object. When i create a new record using the first view object and before commiting the data to the database i navigate to the second
    view object. Suprisingly the second view object is populated with the same data that is posted on the first view object. It seems like both view objects are referencing the same entity object instance.
    Is any way to overcome this strange behaviour.
    Thanks

    As Timo says think of the EO as a record cache. If you had 700 VOs all based on the same EO, it would be ideal to store the same record(s) 700 times in the midtier as it would consume vasts amount of memory. Thus the EO cache.
    If you do want to separate the VOs, you've 3 options:
    1) Use separate EOs for each VO (not ideal)
    2) Expose each VO under their own root level Application Module - a separate EO cache instance for each VO will be created at runtime - however you need to be careful between the VO/EO pairs, you don't update the same record, as you'll get record locks/contention
    3) If you're using task flows in 11g, use the Always Begin New Transaction option for each screen/fragment for each VO. This is the equivalent of 2 but from the task flow level - however again you need to be careful on record locks.
    CM.

  • Table based on multiple views

    Hello all,
    Is it possible to populate a table with data from multiple view objects that are linked with a view link?
    The reason i want to do this is because if you update the reference ID in the master the detail automatically follows.
    Now, I know i can create a view object and then include the detail info using expert mode, but this way the detail info doesn't change if i change the reference ID.
    To conclude, a brief explanation of what i'm trying to achieve.
    I have a table with adresses. Having a reference ID to the ZIP table.
    Because the user doesn't know all the ID's by heart i show the name of the city and the user can change them by clicking on a lov button. This all works fine, BUT, when the city is changed the old one stays visible for the user. Although committing, changes the city to the new one.
    Regard
    Johan

    Keeping in mind what Dave just said, you would be better off creating your GTT once. Then reusing it over and over again. Using GTTs is advantagous in that its contents are visible only at the session level, and depending on how the GTT was created it will either automatically truncate the table on commit (the default if not otherwise specfied) or truncate the table at the end of your session regardless of commits.

  • 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

  • Jdev 9.0.4 View Object Order By

    I'm Using Jdev 9.0.4.
    I set Order by in the view object property.
    When I'm presenting Data into a table from the View Object it does show with the order by , but when i open it into a drop down combo box it's not set with this order by.
    what can i do ?

    9040 implements new functionality.
    Previously, when a row was created and inserted in a view, this row would only become visible to other views when the changes are posted/comitted. This has now changed. When an execute query is done on a different view, the new rows in the entity cache are visible.
    I think the problem stated above is linked to this - The framework is trying to insert a new EO into the VO where the EO is marked as read-only thereby breaking its own rules. In this case i think the View should allow the insert. I dont know the internals, maybe someone from ORACLE could enlighten us??
    Thanks.

  • Problem while Binding multiple Parameters to View Object[Solved]

    Hello,
    I am facing problem while binding multiple parameters with different data types in View Object query. For example suppose I have following query in my view object.
    SELECT Header.ADDED_BY
    Header.BATCH_ID,
    FROM BATCH_HEADER Header
    WHERE :1='deptAdmin' and Header.BATCH_ID
    in
    select batch_id from batch_header_dept_mapping where dept_id in(SELECT * FROM TABLE(CAST(:0 AS TABLE_OF_VARCHAR)))
    I am able to pass the Bind variables of Array type for : 0 , using Steve's ArrayOfStringDomain example. (ArrayOfStringDomain) .
    But after passing value to second bind parameter ie.. :1 .
    I am getting the error as follows.
    ## Detail 0 ##
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CHAR.
    I tried to set
    setWhereClauseParam(1,11); // 11 is Number
    setWhereClauseParam(0,arr); // arr is arr = new Array(descriptor,conn,deptid); for in parameter.
    But of no use , Please let me know if any thing missing form me or have any another solutions. Also please provide me any example if have.
    Thank you,
    Sandeep
    Edited by: user11187811 on Oct 23, 2009 7:27 AM
    Edited by: user11187811 on Oct 26, 2009 12:52 AM
    Edited by: user11187811 on Oct 26, 2009 6:51 AM

    hi.
    but when using non-Oracle named parameter binding styles as you've done (ie. , :1), regardless of what number you give each bind variable, they are sequenced 0, 1, 2 etc. As such your bind variable :1 is the 0th parameter, and your bind variable  is the 1st parameter.Your statment is correct.
    :1 i used was actually on 0th position and :0 was on 1 position. Like you said in sequence 0,1,2 etc. Now i get the answer and i corrected My mistake by assigning right values to right binding variable. and problem just solve.
    Thanks Chris.

  • Adding New View Objects/Link on "Preview and Print" - Order Acknowledgement

    Hi,
    Can we add New View Objects/View Links for the existing "Preview and Print" Order Acknowledgement.
    I want to add for the 2 new functionalities i.e., for Charges (from OE_PRICE_ADJUSTMENTS_V ) and the Line Level Notes, which is currently not supported by Oracle.
    Can anyone help me on acheving this functionality?
    Looking forward for your response.
    Thanks in advance,
    Regards,
    Muru

    You can do that. You should first create the new business objects(AM, VO, VL) in jdeveloper, create your new regions in jdeveloper, associate the AM to the top level region(stackLayout) you create. Use personalization and add a stack layout in the Preview and Print page, set the extends property to point to the new region which you had created. Donot forget to deploy all the files in middle tier before doing the personalization.
    The AM which you had added to the stackLayout will automatically be nested with the root AM of the page during runtime.

Maybe you are looking for

  • Airport no longer works with my MacBooks. Help an old lady get wireless again!

    First, I have to tell you that I'm as dense as granite when it comes to technology, so please talk to me in the simple terms you'd use with a dazed higher primate. Assume that I know nothing. My story: I have the world's oldest MacBook Pro and am als

  • Creation of a Z copy of the tcode S_ALR_87100186

    Hi, I need to make a z copy of the the standard tcode S_ALR_87100186 and do the following changes: 1. Add version & fiscal year to selection screen ( Currently it is defaulted to zero ) 2. Display the output based on the version and fiscal year enter

  • Sqlagent90.exe keeps running in a command window

    HELP!, This is annoying and beyond belief.  I installed SqlServer Developer edition without any problem than I installed SqlServer Express and now whenever I boot my PC, I have a command window that appear with nothing in it and the following title:

  • Optical drive causes crash every time

    I installed a DVD burner (NEC DVD_RW ND-3540A) in place of my DVD-RAM drive. The new drive is set as a master. The drive works fine, except if I dont eject a disc immediately after burning, the entire bus goes down. I am not able to shutdown, restart

  • /etc/hosts is ignored by everything

    Here is the current `/etc/hosts` # Host Database # localhost is used to configure the loopback interface # when the system is booting.  Do not change this entry. 127.0.0.1    localhost 255.255.255.255    broadcasthost ::1        localhost fe80::1%lo0