@Override protected List<DomNode> computeElements() { final List<DomNode> children = new LinkedList<>(); for (DomNode domNode : node.getChildNodes()) { if (domNode instanceof DomElement) { children.add(domNode); } } return children; } };
@Override protected List<DomNode> computeElements() { final List<DomNode> children = new LinkedList<>(); for (DomNode domNode : node.getChildNodes()) { if (domNode instanceof DomElement) { children.add(domNode); } } return children; } };
public static Collection<Node> getChildren(DomNode h) { ArrayList<Node> list = new ArrayList<>(); DomNodeList<DomNode> l = h.getChildNodes(); list.addAll(l); return list; }
/** * Set the value of an InputNumberSpinner. * * @param componentID The JSF component ID or a suffix of the client ID. * @param value The value to set before the form is submitted. * * @throws IOException if an internal refresh is needed and there is an * error sending a request to the server. * @throws DuplicateClientIDException if more than one client ID matches the suffix * @throws ClassCastException if the current page is not an HtmlPage. */ public void setInputNumberSpinner(String componentID, String value) throws IOException { DomNode tdTag = (DomNode)jsfClient.getElement(componentID + "Edit"); HtmlInput input = (HtmlInput)tdTag.getChildNodes().item(0); input.setValueAttribute(value); }
private static void deleteAfter(final DomNode node, final int offset) { if (isOffsetChars(node)) { String text = getText(node); if (offset > -1 && offset < text.length()) { text = text.substring(0, offset); setText(node, text); } } else { final DomNodeList<DomNode> children = node.getChildNodes(); for (int i = offset; i < children.getLength(); i++) { final DomNode child = children.get(i); child.remove(); i--; } } }
private static void deleteBefore(final DomNode node, int offset) { if (isOffsetChars(node)) { String text = getText(node); if (offset > -1 && offset < text.length()) { text = text.substring(offset); } else { text = ""; } setText(node, text); } else { final DomNodeList<DomNode> children = node.getChildNodes(); for (int i = 0; i < offset && i < children.getLength(); i++) { final DomNode child = children.get(i); child.remove(); i--; offset--; } } }
private static void deleteAfter(final DomNode node, final int offset) { if (isOffsetChars(node)) { String text = getText(node); if (offset > -1 && offset < text.length()) { text = text.substring(0, offset); setText(node, text); } } else { final DomNodeList<DomNode> children = node.getChildNodes(); for (int i = offset; i < children.getLength(); i++) { final DomNode child = children.get(i); child.remove(); i--; } } }
private static void deleteBefore(final DomNode node, int offset) { if (isOffsetChars(node)) { String text = getText(node); if (offset > -1 && offset < text.length()) { text = text.substring(offset); } else { text = ""; } setText(node, text); } else { final DomNodeList<DomNode> children = node.getChildNodes(); for (int i = 0; i < offset && i < children.getLength(); i++) { final DomNode child = children.get(i); child.remove(); i--; offset--; } } }
return !selects(nc.getCondition(), element); case Condition.SAC_ONLY_CHILD_CONDITION: return element.getParentNode().getChildNodes().getLength() == 1; case Condition.SAC_CONTENT_CONDITION: final ContentCondition cc = (ContentCondition) condition;
return !selects(nc.getCondition(), element); case Condition.SAC_ONLY_CHILD_CONDITION: return element.getParentNode().getChildNodes().getLength() == 1; case Condition.SAC_CONTENT_CONDITION: final ContentCondition cc = (ContentCondition) condition;
return !selects(nc.getCondition(), element); case Condition.SAC_ONLY_CHILD_CONDITION: return element.getParentNode().getChildNodes().getLength() == 1; case Condition.SAC_CONTENT_CONDITION: final ContentCondition cc = (ContentCondition) condition;
for (final DomNode n : ancestorClone.getChildNodes()) { fragment.appendChild(n);
for (final DomNode n : ancestorClone.getChildNodes()) { fragment.appendChild(n);