NullPointer Exception in the OFA page

Hello

Here's the code I used.

v_OnTheFlyViewObject.executeQuery ();
line oracle.jbo.Row = v_OnTheFlyViewObject.first ();

If (line! = null)
{
v_PONum = row.getAttribute (0) m:System.NET.SocketAddress.ToString ();
System.out.println ("CO - v_PONum-" + v_PONum);
v_POType = row.getAttribute (1) m:System.NET.SocketAddress.ToString ();
}


The code has been compiled and the v_PONum was displayed. But for education v_POType, OAF wrong page with the exception of pointer zero. Is the statement v_POType = row.getAttribute (1) m:System.NET.SocketAddress.ToString (); good. ?

The request was:

String v_OnTheFlyVOQuery = "sΘlectionner segment1 as PONum, attribute5 as POType from po_headers_all";

How to get the value in column 2 of the 1st row?

Thank you
HP
v_OnTheFlyViewObject.executeQuery();
v_OnTheFlyViewObject.reset(); //NEW
oracle.jbo.Row row = v_OnTheFlyViewObject.first();
if(row != null)
{
v_PONum = row.getAttribute(0).toString();
System.out.println("CO - v_PONum - " +v_PONum );
v_POType = row.getAttribute(1)+"";
}

The code has been compiled and the v_PONum was displayed. But for education v_POType, OAF wrong page with the exception of pointer zero. Is the statement v_POType = row.getAttribute (1) m:System.NET.SocketAddress.ToString (); good. ?

It is a region of table, if yes then you can capture by making a loop on the view to this field object attribute.

//Sample Code
OAViewObject vo1 = (OAViewObject)am.findViewObject("EmployeeEOVO1");
vo1.reset();
if (vo1 != null)
{
do
{
if(!vo1.hasNext())
break;
vo1.next();
EmployeeEOVORowImpl lcerl = (EmployeeEOVORowImpl)vo1.getCurrentRow();

//Get value of VO attribute here
v_PONum = lcerl.getAttribute(0)+"":

//How to get the 2nd column value from the 1st row?

v_POType = row.getAttribute(1)+"";

OR
v_POType = row.getAttribute("POType")+""; //VO Attribute attached with that column
}while(true);
}
}

See how loops through the View object to get its line
http://oracleanil.blogspot.com/2009/04/auto-invoice.html
http://oracleanil.blogspot.com/2010/09/OAF-passing-table-type-object-to-Oracle.html

If this POType is just one element on the page, not within the region of the Table then use can capture its value by:

String VPOtype = pageContext.getParameter("POType")+"";  //POType is the ID of the column created on page.

Thank you
-Anil
http://oracleanil.blogspot.com/

Tags: Oracle Applications

Similar Questions

  • Boxes (with the exception of the first page of comments) YouTube comments are insensitive/gray. Google have not responded to my request, can advise you please?

    Boxes (with the exception of the first page of comments) YouTube comments are insensitive/gray. Google have not responded to my request, can advise you please? Running Ff in "Safe Mode" makes no difference, or reload the page.
    The URL is just one example, the first series of observations, I can meet next & following I can't.

    Thanks for your help,
    Dick Holman
    [email protected]

    p.s. I can sometimes get the comment boxes to work if I allow third party cookies.

  • HTTPS Post does not work in the OFA Page

    Hi all

    I created a Page of the OFA, by clicking on button I do next.

    //--------------------------------------------------------
    private static String contactService(String xmlInputString) throws Exception {}
    String outputStr = null;
    OutputStream outputStream = null;
    try {}

    URL url = new URL ("https://wwwcie.ups.com/ups.app/xml/ShipConfirm");

    HttpURLConnection connection = () (HttpURLConnection) url.openConnection;
    System.out.println ("Customer connection established with" + url.toString ());
    Configure the HTTP POST parameters
    connection.setDoOutput (true);
    connection.setDoInput (true);
    connection.setUseCaches (false);

    outputStream = connection.getOutputStream ();
    outputStream.write (xmlInputString.getBytes ());
    outputStream.flush ();
    outputStream.close ();
    System.out.println ("Http status =" + connection.getResponseCode () + "" + connection.getResponseMessage ());

    outputStr = readURLConnection (connection);
    System.out.println ("Response..." + outputStr);
    } catch (Exception e) {}
    System.out.println ("error sending data to the server..." + e.getMessage ());
    throw e;
    } {Finally
    If (outputStream! = null) {}
    outputStream.close ();
    outputStream = null;
    }
    }
    Return outputStr;
    }

    //----------------------------------------------------
    public static String readURLConnection (URLConnection uc) throws Exception {}
    StringBuffer buffer = new StringBuffer();
    BufferedReader reader = null;
    try {}
    reader = new BufferedReader (new InputStreamReader (uc.getInputStream ()));
    Letter int = 0;
    reader.readLine ();
    While ((letter = reader.read ())! = - 1) {}
    Letter from buffer. Append ((Char));
    }
    Reader.Close ();
    } catch (Exception e) {}
    System.out.println ("could not read from URL:" + try ());
    throw e;
    } {Finally
    If (reader! = null) {}
    Reader.Close ();
    Reader = null;
    }
    }
    Return buffer.toString ();
    }

    Now, when I run this JDEVELOPER local it works fine, but when when depolyed on the server, then when I click the button then page gets hanged and it does nothing.
    Is there any setting I should do in APPS environment. or anyone had done the same. any help will be appreciated.

    Thank you
    Vijay chraibi

    Hello

    If your code works fine in JDev and it does not work on the instance, then you can trigger SR with Oracle for Ptoduct JDeveloper.

    Kind regards
    Out Sharma

  • Calls to procedures of database with IN/OUT params in the OFA Page

    Hello

    I have the following requirement, can anyone suggest as the best approach please.

    I have a contract with header page and the rows that will be stored in the custom tables.

    User needs features to copy, which will provide a copy of the current record with the new record (similar to copy the functionality of the simultaneous program).


    As soon as the user presses the copy function, it must call my backend pricedure copy_contract (p_old_contract_no in NUM
    p_new_contract_no OUT number
    p_ret_code OUT number
    p_err_msg OUT VARCHAR
    )

    Once it returns RETCODE contains 0, and p_err_msg is null, then I need open another page that displays p_new_contract_no.


    If one has done similar req. Please share the code.

    Thank you
    Mahesh

    Mahesh

    You can use Oracle callable statement to call the procedure of the OFA database. Please find the link to describe which

    http://oracleanil.blogspot.com/2009/04/itemqueryvoxml.html

    Thank you
    AJ

  • Will not print with the exception of the test pages

    I can't print any document (PDF or Word format) but all the test pages will be printed. The document will show less than a second in the print window then disappears. It doesn't matter if I try to print wireless or I plug the USB printer on the computer.  Also, no Google Cloud Print will print.

    The printer is a Photosmart C7280 all-in-one and computer is a HP Compaq nx7400. I use an operating system of Windows 7 with Office 2007.

    Welcome to the joalrabr forums,

    I understand your Photosmart C7280 print not since your connected PC or wireless USB however, it will print the pages of the test directly from the printer itself.

    First of all, I would like to run the HP print and Scan Doctor. I hope the tool will fix the problem. If it cannot, it will tell you the problem.

    Please let me know the results!

    Happy Monday

  • After you apply the hotfix, button Submit seems to be different in the OFA page

    Hi all

    Recently, we have applied a fix to the db in one of our cases of development and we are now able to find the difference, it's originally. The difference is, in the OA Page submit button seems to be a little different.

    Fixing of the screenshot, FYR

    Note: This is instance 11i in which the hotfix is applied (db is 12 c version)

    Kindly share your thoughts

    Thank you

    Valsaint

    Check the solutions mentioned in the links below.

    Button style - OA frame display

    The button resembles html button not like OPS button

    See you soon

    AJ

  • Selection multiple question table advanced on the OFA page

    Hello

    I have a table edge on the OA Page. This advanced table, I had added the action of multi selection table.
    For multiple selection, I have attached an Instance of the view and an attribute of the view.

    There are text entry field in the advanced table. If the user makes changes to it, a 'updateDate' event fires.
    Co:
    {if (Event.Equals ("updateDate"))}
    System.out.println ("A");
    String rowReference =
    pageContext.getParameter (OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);

    [Serializable] param = {rowReference};

    am.invokeMethod ("DetailsCheckBox", param);
    }

    Am:
    public void DetailsCheckBox (String rowReference) {}
    System.out.println ("B");
    line oracle.jbo.Row = findRowByRef (rowReference);


    Ivo DetailsVOImpl =
    FindViewObject ("DetailsVO1") (DetailsVOImpl);

    String chkbox = (String) row.getAttribute ("Multiselect");
    System.out.println ("multiselect original:" + chkbox);
    If ((chkbox == null) |) (chkbox.equals ("N"))) {
    ivo.setCurrentRow (row);
    row.setAttribute ("Multiselect", "Y");
    String chkbox1 = (String) row.getAttribute ("Multiselect");

    System.out.println ("multiple selection:" + chkbox1);
    Ivo.Reset ();
    }

    }

    The problem is that if there are 5 lines are displayed in the advanced table and changes to one of the first 4 rows, the box gets checked on the page but if I make the changes to the last row, the box is not checked on the page, even if the statement String chkbox1 = (String) row.getAttribute ("Multiselect"); Returns 'Y' AM.

    Help, please. Its urgency.

    Hello

    We use the following pseudocode of the AOS.

    VO. Reset()
    While (vo.hasNext ())
    {
    your code
    }

    This will solve your problem.

    Thank you
    Kumar

  • Control the OFA page scrolling

    Hello

    In the OAF page, we have developed, when you click button SAVE to save the data, the screen is up i.e. that it scrolls automatically to the top of the page when save the ends of the event.

    There are also same thing when we click the button 'Add to the GRID' in a table that has multiple choice.

    Let me know if there is a way by which we can manage this problem and focus on the part of the page desired.

    Thanks in advance
    Saurabh

    test fire partial action instead of full submit.

    Prasanna-

  • hierarchical query of VO in the ofa page

    Hello

    I try to use the hierarchical query in VO for the display of all levels of supervisors for employee and want to display in populist:

    This is the query

    REPLACE SELECT distinct (mgx.full_name, "',' ') supervisor_full_name;

    XPP. Employee_number

    OF per_assignments_x pax,.

    per_people_x ppx,

    per_people_x mgx,

    per_positions pp,

    per_jobs pj,

    per_position_definitions ppd

    WHERE ppx.person_id = pax.person_id

    AND ppx.current_employee_flag = 'Y '.

    AND mgx.person_id = pax.supervisor_id

    AND pp.position_id = pax.position_id

    AND pj.job_id = pax.job_id

    AND ppd.position_definition_id = pp.position_definition_id

    START WITH ppx.employee_number =: 1

    CONNECT BY PRIOR MGX.employee_number = ppx.employee_number AND LEVEL < 6

    I'm trying to get this VO implemented PR when I run the page in jdeveloper with parameter binding, it's getting error.

    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: 27122 Houston: SQL error in the preparation of the statement.

    I would like to delete the parameter binding and executing CO VO past these two statements may be:

    START WITH ppx.employee_number =: 1

    CONNECT BY PRIOR MGX.employee_number = ppx.employee_number AND LEVEL < 6

    How can I do?

    Thank you

    MK

    has worked?

  • How to invoke the webcam in the OFA Page

    Hi all

    I'm working on 12.2.3.

    Can anyone suggest or give an idea of how make to invoke the custom OAF page webcam and capture and store images in to table.

    Kind regards

    Guru

    Take a look at the answer given the thread below:

    Web Cam of OAF Page using custom

  • Need to fill the value of the sequence in a field after insertion in the ofa page

    Hi all

    I have a custom OAF insert the page in do I have to fill out a sequence to a field value, once the data inserted with success at the table.

    so for this I followed the approach below.

    1 > created a database sequence.

    2 > java in the EOImpl of the file in the accessor method Set for their respective fields wrote code below.

    {} public void setContainid (numeric value)

    If (value == null) {}

    OADBTransaction t = getOADBTransaction();

    value = t.getSequenceValue ("XXXXX_CONTAIN_SEQ");

    }

    setAttributeInternal (CONTAINID, value);

    }

    But still, I'm not able to complete the sequence value for the field in my oaf page, please help me with that.

    Thank you

    Hello

    Write this logic to create the EOImpl method:

    public void create (AttributeList attributeList)

    {

    Super.Create (AttributeList);

    Transaction OADBTransaction = getOADBTransaction();

    ContID number = transaction.getSequenceValue ("XXXXX_CONTAIN_SEQ");

    setContainId (contID);

    }

    Sushant-

  • MessageStyledText label comes somewhat horizontal right in internet explore the OFA page

    Hi gurus,

    I developed a customized and attached to a standard page RN.

    IM my RN custom label is to big for a pull-down menu, so I have jailbroken as

    messagechoicebean-first part

    messagestyledtext - part 2

    messagestyledtext - 3rdpart-> when I run this page from Internet Explorer, and then the third part comes a little right aligned... How can I do aigned, left

    Please suggest

    Thank you

    Mahesh

    Hello

    This problem is solved, but lined up strange, I just added a text more before my line and it's good.

  • To retrieve the default organization name in the OFA page

    Hi all

    My requirement is that I have a field named OrganizationName

    Here, I need to get the name of the organization based on the GETORG.ID)

    I read the previous discussions, but they were not clear

    I got to know that we need to write the sql query

    but here, we should pass the org id

    can I know how it's done...


    Sasha in advance

    DEV

    Hi Dev,

    Try this,

    Get the Id of the pageContext Org and pass the query using the prepared statement to get the name of the organization.

    to get the id of the org pageContext.getOrgId ();

    for example: String orgIdValue = pageContext.getOrgId ();
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Code snippet to get the name of Org

    import java.sql. *;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;

    Connection Conn = pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();
    Try
    {
    Query to check the combination for the records.
    Dim Query = "SELECT NAME, hr_all_organization_units, WHERE ORGANIZATION_ID =: 1";
    PreparedStatement stmt = conn.prepareStatement (Query);
    stmt.setString (1, orgIdValue); Set the value obtained by context object

    for (ResultSet resultset = stmt.executeQuery (); resultset.next ();)
    {

    result = resultset.getInt ("NAME");

    }
    }
    catch (System.Exception Exception)

    {
    Incase of any error during execution of the statement to throw an exception.
    throw new OAException ("Error in the application of staffing" + exception, OAException.ERROR);
    }

    Had

  • Cancel on the OFA Page

    Hi all

    I have a requirement for the Undo feature.
    My Page has a few required fields to e b completed by the user before submitting the form.
    but, when the user clicks the button quit, then it should not promt to fill the required parameters.
    On the exit button (submit button) I used OAdialog confirmation page and run small business validations on clique of Yes/No buttons.

    Problem is that when the user presses the output on the page, the Page opens to fill required fields.
    How can we avoid this?

    Thanks and greetings
    POOJA

    POOJA,

    You must set the client property of validation on the side of the button as false. then it won't work.

  • can not put cookies and exceptions on the same screen. Need to fix this.

    Went to the options today and the format has changed. Now I can't put Cookies and Exceptions on the same page at the same time. It is vital that I can put together up to manage cookies. Please fix this. Anyone have any ideas?

    You can enable/disable browser.preferences.inContent false on the topic: page config to restore the autonomous Options/preferences window you had in previous versions of Firefox.

    You can open the topic: config page via the address bar.
    You can accept the warning and click on "I'll be careful" to continue.

Maybe you are looking for