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!

Similar Messages

  • 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

  • I have just purchased a new macbook and need to sync my iphone with itunes, i understand that you can only sync your phone with one itunes account. I do not want to wipe my iphone when syncing with this new itunes account. Any advice welcome

    I have just purchased a new macbook and need to sync my iphone with itunes, i understand that you can only sync your phone with one itunes account. I do not want to wipe my iphone when syncing with this new itunes account. Any advice welcome

    1) authorize iTunes on the new machine for your iTunes store account(s)
    2) connect your device and right-click or control-click it in the iTunes Source list, then choose transfer purchases from the shortcut menu that appears.
    3) sync the device
    iTunes will wipe the iPhone but, since you transferred your purchases in the previous step, your content will be in your library and you can re-populate the iPhone with it.

  • What to do about Backup failed with error: The target volume is read-only

    This is a weird story. My wife has a PowerBook G4/1.33 GHz that she uses in clamshell mode with a 20" Cinema Display. One day under OS X 10.5.6, her Time Machine backups (to a networked 500 GB Time Capsule) failed with the error: Backup failed with error: The target volume is read-only. So I upgraded her to 10.5.7 and erased the sparseimage file, starting a new Time Machine backup. And it just happened again. Any idea how this sort of problem arises? My wife was doing something at her computer when the Time Machine error occurred.
    Please don't advise us to upgrade to 10.5.8, because her PowerBook freezes not infrequently with any OS later than 10.5.6, and I was just about to downgrade her from 10.5.7 to 10.5.6.

    Pondini wrote:
    odysseus wrote:
    This is a weird story. My wife has a PowerBook G4/1.33 GHz that she uses in clamshell mode with a 20" Cinema Display. One day under OS X 10.5.6, her Time Machine backups (to a networked 500 GB Time Capsule) failed with the error: Backup failed with error: The target volume is read-only. So I upgraded her to 10.5.7 and erased the sparseimage file, starting a new Time Machine backup. And it just happened again.
    Try repairing the sparse bundle, per #A5 of the Time Machine - Troubleshooting *User Tip,* also at the top of this forum.
    I've tried this before, but it can't be repaired, because it can't be mounted.
    Any idea how this sort of problem arises? My wife was doing something at her computer when the Time Machine error occurred.
    One possibility is, the HD in the Time Capsule is beginning to fail (all HDs fail, sooner or later).
    I'm backing up to my own sparseimage bundle just fine.
    Please don't advise us to upgrade to 10.5.8, because her PowerBook freezes not infrequently with any OS later than 10.5.6, and I was just about to downgrade her from 10.5.7 to 10.5.6.
    Those two things may be related. Whatever's going wrong may very well be what's corrupting the backups.
    I'd recommend finding out what's wrong with the Powerbook. It's impossible to tell, of course, but that may be the root of the problem.
    There's a problem with PowerBooks and Cinema Displays. I've posted a lot about this. Even after a motherboard replacement, my PowerBook G4/1.67 GHz had freezes, and eventually Apple gave me a MacBook Pro, but I think there's a failure involving hardware/software design.
    If you haven't yet, I'd start by dong a +*Verify Disk+* on it's internal HD (also per #A5);
    That checks out fine.
    if there are no errors, or they're fixed and the problem continues, run the +Apple Hardware Test+ from the disc that came with the Mac. (One of the discs should have that, and instructions for running it, printed in tiny type on the label).
    If still no help, I'd be inclined to do an +Archive & Install, preserving users & settings,+ of Leopard, then download & install the appropriate "combo" update. That's a combination (thus the clever name) of all the updates to Leopard since it was first released, so installing it should fix anything that's gone wrong since then, such as with one of the normal "point" updates. Info and download available at: http://support.apple.com/downloads/MacOS_X_10_5_8_ComboUpdate (change the last "8" to the desired number). Be sure to do a +Repair Permissions+ via Disk Utility (in your Applications/Utilities folder) afterwards.

  • Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?

    Is there a way to create a project with custom audio settings that are NOT only "Stereo" or "Surround"?
    Thanks!
    -Adrian

    the old apps are on my computer but they have had upgrades since they were put on the ipod originally.  you think you would get a warning about this when you restored. I was not worried about losing the progress of the apps but i would have been worried about the app it self!!!!!

  • 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

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

  • PDF form with one submit button that prints form and sanves PDF with data with a unique file name

    We have a long medical form that patients can fill out at kiosks as they wait to see a doctor. We want one button so that the patient can print out the form with one click (and finish filling it out by hand if it's not finished already) and the same button click will save the form with a unique file name (using last name, first name, date, and/or email address so that the identity of the person who filled out the form will be readily apparent to anyone who wants to grab the user's responses later). Is Acrobat capable of doing something like this? LiveCycle Designer maybe? And if we continue with the PDF form and add a submit button, is there a way to program the button click to print and to save?
    Thank you in advance of any suggestions that might accomplish this task.

    I am not sure about the print, but it can probably be done -- possibly with a bit of JavaScript. As to the saving of the form, that is not reasonable at a kiosk. You would want the data submitted to a server (particularly with patient data), no e-mail or accessible drive. You can collect the data and put it in a database or import it to the form for printing yourself.

  • 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

  • Problem with fillable form showing up as read-only

    I created a fillable form in Acrobat 8 Professional. It opens fine for me directly from where I saved the file or when I click on it from a link which I posted on our Web site. However, no one in the office gets the same results - it opens as read-only for them when I send it as an email attachment or when they click on the same link from our Web site.  We are using the same version of Acrobat Reader (10.1.3). What can I do?
    Thank you.

    The problem is the file is a PDF/A document, and the other users have the user preference set to display PDF/A documents in PDF/A mode, so any changes are not allowed. The users can turn this off (Edit > Preferences > Documents > PDF/A View Mode, or you can remove the PDF/A information from the document. The latter is the better appoach. Here's a link to an action that you can install that will do this for you: http://acrobatusers.com/actions-exchange/remove-pdf-a-information
    and here's one with more information: http://blogs.adobe.com/acrolaw/2011/05/how-to-remove-pdfa-information-from-a-file/

  • Can You Burn an Disc with JPEGs That is Read Only

    Is it possible to burn a disc through the finder that will have only JPEGs and have it be read only so no one can copy the images to another computer? Just see them, not copy.

    No.
    Screen capture utilities exist that circumvent that protection. Better to embed a watermark if you are worried about copying.

  • Porblem with One  Info Object. in Two Structures

    Hi,
    I am have a Object like Material Type which i need to use in KF structure by filtering in selection,
    and also same in char Structure with different selection in one query.
    But my Problem is I am unable to Drag this Object in to the selection panel.
    if i delete in KF Structure than i can do this. I want both
    Pls help me anybody how can i salve this.
    Regards,
    Madhu.

    Once you restrict the characteristics value in teh structure in ROWs, your KFs will be automaically restricted by that value. Why do you want to create another selection in KF structure?
    System does not allow because of a simple reason.
    You have already put the restriction on this characteristics from the ROW area. You can do two things.
    Either you can create the same selection in the KF structure or you will create a different selection in KF structure. If you create a same selection, there wont be any change in the result. (So, doesnt make any sense to allow you to drag it). If you create with different selection (So, doesnt make any send as it will not bring any number being different selection at that cell).
    Can you please explain your requirement? May be possible that report can be designed with different design.
    - Danny

  • Is it possible to use two speakers with one Apple Tv ?

    Hello everyone,
    I bought an Apple Tv and I have one apple express with a Bose speaker and a Bose Link Air speaker.
    I would like to see a movie using the two speakers but every time that I try to select two speakers in the airplay Apple Tv menu, it automatically deselect the other speaker.
    Is it possible to use two speakers in the same time ? ( I know it's possible with Itunes)
    Thank,
    Ps: I have the last Apple TV

    No, that is not possible with Apple TV. You can set one 'output' via Apple TV, and 'stream' to multiple speakers from iTunes or via the remote app.

Maybe you are looking for