Package org.apache.commons.jxpath

Examples of org.apache.commons.jxpath.Pointer.asPath()


        List nodeset = new LinkedList();
        Iterator iter = jxcontext_.iteratePointers(xpathSelector);

        while (iter.hasNext()) {
            Pointer nextPointer = (Pointer) iter.next();
            String path = nextPointer.asPath();

            nodeset.add(path);
        }
        return nodeset;
    }
View Full Code Here


            Pointer ptr = (Pointer)pointerIter.next();

            // prepare result Rule
            Rule nextFailedRule = new Rule();

            nextFailedRule.setContext(ptr.asPath());

            // switch to the context of the rule
            JXPathContext localJxpContext = jxpContext.getRelativeContext(ptr);

            // evaluate asserts
View Full Code Here

                    Pointer newRowContextPointer = repeaterContext.createPath(
                            this.rowPathForInsert + "[" + indexCount + "]");
                    JXPathContext newRowContext =
                        repeaterContext.getRelativeContext(newRowContextPointer);
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("inserted row at " + newRowContextPointer.asPath());
                    }
                    //    + rebind to children for update
                    this.rowBinding.saveFormToModel(thisRow, newRowContext);
                    getLogger().debug("bound new row");
                    indexCount++;
View Full Code Here

      Pointer ptr = (Pointer) pointerIter.next ();

      // prepare result Rule
      Rule nextFailedRule = new Rule();
      nextFailedRule.setContext( ptr.asPath() );

      // switch to the context of the rule
      JXPathContext localJxpContext = JXPathContext.newContext( jxpContext, ptr.getValue() );
     
      // evaluate asserts
View Full Code Here

                    Pointer newRowContextPointer = repeaterContext.createPath(
                            this.rowPathForInsert + "[" + indexCount + "]");
                    JXPathContext newRowContext =
                        repeaterContext.getRelativeContext(newRowContextPointer);
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("inserted row at " + newRowContextPointer.asPath());
                    }
                    //    + rebind to children for update
                    this.rowBinding.saveFormToModel(thisRow, newRowContext);
                    getLogger().debug("bound new row");
                    indexCount++;
View Full Code Here

        Iterator rowPointers = multiValueContext.iteratePointers(this.rowPath);
        List l = new ArrayList();
        while( rowPointers.hasNext() )
        {
            Pointer p = (Pointer)rowPointers.next();
            l.add(p.asPath());
        }
        Collections.sort(l);
        for( int i = l.size()-1; i >= 0; i-- )
        {
            multiValueContext.removePath((String)l.get(i));
View Full Code Here

                    Pointer newRowContextPointer = repeaterContext.createPath(
                            this.rowPathForInsert + "[" + indexCount + "]");
                    JXPathContext newRowContext =
                            repeaterContext.getRelativeContext(newRowContextPointer);
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("inserted row at " + newRowContextPointer.asPath());
                    }
                    //    + rebind to children for update
                    this.rowBinding.saveFormToModel(thisRow, newRowContext);
                    getLogger().debug("bound new row");
                    indexCount++;
View Full Code Here

                    Pointer newRowContextPointer = repeaterContext.createPath(
                            this.rowPathForInsert + "[" + indexCount + "]");
                    JXPathContext newRowContext =
                            repeaterContext.getRelativeContext(newRowContextPointer);
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("inserted row at " + newRowContextPointer.asPath());
                    }
                    //    + rebind to children for update
                    this.rowBinding.saveFormToModel(thisRow, newRowContext);
                    getLogger().debug("bound new row");
                    indexCount++;
View Full Code Here

                    Pointer newRowContextPointer = repeaterContext.createPath(
                            this.rowPathForInsert + "[" + indexCount + "]");
                    JXPathContext newRowContext =
                            repeaterContext.getRelativeContext(newRowContextPointer);
                    if (getLogger().isDebugEnabled()) {
                        getLogger().debug("inserted row at " + newRowContextPointer.asPath());
                    }
                    //    + rebind to children for update
                    this.rowBinding.saveFormToModel(thisRow, newRowContext);
                    getLogger().debug("bound new row");
                    indexCount++;
View Full Code Here

        assertTrue("Empty context", it.hasNext());
        while (it.hasNext())
        {
            Pointer pointer = (Pointer) it.next();
            assertNotNull("null pointer", pointer);
            assertNotNull("null path", pointer.asPath());
        }
    }

    public void testPageContext() {
        MockServletContext servletContext = new MockServletContext();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.