mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
support for specifying appearance for select and select1 from the schema.
handling the case where create web content is called with no forms configured for the web project some more progress on xf:switch updated tests - including one from ken at berkeley who is trying to use forms to write grant applications. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4925 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -34,6 +34,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
@@ -175,4 +176,41 @@ public class XMLUtil
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a NodeList of multiple nodelists
|
||||
*/
|
||||
public static NodeList combine(final NodeList... nls)
|
||||
{
|
||||
|
||||
return new NodeList()
|
||||
{
|
||||
public Node item(final int index)
|
||||
{
|
||||
int offset = 0;
|
||||
for (int i = 0; i < nls.length; i++)
|
||||
{
|
||||
if (index - offset < nls[i].getLength())
|
||||
{
|
||||
return nls[i].item(index - offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
offset += nls[i].getLength();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getLength()
|
||||
{
|
||||
int result = 0;
|
||||
for (int i = 0; i < nls.length; i++)
|
||||
{
|
||||
result += nls[i].getLength();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user