OFA: how to insert values from the front end of the OPS to the database page

Hi friends, I am new OAF, iam using jdeveloper version 9.0.3.5

I created a QueryPG .in this page I HAV set a "create" button on this page when I click that "create" button must navigate to another page (ie) createPersonPG, I have hepatitis has created this createPersonPG in a RegionStyle of = > defaultsinglecolumn, with some of my attribute as "personId, phoneno, e-mail, address" in my createPersonPG I hav also set a button titled "save"...»»» " After you enter the data when I click on save button means a new line should be added to my database table that was my task... for which I wrote the code in my MainCO

Successful work means:
--------------------------------------
I can able to query the data from the database
From my QyeryPG, I can access createPersonPG

MY PROBLEM
-------------------
When I enter values in the createPersonPG wen I click on "Save" button means that the data that I enter are not save to database, but in my QueryPG I get confirmation that saved successfully in my QueryPG. " I want data to be saved in the database... when I get select * from table_name average, should be a rank more

can anyone help me with this task please I'll be greateful to you.. _ I was doing this job for more than 20 days Please helpme I complete this task

Thank you
Thilib

my code for in MainCO

in LICS I HAV written query command and navigate to the code "createPersonPG" like this:

' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
{
super.processFormRequest (pageContext, webBean);
String actionInMainProgramScreen = pageContext.getParameter (EVENT_PARAM);
String personId = pageContext.getParameter ("PersonId");
If (pageContext.getParameter ("GO")! = null)
{
System.out.println ("Submit button");
OAQueryUtils.checkSelectiveSearchCriteria (pageContext, webBean);
String firstName = pageContext.getParameter ("FirstName");
String phoneNO = pageContext.getParameter ("PhoneNO");
[Serializable] parameters = {personId, firstName, phoneNO};
System.out.println ("AM method is called");
OAApplicationModule am = pageContext.getApplicationModule (webBean);
am.invokeMethod ("initQuery", parameters);
}


If (actionInMainProgramScreen.equals ("Create"))
{
System.out.println ("create key");
() pageContext.setForwardURL
'OA.jsp?page=/gwp/oracle/apps/xxi/aaaPersonDetails/webui/createPersonPG '.
null
OAWebBeanConstants.KEEP_MENU_CONTEXT
null
null
true
OAWebBeanConstants.ADD_BREAD_CRUMB_YES
OAWebBeanConstants.IGNORE_MESSAGES);
}
}------------------------------------------------------------------------------
IN MY createPersonCO I HAV wrote this code

' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
{
super.processRequest (pageContext, webBean);
String paramPersonAction = pageContext.getParameter ("xxParamActionOnPerson");
OAApplicationModule am = pageContext.getApplicationModule (webBean);
PersonParamList serializable [] = {paramPersonAction};

If (paramPersonAction! = null & & paramPersonAction.equals ("Create"))
{
am.invokeMethod ("createPerson");
}
}

/**
* How to manage remittances form for form elements in
* a region.
@param pageContext OA page context
@param webBean the grain of web for the region
*/

' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
{
super.processFormRequest (pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule (webBean);

If (pageContext.getParameter ('Save')! = null)
{
System.out.println ("first line button Save");
am.invokeMethod ("saveProgramToDatabase");
System.out.println ("navigate to home page');
String message = "saved successfully ';
OAException exp = new OAException (message, OAException.CONFIRMATION);
pageContext.putDialogMessage (exp);
() pageContext.forwardImmediately
'OA.jsp?page=/gwp/oracle/apps/xxi/aaaPersonDetails/webui/aaaPersonDetailsMainPG '.
null
OAWebBeanConstants.KEEP_MENU_CONTEXT
null
null
true
ADD_BREAD_CRUMB_YES);
}
}-------------------------------------------------------
IN my AM I wrote this code

' public void initQuery (String personId, String firstName, String phoneNo)
{
System.out.println ("Am initQuery");
aaaPersonDetailsVOImpl vo = (aaaPersonDetailsVOImpl) getaaaPersonDetailsVO1 ();
System.out.println ("aaaPersonDetailsVO initQuery method called");
vo.initQuery (personId, firstName, phoneNo);
}

Public Sub createPerson()
{
System.out.println ("first createPersonMethod line");
aaaPersonDetailsVOImpl vo = (aaaPersonDetailsVOImpl) getaaaPersonDetailsVO1 ();
System.out.println ("Line before if condition createPersonMethod");
If (!) VO.isPreparedForExecution ())
{
System.out.println ("first line If condition createPersonMethod");
vo.setMaxFetchSize (0);
}
System.out.println ("creating New Row");
Line r = vo.createRow ();
System.out.println ("new insertion line");
vo.insertRow (r);
System.out.println ("inserted row");
r.setNewRowState (r.STATUS_INITIALIZED);
System.out.println ("before"sequence initialized");
Number personId = this.getOADBTransaction () .getSequenceValue "(XXI. PER_DETAIL");
System.out.println ("after"sequence initialized");
vo.getCurrentRow () .setAttribute ("Person_Id", personId);
System.out.println ("sequence number =" + personId);
System.out.println ("last line of the Create method");
}

Public Sub saveProgramToDatabase()
{

System.out.println ("before validation.");
getOADBTransaction () .commit ();
System.out.println ("new program created.");
}

Published by: user13307444 on July 26, 2010 10:20

Hello

This could be the problem if there is that data validation is there that does not back up the data on the page. Because for example I had this problem when my database column has been primary key while on the EO page it wasn't. & When I tried to record data EO was allowing me to record, but the database did not allow. Please check your OA

AJ

Tags: Oracle Applications

Similar Questions

  • How to insert data into the database using smartview

    Hello
    I am trying to insert data into the database using * "Send data" * button on the Ribbon of Essbase.
    My database is empty.

    I opened an ad hoc network, it returns * "#missing" * in all cells
    I have modified the cells and provided data in the cells that I want to. Now, I supported on * "Send data" * button.
    It just reloaded the adhoc grid instead of submit data, I rechecked the data through data console Administrative Service are not inserted.

    I am following the right way to insert data? If not, could you please suggest me how (Populate) insert default data in the database?

    --
    VINET

    You go about it the right way, once you have submitted if you réactualisiez then data values should be there, if you POV is against members of dynamic calc and then data not written to the database, you need to check the Member properties of your POV.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to remove movies from the summary page

    With the help of iTunes version 12.4.  Can anyone help in my attempts to remove movies at home summary page in iTunes?  I was able to remove movies from my iPhone and iPad and unchecked on the summary in the movies tab page.  However, films controlled and deleted still appear in the section summary of movies.  Cannot find a delete any action to remove unwanted movies.  This has to do with the deletion in iTunes itself on a Windows version 10.

    Steve

    FOUND THE ANSWER!  From a previous post-, I had the same problem. You cannot remove them from the summary page. Cannot you.

    In the app iTunes on Mac or PC, without your phone, from the drop-down menu at the top left - select movies and then click on, select, Home Videos. In the next screen, select the home theater and right click. This will allow you to remove. Once you reconnect your phone and sync, the cinema will be gone from your Summary Page!

    Steve

  • How to download files from the database file system.

    Hello everyone.

    I m trying to do a procedure to download a PDF file that is stored in the file system of the server of the database and not inside the database. The established procedure is the following:


    create or replace
    PROCEDURE PRT_PR_DOWNLOAD_FICH (v_file_name VARCHAR2
    )

    AS

    V_LENGTH number;
    Lob_loc Bfile;

    BEGIN


    Lob_loc: = bfilename ('DIR_OBJ', v_file_name);
    V_LENGTH: = dbms_lob.getlength (Lob_loc);

    owa_util.mime_header ("application/octet ', False");
    HTP.p ("Content-length: ' |") v_length);
    HTP.p ('Content-Disposition: attachment; filename = "" | ") SUBSTR (v_file_name, INSTR (v_file_name, ' /') + 1) | '"');
    owa_util.http_header_close;
    wpg_docload.download_file (Lob_loc);


    END PRT_PR_DOWNLOAD_FICH;


    This procedure receive the name of the file to download and use the wpg_docload.download_file () function. The DIR_OBJ is a directory with path from the server to the folder that contains the files I want to download.

    When I run this procedure I get the error: "Internal Server Error".

    Can someone tell me what I am doing wrong and if it is the best way to download a file directly from the database server file system?

    Hello Pedro,

    Just out of curiosity, I tried your example ;-) It works very well in my environment! (Oracle 10g with OSH and Apex 3.1.2
    But: I had to grant READ permissions on my directory object to APEX_PUBLIC_USER!

    (1) I created a "test.txt" document in the directory corresponding with my EXPDIR directory object. 'Oracle' user needs read on the file & document permissions!

    (2) give APEX_PUBLIC_USER necessary READ rights on the directory object:

    grant read on the directory expdir to apex_public_user;

    (3) create the procedure:

    CREATE OR REPLACE PROCEDURE MATTHIASH. PRT_PR_DOWNLOAD_FICH (v_file_name VARCHAR2)
    AS
    V_LENGTH number;
    Lob_loc Bfile;
    BEGIN
    Lob_loc: = bfilename ('EXPDIR', v_file_name);
    V_LENGTH: = dbms_lob.getlength (Lob_loc);

    owa_util.mime_header ("application/octet ', False");
    HTP.p ("Content-length: ' |") v_length);
    HTP.p ('Content-Disposition: attachment; filename = "" | ") SUBSTR (v_file_name, INSTR (v_file_name, ' /') + 1) | '"');
    owa_util.http_header_close;
    wpg_docload.download_file (Lob_loc);

    EXCEPTION
    WHILE OTHERS THEN
    HTP.p (substr (dbms_utility.format_error_stack (): dbms_utility.format_error_backtrace (), 1, 4000));
    END PRT_PR_DOWNLOAD_FICH;
    /

    (4) Grant execute rights on APEX_PUBLIC_USER of this procedure:

    GRANT EXECUTE ON MATTHIASH. PRT_PR_DOWNLOAD_FICH TO APEX_PUBLIC_USER;

    (5) Finally, try if download document works well:

    http://: 7777, pls, apex, MATTHIASH. PRT_PR_DOWNLOAD_FICH? v_file_name = test.txt

    I would like to know if it works!

    HTH
    Matthias

  • in PHP how pass a value from the recordset object via a url

    I have a blog set up with PHP/MySQL with two tables (1 table for blog entry) and 1 table for comments on the blog
    I can view the blog and the comment with a LEFT JOIN recordset like this-
    SELECT golf_blog.blog_ID, DATE_FORMAT (golf_blog.blog_created, "%%b, %Y ') AS blog_created, golf_blog.blog_author, golf_blog.blog_subject, golf_blog.blog_article, blog_comments.comment_article
    FROM golf_blog LEFT JOIN blog_comments using (blog_ID)
    ORDER BY golf_blog.blog_created ASC

    I have a link in the this object recordset repeat region goes to a page containing the comment drag.
    blog_ID is the primary key of the table blog and blog_ID is the index in the array of comment.

    How do you pass the blog_ID of the recordset on a text field in the form of comments via the link insertion?
    Or am even thinking about it in the right way?

    I figured it out and got it to do work in passing the blog_ID as a variable on the URL of the comment form page

    the link looks like this
    ">Comment

    and on the comment page used this code

    $blog_ID = $_GET [$blog_ID]? >

    and the Insert field value is

    I guess that reading David Powers begins to bear fruit. Eureka!

  • How to return values from the record following instead of in the same record in LOV

    Hi all

    I use Forms 10 G.

    I have a block of details. In what in the 3rd column, I have a LOV.

    My requirement is let say I asked for it from the 1st and 2nd column, and it shows 1 record.

    After that if I pressed F9, then it should display the LOV list and, when I select a value any then it will create a new record with the same value of 1st and 2nd column.

    Example: -.

    Agenda provider country
    123ABCIndia

    We here in the column 'Country' LOV. Then when I pressed F9 then Lov should be displayed.

    as below.

    List of countries
    India
    U.S..
    Japan

    It works very well so far.

    Now if I select from the USA in the list then it should create a new record with the values of 1st and 2nd column.

    Agenda provider country
    123ABCIndia
    123ABCJapan

    How can I do this?

    Besically I need, rather than return the value in the same record, he must return to the next with the exsiting values record.

    The algorithm is:

    -use the KEY-LISTVAL about to 'COUNTRIES '.

    -LOV execution using builtin show_lov

    -store the return value Lov any parameter or a local variable in your trigger code ( vL_dummy_Deger varchar2 (100); )

    -Create registration

    -assign value to any new item you want to

    code like this:

    declare

    vLDummy boolean;

    vL_dummy_Deger varchar2 (100);

    Start

    -lov runs lov ruturns value is assigned to all the dummy elements to store Lov, return value. (no need to display)

    "-" DUMMY "point lets store lov, return value.

    vLDummy: = show_lov ('LOV_ULKE');

    --

    vL_dummy_Deger: =: model;

    create_record;

    : new_item: = vL_dummy_Deger;

    end;

  • How to insert images from the external file in the block of text using AppleScript

    the value myFile to null

    say application 'Finder '.

    the value ArtFolder to choose a folder with guest "Select the folder of Art: - > >".

    the value Chap1 to (get 1 folder from the folder ArtFolder)

    the value myFile to (Download file 1 to file (chap1 as alias))

    end say

    say application "Adobe InDesign CS5.5.

    set myDoc for the active document

    say myDoc

    set figureNode to XML element 1 of XML element 2 of XML element 1 of myDoc

    the value myFrame to do text block with properties {the geometric limits: {-13, 13, 3, -3}}

    tell text frame myFrame place (file (myFile))

    markup myFrame with figureNode

      end say

    end say


    ==========================================

    Condition: I want to Insert a picture of external & case content currently in the text frame... document node

    I am using above code but belowe the line does not...

    : - tell text frame myFrame place (file (myFile))

    Can someone help me please...

    Thank you

    Problem solved by code below :===>>

    say application "Adobe InDesign CS5.5.

    set myDoc to the active document

    myDoc say

    set figureNode to 1 to 2 to 1 of myDoc XML element XML element XML element

    set ArtFrame on to do text block with properties {geometric limits: {-13, 13, 3, -3}}-{y, w, h, x}

    Select ArtFrame

    Place (myArtFile as alias) on ArtFrame

    say fit myFrame given frame to content

    end say

    end say

  • How to insert data into the database of the fields that have already been assigned values?

    Hi all

    I'm sorry for the question, I'm still new to the OPS

    Here's the thing.

    I have 4 points messageTextInput in my page. each of these 4 field is associated with an attribute of the VO.

    3 of these items have their value already defined in the processRequest of the Commander, like this:

           
          OAMessageTextInputBean factureItem = (OAMessageTextInputBean)webBean.findChildRecursive("factureItem");
          factureItem.setValue(pageContext,pnumfacture);
    
           OAMessageTextInputBean actionItem = (OAMessageTextInputBean)webBean.findChildRecursive("actionItem");
           actionItem.setValue(pageContext,pidaction);
           
          Date sysDate = new Date(); 
           OAMessageDateFieldBean dateSystemItem = (OAMessageDateFieldBean)webBean.findChildRecursive("dateSystemItem"); 
             dateSystemItem.setValue(pageContext,sysDate);       
    

    The user must enter the value of the 4th field.

    I used the classic entry code for data as follows:

    in the AM, I added,

        public void insertRecord(){
        
        OAViewObject vo = getTraceVO1();
        OADBTransaction trans = getOADBTransaction();
        
            if (!vo.isPreparedForExecution()) 
              { 
                    vo.executeQuery(); 
              }
        
        TraceVORowImpl v_row;
        v_row = (TraceVORowImpl)vo.createRow();
        vo.insertRow(v_row);
       v_row.setNewRowState(v_row.STATUS_INITIALIZED);
      }
    public void apply()
       {
          getTransaction().commit();
        }
    

    In the processRequest of the Commander, I added:

          if (!pageContext.isFormSubmission())
            {        
             am.invokeMethod("insertRecord",null);       
            } 
    

    in the processFormRequest of the CO, I added:

          if(pageContext.getParameter("submitButtonItem")!=null){
                         
                am.invokeMethod("apply");
          throw new OAException("Trace Created successfuly",OAException.CONFIRMATION);
          }
    

    When I run my page, I get the error message saying that myVO not records, the records were removed or the view instance has been initialized incorrectly.

    Can someone please tell me what this means?

    Kind regards

    Afaf

    Afaf,.

    Please try to use the code below and see what happens:

    Replace the insertRecord in the AM method with this.

    Import oracle.jbo.domain.Number;

    public void insertRecord(String pnumfacture, String pidaction){ 
    
      System.out.println("been  in insert method");
      OAViewObject traceVO = getTraceVO1();
      OADBTransaction trans = getOADBTransaction(); 
    
      /*if (!traceVO.isPreparedForExecution())
      {
      traceVO.executeQuery();
      }
      */
      traceVO.setWhereClause(null);
      traceVO.setWhereClauseParams(null);
      traceVO.setWhereClause("1=2");
      traceVO.executeQuery();
    
      Number pidAction;
      try{
      pidAction = new Number(pidaction);
      }catch(Exception e) {}
    
      TraceVORowImpl traceVORow;
      traceVORow = (TraceVORowImpl)traceVO.createRow();
      traceVORow.setIdFacture(pnumfacture);
      traceVORow.setIdAction(pidAction);
      traceVORow.DateSysteme(this.getOADBTransaction().getCurrentDBDate());
      traceVO.insertRow(traceVORow);
      //traceVORow.setNewRowState(traceVORow.STATUS_INITIALIZED); 
    
      System.out.println("been  in insert method");
    } 
    

    Replace the processRequest of the second Commander by this:

    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    {
      System.out.println("first time in processForm of CO2");
      String pnumfacture = null;
      String pidaction = null; 
    
      super.processRequest(pageContext, webBean); 
    
      OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean); 
    
      if(pageContext.getParameter("pnumfacture")!=null)
      {
      pnumfacture = pageContext.getParameter("pnumfacture").toString();
      } 
    
      if(pageContext.getParameter("pidaction")!=null)
      {
      pidaction = pageContext.getParameter("pidaction").toString();
      } 
    
        System.out.println("been  in processRequest before assign variables of CO2"); 
    
      System.out.println("pnumfacture :" + pnumfacture);
      System.out.println("pidaction :" + pidaction);
    
    /*assign values to the 3 fields*/
          /*
       Date sysDate = new Date();
          OAMessageTextInputBean factureItem = (OAMessageTextInputBean)webBean.findChildRecursive("factureItem");
          factureItem.setValue(pageContext,pnumfacture); 
    
          System.out.println("been  in processRequest after assign variables of CO2"); 
    
           OAMessageTextInputBean actionItem = (OAMessageTextInputBean)webBean.findChildRecursive("actionItem");
           actionItem.setValue(pageContext,pidaction); 
    
           OAMessageDateFieldBean dateSystemItem = (OAMessageDateFieldBean)webBean.findChildRecursive("dateSystemItem");
           if(dateSystemItem != null)
           {
             dateSystemItem.setValue(pageContext,sysDate);
           }
           */
        Serializable parameters[] = {pnumfacture, pidaction};
        Class paramTypes[] = {String.class, String.class};
    
           am.invokeMethod("insertRecord",parameters, paramTypes);
           System.out.println("been  in processRequest of CO2 after invokeMethod"); 
    
      }
    

    Let us know what happens.

    You can get an error that I have just change this in Textpad and may have syntax errors. If you can't fix those apply here.

    See you soon

    AJ

  • How to insert text from the text file saved using the line number of the indesign document to point specific cursor?

    I use indesign for books of the brand. I need always insert quotes from some holy books. so I need to insert text using the verse number

    If you are looking for a way to automate where to insert the text? I really don't understand what you're trying to do.

  • Error inserting value into the database

    Hi am error when inserting value by clciking the button

    will have this error ORA-01722: invalid number

    got my trigger when button pressed

    IF: SYSTEM. FORM_STATUS = "MODIFIED" THEN

    -Save the changes if necessary

    DO_KEY ('COMMIT_FORM');

    END IF;

    am fit 11 GR 2

    Hello TerryJones

    After the error, simply press CTRL + SHIFT + E keyboard, and you will see where the problem lies.

    Hope this helps

    Hamid

  • How to retrieve data from the database after the removal of the lines of the VO?

    Hello
    I use Jdeveloper 11.1.2.1.0
    I have a master's degree and a child.

    So according to my use case when a value in the master t changes the corresponding child should be removed.

    but when I change it to any other value I want to cancel the delete operation and retrieve values in children.

    Is it possible to do?


    Kind regards
    Nigel.

    Edited by: Nigel Thomas March 29, 2012 05:07

    Edited by: Nigel Thomas March 29, 2012 05:09

    Check [url http://mjabr.wordpress.com/2011/05/20/perform-deleteundo-delete-without-using-rollback/] recover deleted lines without using rollback

  • How to get information from the database server log?

    Oracle 9.2 UNIX
    We got an error block in the database of production last midnight for 40 minutes and nothing has been treated during this time which delayed our process by lots of night production. Then he disappeared after 40 min. I would like to know what was going on during this time in the database. My question is where can I find an error in the database server? In bdump? Appreciate any ideas.

    Thank you
    S.

    If you have jobs regularly collect statspack report, then it will be easier to troubleshoot. You can just pull the report of the time period.

    A couple of things you can check if there is a problem of storage during the time, as a backup or other work running took all storage OS, so Oracle hung because no space for archiving of newspapers. Usually it will record errors in the alert.log, but if bdump as complete destination, the error will not be recorded.
    Check the activity of the BONE during the time, which is CPU and IO activity. See if you have installed and configured sar
    Check the message of OS file.

  • How to remove audio from the Web page

    Here is my site: lenovermeats.com

    I want to remove the audio playing, how?

    using CS3

    Remove the bottom of the page in Code view of the following...

    images/front.mp3"type ="audio/mpeg">".

    images/front.ogg"type ="audio/ogg">".

    Looks like you are using at least some php on the site, so it is also a small php include on this page as.

  • Create null values in the database for interactive report link column values

    Hello

    I'm pretty new to APEX and tries to create an interactive report with the form. This report examines essentially for more information for a particular employee. If the employee has any information in the table, the report presents information with a button change beside him. If there is no record in the table for this employee, a create button appears. Now when you click create, a new creation page. This page contains the employee number as a single display field with the value from the previous page. This value is displayed in the page, but it is not in the database. Create the page has view-only number and a couple of other columns. The other columns get inserted into the table with an empty number!

    Can someone please? Looks like the page keeps the value zero for the number of the employee who came during the search of the interactive report. Hope I made myself clear, being the newbie hope I haven't used any incorrect terminology.

    Thank you!
    Robet

    Without the DB column, apex will not determine which DB column the data in this field are mapped to (it would be quite impossible to guess the destination since the name of the element column).

    If you want to assign to the previous element of the page, use the default section

    return: P1_EMP_NUM

    By default the value Type: body of the PLSQL function

    and configure the attributes of source as I said before

  • Procedure with the DML statements that insert values from 1 to 100 in only one table and it is matching word equivalent in the other

    Can someone help me create a procedure with the DML statements that insert values from 1 to 100 in a table "abc" and the procedure must connect the numbers into words in another table "xyz" without doing a commit explicitly. "."

    Currently on trial...

    SQL > create table abc (num number);

    Table created.

    SQL > create table xyz (num varchar2 (100));

    Table created.

    SQL > ed
    A written file afiedt.buf

    1. insert all
    2 values of 1 = 1 then in abc (num) (l)
    3 when the values of 1 = 1 then in xyz (num) (to_char (to_date(l,'j'), 'jsp'))
    4 * Select the level from dual connect by level<=>
    SQL > /.

    200 rows created.

    And the result...

    SQL > select * from abc;

    NUM
    ----------
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    ..
    ..
    ..
    98
    99
    100

    100 selected lines.

    SQL > select * from xyz;

    NUM
    ----------------------------------------------------------------------------------------------------
    one
    two
    three
    four
    five
    six
    seven
    eight
    nine
    ten
    Eleven
    twelve
    ..
    ..
    ..
    98
    Nineteen eighty
    Cent

    100 selected lines.

Maybe you are looking for