Search in sources :

Example 1 with XMLNodeList

use of org.openntf.domino.utils.xml.XMLNodeList in project org.openntf.domino by OpenNTF.

the class Subform method getExplicitSubforms.

/* (non-Javadoc)
	 * @see org.openntf.domino.design.AnyFormOrSubform#getExplicitSubforms()
	 */
@Override
public List<String> getExplicitSubforms() {
    XMLNodeList nodes = getSubformNodes();
    ArrayList<String> subforms = new ArrayList<String>();
    for (XMLNode node : nodes) {
        // $NON-NLS-1$
        String name = node.getAttribute("name");
        if (!Strings.isBlankString(name)) {
            // $NON-NLS-1$
            subforms.add(node.getAttribute("name"));
        }
    }
    return subforms;
}
Also used : XMLNode(org.openntf.domino.utils.xml.XMLNode) ArrayList(java.util.ArrayList) XMLNodeList(org.openntf.domino.utils.xml.XMLNodeList)

Example 2 with XMLNodeList

use of org.openntf.domino.utils.xml.XMLNodeList in project org.openntf.domino by OpenNTF.

the class Subform method getExplicitSubformsRecursive.

/* (non-Javadoc)
	 * @see org.openntf.domino.design.AnyFormOrSubform#getExplicitSubformsRecursive(java.util.List)
	 */
@Override
public List<String> getExplicitSubformsRecursive(final List<String> existingList) {
    Database db = getAncestorDatabase();
    DatabaseDesign dbDesign = db.getDesign();
    XMLNodeList nodes = getSubformNodes();
    ArrayList<String> subforms = new ArrayList<String>();
    for (XMLNode node : nodes) {
        // $NON-NLS-1$
        String name = node.getAttribute("name");
        if (!Strings.isBlankString(name)) {
            if (!existingList.contains(name)) {
                // $NON-NLS-1$
                existingList.add(node.getAttribute("name"));
                org.openntf.domino.design.Subform sf = dbDesign.getSubform(name);
                existingList.addAll(sf.getExplicitSubformsRecursive(subforms));
            }
        }
    }
    return existingList;
}
Also used : XMLNode(org.openntf.domino.utils.xml.XMLNode) DatabaseDesign(org.openntf.domino.design.DatabaseDesign) Database(org.openntf.domino.Database) ArrayList(java.util.ArrayList) XMLNodeList(org.openntf.domino.utils.xml.XMLNodeList)

Example 3 with XMLNodeList

use of org.openntf.domino.utils.xml.XMLNodeList in project org.openntf.domino by OpenNTF.

the class AbstractDesignComponentList method swap.

public void swap(final int a, final int b) {
    XMLNodeList fieldNodes = getParent().getDxl().selectNodes(pattern_);
    fieldNodes.swap(a, b);
}
Also used : XMLNodeList(org.openntf.domino.utils.xml.XMLNodeList)

Example 4 with XMLNodeList

use of org.openntf.domino.utils.xml.XMLNodeList in project org.openntf.domino by OpenNTF.

the class Subform method getComputedSubforms.

/* (non-Javadoc)
	 * @see org.openntf.domino.design.AnyFormOrSubform#getComputedSubforms()
	 */
@Override
public List<String> getComputedSubforms() {
    XMLNodeList nodes = getSubformNodes();
    ArrayList<String> subforms = new ArrayList<String>();
    for (XMLNode node : nodes) {
        // $NON-NLS-1$
        String name = node.getAttribute("name");
        if (Strings.isBlankString(name)) {
            // $NON-NLS-1$
            subforms.add(node.selectSingleNode("code[@event='value']/formula").getText());
        }
    }
    return subforms;
}
Also used : XMLNode(org.openntf.domino.utils.xml.XMLNode) ArrayList(java.util.ArrayList) XMLNodeList(org.openntf.domino.utils.xml.XMLNodeList)

Aggregations

XMLNodeList (org.openntf.domino.utils.xml.XMLNodeList)4 ArrayList (java.util.ArrayList)3 XMLNode (org.openntf.domino.utils.xml.XMLNode)3 Database (org.openntf.domino.Database)1 DatabaseDesign (org.openntf.domino.design.DatabaseDesign)1