MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / sendForm

Method sendForm

src/main/java/ServiceDiscovery/DiscoForm.java:130–161  ·  view source on GitHub ↗
(String id)

Source from the content-addressed store, hash-verified

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() {

Callers 1

menuActionMethod · 0.95

Calls 10

addChildNsMethod · 0.95
setAttributeMethod · 0.95
getTagNameMethod · 0.95
getChildBlocksMethod · 0.95
addChildMethod · 0.95
elementsMethod · 0.80
formSubmitMethod · 0.65
equalsMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected