Problems navigating between classes

Hi again,
Sorry to be such a bore; situation is as follows:
1)I have a midlet class containing an inner class where I can merrily navigate between a Form and a Canvas class
2)I've written a separate class, which also extends Canvas – not an inner – which I can navigate to but cannot get back to either the form or the inner canvas class
3) How do I do it? :-)
Cheers
J
And here is the outer class
public class OtherCanvas extends Canvas implements CommandListener{
   public Command form02 ;
   public Canvas myCF;
    public OtherCanvas(){
       //myCF = new CanvasForm();
       form02  = new Command("Form", Command.SCREEN, 1);
       this.addCommand(form02);
    protected void paint(Graphics g){
      int w = getWidth();
      int h = getHeight();
      g.setColor(159,182,205);  //159;182;205
      g.fillRect( 0,0,w,h );
    public void commandAction( Command c, Displayable d){
        //if (c == form02)
}

Hi,
Trying to get to first base(with midlets) has made me forget my basic java. Anyway i have now done what you said (which i should have known) and i must be close, but still unable to navigate back to form from OtherCanvas
Ok here's the code:
J
public class OtherCanvas extends Canvas implements CommandListener{
   public Command form02 ;
   public CanvasForm myCF;
   private Display display;
   private Form form;
   public OtherCanvas(Display disp, Form fm){
       display = disp;
       form = fm;
       form02  = new Command("Form", Command.SCREEN, 1);
       this.addCommand(form02);
       this.setCommandListener(this);
    protected void paint(Graphics g){
      int w = getWidth();
      int h = getHeight();
      g.setColor(159,182,205);  //159;182;205
      g.fillRect( 0,0,w,h );
    public void commandAction( Command c, Displayable d){
        if (c == form02)
           display.setCurrent(form);
}

Similar Messages

  • Custom Events and Listeners between classes

    I've got a project I've been working on for weeks that I'm
    having yet another problem with. I'm trying to learn AS3 which is
    why it's taking so long but that's not important for this post.
    I wanted to create a custom event class so that I could make
    sure the event does not interfere with other "COMPLETE" events that
    are being passed between classes. In other words, I have a few
    things that need to complete prior to a function being called...
    one is some XML being loaded and another is a font loaded. So, I
    thought I would create a custom FontLoaded class that extends Event
    and make the type something like "FontLoadedEvent.LOADED". That way
    I could listen for the XML "Event.COMPLETE" and this font event
    also.
    Please tell me if I'm going down the wrong path here but I
    don't seem to be getting the dispatched event for my new custom
    event. Also, how does one detect if it's being dispatched other
    than if the eventListener is fired? Any other ways to test
    this?

    You can trace the event to see if it dispatched.
    Also, this is not a good case to create a new event. Custom
    events are used to store additional information. MouseEvent exists
    because Event doesn't have localX, localY, etc. properties. Since
    you don't seem to be throwing additional properties, you can use a
    regular event.
    trace(dispatchEvent(new Event("panelFontsLoaded"));
    addEventListener("panelFontsLoaded", onFontsLoaded);
    Static consts are used to help debug typos. The event type is
    just a string, often stored in a const.

  • Controlling events between classes

    hello
    i know i'm asking a lot, but i couldn't find anything. the problem is i've got a jframe and some panels with buttons.
    eg:
    class A extends JFrame
    getContentPane().add( B ) ;
    getContentPane().add( C ) ;
    class B extends JPanel
    add( button1 ) ;
    add( button2 ) ;
    class C extends JPanel
    add( button3 ) ;
    add( button4 ) ;
    where do i add ActionListeners? how do i pass information between classes? if button1 is clicked -> class A should know it.
    i tried to do this in class A: objectOfB.button1 (access button1 directly) - didn't work - why?
    if a button1 is clicked i want to remove the jpanel and replace it with another one. how should i do this?
    Thank You All

    Check out the java tutorials. There are great examples that show you how to do what you want to do

  • WARNING: Problem validating implementation class. Exception declaration mis

    I have created sample class using JDevStudio10.1.3
    Added method getX() throws Ex (Ex implements Exception)
    Select class and generated J2EE 1.4 RPC webservices
    Got the warning :
    Generating WSDL and mapping file
    WARNING: Problem validating implementation class. Exception declaration mismatch between Implementation: mypackage.Class3 and Interface: mypackage.MyWebService3. Impl class Method: X declares exceptions not declared by the interface (mypackage.Exp)
    Now When I generated client proxy from the wsdl generated, Ex class is not getting generated.
    Can some one help me please.
    Thanks in advance

    If you are using Ex in the implemetation class, make sure that you also include the same in the interface (or SEI).
    If the implementation looks something like:
    public void doSomething() throws Ex {
    System.out.println("Is there something to do, now ?");
    then the SEI should be:
    public void doSomething() throws Ex, RemoteException;
    If your have ommited Ex, then you will have the warning you are seing, and there wont be any artifact generated for Ex in the WSDL.
    Because the Ex exception was not mapped to any WSDL artifact, there is no way you will see the Ex exception generated on the client side (or proxy).
    I have been able to reproduce your error message, so you should be all good.
    WARNING: Problem validating implementation class. Exception declaration mismatch between Implementation: bugyyy.MyServiceImpl and Interface: bugyyy.MyWebService. Impl class Method: doSomething declares exceptions not declared by the interface (bugyyy.Ex)
    Hope this helps,
    Eric

  • Navigation between applications

    Hello everyone,
    i had a problem while Navigating from one application to another application.....in webdynpro project.
    i had two application in one webdynpro project. i am passing one url string in first application exit plug.
    using the code below.
    String deployableObjectName =wdComponentAPI.getDeployableObjectPart()     .getDeployableObjectName();
    Map urlParameters = new HashMap();
    //     get URL parameter value entered by user, stored in context attribute
    urlParameters.put("A",                              wdContext.currentContextElement().getA());
    urlParameters.put("B",wdContext.currentContextElement().getB());                                                                 try {
                                                                          WDDeployableObjectPart deployableObjectPart =
                                            WDDeployableObject.getDeployableObjectPart(
                                                      deployableObjectName,
                                                      "TreeApp",
                                                      WDDeployableObjectPartType.APPLICATION);
                                            String urlToTreeApp =
                                                 WDURLGenerator.getApplicationURL(
                                                      deployableObjectPart,
                                                      urlParameters);
                                                                               wdThis
                                                 .wdGetLoginCompInterfaceViewController()
                                                 .wdFirePlugLoginAppExit(
                                                 urlToTreeApp);
                                       } catch (WDURLException e) {
                                            messageMgr.reportException(
                                                 e.getLocalizedMessage(),
                                                 false);
                                       } catch (WDDeploymentException ex) {
                                            messageMgr.reportException(
                                                 ex.getLocalizedMessage(),
                                                 false);
    then this i am receiving in second application inboundplug that is onDefaultplug,there i had given corresponding parameters.
    Everything is working fine.
    My problem is : the parameters whch i am passing are showing in addressbar as query string.I dont want to show them there.
    Is there any other way to witch i can pass parameters from one application to other application without displaying at url.
    anybody help me.
    regards,

    This explains how to use exit plugs for navigation between apps.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial%20on%20inter-application-navigation%20-%2015.htm">Inter-Application Navigation</a>
    Regards,
    Keith L.

  • LightSwitch HTML: Don't wait for active promise operations when navigating between screens

    Navigation between screens is halted (and the loader is shown) until any active promise operation has completed.
    This becomes an issue when a screen started a long loading operation, but the user wants to exit out of that screen. It is easy to cancel promise operations that I started myself, since I have control over when the operation completes. But I don't see any
    way to do it for operations started by the framework itself (such as any collection property of a screen).
    Is there any solution to this problem?

    This becomes an issue when a screen started a long loading operation, but the user wants to exit out of that screen.
    There isn't method available to cancel the navigation between screens, you need look into your project, and check why it takes long time to load.

  • Regarding T Raja weblog Navigation between BSP Applications part I

    Hi sdns,
    This question is regarding weblog T.Raja Navigation between BSP Applications part I.My doubt is i have done it its  working but i am not able to get the o/p data in the table here. I have revised the code twice & thrice not able to find the table which he used. In this code is there any table he used.Or else he provided data directly from the program.
    I am getting the table but no data in it .I have checked p0006 it is an internal table.
    If there is no data in the table how to enter data and in which table we have to enter the data.
    And other thing i have noticed is .In the blog there are only few fields in tthe o/p.But in my program i got a lot of o/p fields.Please help me in this regard.
    Thanks & Regards,
    Lokesh@EDS.

    Lokesh,
    I hope you are talking about the table:model_id->I_detail. This table is declared in Model Class-ZCL_MVC_PERNR_DETAIL in Class attributes. Look at the screen shots in the blog. it will solve the issue.
    @ Viji:
    Lokesh mentioned abt blog /people/raja.thangamani/blog/2006/12/26/bsphow-to-navigation-between-bsp-applications-part-i
    Raja T
    Message was edited by:
            Raja Thangamani

  • What is the fundamental difference between classful and classless routing?

    Hello to all,
    After reading several RFCs, guides and HOWTOs I am confused by an apparently trivial question - what is the basic, fundamental difference between classful and classless routing?
    I am well aware that - said in a very primitive way - the classful routing does not make use of netmasks and instead uses the address classes while the classless routing utilizes the netmasks and does not evaluate the address classes.
    However, already in 1985 the RFC 950 (Internet Standard Subnetting Procedure) stated that the networks can be further subnetted using the network mask. Since then the routers are expected to use network masks in the routing decision process in the precise way they use it nowadays. However, if the routers use network masks they are doing the classless routing, aren't they? Where is then the difference if we used to describe the 80's way of routing as a classful routing? Or was it already the classless routing? The RFCs about CIDR came gradually only in 1992 and 1993.
    If somebody could give me an insight into the key difference between classful and classless routing (and perhaps into the Internet history, how was the real routing done then) I would be most grateful.
    Thank you a lot!
    Regards,
    Peter

    Hello Mohammed,
    I am afraid we still have not understood each other ;) I am not looking for the algorithms used to select the best path. I am well aware of them, both Ford-Bellman and Dijkstra, and about their internals. By the way, these algorithms do not have any influence whether the routing is classful or classless because they deal with metrics, not with masks. For example, a classless EIGRP internally uses a distance-vector algorithm, not a SPF algorithm.
    I will try to explain once more what is my problem... There are two terms commonly used but badly defined: the classless routing and classful routing. Originally, I have thought that the classful routing works as follows:
    - The routing table consists only of classful destination networks (major nets), metrics and respective gateways. No network masks are stored in the table because we are classful, that is, we use exclusively the route classes and all entries in the routing table are already classful.
    - When routing a packet, the router looks at its destination IP address and determines the major net of this IP address (that is, the classful network that this IP address belongs to). Then it looks up the corresponding entry in the routing table and sends the packet to the respective gateway.
    I thought that the classful routing works in this way. I won't describe the classless routing - both of us know how do the today's routers select the next hop.
    However, in the RFCs 917 and 950 which were published in 1985, long ago before the term 'classless routing' was coined, the network mask was already defined and it was stated how the routers should work with it.
    Now I am confused. The terms classless addresses and classless routing were defined sometime in 1990's, therefore I assume that the routing before the invention of classless IP assignment can be in fact described as classful. In other words, I thought that the routing that was commonly used in 1980's did not use netmasks and can be described as classful because the notion of classlessness came first in 1990's. But now I see that netmasks were defined in 1985.
    Now where am I wrong? Do I understand the classful routing properly as I described it? Is it correct to talk about routing in that era as classful although the netmasks were already in use? Or was it already the classless routing?
    Basically I am trying to understand what was called the classful routing if the classless routing is said to be something different.
    Mohammed, I am most grateful to you for your patience and suggestions! Thank you indeed.
    Regards,
    Peter

  • WARNING: Problem validating implementation class. Failed to load class:

    when i am running plsqlAssembler.jar file for wsa.jar with all other atributes , i am getting this warning WARNING: Problem validating implementation class. Failed to load class.
    Please if anybody knows about this reply me,
    thanks in advance.

    If you are using Ex in the implemetation class, make sure that you also include the same in the interface (or SEI).
    If the implementation looks something like:
    public void doSomething() throws Ex {
    System.out.println("Is there something to do, now ?");
    then the SEI should be:
    public void doSomething() throws Ex, RemoteException;
    If your have ommited Ex, then you will have the warning you are seing, and there wont be any artifact generated for Ex in the WSDL.
    Because the Ex exception was not mapped to any WSDL artifact, there is no way you will see the Ex exception generated on the client side (or proxy).
    I have been able to reproduce your error message, so you should be all good.
    WARNING: Problem validating implementation class. Exception declaration mismatch between Implementation: bugyyy.MyServiceImpl and Interface: bugyyy.MyWebService. Impl class Method: doSomething declares exceptions not declared by the interface (bugyyy.Ex)
    Hope this helps,
    Eric

  • Navigation between different componets in IC Web Client for CRM 7.0

    Once the user click save button in component ICCMP_BT_BUTTON I need to navigate to component ICCMP_BT_SVO that displays the Service Order Data and display the new Service Request that was created.
    How can I do navigation between different componets in IC Web Client for CRM 7.0?
    Thanks.
    Rodolfo Miã

    Hello,
    You can find detailed presentations in the learning maps available on the SAP Service Marketplace http://service.sap.com/rkt-crm for release CRM 2006s, CRM 2007, or CRM 7.0. In case I didn't mention it before, Intent-Driven Interaction (IDI) was first introduced and is only available starting with CRM 2006s and above. In the Interaction Center area, there is a presentation called "Rule Based Automation and Guidance" which covers IDI. I'm not sure if you can access the URL directly, but just in case here it is: [https://websmp104.sap-ag.de/~sapidb/011000358700001162852007E].
    Warm regards,
    John

  • How to navigating between layers?( as if they were pages of a book?)

    I need a good advice on design and navigating between some different layers.
    I am a Adobe Director user, and I am used to think of “navigating between frames”. also frames as pages of a book, while in flash time-frames.
    In Director one can navigate between different frames with each containing many components.
    And this does not make any conflict since the frames are some kind of pages of a book, you go to any page you want and back again.
    I am designing math training application in falsh-CS6, in which the user should be able to navigate from start-menu by choosing an
    exercise number and then go to the wanted exercise and then create an exercise by a create_excercise button, there back again to menu to choose another and so on. How I can do it clean in flash?
    As I see I have to place everything in the same “frame” in flash, and it becomes little practical and confusing since there
    are many things all gathered in the same frame, where they should instead appear in their respective “pages”.
    I have done some works in flash:  made 4 layers in flash with the following contents:
    layer 1: for my menu( contains 3 buttons, q1bt, q2bt, q3bt)
    layer 2: for question 1( contains 3 buttons  makeQ1bt, chekAns1bt, and  gotoMenuBtn)
    the same is for layer 3 and 4.
    I see no options rather than making different components visible or invisible whole way! but is there a better way?
    I appreciate any help.

    Flash does allow more than one frame - that is one of the foundations of working with it.  You can restrict yourself to using just one frame if you like, but it is not required and very often people use the timeline instead of keeping things in one place.
    I have no familiarity with Director, but what you just described sounds like designing using the timeline of Flash.  With Flash you can use the timeline in the fashion you just described where different pages occupy different frames of the timeline and you can navigate from one to another.  You are not stuck with one frame in Flash... you can create a new keyframe at any point along the timeline and add new/different content to it, while retaining a menu that exists across all pages (or not - it's your choice)..

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • Navigation between records in a JSP application

    Hi,
    I would like to know how to provide navigation between records in a tabular form liked JSP application using JDeveloper 3.2
    without using the Oracle or Default template.
    I can do it with a singular record view but not in a tabular view. I like to know now I can mimic the navigation provided in Oracle template in which the current selected record is hightlighted. Can we navigate between records using Up and Down
    arrow key like in Oracle form instead of using Navigation Bar. Please provide details code.
    Thanks a bunch,
    Khanh Hoang

    You can refer to the source code in jbohtmlsrc.zip for deriving your own implementation.

  • How to define the dynamic navigation between two component in web ui

    Hi All,
    I have a requirement to create a new assignment block in accounts overview screen .
    1.Created new view(Table view) in the BP_HEAD component.
    2.Created new button on the table view toolbar .
    3.If the user clicks the new button it should navigate to interaction log component(BT126H_CALL).
    Please hekp me step 3 how to do .
    I have checked planned activity assignment block in the account but is dynamic navigation.
    Please explain me how to define the dynamic navigation between two components.
    What is window delegate .
    Thanks,
    Venkyy

    Hi ,
    Kindly follow the link , this will be helpful for your issue :
    http://wiki.sdn.sap.com/wiki/display/CRM/CRM-NavigatingtoyourcustomBSP+component

  • Is there any Similar between Class.forName() and new operator ???

    Plz tel me is there any Similar between Class.forName() and new operator ??? i have been asked this ques in interview

    You probably should have used the other thread:
    http://forum.java.sun.com/thread.jspa?threadID=792678
    To add a little confusion to the matter...Class objects are in fact objects. They're objects representing classes. So, in a sense, I guess, you could say they're similar -- in each you get an object. But in practice Class objects and all other objects should be considered semantically different unless you're doing some pretty unusual stuff. Also Class.forName is more of a factory method than a constructor.

Maybe you are looking for

  • Click wheel and buttons don't work on 5th gen.

    I have had my iPod for about half a year and for some reason my iPod buttons don't work. If I move the hold button it turns on but none of the other buttons work. It charges and everything. Does anyone know what to do? 5th generation   Windows XP  

  • My computer doesn't have a disk drive.  How can I download Adobe Creative Suite 5?

    I am getting the Adobe Creative Suite 5 software from my university's department.  I have the software on a disk and an activation code paid for by the department, but my laptop does not have a disk drive.  How can I download the software from online

  • Product activation

    Hi could anyone please help me... i have downloaded a english trial version of cs 5.5 design premium from adobe website and mistakenly a frnd of mine purschased a german version cs 5.5 product key for me. Now the product key is not working for my eng

  • Reloading Adobe Photosop Premier Elements_10 after major laptop crash!?

    Photoshop Elements_10 is operating fine after reload, but none of the 3 Premier_10 switchboard options are activating their respective functions.  Unfortunately I also tried selecting that only the "New Project" funtion should open on seleting the Pr

  • JavaScript required. The browser that you are using does not support JavaSc

    I keep on getting this message when I'm trying to log on to Hotmail JavaScript required. The browser that you are using does not support JavaScript, or you may have disabled JavaScript And my browser (IE 6) cannot go to any java links. They either do