BCS passing dynamic inputs to methods & calling using in O365

Hi all ,
I have a requirement to pass dynamic values to BDC methods & retrieve data, for this I have created a BDC model file(which has SQL server as external source) with GenericInvoker methods & upload same to Admin central. how do we access these generic
methods in Office 365 using JavaScript client object model.
what are the options we have to invoke methods manually by passing dynamic values.
I tried below code. but I getting below error.
The web with URL 'http://XXXXXXXX:26110/sites/RA5' is not an app web. The GetAppBdcCatalog method must be called on an app web.
Any help on this would be appreciated
function retrieveListItems() {
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
context = SP.ClientContext.get_current();
web = context.get_web();
context.load(web);
entity = web.getAppBdcCatalog().getEntity("PersonalDetails", "New external content type");
context.load(entity);
lob = entity.getLobSystem();
context.load(lob);
lobSystemInstances = lob.getLobSystemInstances();
context.load(lobSystemInstances);
context.executeQueryAsync(GetLobSubscribesystemInstance, onQueryFailed);
function Entity() {
alert("Reached the Entity method");
//these are the helper methods and variables
var context;
var web;
var user;
var entity;
var lob;
var lobSystemInstance;
var lobSystemInstances;
// Initialize the LobSystemInstance.
function GetLobSubscribesystemInstance() {
var $$enum_1_0 = lobSystemInstances.getEnumerator();
while ($$enum_1_0.moveNext()) {
var instance = $$enum_1_0.get_current();
lobSystemInstance = instance;
context.load(lobSystemInstance);
break;
context.executeQueryAsync(Entity, onQueryFailed);
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
ragava_28

Hi all ,
I have a requirement to pass dynamic values to BDC methods & retrieve data, for this I have created a BDC model file(which has SQL server as external source) with GenericInvoker methods & upload same to Admin central. how do we access these generic
methods in Office 365 using JavaScript client object model.
what are the options we have to invoke methods manually by passing dynamic values.
I tried below code. but I getting below error.
The web with URL 'http://XXXXXXXX:26110/sites/RA5' is not an app web. The GetAppBdcCatalog method must be called on an app web.
Any help on this would be appreciated
function retrieveListItems() {
// This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model
$(document).ready(function () {
context = SP.ClientContext.get_current();
web = context.get_web();
context.load(web);
entity = web.getAppBdcCatalog().getEntity("PersonalDetails", "New external content type");
context.load(entity);
lob = entity.getLobSystem();
context.load(lob);
lobSystemInstances = lob.getLobSystemInstances();
context.load(lobSystemInstances);
context.executeQueryAsync(GetLobSubscribesystemInstance, onQueryFailed);
function Entity() {
alert("Reached the Entity method");
//these are the helper methods and variables
var context;
var web;
var user;
var entity;
var lob;
var lobSystemInstance;
var lobSystemInstances;
// Initialize the LobSystemInstance.
function GetLobSubscribesystemInstance() {
var $$enum_1_0 = lobSystemInstances.getEnumerator();
while ($$enum_1_0.moveNext()) {
var instance = $$enum_1_0.get_current();
lobSystemInstance = instance;
context.load(lobSystemInstance);
break;
context.executeQueryAsync(Entity, onQueryFailed);
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
ragava_28

Similar Messages

  • How can i pass array as argument in magento api method calling using sudzc API in iphone Native APP

    0down votefavorite
    I am implementing magento standard api method in native iphone app. I use webservice generated by sudzc. To call method I use:
    [service call:self action:@selector(callHandler:) sessionId:@" " resourcePath:@" " args:@""];
    When I used methods e.g. cart.info or product.info in which I have to pass one parameter; it gives valid response. But when I used method e.g. cart_product.add in which I have to pass an argument as value of array it gives error
    SQLSTATE[42000]: Syntax error or access violation:
        1064 You have an error in your SQL syntax;
        check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
    I have tested in SOAP UI also. There also it gives me same error. But same method works in PHP file. Even I tried by creating same soap request which I created using JavaScript but still it doesn't work.
    Can anyone help me to pass array as a parameter using sudzc api to call magento web services?

    There is an error in your SQL.

  • How to pass dynamic selection to logical databse using ldb_process function

    dear friends,
                         can anybode tell me how to pass dynamic selection to the logical database when i m using LDB_PROCESS function module.  however, in EXPRESSIONS paramter of the function module i m  passing the selecti-option, it is passing their also but when i used more than  two select-option or paramter it throw an exception FREE_SELECTIONS_ERROR.
    SO PLEASE GUIDE ME HOW TO PASS MORE THAN TWO SELECT-OPTION IN LOGICAL DATANSE DYNAMICALLY USING LDB_PROCESS.

    would be nice if you post the answer to all

  • Passing dynamic internal table to FM using RFC

    Dear All,
    Is it possible to pass a dynamic internal table to a function module using RFC?
    If it is possible than how do i achive this?

    Basically not, RFC enabled FM parameters must be defined by a LIKE or TYPE clause. so you may try to use a prededined SAP type wide enough (e.g. TAB512 ) and map the data in the FM and caller program (in Unicode try to use tools like class CL_ABAP_CONTAINER_UTILITIES to map data between actual internal table record and RFC used itab "container" type)
    For examples look at RFC enabled RFC_GET_TABLE_ENTRIES FM, and look for where-used program.
    Regards,
    Raymond

  • Trying to pass arguments into a method call and failing

    Hi everyone, I'm fairly new to programming, and newer to Java. I'm currently working on a project that pulls fields from a database based on a name, and I'm having some trouble getting the connection string set up.
    Statically defined, the database connects and the program logic that follows works just fine. The problem is that to future-proof this application, I need to pass the database URL, port, db instance, username, and password into the program as arguments from the batch file that will then be scheduled to run the program on a job-by-job basis.
    Product Version: NetBeans IDE 6.1 (Build 200805300101)
    Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
    System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
    Userdir: C:\Documents and Settings\xxxxxxxxxxx.SPROPANE\.netbeans\6.1
    Here's my current working source (with the network addresses obfuscated):
    package processsqrjob;
    import java.io.*;
    import java.sql.*;
    import java.util.Date;
    public class Main {
         * @param args jobname, jobparameters, HYPusername, HYPpassword, HYPservername, HYPport, oracleDBURL, oracleport (default 1512), SID (dbb?), oracleusername, oraclepass
         * @throws exeption
        // jobname [0], jobparams[1], hypusername [2], hyppassword [3], hypservername [4], hypport[5], oracledburl[6], oracleport[7], sid[8], oracleusername[9], oraclepass[10]
        public static void main(String[] args) throws SQLException
            DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
            Connection con = DriverManager.getConnection("jdbc:oracle:thin:@oracleserver.local.intranet.com:1521:dbname", "username", "pass");
            Statement stmt = con.createStatement();
            Date date = new Date(); //get the system date for output to both the error log and the DB's lastrun field
            System.out.println(date); //print the date out to the console
            System.out.println(args[0]); //print the job name to the console
            String sourcefolder=""; //we're going to load the job source folder into this variable based on the job's name
            String destfolder="";//same with this variable, except it's going to get the destination folder
            try {
                ResultSet rs = stmt.executeQuery("SELECT * FROM myschema.jobs WHERE NAME =\'"+args[0]+"\'");
                while ( rs.next() ) {
                    sourcefolder = rs.getString("sourcefolder");
                    destfolder = rs.getString("destfolder");
                stmt.executeQuery("UPDATE myschema.jobs SET lastrun ='"+date+"' WHERE name ='"+args[0]+"'");//put this after hyp code
    //            System.out.println(sourcefolder);
    //            System.out.println(destfolder);
    //            System.out.println(description);
                stmt.close(); //close up the socket to prevent leaks
            }catch(SQLException ex){
                System.err.println("SQLException: " + ex.getMessage());
                logError(args[0], ex.getMessage());
    }That works, and it connects to the database and everything. But when I pass the variables in from the project properties run settings, I get the following exception:
    Exception in thread "main" java.sql.SQLException: invalid arguments in call
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:207)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:235)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:440)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
            at java.sql.DriverManager.getConnection(DriverManager.java:582)
            at java.sql.DriverManager.getConnection(DriverManager.java:207)
            at processsqrjob.Main.main(Main.java:42)
    Java Result: 1That is with Connection con = DriverManager.getConnection("jdbc:oracle:thin:@oracleserver.local.intranet.com:1521:dbname", "username", "pass"); changed to Connection con = DriverManager.getConnection("jdbc:oracle:thin:@"+args[6]+":"+args[7]+":"+args[8]+"\", \""+args[9]+"\", \""+args[10]+"\"");{code}, with args 6 7 8 and 9 set to url, port, dbinstance, username, and password respectively.
    Perhaps it's the way I'm escaping the quotation marks, but I put that same line inside a System.out.println() and it output it exactly as I had typed it in statically before, so I don't know what it could be.
    I would really appreciate any advice. Thanks in advance for your time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I think you're mixing up SQL and Java. The Java method expects the user name and password as separate parameters, not encoded in one String. So you shouldn't be concatenating args[9] and args[10] at all, they should remain as separate parameters.
    The call should be:DriverManager.getConnection("jdbc:oracle:thin:@" + args[6] + ":"+ args[7] + ":" + args[8], args[9], args[10]);
                                                     parameter 1                                  2         3

  • Batch input data method

    can i know about batch input method in BDCs?

    Hi..,
    <b>DONT POST THE SAME THREADS AGAIN AND AGAIN !! CLOSE UR THREADS, WHEN UR PROBLEM IS SOLVED !! REWARD ALL HELPFUL ANSWERS !!</b>
    BDC:
    Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
    Types of BDC :
    CLASSICAL BATCH INPUT (Session Method)
    CALL TRANSACTION
    BATCH INPUT METHOD:
    Features:
    Asynchronous processing.
    Synchronous updating in database update.
    Transfer data for more than one transaction.
    Batch input processing log will be generated.
    During processing, no transaction is started until the previous transaction has been written to the database.
    CALL TRANSACTION METHOD :
    Features:
    Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
    Updating the database can be either synchronous or asynchronous. The program specifies the update type.
    Transfer data for a single transaction.
    Transfers data for a sequence of dialog screens.
    No batch input processing log is generated.
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    regards,
    sai ramesh

  • Making an asynchronous method call in Oracle Weblogic Workshop 10.3.2

    Hi,
    Need to make a non blocking asynchronous method call from my application.
    There is an http url which i need to call but in asynchronous way.
    example:
    URL myPage = new URL("http://www.mypage.com/");
    URLConnection yc = myPage.openConnection();
    but the method to be invoked in non blocking or asynchronous way, so that the thread doesn't get stuck when the server of the target url ( http://www.mypage.com) is not working.
    regards
    pramod
    mumbai/India.

    Hi Pramod,
    Well in generally all the Synchronous call only if you want to achieve asynchronous method calls use Web-services method call.
    Here is link which help you to achieve your task.
    http://docs.oracle.com/cd/E11035_01/wls100/webserv_adv/asynch.html
    Regards,
    kal

  • Passing input parameters to the method call in ADF task flow.

    Hi,
    I have the following use case:
    There is a task flow with 2 jspx pages. In the first page I have 2 input search parameters and search button. the search button calls the webservice data control execute (GET_ACCOUNTOperation) method .
    Displaying the search results in the same page is not a problem , but my requirement is that the search results are to be displayed in the second page in tabular form.
    To achieve this, I dragged the execute method as the method call in the task flow and specified the input parameters for the method call (right click and add parameters) . I am getting the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.lang.String, java.lang.String)
         at com.sun.el.util.ReflectionUtil.getMethod(Unknown Source)
         at com.sun.el.parser.AstValue.getMethodInfo(Unknown Source)
         at com.sun.el.MethodExpressionImpl.getMethodInfo(Unknown Source)
         at oracle.adf.controller.internal.util.ELInterfaceImpl.getReturnType(ELInterfaceImpl.java:214)
         at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:135)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1035)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:921)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:820)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:552)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:148)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:109)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:78)
         at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:43)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    even though the execute method is there and the service is up and running. I am not sure whether its the correct way of doing it. Please shed some light on how to solve this use case
    Some additional info:
    Under the data controls pallete, the GET_ACCOUNTOperation method has a parameters section , which has "part" (java.lang.Object) as
    the input parameter.
    Regards,
    Rampal

    Hi,
    thanks for the quick turn-around. Jdev version that i am using is Studio Edition Version 11.1.1.6.0. And i am using SOAP. Isnt there a way without using a backing bean? I am planning to use it as a portlet. Would'nt creating a backing bean cause a problem in that case?? Also i am confused here . The method that i am dragging is GET_ACCOUNTOperation(Object). I tried passing the hashmap . It gave the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.util.HashMap)
    Rampal

  • Using a dynamic variable in the Import command of a Method call

    Hi,
    I am trying to make a Method call fully dynamic.
    I have found out how to make the Method name dynamic, but I am having trouble figuring out how to make the Importing statement dynamic.
    in my code below:
          CALL METHOD o_main->(v_call)
            IMPORTING
              it_ekko = i_ekko.
    I would like to know if it's possible to make both "it_ekko" AND "i_ekko" dynamic so I can use this same call for various tables.
    Hope that makes sense...thanks for your help.
    Andy

    Hi Andrew,
    The method call is fully dynamic; not only the parameters can be specified dynamically but also the method name.
    This is a help extract:
    DATA: line     TYPE c LENGTH 80,
          text_tab LIKE STANDARD TABLE OF line,
          filename TYPE string,
          filetype TYPE c LENGTH 10,
          fleng    TYPE i.
    DATA: meth  TYPE string,
          class TYPE string,
          ptab TYPE abap_parmbind_tab,
          ptab_line TYPE abap_parmbind,
          etab TYPE abap_excpbind_tab,
          etab_line TYPE abap_excpbind.
    DATA: exc_ref TYPE REF TO cx_sy_dyn_call_error,
          exc_text TYPE string.
    class    = 'CL_GUI_FRONTEND_SERVICES'.
    meth     = 'GUI_DOWNLOAD'.
    filename = 'c:\temp\text.txt'.
    filetype = 'ASC'.
    ptab_line-name = 'FILENAME'.
    ptab_line-kind = cl_abap_objectdescr=>exporting.
    GET REFERENCE OF filename INTO ptab_line-value.
    INSERT ptab_line INTO TABLE ptab.
    ptab_line-name = 'FILETYPE'.
    ptab_line-kind = cl_abap_objectdescr=>exporting.
    GET REFERENCE OF filetype INTO ptab_line-value.
    INSERT ptab_line INTO TABLE ptab.
    ptab_line-name = 'DATA_TAB'.
    ptab_line-kind = cl_abap_objectdescr=>changing.
    GET REFERENCE OF text_tab INTO ptab_line-value.
    INSERT ptab_line INTO TABLE ptab.
    ptab_line-name = 'FILELENGTH'.
    ptab_line-kind = cl_abap_objectdescr=>importing.
    GET REFERENCE OF fleng INTO ptab_line-value.
    INSERT ptab_line INTO TABLE ptab.
    etab_line-name = 'OTHERS'.
    etab_line-value = 4.
    INSERT etab_line INTO TABLE etab.
    TRY.
        CALL METHOD (class)=>(meth)
          PARAMETER-TABLE
            ptab
          EXCEPTION-TABLE
            etab.
        CASE sy-subrc.
          WHEN 1.
        ENDCASE.
      CATCH cx_sy_dyn_call_error INTO exc_ref.
        exc_text = exc_ref->get_text( ).
        MESSAGE exc_text TYPE 'I'.
    ENDTRY.
    BR,
    Valentin

  • Passing a method call to a facelet tag

    Hello,
    I am trying to create a JSF confirmation box that replaces the Javascript confirm() function. I am using Seam and Rich Faces 3.2.1. The confirm box is a facelet tag that pops up a modal box with 'cancel' and a 'continue' buttons. Everything is working correctly except for one crucial piece; passing the method call for continue button.
    Here is the set up for the facelets tag in the main xhtml page:
    <at:confirm
        id="confirm"
        title="Confirm"
        message="Do you want to continue"
        buttonText="Continue"
        backingBean="#{confirmAction}"
        method="testMethodTwo"
    />Here is the code for the button inside the facelets tag:
    <a4j:commandLink
        styleClass="rdSplGr1"
        href="#"
        action="#{backingBean[method]}">
        <s:span>#{buttonText}</s:span>
    </a4j:commandLink>The method simply does nothing when the use clicks the button. I am assuming this is due to the lack of "()" however there does not seem to be a way to get those in there. I have tried the following:
    1) placing the parens like this - method="testMethodTwo()"
    2) placing the parens like this - action="#{backingBean[method]()}"
    The first does nothing, the second causes an EL exception.
    I know that it has nothing to do with the modal as I have also placed a button like this into the modal:
    <a4j:commandLink
        styleClass="rdSplGr1"
        href="#"
        action="#{confirmAction.testMethodOne()}">
         <s:span>MethodOne</s:span>
    </a4j:commandLink>That button as you can see has what I am trying to create dynamically and it works like a charm.
    So how do I pass a method call correctly? Or if that is impossible how do I solve the problem of having a the continue button having a different method assigned to it?
    Thanks for any insight into this.
    Edited by: Rhythmicdevil on Aug 4, 2008 7:57 AM

    I agree, reflection should be a last resort. An
    interface would not be useful if you don't know what
    method you want to invoke at compile time. Interfaces
    are useful when you know the method you want to
    invoke, but not the class.That's not true. This is a really lame-ass example but it shows the point.
    public interface RuntimeMethod
       public void method();
    class AClass {
       public static void main(Sting[] args)
          new AClass.handleAtRuntime(
             Factory.getRuntimeMethod(Integer.parse(args[0])));
       public void handleAtRuntime(RuntimeMethod runtime)
          runtime.method();
    class Factory
       public static getRuntimeMethod(int method)
          switch(method)
             case 0: return new RuntimeMethod
                public void method()
                   methodA();
             case 2: return new RuntimeMethod
                public void method()
                   methodB();
             default:
                throw new IllegalArgumentException("bad input");
    }

  • Dynamic method calls in bounded task flows?

    Hi!
    I have the following scenario:
    We are developing a framework in which we would include modules as ADF libraries (as JAR files) with bounded task flows. This framework contains a bean class with bindings for some UI components in framework which I enable or disable (depends on user action). That is the main reason bean class should be present in framework application.
    I have a bounded task flow in every module which needs to call a method in bean with UI component's bindings that would enable or disable that component.
    How can I achieve that? To pass bean as a parameter into bounded task flow and then call its methods? That is dynamic method calls for bean.
    I'm using JDeveloper 11.1.2.1.0
    Thanks for your help
    Regards, Marko

    Hi,
    I explained this; +"I have a bounded task flow in every module which needs to call a method in bean with UI component's bindings that would enable or disable that component. How can I achieve that? To pass bean as a parameter into bounded task flow and then call its methods?"+ a couple of times already (not sure if it was all for you) and don't think I change my position here. I also explained how to use a ValueExpression to lookp a managed bean containing component bindings (should be in requestscope).
    Frank

  • Error: The AcquireConnection method call to the connection manager failed with error code 0xC0202009 using DB2 connection

    I have a SSIS project that I am newly running on the SQL server (2005) .  It was previously run on my PC.  I am importing data from a DB2 server to the SQL server.
    I am in the SA group on the server
    My connection to DB2 works
    When open the package and run it in preview mode, I can retrieve the data.
    When I execute the package I get the below errors:
    [MIDAS OLE DB Source [1]] Error: The AcquireConnection method call to the connection manager "NGMDSPA.alharris" failed with error code 0xC0202009.
    [DTS.Pipeline] Error: component "MIDAS OLE DB Source" (1) failed validation and returned error code 0xC020801C.
    What I have already done that has not worked:
    The original Protection level was set to EncryptSensitiveWithPassword. 
    I have reset the Package Password.
    I have set the protection level to DontSaveSensitive
    I saved the package on the server and set a Package Password.
    I created a new package, set the Protection level to DontSaveSensitive, set a package password in a configuration file using the Package Configuration Wizard.
    Error continues

    Yes.  The Drivers are installed and I have a successfull connection.  I am trouble shooting the issue on the server in BIDS.  I can connect to the DB2 server via the Connectionmanager.  I can also preview the data in the OLE
    DB source connection.  Therefore I know that I have a proper connection
    If you're setting option as DontSaveSensitive then you need to pass the connection information from configuration file/ config table. Otherwise it wont be able to use it for connecting to your source/destination servers. This is the recommended way as it
    will enable you to change connection info at runtime.
    If you want connection info to persist you need to use protection level as EncryptSensitiveUsingUserKey or EncryptSensitiveUsingPassword and set a password.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Dynamic Method call with CHANGING

    Hi,
    I have the following method call:
          CALL METHOD o_salv->DISPLAY_SALV
            CHANGING
              it_data = it_ekko.
    I would like to make this dynamic so that I can call it multiple times from my program with the came set of code.
    I have this working for other Method calls, but the use the same parameters on both sides such as:
          CALL METHOD o_main->get_date
            IMPORTING
              it_ekko = it_ekko.
    being coded as such:
          CALL METHOD o_main->(v_method)
            PARAMETER-TABLE
              ptab.
    Can someone please give me some guidance on how to code the top example dynamically when the 2 variables are different?
    Hope that makes sense...thanks for your help!
    Andy

    Hello Bjorn
    I would suggest the following approach:
    (1) Collect all your GUI control instances in an itab whose line type is TYPE REF TO cl_gui_control.
    (2) Define your "free" method:
    LOOP AT mt_gui_controls INTO lo_gui_control.
    * See if gui control was text editor
      TRY.
        lo_textedit ?= lo_gui_control.
      CATCH cx_sy_move_cast_error INTO lo_error.
      ENDTRY.
      IF ( lo_error IS NOT BOUND ).
        lo_textedit->free.
    *   ... your coding
        CONTINUE.
      ENDIF.
    * See if gui control was tree
      TRY.
        lo_tree ?= lo_gui_control.
      CATCH cx_sy_move_cast_error INTO lo_error.
      ENDTRY.
    ENDLOOP.
    The FREE methods are redefined in the subclasses. However, you could try to call lo_gui_control->free directly because I am not sure if the coding of the superclass or subclass is called (I cannot test this at the moment).
    Regards
      Uwe

  • How to pass attribute values after ExecuteWithParam to method call

    Hi,
    I am using Jdev 11.1.1.6.
    My use case is that I have mainPage BTF which has ExecuteWithParam as the default activity. This filters the VO using params. I have a requirement to store some of the attributes from current row to pageFlowScope which needs to be passed to multiple child taskflows.
    I can introduce a method call after ExecuteWithParam activity and before the page renders but not sure how should I pass the current row (or something) to this method call to store the values on pageFlowScope.
    What should I pass to this managed bean to store the values on pageFlowScope? Is there any alternative?
    Thanks,
    Jai

    I see two possible ways to get to the attributes. First you can get the iterator current row and get the attributes from there. Second you add attribute bindings to the methods pageDef file for all attributes you are interested in. Then you access them using the attribute binding. I never tested the 2nd method but I guess the framework will fill the attribute bindings like it does in a normal page.
    Sorry, can't give you sample code on this add I'm not in front of a PC.
    Timo

  • How to load a class dynamically and then a call a method?

    Hi
    I want to call a method from a class,which class is loaded dynamically.
    Consider a classA and ClassB..
    ClassB contains a method showvalue() which returns a String value.
    I want to load a ClassB dynamically in ClassA,and call the method showvalue() and print the returned value of that method (showvalue).
    How to do this?
    Thanks

    Since you found your way to Reflections and Reference Objects, I can only assume you know that reflection is the answer. Since the reflection tutorial on this site, and indeed, the many others on the web, can explain this a whole lot better and more consisely than can be done in a forum, I'll point you in that direction instead. As a starting point, and to show I'm not just fobbing you off, you're interested in the classes java.lang.Class, java.lang.reflect.Method, and the method Class.getMethod(String, Class[])

Maybe you are looking for

  • Adobe Flash Player Installer has stopped working

    I have recently gone through a lot of problems on this computer i have just now recently fixed. the computer was formated and all, and when i got onto the internet it said it the browser (both mozilla and IE) has stopped working however the problem i

  • Work Flow Question # 2

    This is directed to all the Workflow Guru's out on OTN. From last night, it seems that my users are not receiving notifications. This came to light only this morning - and after taking a look at the log files from the Oracle Application Manager (OAM)

  • Facetime on Mac Pro with Logitech Webcam

    I have a Logitech webcam that works just fine with Skype on my Mac Pro running the newest Snow Leopard. But, the new Beta Facetime for our computers is NOT finding my webcam. Is there something that I am missing?

  • Swatch name Variable

    Hi, It's my first time posting on this forum. I´m new around scripting but I need to do a simple task. I think It´s impossible without using script. Example: I have 4 rectangles, each one with personalized colors using color Palette. Model is RGB. I

  • Maximum RFC connections in RFC

    Hi all, i am facing a problem while trying to send lots of messages from R3 to XI via RFC Sender Adapter: See the SM21 log in sender system: (R3): Communication error, CPIC return code 027, SAP return code 677 > CPI-C function: CMINIT(SAP)   anf if i