Call package function in view object

ok i have a viewobject with a select statement to a table.
in the where clause i would like to call to a package function,
how can i do this?

If you can call the function in a sql statement (i.e. in SQLDeveloper) you can use expert mode in the VO and type in the sql statement there. It should work like in SQLDeveloper.
Timo

Similar Messages

  • Can we call custom functions in view objects?

    Can we call custom functions in view objects?these custom functions are from my backing bean...
    Please help.....

    User,
    You can certainly add code to your view objects to do whatever you like.
    However, it would be considered a very bad practice to call something in the backing bean from your view object. It violates the whole MVC design principle of ADF.
    Perhaps if you can share your real use case, someone will give you ideas about the best way to do it, but I, for one, would advise you to forget about calling a backing bean function from your view object.
    Best,
    John

  • Calling a function on an object passed as argument

    Hi everyone,
    i'm trying to call an actionscript function on an object passed as argument to a c function. Here are how I do :
    I have a class named test_class implemented as
    package
         public class test_class
              public var bliblou:int;
    and a C function that have to modify the bliblou var of an test_class object passed as argument. Here is my function :
    static AS3_Val test_obj_param( void* self, AS3_Val args )
         AS3_Val obj;
         AS3_ArrayValue( args, "AS3ValType ", &obj );
         AS3_Set( obj, AS3_String("bliblou"), AS3_Int( 123456 ) );
         return AS3_Null();
    Then I call the function in my actionscript main function like this :
    var loader:CLibInit = new CLibInit;
    var lib:Object = loader.init();
    var test:test_class = new test_class();
    lib.test_obj_param( test );
    But when the test_obj_param is trying to run, I obtain an error saying "unable to access a propriety of a null object".
    What am I doing wrong ? Is it possible to do what I try to (calling a function on an object passed as argument) ?
    Thanks in advance

    After a long trip to Alchemy possibilities and a lot of tests I have finally found a solution to my question.
    Instead of using AS3ArrayValue to get my objet, I use the AS3 function shift on the args array to get my object. Here is how I do
    static AS3_Val test_obj_param( void* self, AS3_Val args )
         AS3_Val emptyParams = AS3_Array("");
         AS3_Val obj = AS3_CallS( "shift", args, emptyParams );
         AS3_SetS( obj, "bliblou", AS3_Int( 123456 ) );
         AS3_Release(emptyParams);
         return AS3_NULL();
    Maybe there is a bug in the AS3ValType getter.

  • Muse JS Assert: Error calling selector function:Type error: Object has no method Muse Menu

    When exporting html and viewing locally we receive the following error... This error disappears after removing menu from top of page. This error does not occur when viewed on Outdoors360.businesscatalyst.com (our temporary site)
    Muse JS Assert: Error calling selector function:Type error: Object has no method Muse Menu
    Any ideas??

    I fix the problem.
    I have carefully reviewed JAVASCRIPT files and I could see that these are not a major influence within the site, only are reference code and utilities of the same application.
    By removing these files nothing has stopped working, I thought I would have some error in the sliders, or opacities, but no, nothing happened.
    DELETE IT
    FRANCISCO CATALDO DISEÑADOR GRÁFICO

  • JAVA Calling Oracle Function and Returning OBJECT

    HI,
    I am working as a developer in java/j2ee project.
    I am facing one issue:
    I need to call Oracle function from java code. Oracle User define function is residing in oracle package and returning Object which contains data.
    Can you please help me
    With Best Regards

    golduniya wrote:
    I need to call Oracle function from java code. Oracle User define function is residing in oracle package and returning Object which contains data.
    Can you please help meIt requires a great deal of Oracle jdbc driver specific code.
    [http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/oraint.htm#1012664]

  • Calling a function of an object

    If I have an object, and then create a function in this
    object, what syntax
    do I use to call this function?
    SEND_VOTE_OBJECT = new Object();
    SEND_VOTE_OBJECT.SEND_VOTE=function(){
    //function code
    SEND_VOTE_OBJECT.SEND_VOTE();
    I thought this would work but it doesn't!
    What would be the correct syntax?
    Many thanks
    Dave

    Thanks for the reply, it has made me look closer.
    In my actual code I was calling the function before the
    function was
    defined, and that was why it wasn't working.
    i.e like this
    SEND_VOTE_OBJECT = new Object();
    SEND_VOTE_OBJECT.SEND_VOTE();
    SEND_VOTE_OBJECT.SEND_VOTE=function(){
    trace('hi')
    "NSurveyor" <[email protected]> wrote in message
    news:e7m93a$29d$[email protected]..
    > That code works fine:
    >
    > SEND_VOTE_OBJECT = new Object();
    >
    > SEND_VOTE_OBJECT.SEND_VOTE=function(){
    > trace('hi')
    > }
    >
    > SEND_VOTE_OBJECT.SEND_VOTE();
    >
    > As you can see, hi is traced in the output panel, as it
    should. Perhaps
    > you
    > have a problem with your function code. If you post
    that, perhaps I can
    > help.
    >

  • Import package and create view object

    Hi,
    How can i import package from another project and create a new view object with my package and with the imported package.
    Thanks
    null

    Hi,
    How can i import package from another project and create a new view object with my package and with the imported package.
    Thanks
    null

  • Jsp calling a function in js -- object expected runtime error

    Hi,
    I have a js file. script.js
    *function popup( url ) {*
    newWin=window.open(url,'popupWindow,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes');
    newWin.focus();
    void(0);
    and a jsp calling the function in js
    *<HTML>*
    *<HEAD>*
    *<SCRIPT>*
    *<jsp:include page="script.js"/>*
    *</SCRIPT>*
    *</HEAD>*
    *<BODY onLoad="javascript:popup('http;//www.google.com');">*
    *</BODY>*
    *</HTML>*
    Now when i execute the jsp, it gives runtime error -> object expected..
    Not able to figure out why this occurs.. am I doing it the right way ?

    Do you think is this the right way to include .js file...
    <SCRIPT>
    <jsp:include page="script.js"/>
    </SCRIPT>I generally do this way...
    <head>
    <script language="javascript" src = "script.js">
    </script>
    </head>

  • Calling Package Function dynamically using Forms_DDL

    I am trying to write a validation trigger which will validate entries within a text field. It will call a packaged function based on an entry within the Rule form field. As the data within the text field will vary (sometimes numeric, date, text etc), the validation function will also vary accordingly. Example details are shown below (this example will force the entry of a Y or an N):
    FORM FIELDS
    ARG_DEFAULT1 X (This is the parameter to be submitted to the function)
    RULE1 VAL_CHK_0001 (Function to be called).
    FUNCTION CODE
    FUNCTION VAL_CHK_0001 (P1 VARCHAR2) RETURN NUMBER IS
    SQL_RESULT NUMBER;
    ALERT_ID ALERT;
    ALERT_OK NUMBER;
    BEGIN
    IF UPPER(P1) NOT IN ('Y', 'N') THEN
    :GLOBAL.MSG := 'You must enter either "Y" for Yes or "N" for No - please re-enter';
    SQL_RESULT := '1';
    ALERT_ID := FIND_ALERT('VAL_ERROR_ALT');
    SET_ALERT_PROPERTY(ALERT_ID, TITLE, 'Validation Error');
    SET_ALERT_PROPERTY(ALERT_ID, ALERT_MESSAGE_TEXT, :global.msg);
    ALERT_OK := SHOW_ALERT(ALERT_ID);
    RAISE FORM_TRIGGER_FAILURE;
    RETURN SQL_RESULT;
    ELSE
    SQL_RESULT := '0';
    RETURN SQL_RESULT;
    END IF;
    END VAL_CHK_0001;
    VALIDATION TRIGGER CODE (CURRENT)
    DECLARE
    PKG_RUN VARCHAR2(200);
    BEGIN
    IF :PARAMETER_BK.RULE1 IS NOT NULL THEN
    PKG_RUN := ENV_VALIDATE_PKG.VAL_CHK_0001(:PARAMETER_BK.ARG_DEFAULT1)):
    FORMS_DDL(PKG_RUN);
    END IF;
    END;
    When the Rule1 field data is hard coded in (as shown above), it all runs fine and the Alert box is displayed as expected.
    I need the function name to refer to the rule1 parameter (and not a specific value) as shown below:
    PKG_RUN := 'ENV_VALIDATE_PKG.'||:PARAMETER_BK.RULE1||'('||:PARAMETER_BK.ARG_DEFAULT1||')';
    The form compiles without any errors but when the trigger runs, it completely ignores the Forms_ddl call and does nothing.
    I have hunted through this forum, Metalink, Ask Tom etc and have had no success in finding any solution. I have followed the instructions within NOTE:1017160.6 (How to programmatically call a procedure or function using Oracle Forms) which has got me this far. Nothing that I have read so far has suggested that what I am attempting to do is impossible.
    We are using Oracle Forms 10G with an Oracle 9.0.4 database.
    Any suggestions or advice will be greatly received!
    Thanks

    Like the others have said, Forms_DDL is a one-way street. You can only pass values to it, nothing can be returned. But you could probably get Forms_DDL to work if you wrote your validations as stored procedures that had only IN parameters. Then if the edit ran ok, just terminate normally, but if there is an edit error, to a Raise_application_error.
    Then you could use Forms_DDL to call the procedure, and check for Form_Success after the call. If it failed, you might be able to retrieve the error message from the Raise_application_error by checking SQLERRM. But that is completely untested, so I do not know whether it would work.
    The more sure method would be to call a package procedure on the database that calls Execute_Immediate, and then returns the result back to the calling form.
    Now a little advice: For generic routines such as this, pass dates and numbers as text, and you could cut down on the number of procedures you need to create and use.
    And last note: Do NOT define numeric variables, like SQL_Result, and then set the value using quotes. You are forcing the PL/SQL process to convert text to number. Always set numeric values like this:
    SQL_Result := 1;
    Now the question I am almost afraid to ask: What problem are you solving by creating these generic edit routines? I am wondering if you could just as easily write simple edit processes faster. ...the only way to completely parameterize editing would be to call a process on the database for each column value, passing the column name and value.

  • How to call package function and procedure by PL/SQL

    Dear all,
    I created a package and I want test it by a select statement. e.g. select packagename.function(1, 'A') . However, there is an error message. "ORA-14551: cannot perform a DML operation inside a query ".
    In the package, there is a function and I passed two parameters to the function and return a number. These two parameters will be used in the cursor select statment. Is there sth wrong that I use the cursor with the parameters? What can I do then?
    On the other hand, I want to test the package procedure by using select statement in SQL Plus. How can I call it (with parameter)?
    Remark: I am using Oracle 8i.
    Thanks for advance!!
    Regrads.

    Hi!
    I don't know why it is not running in ur computer. Pls check the script --
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace package pack_test
      2  is
      3    function try_test(eno in number,depno in number)
      4    return number;
      5* end;
    SQL> /
    Package created.
    SQL> create or replace package body pack_test
      2  is
      3    function try_test(eno in number,depno in number)
      4    return number
      5    is
      6      saln number(10);
      7    begin
      8      select sal
      9   into saln
    10   from emp
    11   where empno = eno
    12   and deptno = depno;
    13  
    14   return saln;
    15    end;
    16  end pack_test;
    17  /
    Package body created.
    SQL>
    SQL> select pack_test.try_test(7777,30) from dual;
    PACK_TEST.TRY_TEST(7777,30)
                           3456-it is working fine in my system.
    Regards.
    Satyaki De.

  • Sql like function in View Object for progammatically

    Hi friends,
    I used Jdeveloper 11.1.1.4.0 ,I need how to get the datas from database using sql like function(select * from tablename where name like 'p%') using viewCriteria by
    programmatically.
    Thanks & Regards,
    Priya.
    Edited by: priya on Apr 8, 2011 3:48 AM
    Edited by: priya on Apr 8, 2011 3:49 AM

    Check the docs: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvvo.htm#sm0341
    Timo

  • BC4J: Override Views Object default package

    Hi all,
    I need to change the package of the views objects when creating the entity object by reverse engineering from DB. As they are created in the same package of the entity objects.
    Thankx

    Yes, you can. No one step can do all thing for me.

  • Use View Object with Alternative Data Sources in View Link

    In my case, I created a view object based on alternative data source (not with SQL query). I have setQuery(null) in the override create() function for this View Object. When I use this View Object at the destination end of the View Link, the setQuery(null) will raise Jbo-26016 exception (You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.) which does not allow me to do that. I looked Avrom's Framework for Database API-Based ADF BC, in which he override the DBTransaction and CallableStatement in order to intercept the default query clause set by the View Link. I'd like to see if there is any alternative ways to achieve my objective?

    Just following up what I found so far. I'm trying to use customized View Object based on alternative data source at the destination end of View Link with ADF 10.1.3.
    1. For the View Object at the destination end of View Link, I can not call setQuery() which will raise Jbo-26016 exception.
    2. I can omit the setQuery(null) call in my customized ViewObjectImpl, and as long as there is no SQL statement in the View Definition XML, it won't cause problem when calling the executeQueryForCollection() of the super class.
    3. The override executeQueryForCollection() must call the super.executeQueryForCollection() in order to get appropriate result (I tried to skip the call and it does not give back any results)
    4. The funny thing is, when I make getQuery() call in my customized ViewObjectImpl (I'm just trying to double check if the Query object is clean or not), the query object is set to "SELECT FROM" following the getQuery() call, and which causes the exceptions when I call super.exeuteQueryForCollection(). I found out later from the Javadoc API which is implemented in that way.
    So I guess my case is resolved by not making specific call to setQuery(null).

  • Why can't I call the function in the swf from the javascript?

    Hello,
    I have an html file that calls the function in swf file. In the swf file, I registered the function to be called using ExternalInterface.addCallback, as the book says.
    And I put this swf file in the html file using <object> tag and attempted to call the function using this object's id attribute.
    But every time to run this file, what I see is the error message such as "test1.show is not a function".
    Why is it?
    Please anyone help me. I am enclosing my work file. It's very simple one.
    Thank you.
    Daniel.

    It is entirely possible your college has decided to block certain websites. It's easy to do.

  • Call a function, which name is in an Array of Strings...

    hey all
    i have a simple Temp class (made to check things) in a file called Temp.java with the following definition :
    public class Temp {
         int data1;
         int data2;
         public Temp (){
              data1=0;
              data2=0;
         (here i have get and set functions for both data1 and data 2, and i have the two following functions)
         public void printAdd(){
              System.out.println("Result : "+(data1+data2));
         public void printSubtract(){
              System.out.println("Result : "+(data1-data2));
    }i have another class called Server who has the following simple code :
    public class Server {
          public static void main( String args[] )
               String[] table={"printAdd","printSubtract"};
               Temp game=new Temp();
               game.setdata1(8);
               game.setdata2(4);
              //the following two calls work perfectly
               game.printAdd();
               game.printSubtract();
                   System.out.println(table[0]);
    //but the following does not...
               game.(table[0]);
    }as probably you have understood i am trying to call a function to the object game which name is in the String table... how can i actually made a call game.(THE_VALUE_OF_STRING_IN_AN_ARRAY) ...?

    i want to call the function printAdd() to the game object..
    but i want the program to find out the name of the function to call.. i want to execute the function whose name is at the array in position 0 -> table[0]
    so i want the program to resolve the table[0] to printAdd and the use it and call it on object game...

Maybe you are looking for

  • Transparent Animated Gif not possible anymore in Keynote 09?

    I have created an animated GIF (a series of transparent GIFs) with Adobe Image Ready, which was showing and playing OK on keynote 2.0.2. I have tried the same animated GIF on 5.0, and it seems the transparency of GIF is gone, it plays OK though. It w

  • Missing attributes in soap generated from wsdl schema

    I've generated java control (jcx) from a wsdl and now I'm trying to send a soap message using a generated test jws file. <Values> <Value Line="1"><![CDATA[bla]]></Value> <Value Line="2"><![CDATA[bla]]></Value> <Value Line="3"><![CDATA[bla]]></Value>

  • Storing part of the file content into a variable.

    All, I have a log file containing lots of data now i want to extract all text between block below(only names) without the title/end pattern but only names, ++++START++++ SCOTT TIGER HENRY PAUL JARED TEXAS BILL G. OWENS ++++END++++ the names i want to

  • Nonempty list of broken DCs error when we assemble using CBS

    Hi We created DC and we are going to assemble using CBS. When we assemble, we got below error. Info:Starting Step Check-assembly at 2005-03-15T10:13:57.0250-8:00 Fatal:Contact CBS administrator: Nonempty list of broken DCs -stopping export now Error:

  • Preview in windows folder

    hi i have photoshop cs2 when i save a psd file, and i go to the folder that i saved it in, i cant see the image in the folder.  i only see a photoshop icon. is there a way to see the image, just like i can see a jpeg? thanks in advance