Commit 3f7d9300 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed to return many reported items for each collection of fields instead of...

Fixed to return many reported items for each collection of fields instead of using only one item for all the reported fields. JM-136


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@904 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0b5b16e4
...@@ -179,11 +179,13 @@ public class XDataFormImpl { ...@@ -179,11 +179,13 @@ public class XDataFormImpl {
// Append the list of items returned from a search // Append the list of items returned from a search
// Note: each item contains a List of XFormFieldImpls // Note: each item contains a List of XFormFieldImpls
if (reportedItems.size() > 0) { if (reportedItems.size() > 0) {
Element itemElement = x.addElement("item");
Iterator itemsItr = reportedItems.iterator(); Iterator itemsItr = reportedItems.iterator();
while (itemsItr.hasNext()) { while (itemsItr.hasNext()) {
// Add a new item element for this list of fields
Element itemElement = x.addElement("item");
List fields = (List)itemsItr.next(); List fields = (List)itemsItr.next();
Iterator fieldsItr = fields.iterator(); Iterator fieldsItr = fields.iterator();
// Iterate on the fields and add them to the new item
while (fieldsItr.hasNext()) { while (fieldsItr.hasNext()) {
XFormFieldImpl field = (XFormFieldImpl)fieldsItr.next(); XFormFieldImpl field = (XFormFieldImpl)fieldsItr.next();
itemElement.add(field.asXMLElement()); itemElement.add(field.asXMLElement());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment