Calling a method of a returned reference

Hello,
is it possible to instantly do a method call on a returned reference in ABAP Objects? in this case i need it for singleton behaviour of "z_example", but the compiler wont allow me to call like this:
result = z_example=>get_instance( )->do_stuff( input_param another_param ).
i tried several other syntaxes (is this the right plural ), but it wasn't successful. in java its a standard thing:
result = Example.getInstance().doStuff(inputParam, anotherParam);
Thanks in advance,
Stefan

Hello Stefan
In 6.20 and 6.40 I do not think this is possible. In your example you have to invoke the method on result.
Perhaps with release >= 700 it may be possible.
Regards
    Uwe

Similar Messages

  • Error when calling method with a return of double in j2me

    hello all,
    i have following problem with a j2me program:
    if i call a method with a return of double, then i get following error
    message:
    ERROR: floating-point constants should not appear
    Error preverifying class test.hallo
    what i'm doing wrong
    thanks in regard
    ----------------example----------------------------
    double yourValue(int y, int m, int d)
    double v = 0.10;
    v = 3.39 y m *d
    return v;
    public void startApp()
    int td;
    int y =2;
    int m =2;
    int d =2;
    td = yourValue(y,m,d);
    return(td);

    It's true for MIDP 1.0.
    But you can always use implementation of the float
    point arithmetic which was written by independent
    developers. For example see J2ME section of my
    homepage http://henson.newmail.ru
    anyway, double is reserved word in java, the way you wrote the source code in your example neither the preverifier nor the compiler will recognize that you intend to use your own types for double and float. maybe with Double or Float it would be different ...
    further question: you declare a void function, in the body, however, you try to return some value. something wrong with this function??
    regards
    bernard

  • EJB 3.1 @Asynchronous and calling other methods from within

    Hey all,
    I am helping a friend set up a test framework, and I've turned him on to using JEE6 for the task. I am decently familiar with entity beans, session beans, and such. One of the new features is @Asynchronous, allowing a method to be ran on a separate thread. The test framework generally needs to spawn potentially 1000's of threads to simulate multiple users at once. Originally I was doing this using the Executor classes, but I've since learned that for some reason, spawning your own threads within a JEE container is "not allowed" or bad to do. I honestly don't quite know why this is.. from what I've read the main concern is that the container maintains threads and your own threads could mess up the container somehow. I can only guess that this might be possible if your threads use the container services in some way.. but if anyone could enlighten me on the details as to why this is bad, that would be great.
    None the less, EJB 3.1 adds the async capability and I am now looking to use this. From my servlet I use @EJB to access the session bean, and call an async method. My servlet returns right away as it should. From the async method I do some work and using an entity bean store results, so I don't need to return a Future object. In fact, my ejb then makes an HttpClient call to another servlet to notify it that the result is ready.
    My main question though, is if it's ok to call other methods from the async method that are not declared @Asynchronous. I presume it is ok, as the @Asynchronous just enables the container to spawn a thread to execute that method in. But I can't dig up any limitations on the code within an async method.. whether or not it has restrictions on the container services, is there anything wrong with using HttpClient to make a request from the method.. and making calls to helper methods within the bean that are not async.
    Thanks.

    851827 wrote:
    Hey all,.. from what I've read the main concern is that the container maintains threads and your own threads could mess up the container somehow. I can only guess that this might be possible if your threads use the container services in some way.. but if anyone could enlighten me on the details as to why this is bad, that would be great.
    Yes since the EE spec delegated thread management to conatiners, the container might assume that some info is available in the thread context that you may not have made available to your threads.
    Also threading is a technical implementation detail and the drive with the EE spec is that you should concentrate on business requirements and let the container do the plumbing part.
    If you were managing your own threads spawned from EJBs, you'd have to be managing your EJBs' lifecycle as well. This would just add to more plumbing code by the developer and typically requires writting platform specific routines which the containers already do anyway.
    >
    None the less, EJB 3.1 adds the async capability and I am now looking to use this. From my servlet I use @EJB to access the session bean, and call an async method. My servlet returns right away as it should. From the async method I do some work and using an entity bean store results, so I don't need to return a Future object. In fact, my ejb then makes an HttpClient call to another servlet to notify it that the result is ready.
    My main question though, is if it's ok to call other methods from the async method that are not declared @Asynchronous. I presume it is ok, as the @Asynchronous just enables the container to spawn a thread to execute that method in. But I can't dig up any limitations on the code within an async method.. whether or not it has restrictions on the container services, is there anything wrong with using HttpClient to make a request from the method.. and making calls to helper methods within the bean that are not async.
    Thanks.If you want to be asynchronous without caring about a return value then just use MDBs.
    The async methods have no restrictions on container services and there is nothing wrong with calling other non async methods. Once the async method is reached those annotations don't matter anyway (unless if you call thhose methods from a new reference of the EJB that you look up) as they only make sense in a client context.
    Why do you need to make the call to the servlet from the EJB? Makes it difficult to know who is the client here. Better use the Future objects and let the initial caller delegate to the other client components as needed.

  • Calling abstract method from method, where is functional code

    HI All
    I'm trying to find the actual code that is responsible for the play() method to play sound of Applet or of AudioClip. I looked in the source files and found that the two are circle-refering to each other. Audio clip is an interface so it doesnt specify any code for how the method play() should work. That should be left to the classes that implement it. But the play(URL) method of Applet refers to the the AudioClips method:public void play(URL url) {
    AudioClip clip = getAudioClip(url);
    if (clip != null) {
    clip.play();
    So where is the real code for the method?
    This seems to be very normal because almost all methods in Applet where refering to interfaces like AppletContext an AppletStub.
    How does this work? Can anybody explain?

    This is a design-pattern called "factory-method". The factory-method (here getAudioClip(URL)) has a return value of an interface but really returns an object of a class implementing this interface. The user can call this factory-method and then call the methods of the returned object without knowing wich class this methods implements. If you want to change the implementing class later, you only have to build a new class and to change the factory-method - but the code of the "user" will not change.

  • Changing an object by calling a method in another class that returns nothin

    How can a method like for example Arrays.sort(Object[] a) work? The method has a return statement void, so how come the array passed into the method "magically" end up as being sorted when we look at it in another class after having called this method?

    jverd wrote:
    sunfun99 wrote:
    Since references really are more like addresses, jverd's adress-on-pieces-of-paper analogy is the best, but certainly not because the addresses on the pieces of paper are copies of the address (they aren't). We may just be splitting ever finer semantic hairs here, but how is it not a copy of the address?It is a finely split hair - and ultimately just a difference of language use, I think.
    We scribble on pieces of paper and thereby have at least two things to deal with: the scribble, and the location. It is unfortunate, but in English both things are referred to as "the address". The scribble has qualities like "red", "legible" etc, the location has qualities like "distant", "next door to the president": so they do seem to be different things.
    We use "address" for both: "I can't read this address" vs "Go to this address". Children make jokes based on the ambiguity: "How do you spell it."
    But then there's a third thing: the denotation of the location by the scribble. (denotation here == reference/pointing-at/leash/stick etc). It really does seem to be a third thing. (With apologies to Jean Buridan) consider a person who has lat/long coordinates explained to them for the first time and is handed a piece of paper with coordinates on it. They are asked "Do you know who lives here?" and they answer "Yes, I know the person at this address!". Most would say the statement is false - even if it turns out they were handed their own address. Their assertion of knowledge is an assertion about the denotation of the location by the coordinates, not about the location itself.
    So what is copied by a scribe or a photocopy machine when it copies an address? Clearly it's the scribble, not the location. The scribble is duplicated, the location is not. But what about the denotation of the location by the scribble? Not withstanding the above example (and especially in contexts where knowledge and similar concepts are not involved), you could say that the denotation of the location by the scribble is a value. In other words you could hold that two denotations of some location are not just equal but identical iff they denote the same location. (You could, but you needn't.) It is in this sense that the pieces of paper bear, not copies of the address, but the same address.
    (Exactly the same applies to "pointers" ie signposts. If you have two "north pole" signs (1) The are different signs (2) They point to the same place (3) They are two signs bearing one and the same reference.)
    Edited by: pbrockway2 on Mar 15, 2009 12:49 PM

  • A superclass reference can call subclass method directly?

    A Swing Container reference seems to be able to call the methods of subclass directly. For example, you can find following expression in a JApple or JFrame implementation:
    Container c = getContentPane()
    But if you look at the standard API site, you find that Container doesn't have getContentPane(), nor its superclass. Its subclass, JApplet or JFrame has the method! That means that a reference of superclass can use the method in subclass directly. It's hard to understand since superclass can't aware what in its subclasses. Inheritance got to be one direction-->from superclass to subclass.
    Thanks for advise.

    Hey yylx,
    I dont see in you example where a superclass is calling the a function of its subclass. An object can call any of its own function, any protected or public functions of its superclass, and can also invoke any public functions of objects it has references to.
    So in JFrame, when it calls getContentpane() it is invoking one of its own functions which is fine. The function returns a reference to a Container, which JFrame can now invoke the public functions of... The public interface of an object, in this case a container, is available to any other object. So JFrame can call any functions on that particular Container.
    Does that clarify? If not, explain further....
    Josh

  • Problem calling a method in a servlet witch returns remote ejb

    Hi, I have a problem combining servlets ands ejbs, I expose my problem :
    What I have :
    1 . I have a User table into a SGBD with two attributes login and pass.
    2 . I have a UserBean linked to User table with a remote interface
    3 . I have a stateless UserSessionBean with a remote interface
    4 . I have a UserServlet linked to a jsp page which allows me to add users
    5 . I use Jboss
    What is working ?
    1 - I have a method newUser implemented in my UserSessionBean :
    public class UserSessionBean implements SessionBean {
      private SessionContext sessionContext;
      private UserRemoteHome userRemoteHome;
      public void ejbCreate() throws CreateException {
      // Initialize UserRemoteHome
      // Method to add a new user
      public UserRemote newUser(String login, String password) {
            UserRemote newUser = null;
            try {
                newUser = userRemoteHome.create(login, password);
            } catch (RemoteException ex) {
                System.err.println("Error: " + ex);
            } catch (CreateException ex) {
                System.err.println("Error: " + ex);
            return newUser;
    }2 - When I test this method with a simple client it works perfectly :
    public class TestEJB {
        public static void main(String[] args) {
            Context initialCtx;
            try {
                // Create JNDI context
                // Context initialization
                // Narrow UserSessionHome
                // Create UserSession
                UserSession session = sessionHome.create();
                // Test create
                UserRemote newUser = session.newUser("pierre", "hemici");
                if (newUser != null) {
                    System.out.println(newUser.printMe());
            } catch (Exception e) {
                System.err.println("Error: " + e);
                e.printStackTrace();
    Result : I got the newUser printed on STDOUT and I check in the User table (in the SGBD) if the new user has been created.
    What I want ?
    I want to call the newUser method from the UserServlet and use the RemoteUser returned by the method.
    What I do ?
    The jsp :
    1 - I have a jsp page where a get information about the new user to create
    2 - I put the login parameter and the password parameter into the request
    3 - I call the UserServlet when the button "add" is pressed on the jsp page.
    The Servlet :
    1 - I have a method doInsert which call the newUser method :
    public class UserServlet extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html";
        // EJB Context
        InitialContext ejbCtx;
        // Session bean
        UserSession userSession;
        public void init() throws ServletException {
            try {
                // Open JNDI context (the same as TestClient context)
                // Get UserSession Home
                // Create UserSession
                userSession = userSessionHome.create();
            } catch (NamingException ex) {
                System.out.println("Error: " + ex);
            } catch (RemoteException ex) {
                System.out.println("Error: " + ex);
            } catch (CreateException ex) {
                System.out.println("Error: " + ex);
        protected void service(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
         * Does insertion of the new user in the database.
        public void doInsert(HttpServletRequest req, HttpServletResponse resp) throws
                ServletException, IOException {
            try {
                // Get parameters to create the newUser
                String login = req.getParameter("login");
                String password = req.getParameter("password");
               // Create the newUser
                System.out.println("Calling newUser before");
                UserRemote user = userSession.newUser(login, password);
                System.out.println("Calling newUser after");
            } catch (Exception e) {
        // Clean up resources
        public void destroy() {
    Result :
    When I run my jsp page and click on the "add" button, I got the message "Calling newUser before" printed in STDOUT and the error message :
    ERROR [[userservlet]] Servlet.service() for servlet userservlet threw exception
    javax.servlet.ServletException: loader constraints violated when linking javax/ejb/Handle class
         at noumea.user.UserServlet.service(UserServlet.java:112)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:534)
    Constat :
    I checked into my SGBD and the new user has been created.
    The error appears only when the method return Remote ejbs, if I return simples objects (Strings, int..) it works.
    What can I do to resolve this problem ?
    Thank you.

    "Why do you want to servlet to gain access to another EJB through the stateless session bean. Why cant the servlet call it directly ?"
    Because I want to access to the informations included in the entity bean UserBean (which is remote).
    You said that it is a bad design, but how can I access to my UserBean ejbs from the session bean if I don't do that ?
    For example I want a List of all users to be seen in a jsp page :
    1 - I call the method getUserList which returnsan ArrayList of UserRemote.
    2 - I iterate over the ArrayList to get the users parameters to be seen.
    As the other example (newUser), when I do
    ArrayList users = (ArrayList) userSession.getUserList(); with the simple client it works, but in the servlet I got the same error.
    But, if I call directly the findAll method (as you'are saying) in the servlet
    ArrayList users = (ArrayList) userRemoteHome.findAll(); it works...
    I think that if my servlet calls directly entity ejbs, I don't need UserSession bean anymore. Is that right ?
    I precise that my design is this :
    jsp -> servlet -> session bean -> entity bean -> sgbd
    Is that a bad design ? Do I need the session bean anymore ?
    Thank you.

  • Calling a method that returns an object Array

    Hello.
    During a JNICALL , I wish to call a method which returns an object array.
    ie my java class has a method of the form
    public MyObject[] getSomeObjects(String aString){
    MyObject[] theObjects=new MyObject[10];
    return theObjects
    Is there an equivalent to (env)->CallObjectMethod(...
    which returns a jobjectArray instead of a jobject, and if not could somebody suggest a way around this.
    Thanks,
    Neil

    I believe an array oj jobjects is also a jobject. You can then cast it to another class.

  • Call to a possibly undefined method getClipboardContents through a reference with static type flashx.textLayout.edit:ISelectionManager.

    Hi Guys,
    As i am using the nigtly build of TLF 4.0.0.11073.
    I want to copy some text from the TLF, by copy operation. I am getting this type of Error.
    - Call to a possibly undefined method getClipboardContents through a reference with static type flashx.textLayout.edit:ISelectionManager.
    In the previous build, i dont use to get this type of error, but in this nightly builds i am getting this type of error.
    Can anyone help me to fix the same or any workaound.
    Thanks in advance.
    Krishna

    This functionality is still available, but it has moved. It's now in a TextClipboard class, in the same flashx.textLayout.edit package. So you should replace calls to getClipboardFormat() with TextClipboard.getContents().
    Hope this helps,
    - robin

  • Call C# method from javascript in WebView and retrieve the return value

    The issue I am facing is the following :
    I want to call a C# method from the javascript in my WebView and get the result of this call in my javascript.
    In an WPF Desktop application, it would not be an issue because a WebBrowser
    (the equivalent of a webView) has a property ObjectForScripting to which we can assign a C# object containg the methods we want to call from the javascript.
    In an Windows Store Application, it is slightly different because the WebView
    only contains an event ScriptNotify to which we can subscribe like in the example below :
    void MainPage_Loaded(object sender, RoutedEventArgs e)
    this.webView.ScriptNotify += webView_ScriptNotify;
    When the event ScriptNotify is raised by calling window.external.notify(parameter), the method webView_ScriptNotify is called with the parameter sent by the javascript :
    function CallCSharp() {
    var returnValue;
    window.external.notify(parameter);
    return returnValue;
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = DoSomerthing(parameter);
    The issue is that the javascript only raise the event and doesn't wait for a return value or even for the end of the execution of webView_ScriptNotify().
    A solution to this issue would be call a javascript function from the webView_ScriptNotify() to store the return value in a variable in the javascript and retrieve it after.
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = ReturnResult();
    await this.webView.InvokeScriptAsync("CSharpCallResult", new string[] { result });
    var result;
    function CallCSharp() {
    window.external.notify(parameter);
    return result;
    function CSharpCallResult(parameter){
    result = parameter;
    However this does not work correctly because the call to the CSharpResult function from the C# happens after the javascript has finished to execute the CallCSharp function. Indeed the
    window.external.notify does not wait for the C# to finish to execute.
    Do you have any solution to solve this issue ? It is quite strange that in a Window Store App it is not possible to get the return value of a call to a C# method from the javascript whereas it is not an issue in a WPF application.

    I am not very familiar with the completion pattern and I could not find many things about it on Google, what is the principle? Unfortunately your solution of splitting my JS function does not work in my case. In my example my  CallCSharp
    function is called by another function which provides the parameter and needs the return value to directly use it. This function which called
    CallCSharp will always execute before an InvokeScriptAsync call a second function. Furthermore, the content of my WebView is used in a cross platforms context so actually my
    CallCSharp function more look like the code below.
    function CallCSharp() {
    if (isAndroid()) {
    //mechanism to call C# method from js in Android
    //return the result of call to C# method
    } else if (isWindowsStoreApp()) {
    window.external.notify(parameter);
    // should return the result of call to C# method
    } else {
    In android, the mechanism in the webView allows to return the value of the call to a C# method, in a WPF application also. But I can't figure why for a Windows Store App we don't have this possibility.

  • How to get the array of Complex when call a webserivce method it's return an array of user define data struct?

    When call a webservice opreation, it returns an array of complex type, sure, the calling is successed,  but i don't know how to get the return values,
    I have tried use Pendingcall.response & Pendingcall.getOutPutValues() in Pendingcall.onResult event function...
    Waiting....

    Flash Lite doesn't fully support webservices, so you will find it difficult to use the full api set.
    I suggest that you use SWX (swxformat.org) or simply HTTP requests for transactions.
    We have a tutorial on use with ColdFusion here:
    http://vimeo.com/6829083
    Mark

  • 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[])

  • How to call a method in backing bean on hitting 'Enter' key on a page.

    Hi all,
    I would be obliged if any one can provide me solution for the below given problem.
    My requirement is to call a method in backing bean when i hit 'Enter' key on a JSP page.
    I am trying this by using a script given below.
    *function fnChangeFocus(){*
    *if(window.event.keyCode==13){*
    * document.getElementById("mainform:submitForm:commandbutton").focus();*
    The JSP has the textbox as given below.
    *<h:inputText id="inputtxtboxid" disabled="false" value="#{Bean.inputvalue}"*
    onkeypress="fnChangeFocus()" size="24" />
    Using this I could not acheive the required functionality. Please suggest some alternative.
    Thanks,
    Jagadeesh Pala

    Only a form element supports the submit() function. Make sure that the getElementById returns the appropriate form. Or rather pass the element as the 'this' reference to the function and get the parent form from it.
    After all this is just basic DHTML / Javascript+DOM knowledge and in fact this has nothing to do with JSF. For future basic DHTML / JS+DOM questions you may take a look at the appropriate forums, e.g. dhtmlcentral.com, dynamicdrive.com, etcetera.

  • Issue with calling a  method activity before page render

    Hi All,
    I am using Jdeveloper 11.1.1.7.
    I am trying to achieve the approach defined in "1.b. Calling a Method in Backing Bean:" elaborated in the blog - https://blogs.oracle.com/adf/entry/an_epic_question_how_to
    As illustrated, I defined a default method activity (binding to a method in managed bean) and a view activity activity in a bounded task flow.
    When I launch the application (running the view activity), following error is encountered -
    oracle.adf.controller.metadata.ParsingException: ADFC-02020: Cannot find default activity 'check' in task flow definition '/WEB-INF/task-flow-definition.xml#task-flow-definition'.
        at oracle.adfinternal.controller.metadata.model.xml.XmlUtil.createAndLogParsingException(XmlUtil.java:474)
        at oracle.adfinternal.controller.metadata.model.xml.MetadataResourceXmlImpl.parseTaskFlowDefinition(MetadataResourceXmlImpl.java:507)
        at oracle.adfinternal.controller.metadata.model.xml.MetadataResourceXmlImpl.parse(MetadataResourceXmlImpl.java:361)
        at oracle.adfinternal.controller.metadata.provider.mds.MdsMetadataResourceProvider.parseResource(MdsMetadataResourceProvider.java:748)
        at oracle.adfinternal.controller.metadata.provider.mds.MdsMetadataResourceProvider.getMDSCachedResourceOrParse(MdsMetadataResourceProvider.java:732)
    Please advise.
    Best Regards,
    Ankit Gupta

    Hi Cvele, Timo,
    Many thanks for the suggestions.
    To avoid confusions, I have created a new application altogether. It seems that the method call is not being called when I run the page.
    For your reference I have attached the task flow definition and method code below -
    Task Flow Definition
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="task-flow-definition">
        <default-activity id="__1">methodCall1</default-activity>
        <managed-bean id="__11">
          <managed-bean-name id="__13">TestBean</managed-bean-name>
          <managed-bean-class id="__10">TestBean</managed-bean-class>
          <managed-bean-scope id="__12">request</managed-bean-scope>
        </managed-bean>
        <view id="view1">
          <page>/view1.jspx</page>
        </view>
        <view id="exception">
          <page>/exception.jspx</page>
        </view>
        <method-call id="methodCall1">
          <method>#{requestScope.TestBean.checkURL}</method>
          <return-value id="__15">#{TestBean.checkURL}</return-value>
          <outcome id="__14">
            <to-string/>
          </outcome>
        </method-call>
        <control-flow-rule id="__2">
          <from-activity-id id="__3">methodCall1</from-activity-id>
          <control-flow-case id="__5">
            <from-outcome id="__6">go</from-outcome>
            <to-activity-id id="__4">view1</to-activity-id>
          </control-flow-case>
          <control-flow-case id="__8">
            <from-outcome id="__9">error</from-outcome>
            <to-activity-id id="__7">exception</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
      </task-flow-definition>
    </adfc-config>
    Method Code
    public String checkURL() {
    // Add event code here...
    System.out.println("method activity called");
    return "error";
    Best Regards,
    Ankit Gupta

  • How to call a method from a separate class using IBAction

    I can't work out how to call a method form an external class with IBAction.
    //This Works 1
    -(void)addCard:(MyiCards *)card{
    [card insertNewCardIntoDatabase];
    //This works 2
    -(IBAction) addNewCard:(id)sender{
    //stuff -- I want to call [card insertNewCardIntoDatabase];
    I have tried tons of stuff here, but nothing is working. When i build this I get no errors or warnings, but trying to call the method in anyway other that what is there, i get errors.

    Can you explain more about what you are trying to do? IBAction is just a 'hint' to Interface Builder. It's just a void method return. And it's unclear what method is where from your code snippet below. is addNewCard: in another class? And if so, does it have a reference to the 'card' object you are sending the 'insertNewCardIntoDatabase' message? Some more details would help.
    Cheers,
    George

Maybe you are looking for

  • Error reporting in BAPI_BILLINGDOC_CREATEMULTIPLE

    Hi there, I've adapted parameters via customizing to take an orders as reference documents when creating invoices.  The thing is that when I create invoices using deliveries with VF01 I can figure out that I did it wrong cause I get an error message

  • Adobe Media Encoder CS5, fails on 2 pass f4v

    Hi, I have tried encoding several videos at multiple bitrates, including videos I have encoded successfully before in CS4. They all fail about half way through the first pass when using VBR 2 pass. Just stop and show the error exclamation mark symbol

  • Digital copy codes not working

    Hi, I'm from the uk and I've got quite a few bluray DVDs with digital copies with them, they have codes but I don't have a computer to put the disks in to then move them to the iTunes is there any way I can just put the films straight to iTunes with

  • How can I force a out-of-date client to do a sync with master?

    I use 'DB_REPMGR_ACKS_NONE' for some clients which locate in different areas. But sometimes the network is not that good, and causes the client data out-of-date. My question is that: 1. Is there a api that can do a manual sync without restarting the

  • Hosting sites

    A month ago my company stopped hosting our own DNS and hosting our website. Both services went to a local company. We are trying to figure out a few minor details. One being that we still are trying to maintain a portion of the wesite so we can make