/** * Gets this tag if it is already mutable, or a mutable copy of this tag if it is immutable. * * @return This tag if it is already mutable, or a mutable copy of this tag if it is immutable. */ public XmlTag mutable() { if (isMutable) { return this; } else { final XmlTag tag = new XmlTag(); copyPropertiesTo(tag); return tag; } }
/** * Gets this tag if it is already mutable, or a mutable copy of this tag if it is immutable. * * @return This tag if it is already mutable, or a mutable copy of this tag if it is immutable. */ public XmlTag mutable() { if (isMutable) { return this; } else { final XmlTag tag = new XmlTag(); copyPropertiesTo(tag); return tag; } }
/** * Gets this tag if it is already mutable, or a mutable copy of this tag if it is immutable. * * @return This tag if it is already mutable, or a mutable copy of this tag if it is immutable. */ public XmlTag mutable() { if (isMutable) { return this; } else { final XmlTag tag = new XmlTag(); copyPropertiesTo(tag); return tag; } }
/** * Gets this tag if it is already mutable, or a mutable copy of this tag if it is immutable. * * @return This tag if it is already mutable, or a mutable copy of this tag if it is immutable. */ public XmlTag mutable() { if (isMutable) { return this; } else { final XmlTag tag = new XmlTag(); copyPropertiesTo(tag); return tag; } }
private static XmlTag createXmlTag(final String name, final XmlTag.Type type) { final XmlTag xmlTag = new XmlTag(); xmlTag.setType(type); xmlTag.setName(name); return xmlTag; }
private static XmlTag createXmlTag(final String name, final XmlTag.TagType type) { final XmlTag xmlTag = new XmlTag(); xmlTag.setType(type); xmlTag.setName(name); return xmlTag; }
/** * Automatically create a XmlTag, assign the name and the type, and construct a ComponentTag * based on this XmlTag. * * @param name * The name of html tag * @param type * The type of tag */ public ComponentTag(final String name, final XmlTag.TagType type) { final XmlTag tag = new XmlTag(); tag.setName(name); tag.setType(type); xmlTag = tag; }
/** * Automatically create a XmlTag, assign the name and the type, and construct a ComponentTag * based on this XmlTag. * * @param name * The name of html tag * @param type * The type of tag */ public ComponentTag(final String name, final XmlTag.TagType type) { final XmlTag tag = new XmlTag(); tag.setName(name); tag.setType(type); xmlTag = tag; }
/** * Automatically create a XmlTag, assign the name and the type, and construct a ComponentTag * based on this XmlTag. * * @param name * The name of html tag * @param type * The type of tag */ public ComponentTag(final String name, final XmlTag.Type type) { final XmlTag tag = new XmlTag(); tag.setName(name); tag.setType(type); xmlTag = tag; }
/** * Automatically create a XmlTag, assign the name and the type, and construct a ComponentTag * based on this XmlTag. * * @param name * The name of html tag * @param type * The type of tag */ public ComponentTag(final String name, final XmlTag.Type type) { final XmlTag tag = new XmlTag(); tag.setName(name); tag.setType(type); xmlTag = tag; }
/** * Create image xml tag which represets image html tag with proper url generated. * @param pImageFileDescription - image file description. * @param pUrl - component url. * @return image xml tag which represets image html tag with proper url generated. */ public static XmlTag createImageTag(ImageFileDescription pImageFileDescription, CharSequence pUrl) { XmlTag tag = new XmlTag(); tag.setName("img"); tag.setType(XmlTag.OPEN_CLOSE); tag.put(IMAGE_FILE_NAME, pImageFileDescription.getName()); StringBuilder sb = new StringBuilder(pUrl); sb.append("&").append(IMAGE_FILE_NAME).append("=").append(pImageFileDescription.getName()); sb.append("&").append(IMAGE_CONTENT_TYPE).append("=").append(pImageFileDescription.getContentType()); tag.put("src", RequestCycle.get().getOriginalResponse().encodeURL( Strings.replaceAll(sb.toString(), "&", "&"))); return tag; } }
/** * Create image xml tag which represets image html tag with proper url generated. * * @param pImageFileDescription * - image file description. * @param pUrl * - component url. * @return image xml tag which represets image html tag with proper url generated. */ public static XmlTag createImageTag(ImageFileDescription pImageFileDescription, CharSequence pUrl) { XmlTag tag = new XmlTag(); tag.setName("img"); tag.setType(XmlTag.TagType.OPEN_CLOSE); tag.put(IMAGE_FILE_NAME, pImageFileDescription.getName()); StringBuilder sb = new StringBuilder(pUrl); sb.append("&").append(IMAGE_FILE_NAME).append("=").append(pImageFileDescription.getName()); sb.append("&") .append(IMAGE_CONTENT_TYPE) .append("=") .append(pImageFileDescription.getContentType()); tag.put( "src", RequestCycle.get() .getOriginalResponse() .encodeURL(sb.toString())); return tag; } }
/** * Create image xml tag which represets image html tag with proper url generated. * * @param pImageFileDescription * - image file description. * @param pUrl * - component url. * @return image xml tag which represets image html tag with proper url generated. */ public static XmlTag createImageTag(ImageFileDescription pImageFileDescription, CharSequence pUrl) { XmlTag tag = new XmlTag(); tag.setName("img"); tag.setType(XmlTag.TagType.OPEN_CLOSE); tag.put(IMAGE_FILE_NAME, pImageFileDescription.getName()); StringBuilder sb = new StringBuilder(pUrl); sb.append("&").append(IMAGE_FILE_NAME).append("=").append(pImageFileDescription.getName()); sb.append("&") .append(IMAGE_CONTENT_TYPE) .append("=") .append(pImageFileDescription.getContentType()); tag.put( "src", RequestCycle.get() .getOriginalResponse() .encodeURL(sb.toString())); return tag; } }
/** * Create image xml tag which represets image html tag with proper url generated. * * @param pImageFileDescription * - image file description. * @param pUrl * - component url. * @return image xml tag which represets image html tag with proper url generated. */ public static XmlTag createImageTag(ImageFileDescription pImageFileDescription, CharSequence pUrl) { XmlTag tag = new XmlTag(); tag.setName("img"); tag.setType(XmlTag.TagType.OPEN_CLOSE); tag.put(IMAGE_FILE_NAME, pImageFileDescription.getName()); StringBuilder sb = new StringBuilder(pUrl); sb.append("&").append(IMAGE_FILE_NAME).append("=").append(pImageFileDescription.getName()); sb.append("&") .append(IMAGE_CONTENT_TYPE) .append("=") .append(pImageFileDescription.getContentType()); tag.put( "src", RequestCycle.get() .getOriginalResponse() .encodeURL(sb.toString())); return tag; } }
if (tagnameParser.matcher().lookingAt()) final XmlTag tag = new XmlTag();
if (tagnameParser.matcher().lookingAt()) final XmlTag tag = new XmlTag();
XmlTag closeTag = new XmlTag(); closeTag.setType(XmlTag.CLOSE); closeTag.setName(tag.getName());