Example #1
0
 /** Fill Combos (Location, User) */
 private void fillCombos() {
   Vector<KeyNamePair> locationVector = new Vector<KeyNamePair>();
   if (m_bpartner != null) {
     MBPartnerLocation[] locations = m_bpartner.getLocations(false);
     for (int i = 0; i < locations.length; i++)
       locationVector.add(
           new KeyNamePair(locations[i].getC_BPartner_Location_ID(), locations[i].getName()));
   }
   DefaultComboBoxModel locationModel = new DefaultComboBoxModel(locationVector);
   f_location.setModel(locationModel);
   //
   Vector<KeyNamePair> userVector = new Vector<KeyNamePair>();
   if (m_bpartner != null) {
     MUser[] users = m_bpartner.getContacts(false);
     for (int i = 0; i < users.length; i++)
       userVector.add(new KeyNamePair(users[i].getAD_User_ID(), users[i].getName()));
   }
   DefaultComboBoxModel userModel = new DefaultComboBoxModel(userVector);
   f_user.setModel(userModel);
 } //	fillCombos