Title: im
Description:
Copyright: Copyright (c) 2001
Company:
1920212223242526
private RosterBuilder builder; private RosterItemBuilder itemBuilder; public RosterHandler() { builder = new RosterBuilder(); itemBuilder = new RosterItemBuilder(); }
121122123124125126127128129130131132133134135136137138139
{ String nick = txtNick.getText(); if (nick.equals("")) nick = contact.getUser(); //still empty then use domain if (nick == null) nick = contact.getDomain(); RosterBuilder rb = new RosterBuilder(); RosterItemBuilder rib = new RosterItemBuilder(); rib.addGroup((String) cmbGroup.getSelectedItem()); rib.jid = contact; rib.name = nick; rib.ask = "subscribe"; rb.addItem(rib.build()); InfoQueryBuilder iqb = new InfoQueryBuilder(); iqb.addExtension(rb.build()); iqb.setType("set"); backend.send(iqb.build()); } catch (InstantiationException e2) { e2.printStackTrace();