×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    to clear the textfield.

    Hi,
    I want to clear the textfield when the text that was entered,is added to the list.
    So how can i clear it?
    please help

  2. #2
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Re: to clear the textfield.

    Please reply if anybody knows the answer..

  3. #3
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: to clear the textfield.

    when y get the data of your text field
    afetr dat line set text to that text field with ""
    eg

    PHP Code:
    test.setString(""); 
    Regards,
    Saurabh

  4. #4
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Re: to clear the textfield.

    Quote Originally Posted by ingsaurabh View Post
    when y get the data of your text field
    afetr dat line set text to that text field with ""
    eg

    PHP Code:
    test.setString(""); 
    Code:
     if (cmd == okKeeper && item == add) {
            	
                String list1 = addmessage.getString();
                openRMS();
                // add to record store2
                try {
                    list1 = addmessage.getString();
                    cgTodo.deleteAll();
                    String str3 = list1;
                    System.out.println("\nItem added: " + str3);
                    byte[] data4 = str3.getBytes();
                 
                    try {
                        rs2.addRecord(data4, 0, data4.length);
                    } catch (Exception e) {
                    }
                    // -------------------------READ RECORD FROM RMS2 --------------
                 
                    refreshList();
                  
                } catch (Exception error) {
    
                }
            
                closeRMS();
            }
    This is the part of my code so can i know where should i place that part i have tried but its not working.

  5. #5
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: to clear the textfield.

    try dis I suppose addmessage to be your text field

    PHP Code:
    if (cmd == okKeeper && item == add) {
                
                
    String list1 addmessage.getString();
                
    openRMS();
                
    // add to record store2
                
    try {
                    
    list1 addmessage.getString();
                    
    addmessage.setString("");
                    
    cgTodo.deleteAll();
                    
    String str3 list1;
                    
    System.out.println("\nItem added: " str3);
                    
    byte[] data4 str3.getBytes();
                 
                    try {
                        
    rs2.addRecord(data40data4.length);
                    } catch (
    Exception e) {
                    }
                    
    // -------------------------READ RECORD FROM RMS2 --------------
                 
                    
    refreshList();
                  
                } catch (
    Exception error) {

                }
            
                
    closeRMS();
            } 
    Regards,
    Saurabh

  6. #6
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Re: to clear the textfield.

    Thanks a lot Saurabh..

Similar Threads

  1. Replies: 1
    Last Post: 2010-03-07, 15:32
  2. Problem of TextField key hooking...
    By raselbd in forum Mobile Java General
    Replies: 3
    Last Post: 2008-09-02, 08:21
  3. TextField in DECIMAL: Compatibility problems with some phones?!?
    By D0X-Dr in forum Mobile Java Tools & SDKs
    Replies: 12
    Last Post: 2008-01-11, 10:08
  4. Cannot use textField after delete and insert in Form
    By andretr in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2004-08-03, 13:33
  5. TextField refresh problem with Nokia devices
    By RalfHupfer in forum Mobile Java General
    Replies: 1
    Last Post: 2004-07-02, 01:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×