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

Similar Messages

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

  • Uix two view-objects on one entity-object synchronize

    Hi All
    I want to add some uix pages to an old project using ADF UIX and Business Components.
    I have an entity object to a table witch about 50 fields.
    Now I create two view objects due to a better performance. One witch seven attributes for the overwiew and one with all attributes for the detail page.
    They are related via a view link.
    I create the overview as a read-only-table and the detail-page as an input-form.
    The proplem is that the synchronization don't work. The detail page shows the first dataset ever.
    Has anyone a solution or a tip where I can found that?
    Is where a performance problem if I use one view-object for both pages?
    Thanks in advance
    Roger

    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

  • 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

  • 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

  • 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                                                                                                                                                                                                                                                                                                                                                                           

  • Can i use two apple tvs with one itunes account?

    can i use two apple tvs with one itunes account?

    yes and you can use more then 2
    just don't give them the same name

  • PO No range when we ink two SRM system with One ECC system

    Hello Experts,
    We have a client requirement to link Two SRM Systems with One ECC system.
    In this case what number range we need to maintain in both SRM systems for PO.
    -The number range of ECC PO should get update whenver the PO is transferred from any of the two SRM system.
    -We have Extended classic scenario.
    -Also PO Doc type is going to be same.
    Can we handle this by increasing the buffer of the number range in one of the SRM system?
    Any idea...pls help urgently.
    Best Regards,
    Anil
    Edited by: anil.s.verma on Oct 1, 2010 4:33 PM

    Hello Anil,
    Being in Extended Classic Scenario (leading PO being in SRM, R/3 PO number range is concidered as external because PO number is given by SRM), the only solution for you is to:
    1- give same number range interval for PO (internal in SRM system 1 and SRM system 2, external number range in R/3), e.g. 3100000000 - 3199999999
    2- in SRM system 2, fill in current number with (for example) 3159999999 and let empty (or current value) in SRM system 1
    3- assign, in each system for your concerned transaction type, number range as internal in SRM and external in R/3.
    In this way, you will avoid overlaping in R/3 between PO numbers coming from SRM system 1 and SRM system 2
    Regards.
    Laurent.

  • Two View Objects & One Entity Object

    Has anyone ever had it where they create a row from a view object, set some attributes, insert it into that view object, and it shows up in another view object (as well as the one the row was actually inserted on)? Both of these view objects are using the same single entity object, it's just that their where clauses are slightly different. When I do a commit and then executeQuery, all is good and the new row only shows up in the intended view object.
    Here is the code in my app module to do a row insertion on one of the view objects.
    public void addQCNote(int userID, Number theStudyID, String theNote)
              try
                   //StudyFtsViewObjImpl freeTextVO = getStudyFtsViewObj();
                   StudyFtsQCOnlyViewObjImpl freeTextVO = getStudyFtsReadOnlyViewObj();
                   freeTextVO.setWhereClauseParam(0, theStudyID);
                   DBSequence freeTextTypeCode = null;
                   StudyFTSQCCodeValueViewObjImpl freeTextCodeValue = getStudyFTSCodeValueViewObj();
                   freeTextCodeValue.executeQuery();
                   Row[] freeTextCodeValueCurrentRowArray = freeTextCodeValue.getAllRowsInRange();
                   // There SHOULD only be one ... but if there is more, pick one - geeez.
                   for (int i = 0; i < freeTextCodeValueCurrentRowArray.length; i++)
                        Row currentFTRow = freeTextCodeValueCurrentRowArray[0];
                        freeTextTypeCode = ((DBSequence) (currentFTRow.getAttribute(StudyFTSQCCodeValueViewObjRowImpl.CODEVALUE1)));
                   Row freeTextRow = freeTextVO.createRow();
                   // Sets up default values for insertion into db at commit time
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.PARENTENTITYID, theStudyID);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.PARENTENTITYNAME, "STUDY");
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.FREETEXT, theNote);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.FREETEXTTYPECD, freeTextTypeCode);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.CREATEDID, new Number(userID));
                   freeTextVO.insertRow(freeTextRow);
                   freeTextVO.setCurrentRow(freeTextRow);
              catch (Exception ex)
                   System.out.println("Exception in AR3MainAppModule.addQCNote: " + ex.toString());
    -brian

    Did you read this?
    Re: Row created in one ViewObject added to all VOs based on the same Entity
    Why don't you search this forum before posting?
    Sascha

  • ADF: use of view link Accessor in Entity Object = always null?

    Hi,
    JClient 9.0.5.2, adf model.
    I would like to use the view link accessor method in the master EO to retrieve detail EO values and the view link accessor method in the detail EO to retrieve master EO values.
    Detail Rule:
    In the detail EO an attribute is derived from an attribute of the master EO: detail attribute = master attribute.
    Master Rule:
    In the master EO an attribute is derived from the detail EO: master atribute set to 0 if detail EO exist else set to 0.
    Tables:
    Table Master => MasterEO => MasterVO
    - masterPK (not updateable)
    - masterField (not updateable)
    - hasDetailsFlag
    Table Detail => DetailEO => DetailVO
    - detailPK (not updateable)
    - masterPK => foreign key (not updateable)
    - masterField (query only)
    MasterDetailLink based on foreign key.
    In link wizard I asked for the generation of following accessors in the source & destination Entity Objects:
    In DetailEO accessor name: RetrieveFromMaster
    In MasterEO accessor name: RetrieveFromDetail
    In the DetailEO, I asked for the generation of the DetailEOImpl file, accessors and create method.
    As wriiten in the file, before the create method:
    ** Add attribute defaulting logic in this method. **
    I tought this is the place to retrieve the master attribute:
    The code:
    MasterVORowImpl masterVO = getRetrieveFromMaster();
    if (masterVO == null)
    System.out.println("MasterVORowImpl masterVO create NNNNNNNNNNNUUUUUUUULLLLLLLLLL");
    The masterVO is always null?
    I suppose I didn't understand something, my guest is that ViewObjects may not be used for default logic?
    I know how to implement those rules in the database with triggers.
    I think that the data I need for implementing those rules exist somewhere at the ADF level so retrieving the data from the db is not necessary?
    Could somebody give some clues?
    I didn't find a similar example in the Business Rules in BC4J document.
    Your help will be appreciated
    Frederic

    Hi,
    Detail Rule, copy attribute value form master.
    In DetailEOImpl:
    protected void create(AttributeList attributeList)
    setAttribute(MASTERFIELD,this.getMaster().getMasterField());
    super.create(attributeList);
    Master rule, set flag to 0 if no details else set to 1.
    In the MasterEOImpl added method to check if detail row exists based on Row Iterator => no db retrieval?
    This method also sets the flag accordingly:
    protected void checkHasOtherDetails()
    oracle.jbo.RowIterator ri = this.getRetrieveFromdetail();
    ri.last();
    // last() must be called else hasNext() returns true even on last delete ???
    Number hasDetails = Constants.NUMBER_NO; // = 1
    if (ri.hasNext() || ri.hasPrevious())
    hasDetails = Constants.NUMBER_YES; // = 0
    if (!getHasDetailsFlag().equals(hasDetails)) {
    this.setHasDetailsFlag(hasDetails);
    I call this method in the remove method of the detailEOImpl:
    public void remove()
    this.getRetrieeFromMaster().checkHasOtherDetails();
    super.remove();
    To set the flag I added follwoing code in the create method of the DetailEOImpl:
    protected void create(AttributeList attributeList)
    setAttribute(MASTERFIELD,this.getMaster().getMasterField());
    **** ADDED ***
    Number masterHasDetailsFlag = getRetrieveFromMaster().getHasDetailsFlag();
    if (!masterHasDetailsFlag.equals(Constants.NUMBER_YES)) {
    getRetrieveFromMaster().setHasDetailsFlag(Constants.NUMBER_YES));
    super.create(attributeList);
    One more question:
    Is there a danger of calling last() on row iterators in create/update/remove methods of *Impl files?
    => current row changed => any effect on display in JPanel
    Thanks
    Frederic
    PS All variable/method/class names have been manually renamed in this code so some small syntax problems may exist.

  • To Join two SAP fields into one info object

    Hi All,
    Can you please suggest the best method to concatenate values from two R/3 fields into one info object master data table?
    The requirement is to create a Sales report where I need to report on sales against  sales type.
    Sales type is a list of joint values of item category ( 0ITEM_CATEG) and bill type (0BILL_TYPE).
    So, I need a list of all item categories and billing types in a single object and report sales value against it.
    Please suggest.
    Thanks,
    Sharmishtha

    Hi Venkat,
    In DSO any case you will not be having more than 16 Keys. I am surprised seeing requirement of more than 16 keys, but anyways you need to go with some workaround.
    You can concatenate multiple Fields and map to one Dummy InfoObject which will be Key in DSO so in actual you have more than 16 Keys but have 16 Keys in system.
    But analyze requirement in detail because this will increase data redundancy and time for load will get increased.
    Also for new issues start new discussion otherwise people will not able to help you in this forum.
    Regards,
    Ganesh

  • View all rows in Entity object

    please I have a problem can I one help me
    I want to get all rows from specific Entity object
    example
    I am now in validate method in XXX Entity Object and i want to get all the rows in XXX table from validate method(all rows)
    can any one help me to do that
    thanks in advance

    ya sire
    I want from validate method in EO XXX to validate all the rows in the table XXX
    so I want to get all the rows from validate methods in the EO XXX
    thanks in advance

  • Export two TXT files with one button

    Hi,
    I'm using Application Express 2.0, i'm developing aplication in which users import few different excel spreadsheets and after that they export date in specified TXT format.
    I'w like to create functionality to export two and more files in CSV (TXT) format with one button and one click only in defined folder. It's necessary to simplify work of my endusers becose they have to generate ten or more files.
    Is it possible create functionality which generate files in defined folder without any addtional user's action?
    Best,
    Kiril

    Create a procedure to output the files, use the oracle directory object to define your output path.
    create or replace directory wayne as '/csv';
    use google or metalink to get examples. This way you can output as many files as you want, my personal opinion would be to create a dynamic report your users could run on demand.

  • Set Java Object with Java Long Object from JNI

    Hi,
    i am getting crazy with the jni...
    in Java i have the follwoing:
    public class blabla{
    Object myObject;
    i chose Object cause the return value from native is not known
    in case for a long value i handle it like this :
    //get the Long class
    jclass LongCls = env->FindClass("Ljava/lang/Long;");
    jmethodID jmid = env->GetMethodID(LongCls, "<init>","(J)V");
    //create an Long Object with the long return value
    jobject LongObj = env->NewObject(LongCls,jmid,longreturnvalue);
    //set Long Objekt - doesnt work!(jclazz is the class of the return Object of the blabla class)
    jfid = env->GetFieldID(jclazz, "myObject", "Ljava/lang/Object;");
    env->SetObjectField( returnobjectofblabla,jfid,LongObj );
    the long value is set fine in the Long Object but i cant set the Long Object with the SetObjectField method into the Object myObject.
    Java is shown that the myObject contains a Long Object but the long value of the Long Object is totally wrong and doesnt equal to the long value which has been set.But setting the value works fine- any ideas or solutions?
    Thank you!

    charliess wrote:
    sometimes i really wonder about the answers in this forum - until now i got not one answer that helps me, even i tried to write down the problem very detailed...
    Sometimes I wonder about people who jump onto a site and immediately assume that
    1. They are the most important person in the world
    2. That they deserved the absolute undivided attention of absolute everyone.
    3. That everyone should be absolutely polite to them and provide them with perfect answers.
    4. Feel free to denigrate and posit their own opinion on everything while ignoring anything else that anyone else says.
    5. Expect that everyone else should understand their poorly worded questions.
    Myself I find such individuals extremely amusing. Although they seldom stick around long here. At least not under their original alias.
    plaz tel me how to realise your error checking?example plz
    You start by having at least a basic understanding of C/C++ and java.
    Then you read the JNI documents, all of them, for each method that you are using.
    Then you write code such that it actually reflects the documents. For example you check return types. And probably deal with the possibility that JNI methods might throw exceptions.
    as far as i know the jni methods like getfieldids and so on throw exceptions other like stObject dont do that the just return nothing
    i can see all exceptions in my Java console thats not the Problem, setting the Long Object does not throwing a exception btw->
    Myself I wouldn't expect that a JNI exception would show in the java console. Could I suppose though.
    However nothing so far would suggest that an exception is being thrown. That however doesn't alter the fact that you must still write the code such that it could happen.
    is it possible in general to set an java Long Object created in C(native) into a Object type (Object) overgiven as parameter in my JNI function with the setObject method?
    Is it possible that you could actually follow my previous request and create some code that actually runs instead of cut and pasting whatever you feel like?
    plz answer also with code and examples i did the same for you...No you didn't. You posted something which would not compile and quite possibly doesn't represent your actual code at all.
    And please note that we do not get paid to do this. If you want to pay someone to solve your problem then there are sites for that.
    Paying someone allows you to make all sorts of demands. The more you pay the more people will put up with.
    If you don't want to pay and do in fact want free answers then it will probably be in your interest to
    1. Be polite
    2. Answer the questions that have been asked of you.

  • Crystal Reports 2008 - can't see Salesforce objects with 2 parent objects

    I am running CR 2008 SP 1 and accessing Salesforce to create reports.  I just discovered that 2008 does not make available any Salesforce objects that have more than one parent.  This is only an issue if you define multiple relationships in Salesforce as Parent/Child.  Lookup relationships are not an issue.
    I am using CR XI for another client and it can see these objects without problem.  Is this a design issue or is it a bug with CR 2008?
    Hs anyone else encountered this issue?  Thoughts on ways to access these object short of redesigning my Salesforce data?
    BTW, I and using 2008 SP1 because SP2 does not work when accessing Salesforce.
    Thanks, John

    It turns out that the ability to access Salesforce objects with multiple parents was included in release 11 of the Salesforce API.  CR 2008 SP1 used release 9 of the API.  CR SP2 uses release 13 of the API.  Once they get SP2 fixed for the Salesforce interface, this issue will go away.
    John

Maybe you are looking for

  • Create Credit Memo with Reference to Multiple Documents

    Hi.  I have the challenge of Creating a Credit Memo via VA01 referencing Multiple Billing Documents.  Anyone know any tricks to be able to reference Multiple Billing Documents in batch?  Cheers, Jerry Tischer Message was edited by:         Jerry Tisc

  • Blu-Ray Mystery

    Hi everyone, I am editing my film in premeire elements 10. My project setting is HD 1080i, 1920 x 1080  29.97 fps.  I recently started to practice burning blu-ray's to my work in progress movie, just so i am ready when everything is completed. Howeve

  • How to turn off Camera Raw in Photoshop CC?

    How do I turn off Camera Raw in Photoshop CC?  When I am trying to open an image from Bridge CC it automatically opens in Camera Raw.  I've tried everything I know to turn that feature off ... and I know it is just a matter of know what button(s) to

  • Saving time information to regions?

    is there a way to set a region to where it will fall in the same timeframe when dragged from the audio window? i deleted some content from my arrange, but the file is still in the audio window and i want to drag it back onto the arrange window and th

  • Which tablet is better the Kindle or Samsung ?

    My family would like to replace our Nook tablets with either a Kindle Fire HDX or a Samsung Galaxy Tab.  I have my own and my 2 kids each have their own.  I like to know which one is better the KIndle or the Samsung?