(String id)
| 128 | } |
| 129 | |
| 130 | private void sendForm(String id){ |
| 131 | JabberDataBlock req=new Iq(service, Iq.TYPE_SET, id); |
| 132 | JabberDataBlock qry=req.addChildNs(childName, xmlns); |
| 133 | //qry.setAttribute("action", "complete"); |
| 134 | qry.setAttribute("node", node); |
| 135 | qry.setAttribute("sessionid", sessionId); |
| 136 | |
| 137 | JabberDataBlock cform=qry; |
| 138 | if (xData) { |
| 139 | JabberDataBlock x=qry.addChildNs("x", DiscoForm.NS_XDATA); |
| 140 | x.setAttribute("type", "submit"); |
| 141 | cform=x; |
| 142 | } |
| 143 | if (listener != null) |
| 144 | listener.formSubmit(fields); |
| 145 | for (Enumeration e=fields.elements(); e.hasMoreElements(); ) { |
| 146 | FormField f=(FormField) e.nextElement(); |
| 147 | if (f==null) continue; |
| 148 | JabberDataBlock ch=f.constructJabberDataBlock(); |
| 149 | if (ch!=null) { |
| 150 | if (ch.getTagName().equals("remove")) { |
| 151 | cform=qry; |
| 152 | Vector cb=cform.getChildBlocks(); |
| 153 | if (cb!=null) cb.removeAllElements(); |
| 154 | cform.addChild(ch); |
| 155 | break; |
| 156 | } |
| 157 | cform.addChild(ch); |
| 158 | } |
| 159 | } |
| 160 | stream.send(req); |
| 161 | } |
| 162 | |
| 163 | |
| 164 | public void destroyView() { |
no test coverage detected