title: Updating label of a ButtonField from PopupScreen
body: <p>I have a ButtonField on MainScreen, from which I am pushing a PopupScreen where I have added an ObjectListfield. What I want to do is to update the label of ButtonField on MainScreen with the element selected from ObjectListfield of PopupScreen. </p>
  
  <p>Please tell me if it is possible to do without using <code>Dialog</code> class (I really want to use <code>PopupScreen</code> and not <code>Dialog</code> class) and the method by which this can be done. I'd appreciate if some sample code will be provided.</p>
  
  <p>I have added my code.</p>
  
  <pre class="lang-java prettyprint-override"><code>public final class MyScreen extends MainScreen {
      HorizontalFieldManager hfm;
      ButtonField btn;
      public MyScreen() {        
          // Set the displayed title of the screen       
          super();
          setTitle("MyTitle");
  
  
          btn = new ButtonField("label",ButtonField.CONSUME_CLICK);
          final mypopup mps = new mypopup();
  
          btn.setChangeListener(new FieldChangeListener() {
              public void fieldChanged(Field field,int context) {     
                  UiApplication.getUiApplication().pushModalScreen(mps);      
              }
          });
  
          hfm = new HorizontalFieldManager();
          hfm.add(btn);
          add(hfm);
      }
  
      public void setlabel(String labelnew) {
          btn.setLabel(labelnew);
      }
  
      public String getlabel() {
          return this.btn.getLabel();
      }
  }
  
  class mypopup extends PopupScreen implements FieldChangeListener {
  
      String it;
  
      ObjectListField obj = new ObjectListField() {
          public boolean navigationClick(int status,int time) {
              int selectedindex=obj.getSelectedIndex();
              it=(String)obj.get(obj, selectedindex);
  
              UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
  
              /*MyScreen my=new MyScreen();
              my.btn.setLabel(it);
              my.invalidate(); */
              //close();
  
              UiApplication.getUiApplication().invokeLater(new Runnable() {
                  public void run() {
                      /* This im doing to see that setlabel and getlabel are
                                  working properly */     
                      MyScreen my=new MyScreen(); 
                      my.setlabel(it);                 
                      String gt=my.getlabel();     
                      Dialog.alert(gt);            
                      my.hfm.invalidate();                             
  
                          //the label of button is changed but not updating in mainscreen.
                              }
              });
  
              return true;        
          }
      };
  
      public mypopup() {
          super(new VerticalFieldManager());
  
          String[] type=new String[] {"a","b","c","d"};
          obj.set(type);
          add(obj);       
       }
  
      public void fieldChanged(Field field, int context) {
          // TODO Auto-generated method stub
      }
  
  } 
  </code></pre>