Calling a method on all replicas of a bean in one shot

          Hi,
          Is there any properties by which one can make a replica aware stub direct a method call to all
          instances of the bean in a cluster? The requirement is to update data cached in all instances
          of a bean in the cluster by invoking a method on all instances of the bean.
          Regards,
          Sreeja
          

          You can try to think about the issue in another way.
          Hope this link can help you.
          http://www.weblogic.com/docs51/classdocs/API_jndi.html#exactlyOnce
          If you do want to do it in your way.
          Try to use JMS Topic. One server can send a topic of updating and all other servers subscribe this topic.
          Good luck.
          Tao Zhang
          "Sreeja" <[email protected]> wrote:
          >
          >Hi,
          >Is there any properties by which one can make a replica aware stub direct a method call to all
          >instances of the bean in a cluster? The requirement is to update data cached in all instances
          >of a bean in the cluster by invoking a method on all instances of the bean.
          >Regards,
          >Sreeja
          

Similar Messages

  • How can I call a method for all instances of a certain class?

    Hi,
    I have created a snake java applet, which you can play here [http://users.telenet.be/javagames/|http://users.telenet.be/javagames/].
    But now I want to make this into a multi-player game (with two or more snakes etc..).
    In my main class you can find methods like these:
    snake.move();
    snake.drawSnake();Now if I just alter my main class and make a second instance of the class snake and change my methods to this,
    snake.move();
    snake2.move();
    snake.drawSnake();
    snake2.drawSnake();my game almost works perfectly, I'll have to make some minor changes though.
    But my question is, is there a better way of doing this. Instead of duplicating all the code, how can I make the methods immediately work for both snakes, instead of calling it twice?
    All suggestions are welcome!
    Thanks in advance.
    Lennart

    If there was something common to all snake instances then you could declare that variable static.
    Note: I don't want to confuse you here. A static variable can have a value apart from any instances at all. Instances can view static variables but a static method or inner class, for example, cannot view instance variables.
    More generally, I would think you would want to treat each snake as an automaton with its own behavior. There must be some class such as Game or Board or whatever that has, as suggested, either an array or collection of snakes. Iterate over each snake, ask it to perform some computation for the game and then draw itself.
    - Saish

  • Calling a method of all subclasses.

    I have a very complicated problem:
    I need a series of classes that have almost everything in common. They differ only in two things: variable static String ID, which identifies this class, and a method modify() which is implemented by each class differently. Other than that, there are many other fields and methods that are needed for each class, but each class would handle these methods and fields equally.
    So i declared an abstract class where I declared all thing subclasses have in common and each individual class is a subclass of this abstract class. The two thing mentioned before are declared as follows:
    protected static String ID;
    public abstract void modify();
    Now I need three things:
    1) I need a list of IDs of all subclasses for a combo box. So since ID is static and protected and set to value only in the subclass, it can be referenced. This is done by a static method getId(), also declared in the abstract class. Now I do not know whether this ID is thus shared by all subclasses or each class has this ID unique. I need the latter.
    2) I need to fetch a class by its ID to instantiate it.
    3) I need to declare that each subclass must have a one-parameter constructor with one int parameter, so when I get to instantiating by getContructor().newInstance(Object[]) , the params will be compatible every time a new instance occurs, whatever the ID.
    I need this to ease my work. If I accomplish this, every time I would add a new subclass (which could be tens, maybe hundreds of them int the end) I need only to set ID and implement modify() and the new class would automatically register in the combobox and can be instatiated by its ID.
    Thank you for your help.

    Shagrat wrote:
    1) I need a list of IDs of all subclasses for a combo box. So since ID is static and protected and set to value only in the subclass, it can be referenced. This is done by a static method getId(), also declared in the abstract class. Now I do not know whether this ID is thus shared by all subclasses or each class has this ID unique. I need the latter.You could perhaps try it? It will turn out it's the former. There is no way to programmatically produce a unique ID per class from a superclass.
    2) I need to fetch a class by its ID to instantiate it.If you must, a Map of String (ID) vs Class<?> might be a starting point.
    3) I need to declare that each subclass must have a one-parameter constructor with one int parameter, so when I get to instantiating by getContructor().newInstance(Object[]) , the params will be compatible every time a new instance occurs, whatever the ID. There is no way to enforce constructor signatures at compile time.

  • Error when I call a method of AppModule from a backing bean.

    I use Jdeveloper 10.1.3.0.3 EA.
    In my application I have created ApplModule and UsrView(for my table USR).
    I have a login page (login.jsp and the backing login.java) with 2 fields userName and password and an ADF Faces Core command button (cmdCheckPass) and the method cmdCheckPass _action() for the click event .
    The problem is that I can’t call method testPassword(userName, password) which is written in AppModule. (I get error:
    javax.faces.FacesException: #{backing_login.cmdCheckPass_action}: javax.faces.el.EvaluationException: java.lang.NullPointerException) from line:
    answer = app.testPass(st1,st2);
    The code is as follows:
    public String cmdCheckPass_action() {
    String answer="";
    String mes = "";
    String st1=this.getInputText1().getValue().toString();
    String st2=this.getInputText2().getValue().toString();
    AppModuleImpl app = new AppModuleImpl();
    answer = app.testPass(st1,st2);
    if (answer == "OK") {
    return "toMain";
    } else {
    answer = "";
    mes="Invalid username, password !!!";
    FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(mes));
    return answer;}
    I don’t know if theoretically is right to call, from a backing bean, a custom method of AppModule.
    Can I have any help on this?
    Thanks in advance,
    Panos

    Some quick ideas:
    Is the clip the same NTSC/PAL standard as the project you are importing it to?
    Have you tried to rename the offending clip (do NOT rename any clips inside the iMovie /Media folder!!).
    How much free space do you have on the iMovie project volume -- what is the size of the imported clip?

  • How to delete all PO of 1 series in one shot ?

    Dear All,
    Please guide in deleting mass PO in 1 shot.
    Regards,
    Shreya

    All capital inventory till FY-2008-09 was transferred to revenue inventory by movemnt typr 411-Q in MB1B.All the codes those were transferrd are now appearing in MBBS but with zero value. However these codes are appearing in MB5L with value under GL 132006 (for capital items) and having value of 1.08 crores (0.94 crore for imported items and 0.14 crore for revenue items). The GL for all these codes neds to be changed to 132000 (revenue inventory GL) so that in MB5L also these items appear as revenue items.As of today GL of all the codes appearing under GL 132006 are to be changed to 132000 except code 496700086.
    now, changes are reflected in report MBBS but not showing correct information in MB5L report..
    Please guide what is the difference between MBBS and MB5L report.
    Regards
    SHreya

  • Calling a particular Method of all subclass from a super class

    hi
    I have a class 'A' which is a super class for 'B' ,'C' , 'D'
    my main method is in the class Main and while on the run i am calling methods of B,C,D form this main class.
    but as the first step of execution i need to call a init method which has been defined in all the sub-classes. and there can be any no of sub-classes and all will have the init method and i have to call the init method for all classes. is this possible to do that in runtime. ie i wil not be knowing the names of sub-classes.
    thanks
    zeta

    Sorry if i had mislead you all.
    I am not instantiating from my super class.
    as mjparme i wanted one controller class to do the
    init method calls
    so i got it working from the link you gave.
    URL url = Launcher.class.getResource(name);
    File directory = new File(url.getFile());
    This way i can get all the classes in that
    in that package
    and from reflection i can get whether it is
    her it is a sub class of the particular super class
    and i can call the init methods by making the init
    methods static
    thanks for the help
    zetaThis is a rather fragile solution.
    If the problem is one of knowing which subclasses exist, I would suggest specifying them explicitly via configuration (system property or properties file or whatever).
    One thing that's not entirely clear to me: Is the init going to be called once for each subclass, or once for each instance of each subclass? It sounds to me like it's once per class, but I want to make sure.

  • [svn] 2622: TextBox and TextGraphic now call applyDisplayObjectProperties() at the end of their draw() method, like all other GraphicElements.

    Revision: 2622
    Author: [email protected]
    Date: 2008-07-24 16:13:32 -0700 (Thu, 24 Jul 2008)
    Log Message:
    TextBox and TextGraphic now call applyDisplayObjectProperties() at the end of their draw() method, like all other GraphicElements. This method handles setting the visibiliy of the GraphicElement's DisplayObject, among other things.
    Note: We should make it unnecessary for each GraphicElement subclass to have to call applyDisplayObjectProperties() at the end of draw(). The GraphicElement base class should ensure that this gets called at the appropriate time.
    Group now calls draw() on graphic elements even if they are invisible, because otherwise applyDisplayObjectProperties() never gets called and the TextLines stay visible. Group was assuming that the only visible stuff in a GraphicElement is drawn with Graphics calls, which isn't the case.
    This change is OK for now because every GraphicElement currently has its own DisplayObject, but it will need to be rethought when GraphicElements share DisplayObjects.
    Reviewer: Chet
    Bug: MXMLG-206 ("Setting visible property on TextGraphic does nothing")
    QA: Peter, please add a Mustella test case for the 'visible property of TextBox and TextGraphic
    Doc: No
    Ticket Links:
    http://bugs.adobe.com/jira/browse/MXMLG-206
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as

    Changes for spine&#8211;aligned head:
    public class StickManTool extends JPanel
        public StickManTool ()
            limbs [16] = new Limb (lankle, lfoot, 1);
            head = new Head2D (limbs[0]);
        protected void paintComponent (Graphics g)
            head.draw(graphics);
        private void updateLimbs (Point start, Point end)
            head.setPosition();
    class Head2D extends Ellipse2D.Double
        public static double width = 30;   // width of head
        public static double height = 40;  //height of head
        Point atlas;
        Point pelvis;
        private AffineTransform xform = new AffineTransform();
        public Head2D(Limb spine)
            super ();
            atlas = spine.movingJoint;
            pelvis = spine.fixedJoint;
            setPosition();
        public void setPosition()
            // Find angle of spine.
            double dy = atlas.y - pelvis.y;
            double dx = atlas.x - pelvis.x;
            double theta = Math.atan2(dy, dx);
            //System.out.printf("theta = %.1f%n", Math.toDegrees(theta));
            // Find center of head as extension along spine from atlas.
            double cx = atlas.x + (height/2)*Math.cos(theta);
            double cy = atlas.y + (height/2)*Math.sin(theta);
            // Move to origin of head.
            xform.setToTranslation(cx-width/2, cy-height/2);
            // Rotate head about its center.
            xform.rotate(theta+Math.PI/2, width/2, height/2);
        public void draw(Graphics2D g2)
            g2.draw(xform.createTransformedShape(this));
        public double getWidth () { return width; }
        public double getHeight () { return height; }
        public void setWidth (double widthIn) { width = widthIn; }
        public void setHeight (double heightIn) { height = heightIn; }
    }

  • Hi all, BDC call transaction METHOD, trapping ERRORS

    hi
    i have developed BDC (recording via call transaction method) for VB01. 
    could u please tell me how to display records having errors after running recording or to give index of records having errors.
    and is it possible to give transaction code for recording since my bdc is executable program.
    plase answer both the questions.
    thanx

    Here is the flow that Raja is explaining to you.
    DATA: v_index LIKE sy-tabix.
    LOOP AT itab.
      v_index = sy-tabix.
    *-- prepare the BDC data
      CALL TRANSACTION 'VB01' USING bdcdata
                               MODE 'N'
                              MESSAGES INTO bdcmsgcoll.
      READ TABLE bdcmsgcoll WITH KEY msgtyp = 'E'.
      IF sy-subrc = 0.
    *-- Error occured for the record with index <b>v_index</b>
      ELSE.
    *-- unless there is a success message with this number,
    *   it is not succesfull because 'No data for screen xxx'
    *   will not show up as an error message type, but will be
    *  a success message type
        READ TABLE bdcmsgcoll WITH KEY msgnr = '312'.
        IF sy-subrc = 0.
    *-- success
        ELSE.
    *-- error with index <b>v_index</b>
        ENDIF.
      ENDIF.
    ENDLOOP.
    As you can see, now you have the index of the record where the error occured. Now this will become complicated if you are combining several records into one transaction call. In that case you need to find how you can know all the records that you just accumulated.
    As an example, let us say you have an internal table with external number, customer, material, quantity and at every new external number, you want to create a sales order. Until you get a new external number, you will not do the call transaction because until then it will be items of the same sales order. So in this case, after the call transaction, you will have get all the records that belong to making this sales order by using the external number and then prepare your messages.
    I hope this is clear.
    Srinivas
    Message was edited by: Srinivas Adavi

  • AutomationException while calling a method

    Hi all,
    I've got a problem accessing a COM/DCOM component in a Win2k box (Advanced Server)
    with jcom. I configured the server and client described in the "JSP to COM" example.
    The only difference: I don't want to access the excel sheet and I don't use a jsp
    to execute.
    I used the java2com.exe to create the proxies from my dll ScriptableUniversalTransAgt.dll.
    But when I try to call a method on the dll via Java, I get the exception:
    AutomationException: 0x80070005 - General access denied error in 'Invoke'
         at com.bea.jcom.Rpc.a(Rpc.java)
         at com.bea.jcom.be.a(be.java)
         at com.bea.jcom.StdObjRef.a(StdObjRef.java)
         at com.bea.jcom.Dispatch.vtblInvoke(Dispatch.java)
         at de.conet.galileo.suta.IScriptableUniversalTransAgentProxy.setHcmName(IScriptableUniversalTransAgentProxy.java:271)
         at de.conet.galileo.suta.ScriptableUniversalTransAgent.setHcmName(ScriptableUniversalTransAgent.java:336)
         at de.conet.galileo.SUTATest.start(SUTATest.java:33)
         at de.conet.galileo.SUTATest.main(SUTATest.java:27)
    I checked everything on the server, the user has all rights he needs but it doesn't
    work. In the eventlog of the server I can see that the login was successful.
    The attachment contains some log files and my program with the dll.
    Maybe someone can help me?
    Thanks
    Michael
    [src.zip]

    "Jeff Muller" <[email protected]> wrote in message
    news:[email protected]...
    Yeah, now I'm getting this error on code that worked two days ago.
    javax.servlet.ServletException: Unable to initialize servlet:
    AutomationExceptio
    n: 0x80070005 - General access denied error, status: Getting instance, and
    calli
    ng initialize.
    at com.teloquent.MyApp.MyServlet.initCOMObj(MyServlet.
    java:308)
    at com.teloquent.MyApp.MyServlet.init(MyServlet.java:8
    1)
    at
    weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
    pl.java:700)
    at
    weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
    Impl.java:643)
    at
    weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:588)
    at
    weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
    java:368)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:242)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    >
    ... but then again, I don't expect any response here.
    "Michael" <[email protected]> wrote in message
    news:[email protected]...
    Hi all,
    I've got a problem accessing a COM/DCOM component in a Win2k box
    (Advanced
    Server)
    with jcom. I configured the server and client described in the "JSP toCOM" example.
    The only difference: I don't want to access the excel sheet and I don'tuse a jsp
    to execute.
    I used the java2com.exe to create the proxies from my dllScriptableUniversalTransAgt.dll.
    But when I try to call a method on the dll via Java, I get the
    exception:
    >>
    AutomationException: 0x80070005 - General access denied error in'Invoke'
    at com.bea.jcom.Rpc.a(Rpc.java)
    at com.bea.jcom.be.a(be.java)
    at com.bea.jcom.StdObjRef.a(StdObjRef.java)
    at com.bea.jcom.Dispatch.vtblInvoke(Dispatch.java)
    atde.conet.galileo.suta.IScriptableUniversalTransAgentProxy.setHcmName(IScript
    ableUniversalTransAgentProxy.java:271)
    at
    de.conet.galileo.suta.ScriptableUniversalTransAgent.setHcmName(ScriptableUni
    versalTransAgent.java:336)
    at de.conet.galileo.SUTATest.start(SUTATest.java:33)
    at de.conet.galileo.SUTATest.main(SUTATest.java:27)
    I checked everything on the server, the user has all rights he needs butit doesn't
    work. In the eventlog of the server I can see that the login wassuccessful.
    The attachment contains some log files and my program with the dll.
    Maybe someone can help me?
    Thanks
    Michael

  • Doubt in uploading using call transaction method

    hi all
    i am uploading f-29 in call transaction method .. i have a problem in currency field, the currency field is not picking up it shows a error that input field is longer than screen field .. i have declared currency field as type BSEG-WRBTR(same as screen field ...how to go about
    thanks
    lokesh

    Hi,
    When you use the database value directly in your BDC, you will have this issue. It is always advisable to use character fields when doing BDC. so change it to charecter field and try it..
    Regards
    Sudheer

  • How to call a method in one JSP from another JSP?

    say that I have 2 JSPs.
    JSP one has a button.
    JSP two has some method that, say, find the square root of the number passed from JPS one.
    How to - when click - the button on page one call the method on page two?
    Please note that I can not use object binding, but I want passing the actual parameter and call the method on page two.
    Please note that this is an update of a previous post on the same topic called "Object scope".
    Thank you all very much.

    No, i dont know how to call other than main methods from other classes
    And one more doubt i have i.e. Like in C can we see the execution of the program like how the code is being compiled step by step and how the value of the variable changes from step to step like(Add Watch).........

  • Is it possible to call a method in a servlet from  a java script ?

    I need to do a dynamic html page . In the page i select some things and then these things must communicate whit a servlet because the servlet will do some DB querys and update the same webpage.
    So is it possible to actually call a method of a servlet from a java script? i want to do something that looks like this page:
    http://www.hebdo.net/v5/search/search.asp?rubno=4000&cregion=1011&sid=69DHOTQ30307151
    So when u select something in the first list the secodn list automaticly updates.
    thank you very much

    You can
    1. load all the options when loading the page and
    set second selection options when user selected
    the first; or
    2. reload the page when user select first selection
    by 'onChange' event; or
    3. using iframe so you only need to reload part of
    the page.

  • LVOOP "call parent method" doesn't work when used in sibling VI

    It seems to me that the "call parent method" doesn't work properly according to the description given in the LabVIEW help.
    I have two basic OOP functions I am doing examples for. I can get one to work easily and the other one is impossible.
    Background
    There are 3 basic situations in which you could use the "call parent method"
    You are calling the parent VI (or method) of a child VI from within the child VI
    You are calling the parent VI (or method) of a child VI from within a sibling VI
    You are calling the parent VI (or method) of a child VI from a different class/object.
    From the LabVIEW help system for "call parent method":
    Calls the nearest ancestor implementation of a class method. You can use the Call Parent Method node only on the block diagram of a member VI that belongs to a class that inherits member VIs from an ancestor class. The child member VI must be a dynamic dispatching member VI and have the same name as the ancestor member VI
    From my reading of that it means situation 3 is not supported but 1 & 2 should be.
    Unfortunately only Situation 1 works in LabVIEW 2012.
    Here is what I want
    And this is what I actually get
    What this means is that I can perform a classic "Extend Method" where a child VI will use the parent's implementation to augment it's functions BUT I cannot perform a "Revert Method" where I call the parent method's implementation rather than the one that belongs to the object.
    If you want a picture
    Any time I try and make operation2 the VI with the "call parent method" it shows up for about 1/2 sec and then turns into operation.
    So there are only 3 possibilities I can see
    Bug
    Neither situation 2 or 3 are intended to work (see above) and the help is misleading
    I just don't know what I am doing (and I am willing to accept this if someone can explain it to me)
    The downside is that if situation 2 above doesn't work it does make the "call parent node" much less usefull AND it's usage/application just doesn't make sense. You cannot just drop the "call parent node" on a diagram, it only works if you have an existing VI and you perform a replace. If you can only perform situation 1 (see above) then you should just drop the "call parent node" and it picks up the correct VI as there is only 1 option. Basically if situation 2 is not intended to work then the way you apply "call parent method" doesn't make sense.
    Attachements:
    For the really keen I have included 2 zip files
    One is the "Revert Method labVIEW project" which is of course not working properly because it wants to "call parent method" on operation not operation2
    The other zip file is all pictures with a PIN for both "Revert Method" and "Extend Method" so you can see the subtle but important differences and pictrures of the relavant block diagrams including what NI suggested to me as the original fix for this problem but wasn't (they were suggesting I implement Extend Method).
     If you are wondering where I got the names, concepts and PIN diagrams from see:
    Elemental Design Patterns
    By: Jason McColm Smith
    Publisher: Addison-Wesley Professional
    Pub. Date: March 28, 2012
    Print ISBN-10: 0-321-71192-0
    Print ISBN-13: 978-0-321-71192-2
    Web ISBN-10: 0-321-71255-2
    Web ISBN-13: 978-0-321-71255-4
     All the best
    David
    Attachments:
    Call parent node fault.zip ‏356 KB
    Call parent node fault.zip ‏356 KB

    Hi tst,
    Thankyou for your reply. Can you have a look at my comments below on the points you make.
    1) Have to disagree on that one. The help is unfortunately not clear. The part you quote in your reply only indicates that the VI you are applying "Call Parent Node" to must be dynamic dispatch. There is nowhere in the help it actually states that the call parent node applies to the VI of the block diagram it is placed into. Basically case 2 in my example fulfills all that the help file requires of it. The dynamic dispatch VI's operation are part of a class that inherits from a given ancestor. Operation 2 for Reverted behaviour is a child VI that is dynamic dispatch and has the same name as the ancestor VI (operation2). The help is missing one important piece of information and should be corrected.
    2) True it does work this way. I was trying to build case 2 and had not yet built my ancestor DD for operation so the function dropped but wasn't associated with any VI. I was able to do this via a replace (obviously once the ancestor Vi was built) so this one is just bad operator
    3) Keep in mind this is an example not my end goal. I have a child implementation because this is a case where I am trying to do a "reverse override" if you like.
    3a) The point of the example is to override an objects method (operation2) with it's parent's method NOT it's own. The reason there is a child implementation with specific code is to prove that the parent method is called not the one that relates to the object (child's VI). If I start having to put case structures into the child VI I make the child VI have to determine which code to execute. The point of Revert method is to take this function out of the method that is doing the work. (Single Use Principal and encapsulation)
    3b) The VI I am calling is a Dynamic Dispatch VI. That means if I drop the superclass's VI onto the child's block diagram it will become the child's implementation. Basically I can't use Dynamic Dispatch in this case at all. It would have to be static. That then means I have to put in additional logic unless there is some way to force a VI to use a particular version of a DD VI (which I can't seem to find).
    Additional Background
    One of the uses for "Revert Method" is in versioning.
    I have a parent Version1 implementation of something and a child Version2. The child uses Version2 BUT if it fails the error trapping performs a call to Version1.
    LabVIEW has the possibility of handling the scenario but only if both Case 1 and Case 2 work. It would actually be more useful if all 3 cases worked.
    The advantage of the call parent method moving one up the tree means I don't have the track what my current object is and choose from a possible list, if, for example the hierarchy is maybe 5 levels deep. (so V4 calls V3 with a simple application of "call parent method" rather than doing additional plumbing with case structures that require care and feeding). Basically the sort of thing OOP is meant to help reduce. Anything that doesn't allow case 2 or 3 means you have to work around the limitation from a software design perspective.
    If at the end of the day Case 2 and case 3 don't and won't ever work then the help file entry needs to be fixed.
    All the best
    David

  • Calling a method from a super class

    Hello, I'm trying to write a program that will call a method from a super class. This program is the test program, so should i include extends in the class declaration? Also, what code is needed for the call? Just to make things clear the program includes three different types of object classes and one abstract superclass and the test program which is what im having problems with. I try to use the test program to calculate somthing for each of them using the abstract method in the superclass, but its overridden for each of the three object classes. Now to call this function what syntax should I include? the function returns a double. Thanks.

    Well, this sort of depends on how the methods are overridden.
    public class SuperFoo {
      public void foo() {
         //do something;
      public void bar(){
         //do something
    public class SubFoo extends SuperFoo {
       public void foo() {
          //do something different that overrides foo()
       public void baz() {
          bar(); //calls superclass method
          foo(); //calls method in this (sub) class
          super.foo(); //calls method in superclass
    }However, if you have a superclass with an abstract method, then all the subclasses implement that same method with a relevant implementation. Since the parent method is abstract, you can't make a call to it (it contains no implementation, right?).

  • 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.

Maybe you are looking for

  • How to separate "random" code into their own place. (with source code)

    Hi, i can't seem to figure out how use random to separate the letters and how you would select the individual code from the menu and display it. I know a major part of the code is missing, so any help will be greatly appreciated. Here are my instruct

  • How to find who has locked a row in a table?

    My DB is a Oracle Database 10g Enterprise Edition Release 10.2.0.4.0. My question is very simple: You try to update a row of a table but find out it is locked by somebody else. How do I find which user (or session) has locked that row?

  • Roll-up not possible - Help

    Hi, COPA delta load is successfully loaded in to the data target, some how i am getting the following error message and Roll up failed for the last two times. Roll-up not possible; no filled aggregates available Issue happend in Production, Could you

  • After Purchasing, Cannot Download Tracks

    Though money for a recent purchase (this morning) has been deducted from my account, I can review my account info in iTunes, and I cannot purchase the music again, because its already been purchased, when I press the button to get the 12 downloads av

  • Flex HttpService

    Hi all, I am trying to send and object to a servlet from a flex Action Script Class. I configured the services-config.xml file as below <!-- http --> <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel"> <endpoint uri=" http://l