Package org.richfaces.context.IdParser

Examples of org.richfaces.context.IdParser.Node


    private void walk(UIComponent component, String baseId, int nodeIdx) {

        boolean isLastNode = (nodeIdx == parsedId.length - 1);

        Node node = parsedId[nodeIdx];

        Collection<String> directSubtreeIds;
        UIComponent childComponent;

        if (node.getFunction() == null) {
            directSubtreeIds = Collections.singleton(node.getImage());
            childComponent = component;
        } else {
            directSubtreeIds = evaluateFunction(component, baseId, node);
            // functionTarget is set inside evaluateFunction(...) call!
            childComponent = functionTarget;
View Full Code Here


    }

    @Test
    public void testSimpleId() throws Exception {
        assertArrayEquals(new Node[0], parse(""));
        assertArrayEquals(new Node[] { new Node("test") }, parse("test"));
        assertArrayEquals(new Node[] { new Node("form"), new Node("table") }, parse("form:table"));
    }
View Full Code Here

            fail();
        } catch (IllegalArgumentException e) {
            // ignore
        }

        assertArrayEquals(new Node[] { new Node("form"), new Node("table"), new Node("", "rows"), new Node("@row") },
            parse("form:table:@rows():@row"));
        assertArrayEquals(new Node[] { new Node("form"), new Node("table"), new Node("12", "rows") },
            parse("form:table:@rows(12)"));
        assertArrayEquals(new Node[] { new Node("form"), new Node("table"), new Node("", "rows"), new Node("subtable") },
            parse("form:table:@rows():subtable"));

        assertArrayEquals(new Node[] { new Node("form"), new Node("table"), new Node("12", "rows"), new Node("subtable"),
                new Node("a", "rows"), new Node("cell") }, parse("form:table:@rows(12):subtable:@rows(a):cell"));
    }
View Full Code Here

TOP

Related Classes of org.richfaces.context.IdParser.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.