Creates a new instance of vCardForm @param vcard
(VCard vcard)
| 77 | * @param vcard |
| 78 | */ |
| 79 | public VCardEdit(VCard vcard) { |
| 80 | super(SR.MS_VCARD + " " + StaticData.getInstance().account.JID.getBare()); |
| 81 | this.vcard = vcard; |
| 82 | |
| 83 | for (int index=0; index<vcard.getCount(); index++) { |
| 84 | String data=vcard.getVCardData(index); |
| 85 | String name=(String)VCard.vCardLabels.elementAt(index); |
| 86 | //truncating large string |
| 87 | if (data!=null) { |
| 88 | int len=data.length(); |
| 89 | if (data.length()>500) |
| 90 | data=data.substring(0, 494)+"<...>"; |
| 91 | } |
| 92 | itemsList.addElement(new TextInput(name, data, null)); |
| 93 | } |
| 94 | |
| 95 | publish=new LinkString(SR.MS_PUBLISH) { public void doAction() { publish(); } }; |
| 96 | |
| 97 | setPhoto(); |
| 98 | } |
| 99 | |
| 100 | public void publish() { |
| 101 | for (int index=0; index<vcard.getCount(); index++) { |
nothing calls this directly
no test coverage detected