Examples of XmlTag


Examples of net.sourceforge.javautil.common.xml.annotation.XmlTag

//      if (tagDef.translation().length > 0) {
//        XMLTranslationGuide guide = ClassCache.getFor( tagDef.translation()[0].value() ).newInstance();
//        guide.
//      }
     
      XmlTag typeDef = null;
      if (tagType.getAnnotation(XmlTag.class) != null) typeDef = tagType.getAnnotation(XmlTag.class);
     
      if (tagDef.collection().length > 0) {
        this.collection = tagDef.collection()[0];
        this.collectionType = this.collection.type();
        this.tagType = this.collection.value();
       
        if (this.collectionType != CollectionType.WRAPPED)
          typeDef = this.collection.value().getAnnotation(XmlTag.class);
      }
      else if (tagDef.map().length > 0) {
        this.map = tagDef.map()[0];
        this.collectionType = this.map.type();
       
        if (this.collectionType != CollectionType.WRAPPED)
          typeDef = (XmlTag) this.map.valueClass().getAnnotation(XmlTag.class);
        else
          this.tagType = tagDef.concreteType() == Object.class ? LinkedHashMap.class : this.tagDef.concreteType();
      } else {
        if (this.elementType == ElementType.Unspecified)
          this.elementType = tagDef.elementType() == ElementType.Unspecified && typeDef != null ? typeDef.elementType() : tagDef.elementType();
      }
      this.tagName = "".equals( tagDef.name() ) && typeDef != null ? typeDef.name() : tagDef.name();
      if ("".equals(tagName)) tagName = property.getName();
     
      this.tagNamespace = "".equals( tagDef.namespace() ) && typeDef != null ? typeDef.namespace() : tagDef.namespace();
      this.classRegistry = tagDef.classRegistry().length > 0 ? tagDef.classRegistry()[0] :
        (typeDef != null && typeDef.classRegistry().length > 0 ? typeDef.classRegistry()[0] : null);
     
      if (this.elementType == ElementType.Unspecified) {
        if (XMLUtil.isSimpleType(this.tagType)) {
          this.elementType = ElementType.Simple;
        } else {
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

  private static class TestMarkupElement extends WicketTag
  {
    public TestMarkupElement()
    {
      super(new XmlTag());
    }
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

  public String getWicketAjaxBaseUrlEncodedInLastResponse() throws IOException,
    ResourceStreamNotFoundException, ParseException
  {
    XmlPullParser parser = new XmlPullParser();
    parser.parse(getLastResponseAsString());
    XmlTag tag;
    while ((tag = parser.nextTag()) != null)
    {
      if (tag.isOpen() && tag.getName().equals("script") &&
        "wicket-ajax-base-url".equals(tag.getAttribute("id")))
      {
        parser.next();
        return parser.getString().toString().split("\\\"")[1];
      }
    }
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

   */
  @Test
  public void nullModelDoesNotThrowNullPointerExceptions()
  {
    AttributeModifier modifier = new AttributeModifier("test", null);
    XmlTag xmlTag = new XmlTag();
    ComponentTag tag = new ComponentTag(xmlTag);
    tag.setId("foo");
    tag.setName("test");
    modifier.replaceAttributeValue(null, tag);
    Map<String, Object> attributes = tag.getAttributes();
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

      protected String newValue(String currentValue, String replacementValue)
      {
        return "the replacement";
      }
    };
    XmlTag xmlTag = new XmlTag();
    ComponentTag tag = new ComponentTag(xmlTag);
    tag.setId("test");
    tag.setName("id");
    modifier.replaceAttributeValue(null, tag);
    Map<String, Object> attributes = tag.getAttributes();
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

   */
  @Test
  public void testModelReplacement()
  {
    AttributeModifier modifier = new AttributeModifier("test", Model.of("Ellioth Smith Rocks"));
    XmlTag xmlTag = new XmlTag();
    ComponentTag tag = new ComponentTag(xmlTag);
    tag.setId("test");
    tag.setName("id");
    modifier.replaceAttributeValue(null, tag);
    Map<String, Object> attributes = tag.getAttributes();
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

   */
  @Test
  public void testModelReplacementOverwritingExistingAttributeValue()
  {
    AttributeModifier modifier = new AttributeModifier("test", Model.of("Ellioth Smith Rocks"));
    XmlTag xmlTag = new XmlTag();
    ComponentTag tag = new ComponentTag(xmlTag);
    tag.setId("test");
    tag.setName("id");
    Map<String, Object> attributes = tag.getAttributes();
    attributes.put("test", "My mother rocks");
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

      {
        return false;
      }
    };

    XmlTag xmlTag = new XmlTag();
    ComponentTag tag = new ComponentTag(xmlTag);
    tag.setId("test");
    tag.setName("id");
    Map<String, Object> attributes = tag.getAttributes();
    attributes.put("test", "My mother rocks");
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

      protected String newValue(String currentValue, String replacementValue)
      {
        return replacementValue + " together";
      }
    };
    XmlTag xmlTag = new XmlTag();
    ComponentTag tag = new ComponentTag(xmlTag);
    tag.setId("test");
    tag.setName("id");
    modifier.replaceAttributeValue(null, tag);
    Map<String, Object> attributes = tag.getAttributes();
View Full Code Here

Examples of org.apache.wicket.markup.parser.XmlTag

      protected String newValue(String currentValue, String replacementValue)
      {
        return currentValue + " two";
      }
    };
    XmlTag xmlTag = new XmlTag();
    ComponentTag tag = new ComponentTag(xmlTag);
    tag.setId("test");
    tag.setName("id");
    Map<String, Object> attributes = tag.getAttributes();
    attributes.put("test", "one");
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.