public String getDefaultValue() { return getSelf().getDefaultValue(); }
/** * Add required attributes and default values, if set, to the created tag element * * To customize the attributes that get added, use TagCreationInfo metadata * * This method is provided as a utility for clients. It is not used by default * * @param element * @param creationData */ protected final void ensureRequiredAttrs(final Element element, final CreationData creationData) { CMElementDeclaration ed = CMUtil.getTLDElementDeclaration(creationData.getUri(), creationData.getTagName(), creationData.getModel().getDocument().getStructuredDocument()); if (ed != null) { for (Iterator it=ed.getAttributes().iterator();it.hasNext();){ CMAttributeDeclaration attr = (CMAttributeDeclaration)it.next(); if (attr.getUsage() == CMAttributeDeclaration.REQUIRED && element.getAttribute(attr.getAttrName()) == null) { element.setAttribute(attr.getAttrName(), attr.getDefaultValue()); } } } }
CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) insertAttrs.get(i); String requiredAttributeName = attrDecl.getAttrName(); String defaultValue = attrDecl.getDefaultValue(); if (defaultValue == null) defaultValue = ""; //$NON-NLS-1$
CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) insertAttrs.get(i); String requiredAttributeName = attrDecl.getAttrName(); String defaultValue = attrDecl.getDefaultValue(); if (defaultValue == null) defaultValue = ""; //$NON-NLS-1$
CMAttributeDeclaration attrDecl = (CMAttributeDeclaration) fRequiredAttrs.get(i); String requiredAttributeName = attrDecl.getAttrName(); String defaultValue = attrDecl.getDefaultValue(); if (defaultValue == null) { defaultValue = ""; //$NON-NLS-1$