Package com.google.gxp.compiler.validate

Examples of com.google.gxp.compiler.validate.DuplicateAttributeError


    FileRef caller = createFile("caller",
                                "<gxp:param name='bundle' gxp:type='bundle'",
                                "           from-element='div' />",
                                "<call:callee id='x' gxp:bundles='bundle'/>");
    compileFiles(callee, caller);
    assertAlert(new DuplicateAttributeError(pos(4, 1), "<call:callee>", "bundle", "id"));
    assertNoUnexpectedAlerts();

    // test duplicate between gxp:attr and bundle
    caller = createFile("caller",
                        "<gxp:param name='bundle' gxp:type='bundle'",
                        "           from-element='div' />",
                        "<call:callee gxp:bundles='bundle'>",
                        "  <gxp:attr name='id'>",
                        "    <gxp:eval expr='\"foo\"'/>",
                        "  </gxp:attr>",
                        "</call:callee>");
    compileFiles(callee, caller);
    assertAlert(new DuplicateAttributeError(pos(4, 1), "<call:callee>", "bundle", "id"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here


  public void testOutputElement_conflictingAttrs() throws Exception {
    // test duplicate from bundle
    compile("<gxp:param name='bundle' gxp:type='bundle' from-element='div' />",
            "<div id='foo' gxp:bundles='bundle'></div>");
    assertAlert(new DuplicateAttributeError(pos(3,1), "<div>",
                                            "bundle", "id"));
    assertNoUnexpectedAlerts();

    // test gxp:attr bundle duplicate
    compile("<gxp:param name='bundle' gxp:type='bundle' from-element='div' />",
            "<div gxp:bundles='bundle'>",
            "  <gxp:attr name='id'>",
            "    foo",
            "  </gxp:attr>",
            "</div>");
    assertAlert(new DuplicateAttributeError(pos(3,1), "<div>",
                                            "bundle", "id"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.validate.DuplicateAttributeError

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.