How to do the Validation of SQL in extended OT?

Hello

I'm new to OFA. I have a requirement on a Page of the OAF that when a new record is created system must check whether the same value already exists in one of our custom paintings, then it should trigger a warning.

I guess I have to code this extended logic in OT. I checked the examples in tutorial Toolbox of framework in which they use VVO and experts of the entity to do Validation based on SQL, but how can I do in extended OT?

Can we do direct SQL calls in OT?

Can someone please?

Hey Hi there,

At the click of a button, you can get the handle to the action of submit and use the code to validate if the record already exists below

String codeUpper = pageContext.getParameter ('Code'); get your field values

String actionUpper = pageContext.getParameter ("Action");

String seqNoUpper = pageContext.getParameter ("PacelineStdSeqNum");

If (PageContext.GetParameter ('Save')! = null)

{

context of the page get the value of the code and action.

String codeValue = pageContext.getParameter ('Code');

String actionValue = pageContext.getParameter ("Action");

String stdSeqNumValue = pageContext.getParameter ("PacelineStdSeqNum");

declare the variable to count the number of records returned by the query.

int result = 0;

get the JDBC connection.

Connection Conn = pageContext.getApplicationModule (webBean) .getOADBTransaction () .getJdbcConnection ();

Try

{

Query to check the combination for the records.

Dim Query = ' SELECT count (*) count of SDA_PACELINE_STD where CODE =: AND ACTION = 1: 2.

PreparedStatement stmt = conn.prepareStatement (Query);

stmt.setString(1, codeValue);

stmt.setString (2, actionValue);

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

{

pageContext.writeDiagnostics (Thi, "query Executed", 1);

pageContext.writeDiagnostics (Thi, "query Executed", 2);

result = resultset.getInt ('count');

pageContext.writeDiagnostics (this, 'query Executed' + result, 1);

pageContext.writeDiagnostics (this, 'query Executed' + result, 2);

}

}

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);

}

if(result >0) / / result > 0 indicates that there is a combination record already

{

throw new OAException ("The Record combination already exists", OAException.INFORMATION);

}

Let me know if this isn't clear.

-Had

Tags: Oracle Applications

Similar Questions

  • How to adopt the validation of level entity such as BC ADF using EJB/JPA?

    I explore how to implement validation to entity level using the EJB/JPA instead of ADF BC. (Note: I use JDeveloper + ADF 12 c)

    1. I cannot add validation attribute level in the ADF (Data Control) of EJB model layer. but it is not enough. I can just code partial UI validation here.

    2. I googled and find that someone is using jsr-303-bean-validation. What is a unique choice? How the entity-level validation code?

    Validation of the JPA EJB ADF application entity

    3. I want to implement certain business validation and processing business in the layer of business ADF service, as in the EJB method.

    I did a simple test to simulate an exception, but I found the exception has been handled incorrectly in the layer of binding of ADF and error dialog box prompt: DCA-29000: Unexpected exception caught: java.lang.reflect.InvocationTargetException, msg = null.

        public Departments persistDepartments(Departments departments) {
            if(true){
              throw new RuntimeException("persistDepartments");
            }
            em.persist(departments);
            return departments;
        }
    
    
    
    

    Any expert can help? will I have to rewrite the ADF Model layer error handling? How to code the validation in EJB? you will need to take local and manipulate it in class in the ADF error handling model layer? where can I find a demo?

    4. I want to introduce a layer of application service between EJB session façade and JPA entity for the re-use of the company.  but I found JDeveloper helps me to do anything. I do code manually, when I create EJB session façade, it always integrate directly with JPA entity inside.  I expect that my application service is class instead of the EJB POJO.  Session EJB façade summons enforcement and demand serviceshall call JPA entity services.  is this possible? any sugguestion?

    Thank you

    Qn1, the ADF Model layer Validation are supported at the level of the validation attribute. It is confirmed.

    Qn2, it seems that this is a better solution, but is not Explorer so far.

    Qn3 is resloved by creating a custom error handler to extract a validation thrown from EJB exception and at the same time, it cannot be avoided that the thrown exception of service business layer is still dumped at MTS-out.

    Qn4 is reslolved by employment Commission to inject POJO, EJB session faade and inject POJO EntityManager (use JTA transaction).

    Thanks to you all!

  • How to skip the installation of SQL Express 2005 and using SQL Express 2008 instead?

    I have SQL Express 2008 is installed and you want to use instead of SQL Express 2005.

    How to configure the installation of Lookout as he ignores the installation of SQL Express 2005?

    Are there other measures that must be taken so that Lookout can work properly with SQL Express 2008?

    Thank you.

    OK - it worked.

    However, for 64-bit installations, I had to use the WOW of SQL Express 2008 versions, because, the Citadel is a 32-bit database and installation of 64-bit native versions would not allow an upgrade of the Citadel of Instance.

    Thank you.

  • How to get the hang of sql

    Hi all

    I can view the blocked sql using sql_txt to this:

    Select distinct s1.username | » @'|| S1.machine | "(INST =' | s1.inst_id |) ' SID = ' | S1.SID |')

    blocks ' | S2. UserName | '@' || S2.machine | ' (INST =' | s1.inst_id |') SID =' | S2.SID |') '

    LIKE blocking_status, s2.program, s3.sql_id, s3.sql_text gv$ lock l1, gv$ session s1, gv$ lock l2, gv$ session s2, s3 in v$ sql

    where s1.sid = l1.sid

    and s2.sid = l2.sid

    and l1.block = 1

    and l2.request > 0

    and l1.id1 = l2.id1

    and l2.id2 = l2.id2

    and s2.sql_id = s3.sql_id;

    But I can view the blocker sql

    Can you help me how to get the sql_txt hang?

    I try to review the program that is:

    Select s1.sid, s1.serial #, s1.inst_id, s1. SQL_ID gv$ lock l1, gv$ session s1, gv$ lock l2, gv$ session s2, s3 in v$ sql

    where s1.sid = l1.sid

    and s2.sid = l2.sid

    and l1.block = 1

    and l2.request > 0

    and l1.id1 = l2.id1

    and l2.id2 = l2.id2

    and s2.sql_id = s3.sql_id;

    INST_ID SELECT SQL_ID SID, SERIAL #.

    ---------- ---------- ---------- -------------

    1-148-88

    But s1.sql_id is null. where do I get it?

    Thank you

    It occurred in the past.  You can't find it in the past.

    If you enable this, you might find the SQL code in the future.

    Hemant K Collette

  • How to disable the validations when CommandImageLink is sent

    Hello

    I have a few required fields in my page and CommandButtons and CommandImageLinks.
    I put "Immediate = true' on the button and Imagelink to skip validation." Button action works without any problem.
    But, when the ImageLink is cliked I need to search on a Table and need to update the table. ActionListener to fires, but the table is not refreshing.
    If I remove 'Immediate = true', the table is refreshing, but it will trigger the validations.

    All the solutions for this?

    Thank you
    Swathi

    Hi Jessica,.

    PartialSubmit and immediate, the two don't go well together, when immediate is true on a command button, action is performed before the update phase model so the values you entered in the search field will be not available at the time when the action is executed.

    You can find more information on link below:
    https://cwiki.Apache.org/Confluence/display/MYFACES/how+the+immediate+attribute+works (section of components UICommand check)

    Here is a text copied from above with the link that shows how to retrieve values of action for this case:
    For input elements not immediate in the page, the only way that an action for a component of immediate order method can access the user input data is using the binding component or search by name to retrieve a specific UIComponent object and then call getSubmittedValue() to get the raw string provided by the user. This value has not been converted to the target type (using a specified by the user or by default converter), nor is it validated.

    Note: There are two or three solutions proposed under the Limitations, you can cross and go ahead with what is right for you.

    Jean Lou

  • How to stop the validation?

    Hello world

    I have a form with custom validation. If the user activates a box a subform becomes visible. Only when this subform is visible a couple of his fields should be a required. I was able to achieve this with the script below except that the validation is triggered to this subform at the same time. I would have preferred a mistake at a time. If fabricant1 is null the guest notifies the user, highlights and focus on that field and no other alerts required should appear. How to stop validation after the outbreak of the first error null?

    Validate Vendor1 events:

    If (comparativeBids.presence == 'visible' & & this.rawValue == null) {}

    App.Alert ("Please enter a provider name on line 1 of the"Comparative analysis"section.")

    this.fillColor = "255,232,230";

    xfa.host.setFocus (this);

    fake;

    }

    Validate the events of Fabricant2:

    If (comparativeBids.presence == 'visible' & & this.rawValue == null) {}

    App.Alert ("Please enter a provider name on line 2 of the"Comparative analysis"section.")

    this.fillColor = "255,232,230";

    xfa.host.setFocus (this);

    fake;

    }

    etc.

    Just in case someone can it find it useful... I solved the above problem by adding all the conditions of validation in the click event of button "submit", using a switch instead of if statement. The break in the case prevents the field following validation until the previous one has passed its own validation - that means an alert at a time instead.

    var canSubmit = true

    myDoc = event.target var;

    mail_message var = "Insert default Message text here"

    mail_subject var = "E-mail subject" here

    start the posting of the subform:

    Switch (comparativeBids.presence == 'visible') {}

    case PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.rawValue is nothing:

    App.Alert ("Please enter a provider name on line 1 of the"Comparative analysis"section.");

    PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.fillColor = "255,232,230";

    xfa.host.setFocus (PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1);

    canSubmit = false;

    Reset other alerts

    PRForm.comparativeBids.comparativeBidsTable.Row1.price1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.price2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.price3.fillColor = "255,255,255";

    PRForm.comparativeBids.justification.fillColor = "255,255,255";

    break;

    case PRForm.comparativeBids.comparativeBidsTable.Row1.price1.rawValue is nothing:

    App.Alert ("Please enter a price on line 1 of the"Comparative analysis"section.");

    PRForm.comparativeBids.comparativeBidsTable.Row1.price1.fillColor = "255,232,230";

    xfa.host.setFocus (PRForm.comparativeBids.comparativeBidsTable.Row1.price1);

    canSubmit = false;

    Reset other alerts

    PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.price2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.price3.fillColor = "255,255,255";

    PRForm.comparativeBids.justification.fillColor = "255,255,255";

    break;

    case PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.rawValue is nothing:

    App.Alert ("Please enter a provider name on line 2 of the"Comparative analysis"section.");

    PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.fillColor = "255,232,230";

    xfa.host.setFocus (PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2);

    canSubmit = false;

    Reset other alerts

    PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row1.price1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.price2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.price3.fillColor = "255,255,255";

    PRForm.comparativeBids.justification.fillColor = "255,255,255";

    break;

    case PRForm.comparativeBids.comparativeBidsTable.Row2.price2.rawValue is nothing:

    App.Alert ("Please enter a price on line 2 of the"Comparative analysis"section.");

    PRForm.comparativeBids.comparativeBidsTable.Row2.price2.fillColor = "255,232,230";

    xfa.host.setFocus (PRForm.comparativeBids.comparativeBidsTable.Row2.price2);

    canSubmit = false;

    Reset other alerts

    PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row1.price1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.price3.fillColor = "255,255,255";

    PRForm.comparativeBids.justification.fillColor = "255,255,255";

    break;

    case PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.rawValue is nothing:

    App.Alert ("Please enter a provider name to line 3 of the"Comparative analysis"section.");

    PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.fillColor = "255,232,230";

    xfa.host.setFocus (PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3);

    canSubmit = false;

    Reset other alerts

    PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row1.price1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.price2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.price3.fillColor = "255,255,255";

    PRForm.comparativeBids.justification.fillColor = "255,255,255";

    break;

    case PRForm.comparativeBids.comparativeBidsTable.Row3.price3.rawValue is nothing:

    App.Alert ("Please enter a price on line 3 of the"Comparative analysis"section.");

    PRForm.comparativeBids.comparativeBidsTable.Row3.price3.fillColor = "255,232,230";

    xfa.host.setFocus (PRForm.comparativeBids.comparativeBidsTable.Row3.price3);

    canSubmit = false;

    Reset other alerts

    PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row1.price1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.price2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.fillColor = "255,255,255";

    PRForm.comparativeBids.justification.fillColor = "255,255,255";

    break;

    case PRForm.comparativeBids.justification.rawValue is nothing:

    App.Alert ("Please explain your choice of the seller under the"Comparative analysis"section.");

    PRForm.comparativeBids.justification.fillColor = "255,232,230";

    xfa.host.setFocus (PRForm.comparativeBids.justification);

    canSubmit = false;

    Reset other alerts

    PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row1.price1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.price2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.price3.fillColor = "255,255,255";

    break;

    default: //reset all alerts

    PRForm.comparativeBids.comparativeBidsTable.Row1.vendor1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row1.price1.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.vendor2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row2.price2.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.vendor3.fillColor = "255,255,255";

    PRForm.comparativeBids.comparativeBidsTable.Row3.price3.fillColor = "255,255,255";

    PRForm.comparativeBids.justification.fillColor = "255,255,255";

    }

    If subform is hidden or past the above conditions then send

    If {(canSubmit)

    myDoc.submitForm ({cURL: "mailto:;?"}) [email protected]; & subject = ' + mail_subject + "& body = '+ mail_message,

    bEmpty: true, / / show all fields (true), or not posting all the fields (false)

    cSubmitAs: 'PDF', / / Post PDF format

    ({cCharset: 'utf-8'});

    }

  • How to ignore the validation of the ADF LOV

    Hello

    I have worked in oracle forms and now try to learn the ADF.

    In oracle forms, if we apply LOV to a field, it offers the possibility that we validate this filed of LOV like it or not. If we set ENTER FROM LIST = No., user can select LOV value or it can enter the value manually (and this value can be or not be in LOV).

    Now in JDeveloper 11.1.1.5.0, I have attached a list of input to a values it was filed. Any value I put in the deposited ADF framework, trying to validate of LOV, and does not update the model compared to invalid values. How can we ignore that?

    Infact, I have an obligation if the value does not exist in LOV, I create this value in the object instance on which rests the LOV. In doing so, the value will now be a valid value.

    Published by: student of oracle on 25 May 2011 23:57

    Published by: student of oracle on May 26, 2011 12:02 AM

    Yes, I agree. However, this might give you an idea how to make the scenario using a manual coding

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/69-custom-lov-with-BTF-276178.PDF

    Frank

  • How to convert the number to SQL?

    How can I convert the number in SQL?
    The problem is that I use .NET and the Oraclenumber seems to be too big.

    Number of database - what I get when I select
    -----------'12'--------------------------------------'12'
    -12, 1-12, 10' <-this 0 should not be there
    -----------'12,12'-----------------------------------'12,12'
    -12, 123'---12, 1230' <-this 0 should not be there
    -----------'12,1234'-------------------------------- '12,1234'


    I don't know why this happens?

    Now, I tried to select with to_char (COLUMN1), but when I have values like "' 0,15 ' in the base, I get in select ', 15' when I convert with to_char?"

    Anyone know a solution?

    Kind regards
    Simon

    Edited by: user3654758 the 30.09.2010 02:02

    with mytable as
    (select 12 n of all the double union)
    Select 12.1 in union double all the
    Select 12.12 in union double all the
    Select 12.123 in all the double union
    Select double 12.1234)
    Select case when trunc (n) = n then
    TO_CHAR (n, 'FM9999999999999999999')
    on the other
    TO_CHAR (n, 'FM9999999999999999999D9999999')
    end
    FROM MyTable;

    Edited by: hartmutm the 30.09.2010 02:21

    I changed it a bit, because you have a problem with the separator decimal escape in the previous code.

  • How to specify the instance in SQL * more command line?

    Hello

    I'm learning to Oracle. I currently have 2 instances of database running. I wanted to connect to one of the bodies and used the following command from the command line:
    sqlplus system as sysdba/abc123@ocp11gsid
    
    where 1234 is the password for the system user in the ocp11gsys instance.
    When I run the command above, SQL * more ask me the password. I do not understand why he asks me the password because I provided on the command line.

    What is the correct command line, so he asks me the password? (without defining the variable ORACLE_SID of environment - basically, I want to know how to specify the user, his password and sid, all in the sqlplus command line, without being prompted to enter the password that I mentioned.)

    Thank you for your help,

    John.

    John,

    This is how it works.

    E:\Documents and Settings\aristadba>sqlplus system/oracle as sysdba
    
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 2 22:49:25 2010
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL>
    

    And now it ask the password,

    E:\Documents and Settings\aristadba>sqlplus system as sysdba/oracle
    
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 2 22:50:42 2010
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Enter password:
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL>
    

    Spot the difference?

    The user name and password must unite. What you are to provide the password with the role where it will not be considered.

    Update
    I missed that part,

    What is the correct command line, so he asks me the password? (without defining the variable ORACLE_SID of environment - basically, I want to know how to specify the user, his password and sid, all in the sqlplus command line, without being prompted to enter the password that I mentioned.)

    The only thing that you can specify is the user name and password. The SID must be defined by you, either explicitly using the export or oraenv command if you are on the local system and do not use the TNS to connect to the instance. If you use the TNS, then an appropriate entry should be there which would connect to the required database.

    HTH
    Aman...

    Published by: Aman... on August 2, 2010 22:54

  • How to make the output of Sql Plus with an error Code

    Dear members,

    How can I define sql more exit with an error code.

    We have a simultaneous host program. The executable is a shell script for this program. This sql script Shell script request which in turn gives call to a custom database package that I built.

    The flow rate is:


    -> SQL-> CUSTOM PACKAGE SCRIPT SHELL SCRIPT

    Custom package has two PARAMETERS of the error indicator and the error message. If something fails in the package these two PARAMETERS is returned with a value.

    So my sql script code looks like this:

    WHENEVER SQLERROR EXIT 251
    WHEN the OSERROR EXIT 251
    Set serveroutput size 1000000
    set linesize 32767
    set verify off
    set the position
    Set feedback off

    DECLARE
    x_error_message VARCHAR2 (1000);
    x_sql_message VARCHAR2 (1000);
    x_exception EXCEPTION;
    e_value NUMBER;

    BEGIN
    dbms_output.put_line ('Inside sql file');


    XXpackage.xxproc (x_error_message, x_sql_message);


    IF (x_error_message IS NOT NULL) AND (x_sql_message IS NOT NULL) THEN
    RAISE x_exception;
    END IF;


    EXCEPTION
    WHEN X_EXCEPTION THEN
    e_value: = 1;
    DBMS_OUTPUT. Put_line (' Exit Code: ' | e_value);
    DBMS_OUTPUT. Put_line ('X_EXCEPTION: EXCEPTION IN SCRIPT xpoext04a.sql :'||) SQLERRM);
    DBMS_OUTPUT. Put_line ('x_error_message is: ' | x_error_message);
    DBMS_OUTPUT. Put_line ('x_sql_message is: ' | x_sql_message);
    DBMS_OUTPUT. PUT_LINE (' ERROR IS: ' |) SQLERRM);
    WHILE OTHERS THEN
    e_value: = 252;
    DBMS_OUTPUT. Put_line (' Exit Code: ' | e_value);
    DBMS_OUTPUT. Put_line (' OTHER: EXCEPTION IN SCRIPT xpoext04a.sql :'||) SQLERRM);
    DBMS_OUTPUT. Put_line ('x_error_message is: ' | x_error_message);
    DBMS_OUTPUT. Put_line ('x_sql_message is: ' | x_sql_message);
    DBMS_OUTPUT. PUT_LINE (' ERROR IS: ' |) SQLERRM);


    END;
    */*
    output
    */*


    As you can see from above, if the two PARAMETERS have value, then it goes to an exception.

    My problem is that if it goes with the exception of X_EXCEPTION, the sql is not come away with a mistake. I mean sql is not treat this case like a sqlerror.


    How can do us more sql dating a sqlerror so that the host program must fail.


    Thank you
    Sandeep

    Published by: user340 on July 28, 2009 12:51

    Published by: user340 on July 28, 2009 12:57

    the plu sql is not come away with a mistake. I mean sql is not treat this case like a sqlerror.

    This is because there is no error. You handled the exception.

    You can try adding a STIMULUS; at the end of your exception section. This re-triggers the exception so sql liked to see it.

  • JDev 10.1.3.4: How to customize the validation message?

    Hello

    I am using JDeveloper 10.1.3.4 and want to customize validation error message but don't know how. Also, the error message is triggered off the base and needs fixing.

    On my page, I have a group of two radio button is set to required = "true", a message is added, and the two buttons and the error message are placed in a grid of three-column table:
    <h:panelGrid columns="3"
                 binding="#{backing_student_doValidation.panelGrid1}"
                 id="panelGrid1" frame="none">
    <h:selectOneRadio binding="#{backing_student_doValidation.selectOneRadio1}"
                      id="selectOneRadio1" required="true">
      <f:selectItem itemLabel="I Agree" itemValue="agree"
                    binding="#{backing_student_doValidation.selectItem1}"
                    id="selectItem1"/>
      <f:selectItem itemLabel="I Disagree" itemValue="disagree"
                    binding="#{backing_student_doValidation.selectItem2}"
                    id="selectItem2"/>
    </h:selectOneRadio>
    <h:message for="selectOneRadio1" errorStyle="color:rgb(255,0,0);"/>
    </h:panelGrid>
    When none of the buttons is selected, the validation error message is:
       O I Agree   O I Disagree   Validation Error: Value is required
    that is not quite user-friendly. I want the message to be: "you have to either agree or disagree. But how?

    Another problem is that the error message is triggered. What may be not presented above, is that this error is emitted above the buttons as if the error message is surrounded by the Exhibitor tag: imagine < font size = "2" > < sup > Validation error: it takes value negative > < / police >. I tried several (middle, base, low) values for the vertical-align property of the panelGrid but none has no effect. Is there a way to fix this?

    Thank you!


    Newman

    Hello Newman,

    It is strongly recommended to use the xml format of the jsp that is jspx. It's good to move to this format for all of the examples you will find only in this format. JSPX has nothing to do with panelPage or ADF Faces components. You can use pure standard JSF
    jspx format components. But I would suggest that you use ADF Faces components since they are compatible JSF and they provide the enriched functionality. Or you can freely combine JSF components and standard ADF Faces or even if you like another set of compatible
    You can import the tag library and also use JSF components.
    To return to your use case. Using the af:selectOneRadio instead of f: selectOneRadio component you can solve the problem with customization of message required validation by using the requiredMessageDetail property, but you will encounter :) problem of position of this message

    
                
                  
                  
                
    
    
    

    Kind regards

    Branislav

  • How to call the OFA PL/SQL procedure.

    Hello

    I'll call the pl/sql stored procedure of the OAF page (AM). the procedure is content parameter 3 IN 1 OUT parameter. all the parameters of character type is integer.


    I put the output parameter and it's returning the value, but I don't have how to configure the setting IN because the settings IN, I need to convert the INT data type number in java.

    Please help me.


    int in_parm1 = 0;
    Number in_param;
    Request_id number;
    request_id = new Number (0);
    getDBTransaction () .commit ();
    TXN OADBTransaction = getOADBTransaction();
    int l_user_id = txn.getUserId ();
    int l_resp_id = txn.getResponsibilityId ();
    int l_resp_appl_id = txn.getResponsibilityApplicationId ();
    Number of ln_user_id = new Number (l_user_id);
    Number of ln_resp_id = new Number (l_resp_id);
    Number of ln_resp_appl_id = new Number (l_resp_appl_id);
    CallableStatement cs = txn.createCallableStatement ("start oaf_request(:1,:2,:3,:4); end; ", 1) ;
    Try
    {
    System.out.println ("run ahead");
    cs.registerOutParameter (3, Types.VARCHAR, 0, 100);
    cs.registerOutParameter(1,in_param);
    cs.registerOutParameter(4,Types.NUMERIC);
    DSI Execute();
    in_parm1 = cs.getInt (4);
    request_id = new Number (in_parm1);
    System.out.println ("Request ID" + in_parm1);
    System.out.println ("run after");
    DSI Close();
    System.out.println ("result");
    }
    catch (System.Exception e)
    {

    throw OAException.wrapperException (e);

    }

    I would tell you to go through the "appeal of PL/SQL procedures and functions" Section in the User Guide.
    Example and the details are there reference.

    Thank you

  • How to get the create view sql statement

    I have a technical problem

    There is a view in the database, for example "topstudentsview" and sql statement is ' select * student where scores > 90;

    My question is how to get the sql statement of the view. I want to get the sql statement in the topstudentsview

    Is the equivalent in MS Sql

    sp_helptext 'topstudentsview '.

    How in Oracle?

    Thank you

    user10182401 wrote:
    My question is how to get the sql statement of the view.

    Simple answer: use a tool. Almost every development tool will give you an option for this requirement.

    In Oracle SQL Developer (free), it's as simple as:

    Connect to the database with the user and click on "views".
    Select the appropriate view, and then click the SQL tab.

  • How to disable the Validation of the LOV on the search screen?

    I have a request for information form to allow the user to search from a main table.

    I added a LOV next to one of the research area to allow the user to get the code corresponding to the search as below.

    LOV Queries.jpg

    The LOV works very well and the user can select a value in the LOV and its target of search result.

    However, if the user manually entered something in this text field that is not a value valid within the LOV, adf exception out.

    It seems that it is because the validation against the VO LOV. Is it possible to disable LOV the validation on this job? Thank you!

    Best regards
    Eric

    In fact, I request for ongoing service thereon.

    First Support of Oracle responded with "this is not a bug, this is normal!"

    Then I sent PM to several product managers and it are created internal bugs for issues related to this lov generated automatically in the facets of filter...

    There is no activity on the SR for almost 2 months...

    So if you have a support account, you can ask them (and refer to: Bug 20071215 - thrown exception table when the value in the field filter does not exist in lov, Bug 20071193 - using operator in the filter of the bird exception table when the column has associated lov)

    There are other issues, such as: If you meet several attributes in lov model-driven, it will also in filter fields, it is unclear what will happen if you have several lovs assigned to the attribute even,...

    Dario

  • How to use the validator for an inputtext inside the af: column

    Hi Experts ADF,

    Jdev version 11.1.1.7.0

    I created a datacontrol pojo based. And trained as a table in a jsf page. I have a column in which I have an inputText.

    Initially the inputText is a certain values as 0, 10 and 12 respectively.

    Now, I want the end user to change some values in this column and the validation range must be between 1 and 10000.

    But after using the validator if other lines have default values 0 then validation is triggered for all lines.

    Thank you

    AR

    Try to put the table in clickToEdit mode.

    Timo

Maybe you are looking for