Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor rajan701v's Avatar
    Join Date
    Dec 2009
    Location
    Ghaziabad
    Posts
    244
    Is it possible to set the form to back in LWUIT.
    Let i have Form1 and Form2.
    Form1 switches to Form2 which has back Command. On the click of Back Command it will move to Form1 again.
    Form1 has Labels and Textfields

    Please Reply.
    Regards
    Rajan Verma

  2. #2
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Quote Originally Posted by rajan701v View Post
    Is it possible to set the form to back in LWUIT.
    Let i have Form1 and Form2.
    Form1 switches to Form2 which has back Command. On the click of Back Command it will move to Form1 again.
    Form1 has Labels and Textfields

    Please Reply.
    This is very basic thing that is required in most of the apps. You can set the form2 as the current displayable on the back command action inside the actionPerformed()

    This is how you can move ahead,
    PHP Code:
    public void actionPerformed(ActionEvent ae) {
         
    Form current Display.getInstance().getCurrent();
         if (
    current == mFirstForm) {
          
    mSecondForm.show();
         } else if (
    current == mSecondForm) {
          
    mFirstForm.show();
         }
        } 
    In this code you can put the command events and change the displayable.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Regular Contributor rajan701v's Avatar
    Join Date
    Dec 2009
    Location
    Ghaziabad
    Posts
    244
    Quote Originally Posted by raj_J2ME View Post
    This is very basic thing that is required in most of the apps. You can set the form2 as the current displayable on the back command action inside the actionPerformed()

    This is how you can move ahead,
    PHP Code:
    public void actionPerformed(ActionEvent ae) {
         
    Form current Display.getInstance().getCurrent();
         if (
    current == mFirstForm) {
          
    mSecondForm.show();
         } else if (
    current == mSecondForm) {
          
    mFirstForm.show();
         }
        } 
    In this code you can put the command events and change the displayable.
    thanks a lot for the reply. Will it work like Back commnad as in LCDUI Command.BACK

    Please Reply.
    Regards
    Rajan Verma

  4. #4
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Quote Originally Posted by rajan701v View Post
    thanks a lot for the reply. Will it work like Back commnad as in LCDUI Command.BACK

    Please Reply.
    Yeah, just you have to provide the proper command action, what you wanna do..it will work,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Regular Contributor rajan701v's Avatar
    Join Date
    Dec 2009
    Location
    Ghaziabad
    Posts
    244
    Quote Originally Posted by raj_J2ME View Post
    Yeah, just you have to provide the proper command action, what you wanna do..it will work,
    Thanks raj. I followed your steps. But when i goes back to the previous form, all the components, command are removed and Screen is blank . What should i do for this.

    Please Reply.
    Regards
    Rajan Verma

  6. #6
    Registered User bhanuchandar.k's Avatar
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868
    Hi rajan701v ,

    In the process of the setting the form back you are clearing the previously added components some where . Please make sure like you are not removing the commands and the item in that form . Or you might be creating the new instance of the form.

  7. #7
    Regular Contributor rajan701v's Avatar
    Join Date
    Dec 2009
    Location
    Ghaziabad
    Posts
    244
    Quote Originally Posted by bhanuchandar.k View Post
    Hi rajan701v ,

    In the process of the setting the form back you are clearing the previously added components some where . Please make sure like you are not removing the commands and the item in that form . Or you might be creating the new instance of the form.
    Thanks i got the solution.
    Regards
    Rajan Verma

Similar Threads

  1. pass Text field value from one form to another form in LWUIT.
    By debasish_cse05 in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2011-01-13, 11:21
  2. problem in back and forth of LWUIT form and normal form in j2me
    By jugal.inani in forum Mobile Java General
    Replies: 8
    Last Post: 2010-06-09, 12:24
  3. need to put canvas in LWUIT Form
    By yatin.frankline in forum Mobile Java General
    Replies: 5
    Last Post: 2010-04-05, 13:23
  4. want to open form when back to first ap , how?
    By nokia_lin in forum Symbian User Interface
    Replies: 0
    Last Post: 2009-04-15, 02:41
  5. How to use replace method of LWUIT form?
    By neeraja.nokia in forum Mobile Java General
    Replies: 0
    Last Post: 2009-01-24, 04:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved