Putting validation in VO based on sql query

Hi All,
I need few inputs for the customization of OAF page.
Business Need: Restriction of special character in supplier oaf pages for supplier name.
There are 3 oaf pages involved in supplier creation/update for R 12.1.3
1)     oracle\apps\pos\supplier\webui\OrganizationPG (underlying VO is sql query based).
2)     oracle\apps\pos\supplier\webui\QuickUpdatePG (underlying VO is sql query based).
3)     oracle\apps\pos\supplier\webui\SuppCrtPG (underlying VO is based on EO - HzPuiOrgProfileQuickEOEx) .
For pages referring EO, we have extended the underlying EO and override the validateEntity() method to throw the OAAttrValException. After substitution, validation is working.
For VO based on query, the standard AM’s are instantiating the VO and using Rowimpl class they are setting the attributes.
Question: How to enforce validation logic in VO or AM in such cases where oracle standard code is instantiating the VO dynamically?
One possible solution is to use the PPR event on input text message bean and catch it in custom controller’s processFormRequest method and before super. processFormRequest(), we can put the validation.
Is there any other way to achieve it?

{forum:id=210} is the OAF forum

Similar Messages

  • Oaf: putting validation in VO based on sql query

    Hi All,
    I need few inputs for the customization of OAF page.
    Business Need: Restriction of special character in supplier oaf pages for supplier name.
    There are 3 oaf pages involved in supplier creation/update for R 12.1.3
    1)     oracle\apps\pos\supplier\webui\OrganizationPG (underlying VO is sql query based).
    2)     oracle\apps\pos\supplier\webui\QuickUpdatePG (underlying VO is sql query based).
    3)     oracle\apps\pos\supplier\webui\SuppCrtPG (underlying VO is based on EO - HzPuiOrgProfileQuickEOEx) .
    For pages referring EO, we have extended the underlying EO and override the validateEntity() method to throw the OAAttrValException. After substitution, validation is working.
    For VO based on query, the standard AM’s are instantiating the VO and using Rowimpl class they are setting the attributes.
    Question: How to enforce validation logic in VO or AM in such cases where oracle standard code is instantiating the VO dynamically?
    One possible solution is to use the PPR event on input text message bean and catch it in custom controller’s processFormRequest method and before super. processFormRequest(), we can put the validation.
    Is there any other way to achieve it?

    VO extension will not work as the
    Standard Controller code : oracle.apps.pos.supplier.webui.QuickUpdateCO is calling the AM's method on the click of save button and AM is dynamically invoking the methods in VO.
    Standard Controller code:
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    if(oapagecontext.getParameter("btnSave") != null)
    oaapplicationmodule.invokeMethod("updateVendor");
    oaapplicationmodule.invokeMethod("updateVendorSites");
    oaapplicationmodule.getTransaction().commit();
    Corressponding standard standard AM code...
    CallableStatement callablestatement;
    Exception exception;
    oadbtransaction = getOADBTransaction();
    connection = oadbtransaction.getJdbcConnection();
    Object obj = null;
    oaviewobjectimpl = (OAViewObjectImpl)findViewObject("SupplierVO");
    callablestatement = null;
    try
    callablestatement = oadbtransaction.createCallableStatement(" BEGIN savepoint upd_vndr_ab ; END;", 0);
    callablestatement.executeQuery();
    catch(SQLException sqlexception1)
    throw OAException.wrapperException(sqlexception1);
    finally
    if(callablestatement == null) goto L0; else goto L0
    if(callablestatement != null)
    try
    callablestatement.close();
    catch(SQLException sqlexception) { }
    break MISSING_BLOCK_LABEL_97;
    try
    callablestatement.close();
    catch(SQLException sqlexception2) { }
    throw exception;
    VendorsVORowImpl vendorsvorowimpl;
    label0:
    oaviewobjectimpl.reset();
    vendorsvorowimpl = (VendorsVORowImpl)oaviewobjectimpl.first();
    String s = vendorsvorowimpl.getPosModified();
    String s1 = vendorsvorowimpl.getHzModified();
    Number number = vendorsvorowimpl.getVendorId();
    int i = number.intValue();.....
    Extending the VO will not server the good as the handle will not be given to extended class....
    Edited by: user13791631 on Jun 20, 2012 9:29 PM

  • Validation in VO based on sql query

    I need few inputs for the customization of OAF page.
    Business Need: Restriction of special character in supplier oaf pages for supplier name.
    There are 3 oaf pages involved in supplier creation/update for R 12.1.3
    1)     oracle\apps\pos\supplier\webui\OrganizationPG (underlying VO is sql query based).
    2)     oracle\apps\pos\supplier\webui\QuickUpdatePG (underlying VO is sql query based).
    3)     oracle\apps\pos\supplier\webui\SuppCrtPG (underlying VO is based on EO - HzPuiOrgProfileQuickEOEx) .
    For pages referring EO, we have extended the underlying EO and override the validateEntity() method to throw the OAAttrValException. After substitution, validation is working.
    For VO based on query, the standard AM’s are instantiating the VO and using Rowimpl class they are setting the attributes.
    Question: How to enforce validation logic in VO or AM in such cases where oracle standard code is instantiating the VO dynamically?
    One possible solution is to use the PPR event on input text message bean and catch it in custom controller’s processFormRequest method and before super. processFormRequest(), we can put the validation.
    Is there any other way to achieve it?

    {forum:id=210} is the OAF forum

  • Bold a single row in a Report based on SQL Query

    Should be easy? So, how do I bold a single row in a report based on SQL query without creating a new template or writing Java for the page? What is the Tabular Form Element "Element Attributes" field for? Or what am I supposed to put in there to make it do anything?

    One way to do this is to add a hidden column to your report which contains the formatting value, for example:
    select empno
    , ename
    , sal
    , decode(empno,1,'font-weight:bold','font-weight:normal') style
    from emp
    Hide the STYLE column.
    Then you can use this column for each column in Column Formatting > HTML expression in this way:
    <span style="#STYLE#">#SAL#</span>
    Unfortunately you have to do this for each colum you want to appear bold.
    good luck,
    Dirk Dral

  • Lookup vo based on sql query or on Entity?

    Hello all,
    which is better for performance to build a view object to be used as lookup [LOV] based on SQL query or build an Entity object and a view object based on it? and why?
    regards,

    As fas as i know,EO is better rather than SQL because result is backedup by EO cache..

  • How to create graph based on sql query

    Hi all,
    I am using jdev 10.1.3.3
    My requirement is need to ctreate graph(pie chart) based on sql query ex: select count(empno) from emp group by deptno;
    and also i need to give link on graph. If i click 10 deptno part in pie chart only 10 deptno employee list need to display.
    Please help meeeeeee
    Thanks
    NR

    Hi,
    just non click able graph in ADF 10g using BI Graph: http://www.freewebalbum.com/blogs/faces/bjanko/blogs.jsp?blog=bjanko20070629162305
    regards,
    Branislav

  • Dynamic Rendering of Child Component based on SQL Query

    I want to preface this with I am very new to ADF.
    I have a page with a parent-multi child (tabbed) layout, and what I want to do is render one of the children based on the values of a sql query. I tried creating a manged bean but I had no idea how to get the database connection, so I added a method to my application module implementation instead. The method is of type boolean that runs my sql query and based on the results, returns true or false. I then set the tab's Rendered property to this method, #{bindings.method.execute}. Unfortunately, when I run the application the tab is not rendered, no matter what the value of the results. I therefore set a breakpoint on the code and ran it through the debugger, but the code is never being executed.
    If anyone could help, it would be greatly appreciated.
    I am running JDeveloper 11.1.1.3, hitting an Oracle 11g database, using ADF BC.
    Thanks,
    Michelle

    I don't really know what you mean, here is my code:
      public boolean checkLevel2Needed(String revwId)
        PreparedStatement stmnt = null;
        StringBuffer sql = new StringBuffer();
        Object[] procArgs = new Object[]{ revwId };
        ResultSet rs = null;
        boolean level2Required = false;
        System.out.println(revwId);
        sql.setLength(0);
        sql.append("Select count(*) as yesCount from usq.vu_review_response ");
        sql.append(" where revw_id = ? ");
        sql.append(" and gp_name = 'Level 1 Screen' ");
        sql.append(" and resp_text = 'Yes' ");
        try
          stmnt = getDBTransaction().createPreparedStatement(sql.toString(), 0);
          if (procArgs != null)
            for (int z = 0; z < procArgs.length; z++)
              stmnt.setObject(z + 1, procArgs[z]);
          rs = stmnt.executeQuery();
          if (rs.next())
            if (rs.getInt("yesCount")>0)
              System.out.println(rs.getInt("yesCount"));
              level2Required = true;
          rs.close();
        catch (SQLException e)
          throw new JboException(e);
        finally
          try
            if (stmnt != null)
              stmnt.close();
          catch (SQLException e) {}
        return level2Required;
      }But I don't think it is ever executing this code, the system.out.println's don't show up in the console and if I run it through the debugger with a breakpoint it never stops.
    What I really need is for this code to execute when I enter this page, and also any time the page is updated. Should I be using a backing bean?
    Thanks,
    Michelle
    Edited by: MSchaffer on Jan 6, 2011 5:27 PM

  • Report Column Headings based on SQL Query

    Hi ,
    I am working on creating a SQL query based report. However, my column headers for this report are stored in a table and hence, I need the column headers to be based on a sql query also.
    Can you give me some pointers on how to do this ?
    Thanks!
    Lavanya

    Lavanya,
    The report column attributes page has a radiogroup of column heading types. One lets you specify a PL/SQL function that returns the headings.
    Scott

  • Populate a select list based on sql query

    I need to populate a select list using an sql query based on the value value I get from the previous page sent using link . How can I achieve this behaviour ? I tried giving select app_item_id a,app_item_id b from app_item_definition where app_id = :P11_APP_TDL_ID order by 1 in LOV, but it doesn't work . Please advice .

    Okay, I just had the right idea and it's working well! Sorry for posting!
    I return the name of the employee that has edited a dataset and simply add all others of the logged on department! Really easy! Should have thought of that before posting! ;-(
    The correct code is select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter a, vt_tbl_punktdaten b where a.cnt_bearbeiter = b.int_bearbeiter and
    inv_pt_id_sub = :P4_PTIDS
    union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user))Bye,
    Seb

  • Report Layout width(Report based on SQL Query)

    Is there any way to increase the width of the report layout? I have removed as many columns as I can and dropped the font size down but the data in the columns is still wrapping to more than one line. How can I increase the report layout width, or change the layout to landscape or something similar.
    thanks

    I had this problem with wrapping text. You have to create a Reports From SQL Query and choose a custom layout. Then when you go the the HTML layout section, you will need to ad nowrap to the <TD> tag (i.e. <TD nowrap>) for each field you do not want to wrap.
    Martin

  • Text area with html editor based on sql query

    Hi all,
    I am trying to create a text area with its contents loaded from a sql query returning a blob field.
    I gave the query
    select blob_field from file_subjects where id=41; in the item source valueI am getting an error in the display page like
    ORA-00932: inconsistent datatypes: expected NUMBER got BLOB
         Error      ERR-1019 Error computing item default value: page=5 name=CONTENTS.
    where am i goig wrong..?
    should i go for a pl/sql instead?

    Venket,
    See my previous thread on this (Well I used CLOB rather than BLOB). You will find code examples too. Should be just what you need.
    How to "Bypass" HTMLDB
    -Joe

  • Dynamic charting in J2ME using SVG - based on SQL query from a web server

    Hi
    I am creating a J2ME application which needs to generate dynamic charts for the user.
    The data for generating the charts is stored on a web server. In order to have minimal computations on the mobile device, I want to generate the charts on the web server itself.
    I have written a code which generates svg (svg tiny) charts dynamically on a web server based on sql queries on a database . Now I want a J2ME client app to be able to retrieve this data through a web service.
    Can someone guide me as to how to return svg files from a java web service.
    Any help would be greatly appreciated.
    Regards
    Sparsh

    Hi
    Actually, I am developing my application using Netbeans 6. In order to connect to my web service , I am using the J2ME client to web service as the type of my project and that uses the above mentioned API's.
    My question is how do I enable my web service to return a SVG file , and then how do I retrieve it in the J2ME client. Any example application that anyone knows online would be really helpful

  • AD: Extracting to Shapefile based on SQL query

    We have written a command-line tool, SpatialExtractor, that takes an SQL query and produces an ESRI Shapefile.
    If this is valuable to you, please download an evaluation version from our website, www.geometry.com.au. The full version is (approx) US$570.
    We welcome any feedback or comments.
    regards,
    Andrew Betlehem
    Geometry
    www.geometry.com.au

    Hi,
    just non click able graph in ADF 10g using BI Graph: http://www.freewebalbum.com/blogs/faces/bjanko/blogs.jsp?blog=bjanko20070629162305
    regards,
    Branislav

  • POPUP LOV'S BASED ON SQL QUERY

    Help! I am a beginner with APEX and SQL in general, and I need help with an issue I am experiencing. I've created a POPUP LOV with the following SQL statement:
    SELECT CLOCK_NUMBER || ' ' ||LAST_NAME||', '||FIRST_NAME D, EMP_ID R
    FROM MASTER
    The return value should populate the table, but instead it is returning to the report in APEX. If I choose a SELECT LIST based on a named LOV, it works. But unfortunately I cannot use a SELECT LIST, but I must use a POPUP based on a named LOV. Has anyone had these issues with POPUP LOV's? This is driving me crazy, and I'm sure I'm doing something stupid!
    Thanks!

    I've researched this quite a bit and it seems that this is a huge problem with APEX 3.1. Basically, I've created a tabular form. I have a column based on a LOV. In a tabular form, you DO NOT have the option of creating a PopUP..KEY..LOV, which would work for me, since it writes the return value back to the table. The normal PopUP LOV that you have the option of implementing on a tabular form does not behave like a PopUP..KEY..LOV, but it brings the return value back to the report (which in my case would be an employee_id, which doesn't work), and writes the display value back to the table.
    To add insult to injury, a regular SELECT LIST (based on named LOV) would work, however my LOV violates the buffer (which is 32k) and I get this error:
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    I've researched this error and there are about 10 to the 100 posts regarding it, especially when dealing with LOV's and select lists that violate the 32k limit.
    Any new fresh advice?
    Thanks for your response as well. I appreciate your time and any help you may offer.

  • Set default value based on sql query?

    Hi,
    is it possible to set default value of an BC entity attribute by using sql expression?
    Eg. "select max(x)+1 from y where userid=?"
    Rgs
    Jernej

    Jernej,
    Yes, you can do this. Edit your entity object attribute, and in the Edit Attribute dialog select "Derived from SQL Expression". Then you can enter your expression in the Expression text box.
    Blaise

Maybe you are looking for

  • Can we do a recording for ABZON transaction?

    Hi, We are using transaction ABZON for creating 'new asset' for uploading data using LSMW recording method. We are getting an error "leave transaction not possible for batch input" when we are try to upload more than one record from the file. The LSM

  • Send Changes for IDOC ORDRSP

    Hi Gurus   Can anyone help me in sending the changes for the IDOC for transactional data. For Sales Order IDOC -- ORDRSP. When newly sales order is created, all the sales order information should be sent. --This is not a problem. When changes are don

  • ?? default purchase order number generation

    Hello everyone. When a purchase order is automatically generated from a sales order, is it possible to make the new PO number the same as the SO number we've just set?  ie we need to manually overwrite the newly generated PO just like we did with the

  • How to run a particular JRE at run time

    Hi All, I have two different versions of Java installed in my system (JDK 1.5 & JDK 1.6). The path in environment variables is setted to jdk1.5. But after installation of jdk1.6 it is showing as jdk1.6. I want to test my code for these two different

  • What happen ?why can't i print a pdf any longer ?? very very frustrated uninstalled reinstalled 3 times ??????????

    What happened ? Why can I no longer print PDF on my mac pro???????? Uninstalled reinstalled 3 times very very frustrated