Multiple arguments passed in function's input

Hello..
Kind of a silly question but I have a function with accepts 3 parameters as:
var Exposed = {};
            Exposed.trace = function(url,locationID,departmentID) {       
                air.trace("Url is: " + url + locationID + departmentID);                               
                var urlReq = new air.URLRequest(url);    
                urlReq.method='POST';                   
                air.navigateToURL(urlReq);   
So in my java class how shoudl I call the above method specially in trace().
as passing one parameter is fine, but with additional one it's giving me an issue...
Clients.evalJavaScript("window.parentSandboxBridge.trace(\"" + url + " \")");
Thanks for the help in advance.

I am not familiar with the Clients.evalJavaScript() code. What script contains this code:
Clients.evalJavaScript("window.parentSandboxBridge.trace(\"" + url + " \")");
I had assumed it was Java (which you mention in your post). Is it from some Ajax framework?
Does something like this work:
Clients.evalJavaScript("window.parentSandboxBridge.trace(\"" + url + "\", " + locationID + ", " + departmentID + ")");
If not, can you please provide the code in which you are trying to pass in three parameters?

Similar Messages

  • How to pass argument in main function ?

    How to pass arguments in main function of one class from another class ?
    I don't want to pass argument from command prompt.
    I want to try something like this -
    class Test{
    public static void main(String args[]){
    for(int i=0;i<args.length;i++)
         System.out.println(args);
    class Fun{
    public static void main(String args[]){
         Test t=new Test("Hello","good bye");
    when i run Fun class it gives error.
    Suggest me how can i do that.

    In Fun class main method does not take arguments that is fine. In Test class instead of main method you can have constructor to take input parameters as suggested by BalusC
    However, if you want to make your existing code work, you can call (though not appropriate) main() method of Test class from main() method of Fun class (As main() method is static object is not required to invoke this):
    Test.main(new String[]{"Hello","good bye"});Here is your code:
    class Test{
    public static void main(String args[]){
    for(int i=0;i<args.length;i++)
    System.out.println(args);
    public class Fun{
    public static void main(String args[]){
    //Test t=new Test("Hello","good bye");
    Test.main(new String[]{"Hello","good bye"});
    } Thanks,
    Mrityunjoy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to pass OAF filed data as a argument to custom function

    Hi All,
    I am doing controller extension. I have the following doubt will you please solve my doubt.
    My doubt is how to pass the standard page filed data as an argument to custom function.
    Let us assume that in my standard page i have item details (item number, description and uom.......)
    and i need to pass item number as an argument to my custom function.
    How to do this?
    Please help me on this.
    Regards
    Zaheer.

    Hi
    Thanks a lot for replying me, Thanks again and again.
    The error which i am getting is as follows:
    Actually iam extending egocancelapplypagebuttonbarco.
    in this co we have code on Apply button iam writing my code there.
    My code is as follows:
    package oracle.apps.ego.common.webui;
    import java.sql.*;
    import oracle.apps.ego.item.eu.util.EgoItemContext;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.form.OAFormValueBean;
    import oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean;
    import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
    import oracle.apps.fnd.framework.webui.beans.nav.OABreadCrumbsBean;
    import oracle.jbo.Transaction;
    import oracle.cabo.ui.beans.layout.PageLayoutBean;
    import oracle.cabo.ui.beans.nav.LinkBean;
    import oracle.jbo.ApplicationModule;
    // Referenced classes of package oracle.apps.ego.common.webui:
    // EgoCancelApplyPGButtonBarCO
    public class EgoCancelApplyPGButtonBarEXTCO extends EgoCancelApplyPGButtonBarCO
    public EgoCancelApplyPGButtonBarEXTCO()
    public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    super.processRequest(oapagecontext, oawebbean);
         String s = null;
    OAFormValueBean oaformvaluebean = (OAFormValueBean)oapagecontext.getPageLayoutBean().findChildRecursive("cancelDestinationHidden");
    if(oaformvaluebean != null)
    s = (String)oaformvaluebean.getValue(oapagecontext);
    if(s == null)
    OABreadCrumbsBean oabreadcrumbsbean = (OABreadCrumbsBean)oapagecontext.getPageLayoutBean().getLocation();
    if(oabreadcrumbsbean != null)
    int i = oabreadcrumbsbean.getLinkCount();
    if(i >= 2)
    s = oabreadcrumbsbean.getLinkDestination(i - 2);
    if(oapagecontext.getSessionValue("EgoCritTempListPgUrl") != null && s == null)
    s = (String)oapagecontext.getSessionValue("EgoCritTempListPgUrl");
    if(s == null)
    s = oapagecontext.getCurrentUrlForRedirect();
    OAButtonBean oabuttonbean = (OAButtonBean)oawebbean.findIndexedChildRecursive("cancelButton");
    oabuttonbean.setWarnAboutChanges(false);
    oabuttonbean.setDestination(s);
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    byte byte0 = 4;
    super.processFormRequest(oapagecontext, oawebbean);
    OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
    if(oapagecontext.getParameter("applyButton") != null)
    oapagecontext.getApplicationModule(oawebbean).getTransaction().commit();
    String s = null;
    if(oapagecontext.getTransactionTransientValue("OverrideEgoCancelApplyPGButtonBarCODestination") == null)
    OAFormValueBean oaformvaluebean = (OAFormValueBean)oapagecontext.getPageLayoutBean().findChildRecursive("applyDestinationHidden");
    if(oaformvaluebean != null)
    s = (String)oaformvaluebean.getValue(oapagecontext);
    if(s == null)
    OAButtonBean oabuttonbean = (OAButtonBean)oawebbean.findIndexedChildRecursive("cancelButton");
    s = oabuttonbean.getDestination();
    try
    oapagecontext.sendRedirect(s);
    return;
    catch(Exception exception)
    return;
    if(byte0 == 4)
    EgoItemContext egoitemcontext = EgoItemContext.getItemContextObject(oapagecontext);
    String s1 = egoitemcontext.getItemNumber();
    try
    CallableStatement callablestatement = oaapplicationmodule.getOADBTransaction().getJdbcConnection().prepareCall("{XXNRITEMUPDATE(?)}");
    callablestatement.setString(1, s1);
    callablestatement.execute();
    callablestatement.close();
    catch(SQLException sqlexception)
    sqlexception.printStackTrace();
    And my error is as follows
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean.processRequest(OAPageButtonBarBean.java:351) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:980) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353) at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430) at oa_html._OA._jspService(_OA.java:82) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175) at oa_html._OA._jspService(_OA.java:92) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175) at oa_html._OA._jspService(_OA.java:92) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456) at org.apache.jserv.JServConnection.run(JServConnection.java:294) at java.lang.Thread.run(Thread.java:595) ## Detail 0 ##
    java.lang.NullPointerException at oracle.apps.ego.common.webui.EgoCancelApplyPGButtonBarCO.processRequest(EgoCancelApplyPGButtonBarCO.java:81) at oracle.apps.ego.common.webui.EgoCancelApplyPGButtonBarEXTCO.processRequest(EgoCancelApplyPGButtonBarEXTCO.java:31) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean.processRequest(OAPageButtonBarBean.java:351) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:980) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353) at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430) at oa_html._OA._jspService(_OA.java:82) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175) at oa_html._OA._jspService(_OA.java:92) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175) at oa_html._OA._jspService(_OA.java:92) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456) at org.apache.jserv.JServConnection.run(JServConnection.java:294) at java.lang.Thread.run(Thread.java:595)
    I hope that u will help me untill i got the solution for this issue.
    Regards
    Zaheer.

  • Is it possible to pass an argument to the function triggered by an event handler?

    Hello All,
    Trying to migrate my way of thinking from AS2 to CS4/AS3.
    Ok, I have 2 buttons on the stage. Each button does almost
    the same thing, so I want to create a single function, and each
    button calls that same function (we'll name that function
    "Navigate")... however, the function will need to end up doing
    something different dependant on which button was clicked.
    So, previously, in AS2, I would've added some code onto the
    buttons themselves with on(release) methods (see CODE EXAMPLE 1)
    So, each button effectively calls the Navigate function, and
    passes a different frame label to the function.
    Now, I'm trying to recreate this functionality in AS3. As you
    all know, on(release) has been done away with (still don't know
    why), but we now have to use event handlers, so I'm trying to
    figure out a way to pass a different frame label argument to the
    Navigate function. Currently I can achieve that by using a switch
    statement to test which button was clicked, and act accordingly
    (see CODE EXAMPLE 2).
    In this over-simplified example, this works fine, but in the
    real world I'm going to have more than 2 buttons, and the Navigate
    function would probably be much more complicated...
    So, I would like to be able to pass an argument(s) (like in
    the AS2 example) to the Navigate function... perhaps in the
    addEventListener() method? I tried this, but got compiler errors
    (see CODE EXAMPLE 3):
    The Million Dollar Question:
    Is it possible to dynamically pass/change an argument(s) to a
    function which is triggered by an event listener? (Or is the event
    that triggered the function the only argument you can have?)
    If this isn't possible, I'd greatly like to hear how you
    folks would handle this (other than having a switch statement with
    12 cases in it)???

    I've found a couple solutions that I'll post below for
    prosperity...
    You could create a Dictionary keyed by the prospective event
    targets and store any information in there you want associated with
    them. Then the navigate function can check that dictionary to get
    it's parameters:
    // Code //
    Button1.addEventListener(MouseEvent.CLICK, Navigate, false,
    0, true);
    Button2.addEventListener(MouseEvent.CLICK, Navigate, false,
    0, true);
    var buttonArgs:Dictionary = new Dictionary();
    buttonArgs[Button1] = "FrameLabel1";
    buttonArgs[Button2] = "FrameLabel2";
    function Navigate(e:MouseEvent):void{
    gotoAndStop(buttonArgs[e.target]);
    This in my eyes, is about the same amount of work as writing
    a long switch statement, but a little more elegant I suppose.
    I had a little trouble understanding the next solution,
    because I didn't quite understand an important piece of information
    about event listeners. The addEventListener () requires a Function
    as the 2nd argument passed to it.
    It didn't quite click until someone pointed it out to me:
    Navigate is a Function...
    Navigate("FrameLabel1") is a Function
    call...
    So by writing just
    Navigate, I'm not actually calling the function at the time
    of the addEventListener call, I'm just supplying the event listener
    with a reference to the name of the function. Then, when the
    listener is triggered, the listener will call (and pass a
    MouseEvent argument to) the Navigate function.
    Conversely, by writing
    Navigate("FrameLabel1") as the 2nd argument, the event
    listener trys to execute the Navigate function at the time the
    addEventListener is instantiated. And, since, in this example, the
    Navigate function returned as ":void" a compile error would occur
    because as I stated, an event listener requires a Function data
    type as the 2nd argument. This would basically be like writing
    addEventListener(MouseEvent.Click,
    void, false, 0, true)
    However, there is a way around this... basically, instead of
    defining the Navigate function as returning a void data type, you
    define it as returning a Function data type, and then nest another
    function (which actually contains the actions you want to perform)
    inside of it.
    Button1.addEventListener(MouseEvent.CLICK,
    Navigate("FrameLabel1"), false, 0, true);
    Button2.addEventListener(MouseEvent.CLICK,
    Navigate("FrameLabel2"), false, 0, true);
    function Navigate(myLabel:String):Function{
    return function(evt:MouseEvent):void{
    gotoAndStop(myLabel);

  • Passing a function argument into LoadListener

    Hi, I was wondering if you could help me, imagin that I have
    a function. This function gets an argument like this:
    function PMFUpdate(PMID){
    Spry.Utils.loadURL("GET", "test/update.php?id="+PMID, true);
    Now, I want to use LoadListener and EventListeners, like
    this:
    Spry.Utils.addLoadListener(function(){
    Spry.Utils.addEventListener("element", "click",
    PMFUpdate(PMID), false);
    But I know this dosn't work! How can I pass PMFUPDATE()
    argument into LoadListener and use it in EventListener.
    Another question, how can I load certain amount of records in
    a XMLDataSet without PagedView.
    Oh, Last question, I bet, How can I stop loading
    XMLDataSet???
    Thanks in advance!

    maby this is what u are looking for in stopping the xml from
    loading;
    http://labs.adobe.com/technologies/spry/articles/data_api/apis/dataset.html#cancelloaddata
    loading data pieces with out paged;
    http://labs.adobe.com/technologies/spry/articles/data_api/apis/dataset.html#getdata
    element selector; maby this will help u out a bit.
    Spry.Utils.addEventListener("element", "click", function(e)
    var PMID = (how ever u where gonna get the id)
    PMFUpdate(PMID);
    return false;
    }, false);

  • Event Handlers which trigger functions with multiple arguments

    I am playing two video clips back to back. I have a few
    things which I need to do in between clips, so what I am doing for
    each is adding a handler for VideoEvent.COMPLETE, at which time i
    want to call a function which takes multiple arguments, like this:
    video.addEventListener(VideoEvent.COMPLETE,
    myFunction("1","2","3"));
    private function myFunction(var1:String, var2:String,
    var3:String):void
    video.removeEventListeners(VideoEvent.COMPLETE, myFunction);
    I've already figured out that getting rid of event handlers
    that trigger anonymous functions is impossible. Please don't tell
    me that it's impossible to remove them if functions require more
    than 0 arguments...

    "muskiemania" <[email protected]> wrote in
    message
    news:gc0pk0$jfb$[email protected]..
    >I am playing two video clips back to back. I have a few
    things which I need
    >to
    > do in between clips, so what I am doing for each is
    adding a handler for
    > VideoEvent.COMPLETE, at which time i want to call a
    function which takes
    > multiple arguments, like this:
    >
    > video.addEventListener(VideoEvent.COMPLETE,
    myFunction("1","2","3"));
    >
    > private function myFunction(var1:String, var2:String,
    var3:String):void
    > {
    > video.removeEventListeners(VideoEvent.COMPLETE,
    myFunction);
    > }
    >
    > I've already figured out that getting rid of event
    handlers that trigger
    > anonymous functions is impossible. Please don't tell me
    that it's
    > impossible to
    > remove them if functions require more than 0
    arguments...
    Any function that you add via addEventListener should expect
    exactly ONE
    argument, the event. And 99.958% of the time, you can take
    that event
    object and figure out exactly what you need to know.
    HTH;
    Amy

  • Passing procedures/functions as arguments ?

    I doubt this is possible but just to make sure: can a procedure or function be passed as an argument to another (or even the same) procedure or function, like in functional programming ? This would help a lot cleaning up a convoluted if-then-else spaggeti piece of code I'm dealing with.
    Thanks,
    George

    It depends on what exactly you want to do. You can pass a function as an argument to a procedure, or another function. The called function gets the result of the parameter function as the argument. You cannot pass a procedure as an argument because a procedure cannot be resolved to a scalar value or collection.
    SQL> CREATE FUNCTION f (p_str IN VARCHAR2) RETURN VARCHAR2 AS
      2  l_ret VARCHAR2(100);
      3  BEGIN
      4     l_ret := 'Hello '||p_str;
      5     RETURN l_ret;
      6  END;
      7  /
    Function created.
    SQL> CREATE PROCEDURE p (p_str IN VARCHAR2) AS
      2  BEGIN
      3     DBMS_OUTPUT.Put_Line(p_str);
      4  END;
      5  /
    Procedure created.
    SQL> exec p(f('World!'))
    Hello World!
    PL/SQL procedure successfully completed.If you want to pass a procedure or function and have the called procedure execute that function then you will need to use dynamic sql.
    HTH
    John

  • The 'argumentname' argument passed to the 'Methodename 'function is not of type 'Dto name'

    Hi, there!
    Sr for that question, because it should be pretty easy to answer, but i'm totally new to coldfusion
    and googled for about an hour now. I have a orm DTO.cfc:
    <cfcomponent entityname="testDTO" persistent="true" table="test"  schema="informix" output="false">
        <!---- properties ----> 
    </cfcomponent>
    and have a service Methode in test.cfc
        <!---- Add test---->
        <cffunction name="createTest" returntype="testDTO" access="remote">
            <cfargument name="item" type="testDTO" required="true" />
            <!---- Auto-generated method
              Insert a new record in test---->
            <cfset entitysave(item) />
            <!---- return created item ---->
            <cfreturn item/>
        </cffunction>
    i try to call via the the <cfInvoke>-Tag
    <cfset lieferant = entityNew('test')>
    <cfinvoke
        component="#request.componentbase#.test"
        method="createTest"
        item="#test#"
        returnvariable="test">
    but the error
    'The ITEM argument passed to the createLieferant function is not of type testDTO.'
    appears on function call. I just can't find a way to tell cf that lieferant is of type testDTO.
    When i type the methodes parameter to struct the methode call works well.
    Thanks for your help in advance!
    Florian

    I'm assuming your extract there isn't quite right:
    <cfset lieferant = entityNew('test')>
    <cfinvoke
        component="#request.componentbase#.test"
        method="createTest"
        item="#test#"
        returnvariable="test">
    You're doing item="#test#", surely this should be item="#lieferant#"?
    In which case, you've done  <cfset lieferant = entityNew('test')>, which is of type "test", not "testDTO"?
    If you're still having trouble, remove the item="" attribute from CFINVOKE and use CFINVOKEARGUMENTs instead.

  • [SOLVED][BASH] Using a string to pass multiple arguments.

    I'm scratching my brain on this little project my friend roped me into.
    I have a function which generates a list of VM's and their states and stores it as a variable. this list is to be presented to the user using the libgui.sh 'ask_option' function. The problem is that the ask_option function does not interpret it correctly. And by saying ask_option isn't doing it right I mean I am expecting a certain behavior, and that expectation is flawed.
    Here are the two parts in question
    #assume VMLIST has a value identical to this assignment after my function call:
    #I have confirmed that this is the exact value
    VMLIST="\"Arch Linux Live\" \"running\" \"Windows XP\" \"power off\""
    ask_option 0 "VMs Present" '' optional "0" "Return to the Main Menu" $VMLIST
    What I actually get shows that ask_option is interpreting each discreet word as an argument. whereas I want the argument to be the text between each quote
    0 Return to Main Menu
    "Arch Linux
    Live" "running"
    "Windows XP"
    "power off"
    Obviously what I want is a two column output in the dialog that resembles
    0 Return to Main Menu
    Arch Linux Live running
    Windows XP power off
    What should our approach be to rectify this? How can I use the variable to suppply discreet arguments to another function? or rather how can I have the value of the variable interpreted literally on the function call line?
    Last edited by OrionFyre (2011-04-05 19:04:49)

    ARRAYS! I knew that
    Thanks scary face kitteh!
    I should have remembered arrays. alas. that's what happens when you don't use it for a while.

  • Send multiple argument to backend method

    Dear All,
    I am trying to send the multiple arguments to backend server method using Remote Object. At the backend I am using Weborb for .net
    private function initWebOrb(event:AppEvent):void
        weborbCallback = event.callback;
    var method:String = event.data.method as String;
    var data:Array  = event.parameterdata;
    var op:AbstractOperation = remoteDataObject.getOperation(method);
    op.addEventListener("result", getListResultHandler);
    op.addEventListener("fault", onerrorweborb);
    op.arguments =data;
    op.send();
    but It shows the error unable to find method with name "Testmethod"  and the given argument types  at Weborb.Util.MethodLookup..........
    I have also tried.
    private function initWebOrb(event:AppEvent):void
       weborbCallback = event.callback;
    var method:String = event.data.method as String;
    var data:Array  = event.parameterdata;
    var op:AbstractOperation = remoteDataObject.getOperation(method);
    op.addEventListener("result", getListResultHandler);
    op.addEventListener("fault", onerrorweborb);
    op.send(data);
    I also tried to send the data as object
    var data:Object  = event.parameterdata;
    Note: I change the argument type accordingly while dispatching this event.

    try this
    <%
    int parameter=0;
    %>
    <f:invoke var="${bpmobject}" methodName="oper" retAttName="op" retAttScope = "Page">           
                   <f:arg value=<%= parameter> type="int"/>
    </f:invoke>
    the name of bpmobject passed in the arguments form ...
    edit : http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/taglib/f/arg.html
    Edited by: cealex on Jan 24, 2010 5:34 AM - :pass "parameter" Parameter :)

  • HTTP-400 Too many arguments passed error

    I am getting the following error when using a multiselect list item to select/update data in the tabular form.
    Bad Request
    Your browser sent a request that this server could not understand.
    mod_plsql: /pls/otn/wwv_flow.accept HTTP-400 Too many arguments passed in. Got 2346 parameters. Upper limit is 2000
    Oracle-Application-Server-10g/10.1.2.3.0 Oracle-HTTP-Server Server at apex.oracle.com Port 80
    I have built this prototype application on the Oracle’s hosted apex.oracle.com site.
    The application page has three sections. Section 1 is an HTML region with the multiselect list. Section 2 is an HTML region with 20 text items. Section 3 has the tabular form with 25 columns that are used to update the data. The tabular form pagination values “Number of Row” and “Maximum Row Count” are set to 500.
    Up until now, the multiselect list in the Section 1 was just a simple select list and I never had any issues. I guess the number of arguments passed was low. Per our customer requirement, I had to change the simple select list to a multiselect list. Now, If I select multiple values in the select list, I get the above mentioned error. But, it does not seem to happen all the time. For example, the first time I select 3 values in the multiselect list, the page renders fine, and I am able to enter/save data in the tabular form. Then, I select two other values in the multiselect list, I would get the error.
    I am getting this error on the Oracle’s hosted apex.oracle.com site where my prototype application exists. And, according to the error oracle is using 10g/10.1.2.3.0. Is there any way to circumvent this issue so I can demo my application to the customer using the multiselect list?
    I found several threads on this forum regarding the same error and it seems that there was a bug in the older versions of Oracle Application server. Also, there were discussions about setting the PlsqlMaxParameters.
    Our dev/test/prod environment would be set up using the Oracle Application Server-10g/10.1.3. The question is would we need to add a line to set the PlsqlMaxParameters value in the plsql.conf file? In addition, what is the maximum value that it can be set to?
    Please forgive me for the longwinded description and the question - only way I could describe the situation.
    Thanks,
    DP

    Varad and Sc0tt,
    Thank you both for your responses.
    Varad – Yes, I can/will reduce the amount of data so it does not cause the tabular form to go over the 2000 field limit. If that is not possible, I will at least make the users aware of this issue. Since the same data is used for the other pages in the application, the users might want to keep all the data.
    Sc0tt – thanks for providing the information for your environment and settings. To plan for the future, we will have to set the value to something high also, around 8-10K range, and adjust later if we have to.
    Thank you both, I will mark both of your answers as helpful and the question as being answered.
    DP
    (Have either of you used the jquery datepicker solution? If yes, can you please take a look at my thread: Thread: Jquery Datepicker calendar problem with page scrolling
    Jquery Datepicker calendar problem with page scrolling

  • Search help(f4)  for function module input

    can we create a serch help for  function module input giving process

    Hello basichodary,
    You can encapsulate the function module within a program.  Include the search help in a parameter statement in the calling program and pass the parameter to the function module.  For example, suppose you want to have field i_carrid to have a search help.  Use the following code. 
    report  call_function_module.
    parameters p_carrid type s_carr_id matchcode object demo_f4_de.
    call function 'FUNCTION_MODULE'
       exporting
          i_carrid    = p_carrid
    Kind Regards,
    Rae Ellen Woytowiez

  • Pass a datarow as input parameter in a stored procedure

    Hi everyone!
    I wonder if anyone know how to pass a datarow (better if tipized like "tablenameRow") as input parameter for a stored procedure.
    links or suggestions are welcome! (i'm newbie in .net programming, so if you can post some code i'll be really grateful!)
    Thank you!

    Hi,
    YES!! its possible you can pass a datarow to a SP from your Dot net application.
    Here below i'm going to give you an example for Desktop Application.
    For Passing a datarow as Input Parameters, your SP need to support for all these parameters.
    I mean, if a data row has 03 Columns. Then your procedure should be able to take 03 arguments/parameters.
    --Adjust code according to your need.
    --Its for C# Desktop application.
    --Visual Studio Professional, Framework (2.0)
    //Setting connections.
    OracleConnection con=new OracleConnection("Data Source=orcl9i; user id=scott; password=tiger");
    OracleComand cmd=new OracleCommand(con);
    cmd.Type=CommandType.StoredProcedure; //you are useing SP
    cmd.Text="my_stored_procedure"; //Mention SP name.
    --if DataRow has Three columns. You need three parameters.
    OracleParameter p1=new OracleParameter ();//By default parameters are input parameters.
    OracleParameter p2=new OracleParameter ();
    OracleParameter p3=new OracleParameter ();
    //We assume that Datarow already has data in it.
    p1.ParametersName="sp_var1 ";
    p1.OracleDbType=OracleDbType.Varchar;
    p1.Value=tablenameRow[1]; //Here DataRow object's Column1 is input.
    p2.ParametersName="sp_var2 ";
    p2.OracleDbType=OracleDbType.Varchar;
    p2.Value=tablenameRow[2]; //Here DataRow object's Column2 is input.
    p3.ParametersName="sp_var3 ";
    p3.OracleDbType=OracleDbType.Varchar;
    p3.Value=tablenameRow[3]; //Here DataRow object's Column3 is input.
    cmd.OracleParameter.Add(p1); //Add parameters.
    cmd.OracleParameter.Add(p2); //Add parameters.
    cmd.OracleParameter.Add(p3); //Add parameters.
    cmd.ExecuteNonQuery(); //Execute Procedure here.
    Feel free to ask if still found problem.
    ....

  • HTTP-400 Too many arguments passed

    Hello There,
    I installed the fresh 10g and applied patchset 2 on it. I get following error:
    HTTP-400 Too many arguments passed upper limit is 2000
    Please help

    Hello Qiang,
    Little more detail for your reference.
    README for 3355915
    MODPLSQL VERSION 9.0.2.6.0A ONE-OFF PATCH
    Date: January 6, 2004
    o What is in this patch?
    -> FIXES FOR:
    Bug#3355915 : BACKPORT BUG#3329645
    Bug#3116388 : TASK: MOD_PLSQL DOES NOT ALLOW PASSING MORE THAN 2000 PARAMETERS
    Bug#3024540 : NON-SUCCESS CODES WITH NO CONTENT SHOULD SERVE OHS ERRORDOCUMENT
    Bug#2023253 : NLS:FILE IS NOT PROPERTY UPLOADED IF IT'S FILENAME CONTAINS 0X5C
    Bug#3329645 : MODPLSQL IS UNABLE TO PASS PARAMETER LESS THAN 32K BYTES
    Bug#3264502 : DOC PATH REQUEST WITH PERPACKAGE AUTH CALL WRONG AUTH FUNCTION
    Bug#2802064 : ORA-01036 ILLEGAL VAR NAME/NUMBER USING VARIABLE NAMED P_ARRAY
    o What version can I apply this patch on?
    -> iAS 9.0.2.x.x

  • Error: [msnodesql] Invalid passed to function query

    i create a schedule. 
    I try to run this code:
    var todoItemtable = tables.getTable('TodoItem');
    var item = {text:"blahblah"};
    todoItemtable .insert(item, {
    success: function() {
    console.log('Inserted event: ', item);
    or this:
    var sql = "select * from TodoItem";
    mssql.query(sql, {
    success: function(results) {
    console.log('Success: ', results);
    }, error: function(err) {
    console.log('Error: ', err);
    but always get an error: [msnodesql] Invalid passed to function query. Type should be .
    What is the problem? What am I doing wrong?

    Mal,
    I think that need to provide more information about what you are doing when you get this error. This appears to be a LV error.
    1)What version of LV are you using? What are you doing in TestStand when you get this error?
    2)Is your TestStand sequence calling a VI from which this error is generated? If so what is this VI doing?
    3)Can you isolate the source of this error to a particular VI that is using queues?
    4)How often does the error occur?
    5)The path of Queue Core.vi is \vi.lib\Platform\synch.llb\Queue Core.vi. Can you put some probes on the input of this VI to determine what inputs are causing this error? What are all of the inputs to this VI when the error occurs?
    6)Is queue being created or destroyed? Is an element being added or removed from a que
    ue?
    7)Is this your queue or a queue used by one of LV's VIs?
    Unless someone has had this exact error, then it is going to be difficult to debug without more information. Clearly, the problem is easiest to solve if it is reproducible by others.

Maybe you are looking for

  • Can't copy some files from Windows 7 to Mac OSX over network

    Hi, I'm running the latest version of Max OSX v10.8.4 on a brand new Macbook Pro. I have followed the setup instructions at http://www.7tutorials.com/how-change-workgroup-mac-os-x-easy-networking to access my Macbook from Windows, and http://www.howt

  • Mapping issue replicating sub nodes

    Here's what I have Messages 1:1 Source_MT 1:1 - OrderNum 1:unbounded - Header 1:1 - - Text 1:unbounded - - - TextId - - - TextLine Target is an RFC structure Messages 1:1 BAPI_SO 1:unbounded - SONumber 1:1 - Order_text - - Item 1:unbounded - - - Text

  • Javascript in weblogic 10.3

    Hi.. Can anyone help tell me how to use javascript in 10.3. I've tried the following option:      var form = document.getElementById(lookupIdByTagId("searchForm", this));      var ban = form[lookupNameByTagId("ban_num", this)]; The form object always

  • Advanced TDMS, Set Channel Information

    Hello, I have a problem with scaling in and TDMS File. I´ll try to explain what i want to do. I work on a system that streams data from 2 PXIe 5122 via peer to peer streaming to 2 NI 7962R FPGA FlexRIO cards. After that I want to stream my measuremen

  • EL expressions not evaluating after JSF 1.1 --- 1.2 upgrade.

    I am having a problem with EL expressions not evaluating in a JSF application that I just upgraded from Apache MyFaces JSF 1.1 to JSF-RI 1.2 and from Tomcat 5.5.25 to 6.0.26. After the upgrade the entire application is working fine except for EL expr