Newbie needs guidance on BC4J

I'm struggling to get my head round something. I'll keep it simple??
I have a user table (userid, username)
I have a message table (messageid, userid, message)
I have created Entity Objects for the user and message tables.
I have created an association between the user.userid and message.userid. I have created a view object based on these 2 entity objects as follows
select username, message, userid, messageid from
message, user where user.userid = message.userid;
When testing this single view object using the tester in Jdeveloper the functionality I require is that when a user wants to create a new message they click new and insert a new message yet pick an existing user from the user table. However the BC4J framework creates a new instance of Message entity and a new instance of the User entity. I do want to create a new message but not a new user!!
Where am I going wrong? I've read through lots and lots of docs but do not seem to find something this simple. Any pointers would be great. Thanks.

Try it this way.
Create a new view and add to it first the message table and only then the user table (note that the user table is added as a read-only table).
This should do the trick.

Similar Messages

  • Flash Newbie Need Guidance

    Yes, I am most likely over-confident that I can get what I
    want to do done, but I have high hopes!
    I am building a new site, and I am planning four flash
    elements for the entire site. This is a wee bit presumptious in
    that I dont really know flash yet, I do have the flash bible, and I
    am willing to learn, so please guide me. I am good with PS and
    Dreamweaver, so I am hoping I can have the same experience with
    flash.
    Element 1) My main page (
    Which
    Can be found here) needs a flash gallery that will move between
    three seperate products. I am hoping to put in a transition between
    the three products, and most importantly, I need it to work with a
    database (SQL server 2000, I think) anyways, I believe you can do
    this with XML and flash, basically I will create the image to be
    pictured, it will be a static image that just gets displayed during
    its time on screen, the only animation may be a Click Here type
    thing to encourage clients to click the image. The xml of which
    images to display will be updated by the DB, (I am working with a
    DB pro who I think knows how to do this step) and then Flash pulls
    the images, makes it so the link clicks to the product, and then if
    nothing happens after say 15 seconds transitions to the next image.
    I would like to put (as in what you can see online ) a FF, Rewind,
    and Pause/Play button.
    Any ideas on where to start to do all of that?
    Element 2) A pic gallery for a particular product. Again, the
    pics will be loaded by the database. Typically we sell two products
    at the same time, so I need two "tracks" to display thumbs of the
    various pictures. This way, my client clicks a thumbnail, it loads
    a larger picture in a main window area ( I am envisioning a box
    approx: 300 w X 200 H, with the tracks displayed underneath that)
    then they click a thumb in the other track and it displays in the
    larger window. Then they can click the larger pic to be taken to
    element #4.
    Element 3) Some tabs with titles like : Description Product
    1, Description Product 2, Schedule, etc...
    When they click a tab it display the info associated with
    each tab. Again, data comes from a DB.
    Element 4) Large Viewing Area - This one will be a basic box,
    approx 750 x Something. Clients see larger picture of whatever they
    clicked on (this btw will open in a new window) I would like this
    to have a zoom feature, a move feature, and the ability to go to
    any of the other pics that were contained within that track. The
    Pics will again be pulled from a DB
    Thats about it, a long list for someone so new, so any
    suggestions on where I can start, find a tut, or even (possibly)
    buy an already existing set of stuff that I can customize to my
    look.
    Appreciate the help
    -Adam

    Found this at another link. This is kind of how I imagine
    element 4 but with a zoom and move feature.
    http://www.westlight.net/

  • Newbie - need guidance to start HUGE import

    Hi - I am a newbie to Mac and lovin' it! I opened iPhoto and plugged in my Canon S80 to copy about 30 photos and a dozen AVI files into the roll "fall birthdays". I am sampling with this small amount to get to know the software before my HUGE import comes... 18,000 images on my pc.
    Here are questions based on my experiment that will help understand how to import my complete library:
    #1 I noticed I have the Original and Modified folder. BUT - the modified folder holds the larger image. Wouldnt the original (larger) size file be in the Original folder? No editing was done on the images, not even keyword additions.
    #2 If iPhoto creates duplicates on every image, that's great protection, but can I possible look forward to duplicating 18000 images??? GULP.
    #3 I have AVI files that are copied into the photo folders as well. These AVI files are not usable by iMovie,etc. because they are not treated as movies. i have to copy these files into my Movies folder. How can these be handled? I have LOTS scattered in my pc folders - PSE4.0 Organizer copied them into the same folder with my photos on the pc.
    #4 I have had suggestions to use iPhoto iBuddy that will help keep track of additional libraries. Is this recommended with the large library I have? Would iPhoto work well with my huge amount of files in ONE library? If you have more than one library you cannot gather photos from each library can you?? (you can only have one library open at a time, right?)
    I am sure I have oodles of questions, but I will start here. Also, if there are tuts or otherwise on the site here, please direct me to some good resources. I am starting with the Help files, but it is a slow process learning - so much to learn since I am a switcher too!!
    Thanks all...

    Hi.
    iPhoto tutorial at http://www.apple.com/ilife/tutorials/iphoto/
    First, you should be aware of the Golden Rule of iPhoto: Do not make changes to your iPhoto Library or file structure from the Finder. iPhoto is a database application, and changing things from within the Finder can damage the database. Everything can be done from within the iPhoto application itself.
    That being said, you want to understand what iPhoto is doing. (Understandibly)
    #1 There are 3 folders which contain photo files. Originals contains all of your original, full-sized, images. Modified contains the edited versions of your photos, including ones that were rotated. This gives you the option of "revert to original" any time you want. When I edit a picture in Photoshop Elements, the size in MB of my photo usually increases. This may explain what you saw. The Data folder contains the small thumbnails created by iPhoto, one for each file in the Originals folder. Thumbnails are automatically generated and allow you to see all those images at once; without them your app would grind to a halt.
    #2 So, yes, every one of your 18000 images will have a thumbnail in the Data folder, but these are small files. Only edited (and auto-rotated) photos will have a version in the Modified folder. There is a way around this, but only if you forfeit the ability to revert to your original version. With a library this large, it makes sense to store it on an external drive, anyway.
    #3 I have many AVI files in my iPhoto Library. I have read that people have trrouble with these, but mine have worked fine so far. I do not keep these in my Movies folder at all, as then they would not be linked to iPhoto. In my Library, these video clips show as thumbnails just like my jpegs, but with a movie icon near the bottom. When I double-click on one, QuickTime launches and the clip can be played there. I had no trouble importing them into iMovie, creating a movie with them, and making a DVD in iDVD. It all worked seamlessly. However, I believe that I read from Karsten Schluter on the iMovie forum that AVI is a "wrapper" which can contain several different things -- some work, others don't. Do yours open like mine?
    #4 The top ranked member of this forum recommends iPhoto Library Manager and prefers it to iPhoto Buddy. If you use the paid version of iPLM you will have the ability to merge libraries if you should choose. Yes, one library open at a time. So I would maybe put older, lower priority photos in one library, and have another library for your current collection. Switching between libraries is easy enough. To transfer photos between libraries you could merge with iPLM and regroup. Performance of your iPhoto depends greatly on your Mac's speed and RAM. I have 5000 images in my library, but with only 256 MB RAM I have to be very patient. The more RAM, the better.
    #5 Each time you import a group of images, the photos are placed into a new "Film Roll". This is what iPhoto uses for its file structure - your photos are listed in the finder inside folders with the same names as your film rolls. For your importing project, I recommend that you select Film Roll View in your Library. This way you can rename the rolls as you import to maintain a similar structure as you already have (although it will not be heirarchical). Rolls will list in iPhoto in chronological order, so edit the film roll's date if it is different than what you want. Do not import folders that contain subfolders. Start from the bottom of your existing structure and work up.
    It is also recommended that you keep a current backup of the Library6.iPhoto file (found inside the iPhoto Library folder in Finder). This contains albums, info, keywords, etc. and is vital to have in the case of a database corruption.
    Have fun with this big project. I'm sure others here will add their valuable input, as well. If you'd like further clarification from me, I'll be glad to help.

  • Startup script error-newbie needs guidance

    I am seeing a new error from my startup script...can anyone give me assistance...
    mac os 10.4.3.....
    error with adobe file...........adobelibrary2.jsx
    line 220: throw localize ($$$/was/store/err3=errr reading storage information: file not found")
    to view a photo of the message
    http://domphoto.com/errorphoto.png

    Something has gone wrong with your file permissions.
    Go to Folder:
    [User Library]\Application Support\Adobe\ScriptStore
    Delete all the files in that folder, and restart.
    Somehow, your account lost permission to read those files.
    Bob
    Adobe Workflow Scripting

  • Need guidance in displaying graphics shapes on image

    I would like some help drawing a circle over an image which is displayed in JScrollpane through JLabel, The goal is, whe we click over the image, the image apperas with a small circle in the place we have clicked. I have used JLabel for displaying image in JScrollpane by using imageLabel.setIcon(new ImageIcon("default.jpg"));
    I need to draw circle/rectangle when i click on image by this i need to select different points in the image by drawing circles/rectangles over the image.
    If you understand my problem than please guide me for the same.
    Thank you

    Don't post the same question multiple times. It's rude, as it leads to people wasting their time duplicating each others' answers.
    http://forums.oracle.com/forums/message.jspa?messageID=9385315#9385315
    http://forums.oracle.com/forums/message.jspa?messageID=9385314#9385314
    Need guidance in displaying graphics shapes on image

  • Need guidance on statspack report

    Hello Friends, How are you. I hope you all will be fine.I need guidance on statspack report. I do not know how can i resolve wait events. Please help me and give me some time for considering statspack report. If any one willing to do my help its really honour for me. In reply just show me email address and i contact you for you kind consideration.
    Thanks in advance

    Either post the report here, or send it to me at [email protected], and I'll try to give my 2 cents on it.
    Daniel

  • My start up disk Macintosh HD is full on my McAir OSX 10.9.4 memory 4GB. I need to clear the disk so that I can update it with the new software IOS 10.9.5 requiring 2.05GB. Need guidance on how to clear space.

    My start up disk Macintosh HD is full on my McAir OSX 10.9.4 memory 4GB. I need to clear the disk so that I can update it with the new software IOS 10.9.5 requiring 2.05GB. Need guidance on how to clear space.

    For information about the Other category in the Storage display, see this support article. If the Storage display seems to be inaccurate, try rebuilding the Spotlight index.
    Empty the Trash if you haven't already done so. If you use iPhoto, empty its internal Trash first:
              iPhoto ▹ Empty Trash
    Do the same in other applications, such as Aperture, that have an internal Trash feature. Then restart the computer. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation—not the mythical 10%, 15%, or any other percentage. You also need enough space left over to allow for growth of the data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    When Time Machine backs up a portable Mac, some of the free space will be used to make local snapshots, which are backup copies of recently deleted files. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown as  Backups. The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself. If you followed bad advice to disable local snapshots by running a shell command, you may have ended up with a lot of data in the Other category. Ask for instructions in that case.
    See this support article for some simple ways to free up storage space.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) or GrandPerspective (GP) to explore the volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one. Note that ODS only works with OS X 10.8 or later. If you're running an older OS version, use GP.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS or GP can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    If you have more than one user account, make sure you're logged in as an administrator. The administrator account is the one that was created automatically when you first set up the computer.
    Install the app you downloaded in the Applications folder as usual. Quit it if it's running.
    Triple-click anywhere in the corresponding line of text below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    sudo /Applications/GrandPerspective.app/Contents/MacOS/GrandPerspective
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. Ignore any other messages that appear in the Terminal window.
    The application window will open, eventually showing all files in all folders, sorted by size. It may take a few minutes for the app to finish scanning.
    I don't recommend that you make a habit of doing this. Don't delete anything as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with the app, quit it and also quit Terminal.

  • I'm looking for Apple desktop P.C. as an upgrade from my Dell /windows XP. I need  guidance.

    I currently use a 6 yr. old Dell Vostro 200 (Windows XP). I want to upgrade to an Apple desktop PC. I need guidance to a product. Are any peripherals compatible (ie. screen, printer, Maxtor hard drive)?

    Almost all  peripherals are compatible. I'd recommend reading https://www.apple.com/support/macbasics/  and if you have an Apple Store in your general area stop buy and ask questions. You were not specific as to what screen, printer etc... that you want to use with the iMac and that is all important so you can verify they are compatible.

  • MacBook - Newbie: Need help on printing wirelessly to XP shared printer

    MacBook - Newbie: Need help on printing to XP shared printer
    Bear with me please. I read tons of articles on this but somehow as a newbie to MAC (girlfriends sick daughter), I am missing something. 10.5.2
    Currently, she can print directly if we plug in the HP Deskjet printer directly via USB to the MACBook. No problem.
    When we first got the MACBOOK I tried setting up the MACBOOK wirelessly to recognize the workgroup where the printer was attached via USB to the Windows XP PC. However it printed out garbage since I did not know there was a difference between XP printing and MAC (Gutenberg/gimp printing/drivers).
    Now I know there is a difference.
    But in reading various instructions, I no longer can find how to connect the MAC to the Windows workgroup. Note we do have a printer set up currently as USB-HP Deskjet on the Macbook (not sure I need to delete it yet).
    I went to System Preferences on MACBOOK and clicked on printers, more printers. In the drop down box was CANON, APPLETALK, IP HP printing and Firewire. There was no WINDOWS selection as I saw in other online web instructions.
    So not sure how to proceed to find a way to:
    1. Connect to Windows workgroup (click on what exactly), step by step please!!
    2. Add correct HP Deskjet 5490 printer (perhaps there is one with Gutenberg or perhaps I need Gutenprint-really not sure what I am talking about)
    Thanks so much in advance. Fiancé's kid has had her cancer recur in a different place and someone was nice enough to buy her a MACBOOK as a gift.
    Sincerely
    Peter

    ccarbery wrote:
    OK...I figured it out...no need to reply.  I noticed that there was another Protocol to use to set up the printer on the Mac, I was using LPD, so I switched it to HP Jet Direct-socket, and it prints fine...thanks.  I am curious as to why LPD wouldn't work; if anyone has that answer I would like to know...thanks
    Any chance of posting the Protocol you used to connect to your printer with your laptop?  I'm have the exact same problem printing from my MB.  Same error message "..is busy".

  • Need guidance to solve the problem.

    my internal hard drive is not showing up on mac. need guidance to solve the problem. thanks

    Hi,
    First make the finder the Front app.
    The Finder Menu > Preferences > General Section should have the Hard Drive item ticked to show the Hard Drive on the Desktop.
    The Name of the drive should not have a . at the beginng  as in .Mactinosh HD as this will make te file Invisible.
    There are also other characters that cause this.
    If you go to the Finder > Go Menu and select My Computer it should have opened a window displaying the Volumes ( Hard Drives and storage devices) that are connected.
    10:17 PM      Sunday; April 14, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • I need guidance on software selection

    I am totally lost on the myriad of software being offered and I need guidance on which one i should use.
    I want to create an interactive short movie display for my website similar to the one that does a 360 virtual tour being used by Royal Caribbean Cruiselines on their website. That allows the view to do a 360 and with the mouse you can also pan up and down, slow or pause.
    Can anyone tell me what Apple product or combination of products I would need to achieve this? My webserver is Linux.
    URL ref: www.royalcaribbean.com
    NAVIGATE TO: Find a Cruise > Ships > Freedom of the Seas > Deck Plans and then select VIRTUAL TOUR.
    Thanks for your assistance.
    Rgds/
    Terry

    What you need to create is a QuickTime VR movie. Apple does not make any Windows-based tools for creating QTVR movies, but there are some third-party tools available. Try VR Worx; it's probably the most popular and capable.
    Hope this helps.

  • Newbie:Need Web Pages Which Provide Guidance

    I am more well known at my company for my Access 97 abilities. I've
    graduated to the point of extensive Visual Basic in Access 97. However, now
    where I work there are needs for a LabView programmer, and I've been
    nominated. I'm TOTALLY a newbie, and I need to find some web sites which
    will furnish syntax & the like for programming in Labview.
    Any help that can be furnished, I appreciate much.
    Larry

    Hi Larry,
    First leason.
    There is no syntax in LabVIEW.
    That is exactly why I love it.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Need help with BC4J/Struts application using a Stored Procedure

    Hi,
    I am doing a proof of concept for a new project using JDeveloper, Struts and BC4J. We want to reuse our Business logic that is currently residing in Oracle Stored Procedures. I previously created a BC4J Entity Object based on a stored procedure Using Oracle Stored Procedures but this stored procedure is a bit different in that it returns a ref cursor as one of the paramters. http://radio.weblogs.com/0118231/stories/2003/03/03/gettingAViewObjectsResultRowsFromARefCursor.html
    I tried the above method, but I am having some trouble with it. I keep getting the error ORA-01008: not all variables are bound when I test it using the AppModule tester.
    Here is the store procedure definition:
    CREATE OR REPLACE PACKAGE pprs_test_wrappers IS
    TYPE sn_srch_results IS REF CURSOR;
    PROCEDURE sn_srch_main_test
    (serial_num_in IN OUT VARCHAR2
    ,serial_coll_cd_in IN OUT NUMBER
    ,max_rows_allowed IN OUT NUMBER
    ,total_rows_selected IN OUT NUMBER
    ,message_cd_out IN OUT VARCHAR2
    ,query_results          OUT sn_srch_results
    END pprs_test_wrappers;
    And here is my code:
    package pprs;
    import java.math.BigDecimal;
    import java.sql.CallableStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Timestamp;
    import java.sql.Types;
    import oracle.jbo.JboException;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.DBTransaction;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    // --- File generated by Oracle Business Components for Java.
    public class LienCheckImpl extends ViewObjectImpl
    * This is the PLSQL block that we will execute to retrieve the REF CURSOR
    private static final String SQL =
    "begin ? := pprs_test_wrappers.sn_srch_main_test(?, ?, ?, ?, ?, ?);end;";
    public LienCheckImpl() {}
    * Overridden framework method.
    * Executed when the framework needs to issue the database query for
    * the query collection based on this view object. One view object
    * can produce many related result sets, each potentially the result
    * of different bind variable values. If the rowset in query is involved
    * in a framework-coordinated master/detail viewlink, then the params array
    * will contain one or more framework-supplied bind parameters. If there
    * are any user-supplied bind parameter values, they will PRECEED the
    * framework-supplied bind variable values in the params array, and the
    * number of user parameters will be indicated by the value of the
    * numUserParams argument.
    protected void executeQueryForCollection(Object qc,Object[] params,int numUserParams) {
    * If there are where-clause params (for example due to a view link)
    * they will be in the 'params' array.
    * We assume that if some parameter is present, that it is a Deptno
    * value to pass as an argument to the stored procedure.
    * NOTE: Due to Bug#2828248 I have to cast to BigDecimal for now,
    * ---- but this parameter value should be oracle.jbo.domain.Number type.
    String serialNumIn = null;
    BigDecimal serialCollCdIn = null;
    BigDecimal maxRowsAllowed = null;
    BigDecimal totalRowsSelected = null;
    String messageCdOut = null;
    if (params != null) {
    serialNumIn = (String)params[0];
    serialCollCdIn = (BigDecimal)params[1];
    maxRowsAllowed = (BigDecimal)params[2];
    totalRowsSelected = (BigDecimal)params[3];
    messageCdOut = (String)params[4];
    storeNewResultSet(qc,retrieveRefCursor(qc,serialNumIn,
    serialCollCdIn,
    maxRowsAllowed,
    totalRowsSelected,
    messageCdOut));
    super.executeQueryForCollection(qc, params, numUserParams);
    * Overridden framework method.
    * Wipe out all traces of a built-in query for this VO
    protected void create() {
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    * Overridden framework method.
    * The role of this method is to "fetch", populate, and return a single row
    * from the datasource by calling createNewRowForCollection() and populating
    * its attributes using populateAttributeForRow().
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs) {
    * We ignore the JDBC ResultSet passed by the framework (null anyway) and
    * use the resultset that we've stored in the query-collection-private
    * user data storage
    rs = getResultSet(qc);
    * Create a new row to populate
    ViewRowImpl r = createNewRowForCollection(qc);
    try {
    * Populate new row by attribute slot number for current row in Result Set
    populateAttributeForRow(r,0, nullOrNewNumber(rs.getBigDecimal(1)));
    populateAttributeForRow(r,1, nullOrNewNumber(rs.getBigDecimal(2)));
    populateAttributeForRow(r,2, rs.getString(3));
    populateAttributeForRow(r,3, rs.getString(4));
    populateAttributeForRow(r,4, rs.getString(5));
    catch (SQLException s) {
    throw new JboException(s);
    return r;
    * Overridden framework method.
    * Return true if the datasource has at least one more record to fetch.
    protected boolean hasNextForCollection(Object qc) {
    ResultSet rs = getResultSet(qc);
    boolean nextOne = false;
    try {
    nextOne = rs.next();
    * When were at the end of the result set, mark the query collection
    * as "FetchComplete".
    if (!nextOne) {
    setFetchCompleteForCollection(qc, true);
    * Close the result set, we're done with it
    rs.close();
    catch (SQLException s) {
    throw new JboException(s);
    return nextOne;
    * Overridden framework method.
    * The framework gives us a chance to clean up any resources related
    * to the datasource when a query collection is done being used.
    protected void releaseUserDataForCollection(Object qc, Object rs) {
    * Ignore the ResultSet passed in since we've created our own.
    * Fetch the ResultSet from the User-Data context instead
    ResultSet userDataRS = getResultSet(qc);
    if (userDataRS != null) {
    try {
    userDataRS.close();
    catch (SQLException s) {
    /* Ignore */
    super.releaseUserDataForCollection(qc, rs);
    * Return a JDBC ResultSet representing the REF CURSOR return
    * value from our stored package function.
    private ResultSet retrieveRefCursor(Object qc,
    String serialNum,
    BigDecimal serialColCd,
    BigDecimal maxRows,
    BigDecimal totalRows,
    String messageCd ) {
    CallableStatement st = null;
    try {
    st = getDBTransaction().createCallableStatement(SQL,DBTransaction.DEFAULT);
    * Register the first bind parameter as our return value of type CURSOR
    st.registerOutParameter(1,OracleTypes.CURSOR);
    * Set the value of the 2nd bind variable to pass id as argument
    if (serialNum == null) st.setNull(2,Types.CHAR);
    else st.setString(2,serialNum);
    if (serialColCd == null) st.setNull(3,Types.NUMERIC);
    else st.setBigDecimal(3,serialColCd);
    if (maxRows == null) st.setNull(4,Types.NUMERIC);
    else st.setBigDecimal(4,maxRows);
    if (totalRows == null) st.setNull(5,Types.NUMERIC);
    else st.setBigDecimal(5,totalRows);
    if (messageCd == null) st.setNull(6,Types.CHAR);
    else st.setString(6,messageCd);
    st.execute();
    ResultSet rs = ((OracleCallableStatement)st).getCursor(1);
    * Make this result set use the fetch size from our View Object settings
    rs.setFetchSize(getFetchSize());
    return rs ;
    catch (SQLException s) {
    throw new JboException(s);
    finally {try {st.close();} catch (SQLException s) {}}
    * Store a new result set in the query-collection-private user-data context
    private void storeNewResultSet(Object qc, ResultSet rs) {
    ResultSet existingRs = getResultSet(qc);
    // If this query collection is getting reused, close out any previous rowset
    if (existingRs != null) {
    try {existingRs.close();} catch (SQLException s) {}
    setUserDataForCollection(qc,rs);
    hasNextForCollection(qc); // Prime the pump with the first row.
    * Retrieve the result set wrapper from the query-collection user-data
    private ResultSet getResultSet(Object qc) {
    return (ResultSet)getUserDataForCollection(qc);
    * Return either null or a new oracle.jbo.domain.Number
    private static oracle.jbo.domain.Number nullOrNewNumber(BigDecimal b) {
    try {
    return b != null ? new oracle.jbo.domain.Number(b) : null;
    catch (SQLException s) { }
    return null;
    I created the view object in expert mode so there is no entity object. Can someone help? I don't have much time left to finish this.
    Also, could I have done this from the Entity object instead of the view object by registering the ref cursor OUT parameter in handleStoredProcInsert()?
    Thanks
    Natalie

    I was able to get the input parameter by putting the following in my struts actions class
    vo.setWhereClauseParam(0,request.getParameter("row0_SerialNum"));
    The full code is:
    package mypackage2;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import oracle.jbo.html.BC4JContext;
    import oracle.jbo.ViewObject;
    import oracle.jbo.html.struts11.BC4JUtils;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class LienCheckView1QueryAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    BC4JContext context = BC4JContext.getContext(request);
    // Retrieve the view object instance to work with by name
    ViewObject vo = context.getApplicationModule().findViewObject("LienCheckView1");
    vo.setRangeSize(3);
    vo.setIterMode(ViewObject.ITER_MODE_LAST_PAGE_PARTIAL);
    // Do any additional VO setup here (e.g. setting bind parameter values)
    vo.setWhereClauseParam(0,request.getParameter("row0_SerialNum"));
    // default value for serialCollCd 1 is for Motor Vehicles
    vo.setWhereClauseParam(1,new oracle.jbo.domain.Number(1));
    // Default value for maxRows_allowed
    vo.setWhereClauseParam(2,new oracle.jbo.domain.Number(20));
    return BC4JUtils.getForwardFromContext(context, mapping);
    This doesn't always work properly though. The first time I press the query button, the SerialNum parameter is still null, however if I re-execute the query by pressing the query button again. It will work, and return the rows. I always have to query twice. Also the SerialNum attribute is set to a String in my view object, it is a varchar column in the database, but some serial number I enter give a "Error Message: oracle.jbo.domain.Number ". This happens even though the underlying BC4J is returning values for the query. I also get a "500 Internal Server Error java.lang.ClassCastException: java.lang.String on my View object's code at line 65 which is
    if (params.length>1) serialCollCdIn = (BigDecimal)params[1];
    This is an input paramter to the oracle stored procedure that defaults to a Number value of 1.
    Any idea what the problem is? Here is the full code for my view object:
    package mypackage1;
    import java.math.BigDecimal;
    import java.sql.CallableStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Timestamp;
    import java.sql.Types;
    import oracle.jbo.JboException;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.DBTransaction;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    // --- File generated by Oracle Business Components for Java.
    public class LienCheckViewImpl extends ViewObjectImpl
    * This is the PLSQL block that we will execute to retrieve the REF CURSOR
    private static final String SQL =
    "begin pprs_test_wrappers.sn_srch_main_test(?, ?, ?, ?, ?, ?);end;";
    private BigDecimal totalRows = null;
    private String messageCd = null;
    private BigDecimal serialColCd = null;
    private BigDecimal maxRows = null;
    public LienCheckViewImpl() {}
    * Overridden framework method.
    * Executed when the framework needs to issue the database query for
    * the query collection based on this view object. One view object
    * can produce many related result sets, each potentially the result
    * of different bind variable values. If the rowset in query is involved
    * in a framework-coordinated master/detail viewlink, then the params array
    * will contain one or more framework-supplied bind parameters. If there
    * are any user-supplied bind parameter values, they will *PRECEED* the
    * framework-supplied bind variable values in the params array, and the
    * number of user parameters will be indicated by the value of the
    * numUserParams argument.
    protected void executeQueryForCollection(Object qc,Object[] params,int numUserParams) {
    * If there are where-clause params (for example due to a view link)
    * they will be in the 'params' array.
    * We assume that if some parameter is present, that it is a Deptno
    * value to pass as an argument to the stored procedure.
    * NOTE: Due to Bug#2828248 I have to cast to BigDecimal for now,
    * ---- but this parameter value should be oracle.jbo.domain.Number type.
    String serialNumIn = null;
    BigDecimal serialCollCdIn = null;
    BigDecimal maxRowsAllowed = null;
    BigDecimal totalRowsSelected = null;
    String messageCdOut = null;
    if (params != null) {
    if (params.length>0) serialNumIn = (String)params[0];
    if (params.length>1) serialCollCdIn = (BigDecimal)params[1];
    if (params.length>2) maxRowsAllowed = (BigDecimal)params[2];
    storeNewResultSet(qc,retrieveRefCursor(qc,serialNumIn,
    serialCollCdIn,
    maxRowsAllowed));
    super.executeQueryForCollection(qc, params, numUserParams);
    * Overridden framework method.
    * Wipe out all traces of a built-in query for this VO
    protected void create() {
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    * Overridden framework method.
    * The role of this method is to "fetch", populate, and return a single row
    * from the datasource by calling createNewRowForCollection() and populating
    * its attributes using populateAttributeForRow().
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs) {
    * We ignore the JDBC ResultSet passed by the framework (null anyway) and
    * use the resultset that we've stored in the query-collection-private
    * user data storage
    rs = getResultSet(qc);
    * Create a new row to populate
    ViewRowImpl r = createNewRowForCollection(qc);
    try {
    * Populate new row by attribute slot number for current row in Result Set
    //AddedByRegisNum
    populateAttributeForRow(r,0, nullOrNewNumber(rs.getBigDecimal(1)));
    System.out.println("AddedByRegisNum :" + rs.getBigDecimal(1));
    // OrigRegisNum
    populateAttributeForRow(r,1, nullOrNewNumber(rs.getBigDecimal(2)));
    System.out.println("OrigRegisNum :" + rs.getBigDecimal(2));
    // SerialNum
    populateAttributeForRow(r,2, rs.getString(3));
    System.out.println("SerialNum :" + rs.getString(3));
    // SerialNumDesc
    populateAttributeForRow(r,3, rs.getString(4));
    System.out.println("SerialNumDesc :" + rs.getString(4));
    // FlagExactMatch
    populateAttributeForRow(r,4, rs.getString(5));
    System.out.println("FlagExactMatch :" + rs.getString(5));
    // MessageCd
    populateAttributeForRow(r,5, messageCd);
    // TotalRows
    populateAttributeForRow(r,6, totalRows);
    catch (SQLException s) {
    throw new JboException(s);
    return r;
    * Overridden framework method.
    * Return true if the datasource has at least one more record to fetch.
    protected boolean hasNextForCollection(Object qc) {
    ResultSet rs = getResultSet(qc);
    boolean nextOne = false;
    try {
    nextOne = rs.next();
    * When were at the end of the result set, mark the query collection
    * as "FetchComplete".
    if (!nextOne) {
    setFetchCompleteForCollection(qc, true);
    * Close the result set, we're done with it
    rs.close();
    catch (SQLException s) {
    throw new JboException(s);
    return nextOne;
    * Overridden framework method.
    * The framework gives us a chance to clean up any resources related
    * to the datasource when a query collection is done being used.
    protected void releaseUserDataForCollection(Object qc, Object rs) {
    * Ignore the ResultSet passed in since we've created our own.
    * Fetch the ResultSet from the User-Data context instead
    ResultSet userDataRS = getResultSet(qc);
    if (userDataRS != null) {
    try {
    userDataRS.close();
    catch (SQLException s) {
    /* Ignore */
    super.releaseUserDataForCollection(qc, rs);
    * Overridden framework method
    * Return the number of rows that would be returned by executing
    * the query implied by the datasource. This gives the developer a
    * chance to perform a fast count of the rows that would be retrieved
    * if all rows were fetched from the database. In the default implementation
    * the framework will perform a SELECT COUNT(*) FROM (...) wrapper query
    * to let the database return the count. This count might only be an estimate
    * depending on how resource-intensive it would be to actually count the rows.
    public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
    Object[] params = viewRowSet.getParameters(true);
    String serialNumIn = (String)params[0];
    BigDecimal serialCollCdIn = (BigDecimal)params[1];
    BigDecimal maxRowsAllowed = (BigDecimal)params[2];
    CallableStatement st = null;
    try {
    st = getDBTransaction().createCallableStatement(SQL,DBTransaction.DEFAULT);
    * Register the fourth bind parameter as our return value of type NUMERIC
    st.registerOutParameter(4,Types.NUMERIC);
    * Set the value of the 3 bind variables to pass as arguments
    if (serialNumIn == null) st.setNull(1, Types.CHAR);
    else st.setString(1,serialNumIn);
    if (serialCollCdIn == null) st.setNull(2,Types.NUMERIC);
    else st.setBigDecimal(2,serialCollCdIn);
    if (maxRowsAllowed == null) st.setNull(3, Types.NUMERIC);
    else st.setBigDecimal(3, maxRowsAllowed);
    st.execute();
    System.out.println("returning value of :" + st.getLong(4));
    return st.getLong(4);
    catch (SQLException s) {
    throw new JboException(s);
    finally {try {st.close();} catch (SQLException s) {}}
    * Return a JDBC ResultSet representing the REF CURSOR return
    * value from our stored package function.
    private ResultSet retrieveRefCursor(Object qc,
    String serialNum,
    BigDecimal serialColCd,
    BigDecimal maxRows) {
    CallableStatement st = null;
    try {
    st = getDBTransaction().createCallableStatement(SQL,DBTransaction.DEFAULT);
    * Set the value of the bind variables
    System.out.println("SerialNumIn :" + serialNum);
    if (serialNum == null) st.setNull(1,Types.CHAR);
    else st.setString(1,serialNum);
    if (serialColCd == null) st.setNull(2,Types.NUMERIC);
    else st.setBigDecimal(2,serialColCd);
    if (maxRows == null) st.setNull(3,Types.NUMERIC);
    else st.setBigDecimal(3,maxRows);
    st.registerOutParameter(1, Types.CHAR); // serialNum
    st.registerOutParameter(2, Types.NUMERIC); // serialColCd
    st.registerOutParameter(3, Types.NUMERIC); // maxRows
    st.registerOutParameter(4, Types.NUMERIC); // totalRows
    st.registerOutParameter(5, Types.CHAR); // messageCd
    * Register the 6th bind parameter as our return value of type CURSOR
    st.registerOutParameter(6,OracleTypes.CURSOR);
    st.execute();
    ResultSet rs = ((OracleCallableStatement)st).getCursor(6);
    serialColCd = st.getBigDecimal(2);
    System.out.println("SerialColCd= " + serialColCd);
    maxRows = st.getBigDecimal(3);
    System.out.println("maxRows= " + maxRows);
    totalRows = st.getBigDecimal(4);
    System.out.println("totalRows= " + totalRows);
    messageCd = st.getString(5);
    System.out.println("messageCd= " + messageCd);
    * Make this result set use the fetch size from our View Object settings
    rs.setFetchSize(getFetchSize());
    return rs ;
    catch (SQLException s) {
    throw new JboException(s);
    finally {try {st.close();} catch (SQLException s) {}}
    * Store a new result set in the query-collection-private user-data context
    private void storeNewResultSet(Object qc, ResultSet rs) {
    ResultSet existingRs = getResultSet(qc);
    // If this query collection is getting reused, close out any previous rowset
    if (existingRs != null) {
    try {existingRs.close();} catch (SQLException s) {}
    setUserDataForCollection(qc,rs);
    hasNextForCollection(qc); // Prime the pump with the first row.
    * Retrieve the result set wrapper from the query-collection user-data
    private ResultSet getResultSet(Object qc) {
    return (ResultSet)getUserDataForCollection(qc);
    * Return either null or a new oracle.jbo.domain.Number
    private static oracle.jbo.domain.Number nullOrNewNumber(BigDecimal b) {
    try {
    return b != null ? new oracle.jbo.domain.Number(b) : null;
    catch (SQLException s) { }
    return null;
    Natalie

  • New iPhone user needs guidance setting up 4 iPhones for family - best approach?

    Hi - I'm a new iPhone user tasked with setting up 4 iPhones for family (three 4S, one 3GS). I set up the first 4S using my mother's existing Apple ID (she has an iPad) and I think (hope) hers is fine. When I set up my father's phone, my sister said to enter my mother's Apple ID during setup since they wanted to use a single Apple ID for iTunes purchases. The setup screen I'm referring to the 7th screen into the setup process for a new iPhone 4S (after the Welcome, Language, Country/Region, Location Services, Wi-Fi Networks, and Set Up iPhone screens), where it asks you to "Sign In with an Apple ID" or "Create a Free Apple ID". This screen was where I entered my mother's Apple ID into my father's phone.
    By entering my mother's Apple ID on my father's phone at this point during setup, I seem to have created a "clone" of her phone - their phone numbers are distinct and they can call each other but iMessages sent to either of them initially appeared on BOTH phones. I think I have now fixed that by creating a separate Apple ID for my father after the fact and entering it under Settings>Messages. Thinking I could also enter his new Apple ID under Settings>iCloud, I found I could not change it from my mother's Apple ID (it's greyed out). I saw a recommendation in another post to click on the red "Delete Account" button at the bottom, but will that delete my mother's entire account or only its association with my father's phone?
    Backing up a step or two, I'm worried that at this point I should have entered/created a new Apple ID on screen #7 during initial setup of my father's phone (instead of entering my mother's Apple ID), and that just changing settings in iMessage, iCloud, etc. won't really fix any problem(s) I've created. I hesitate to set up the other two phones before knowing how badly I've already messed things up with this one.
    During the initial set up of my father's iPhone, should I have created/entered his own unique Apple ID on screen #7 instead of entering my mother's Apple ID? (and then on his phone AFTER setup was complete, changing to my mother's Apple ID under Settings>Store so that all purchases are shared)?
    If yes, do I need to restore his phone to factory settings and set it up as a new phone so his phone behaves like his and not a clone of hers?
    Without knowing what might be the best way to set up these 4 new iPhones, I was thinking the four unique users of these new phones would most likely want to share apps (by purchasing them with one Apple ID), backup/synch to one computer, but maintain separate iCloud accounts so everyone's info is private? I've spent time reading other posts and see so many different recommendations for families with multiple devices that my head is spinning. Many include questions from folks migrating from older phones or MobileMe. I think my situation is simpler in that there are 4 new iphones and one existing Apple ID. Have I missed some comprehensive post that clarifies the best way to set things up for families new to iPhones, or do needs vary so much that no single best way exists? Given my situation (and depending on which way I should proceed regarding having set up my father's phone with my mother's Apple ID), should I create/enter a separate Apple ID for each new phone user during initial setup so each phone is distinct from the others, and AFTER setup is complete, changing the iTunes and Store info to the shared Apple Id for purchases? Or can I customize each individual phone after the fact in Settings>Whatever so that even if I've entered the same Apple ID on Screen #7 during initial new phone setup, the 4 phones will ultimately be set up correctly?
    So sorry to have to ask such basic questions. Many thanks, in advance, for any guidance provided to help me not make any (more?) mistakes during setup that will be a real headache to remedy later, once everyone has started using their phones.

    Hi edgefield,sorry you're having so much trouble.
    FIRST CREATE A BACKUP ON YOUR COMPUTER -ALWAYS BEFORE PLAYING WITH THE INFORMATION ON THE PHONES (it prevents losses)
    Now I'll answer your questions)
    During the initial set up of my father's iPhone, should I have created/entered his own unique Apple ID on screen #7 instead of entering my mother's Apple ID? (and then on his phone AFTER setup was complete, changing to my mother's Apple ID under Settings>Store so that all purchases are shared)?
    Yes.  Create his own apple id and sign him in.  then tap settings ->store -> tap on the account name -> sign out.
    Then sign in your fathers apple id.  (create your fathers apple id on the computer, its much easier, trust me).
    If yes, do I need to restore his phone to factory settings and set it up as a new phone so his phone behaves like his and not a clone of hers?##
    No.  Tap settings -> icloud, and turn everything off (keep on the phone option).  Then DELETE ACCOUNT (it's got red around it and at the bottom of the screen if you scroll down).  You cannot sign out of iCloud, you can only delete the account.  Then clean up the contacts and information on the phone. 
    Then you tap settings -> iCloud and sign in.  Put your fathers apple id in the section.  His information will be uploaded to www.icloud.com.  Then go to www.icloud.com and sign in with his apple id.  Make sure his information is uploaded (you'll have to select timezone and such). 
    From that point you are fine except for iMessage.
    For iMessage to function properly, only one apple id can be signed into the iTunes store (settings -> store).  If they are both signed into the same apple id on the iTunes store, than you need to turn off iMessage on one of the phones.  The iMessage may be delievered to either phone when both are signed in under the same apple id in the iTunes store.
    tap settings -> messages -> imessage off 
    This also disables facetime.  If you want them to have iMessage and Facetime, they have to have seperate apple id's signed into the iTunes store.
    Have I missed some comprehensive post that clarifies the best way to set things up for families new to iPhones, or do needs vary so much that no single best way exists?
    Not that I've seen, will consider creating one if I have time.
    Given my situation (and depending on which way I should proceed regarding having set up my father's phone with my mother's Apple ID), should I create/enter a separate Apple ID for each new phone user during initial setup so each phone is distinct from the others, and AFTER setup is complete, changing the iTunes and Store info to the shared Apple Id for purchases?
    Your best bet is to create each apple id on the computer (keyboards are easier to use) and then sign them each in during the creation process.  Then change the iTunes store info to the stored apple id.
    This will allow each person to serpate iClouds without interfering with each others Cloud as you set up new devices.
    Or can I customize each individual phone after the fact in Settings>Whatever so that even if I've entered the same Apple ID on Screen #7 during initial new phone setup, the 4 phones will ultimately be set up correctly?
    Doing it this way can cause problems (or used to, not sure if it still does), initially, when you set it up, it wants to create a backup or upload the blank info to iCloud.  You are better off setting up their own apple id first and signing in with that, and then changing it in the iTunes store.
    I'm off to bed, I'll check this thread tomorrow and see if you have any more questions/problems.  Remember, always create a back-up before you do anything.

  • Newbie needs help with MS exchange / MS Push email

    I just got an iPhone 3G a few days ago. Heretofore, all my experience has been with HTC, Motorola and Blackberry phones. As a non-technical person trying to make Pust work through my network is very confusing.
    I read the instructions / bulletins and finally made email and calendar work (sort of). It only works on WiFi and then I have to manually update mail as it does not always Push.
    Does the iPhone Push setup only work with Server 2003 / Push via WiFi? If not, can anyone give me step by step instructions on how to make it work with 3G and no WiFi?
    If possible, please be specific as I am a newbie trying to make this work for my small company.
    If I can't find a solution I'll have to get rid of this and go back to something that works.
    It seems that Apple is making it very difficult to set this phone up for Push application
    Thanks,
    Gary

    The iPhone works fine over cellular. You did mention a certificate - I am going to guess that this may be the issue.
    If you open Safari on the iPhone and connect to your OWA, do you get a warning? When you viewed the cert in IE, is it self-signed? If so you need to get it on the iPhone. The easiest way is to set up gmail or something similar on iPhone and email it to yourself.
    when it come in email your iPhone will immediately recognize it as a file that you can import it. Select it and import it, then you should be able to connect to your Outside Exchange server.

Maybe you are looking for

  • Can I use home sharing if the other computer is off?

    I have a Mac Book Pro and my husband has Dell Desk Top PC...can he use home sharing to hear my music if my Mac is not on? Also can he permanently put my library on his computer using home sharing?

  • Cannot install or uninstall Apple Mobile Device Support

    Trying to help a friend whose original problem was she was unable to connect her ipod. When I checked devices I found it was using the microsoft USB driver. I was unable to persuade it to use the apple driver so resorted to uninstall everything as pe

  • Java App won't start on 10.5

    I have a MacMini 2,1 runing MacOS 10.5.8 installed is Java 10-1.5 update 10 which tests well with Jave Test apps downloaded from web. I've downloaded a Java application from the web called ProjectLibre which refuses to run, the supplier of this appli

  • ADF Tutorial, missing file

    I'm learning about ADF by doing the ADF tutorial step by step ( http://www.oracle.com/technology/obe/ADF_tutorial_1013/ADF_tutorial.pdf ). In chapter 2-15, I need a file called CreateInterface.txt. I need it to comlete the code for SRPublicFacadeLoca

  • Can't access my widgets on 10.9.4 - what to do?

    can't access my widgets on 10.9.4 - what to do?