Examples of DuplicateAttributeError


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

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

  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

Examples of pt.webdetails.cdf.dd.model.core.validation.DuplicateAttributeError

        LabeledValue labeledValue = labeledValueBuilder.build();
        if(this._possibleValuesByValue.containsKey(labeledValue.getValue()))
        {
          // Ignore LabeledValue, log warning and continue.
          // TODO: error class should not be this one?!
          _logger.warn(new DuplicateAttributeError(labeledValue.getValue()));
          continue;
        }

        this._possibleValuesByValue.put(labeledValue.getValue(), labeledValue);
      }
View Full Code Here

Examples of pt.webdetails.cdf.dd.model.core.validation.DuplicateAttributeError

        }
       
        if(this._attributesByName.containsKey(attribute.getName()))
        {
          // Ignore attribute, log warning and continue
          _logger.warn(new DuplicateAttributeError(attribute.getName()));
          continue;
        }

        this._attributesByName.put(attribute.getName(), attribute);
      }
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.