/** * Returns true if the given attribute name is specified, false otherwise. */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
static String safeGetStringAttribute(TagData data, String attributeName) { final Object attribute = data.getAttribute(attributeName); if (attribute == TagData.REQUEST_TIME_VALUE) { return null; } return data.getAttributeString(attributeName); }
/** * Return information about the scripting variables to be created. */ public VariableInfo[] getVariableInfo(TagData data) { String className = null; if (data.getAttribute("multiple") == null) className = "javax.servlet.http.Cookie"; else className = "javax.servlet.http.Cookie[]"; return new VariableInfo[] { new VariableInfo(data.getAttributeString("id"), className, true, VariableInfo.AT_BEGIN) }; }
/** * Returns true if the given attribute name is specified, false otherwise. */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
/** * Returns true if the given attribute name is specified, false otherwise. */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
/** * Returns true if the given attribute name is specified, false otherwise. */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
/** * Returns true if the given attribute name is specified, false otherwise. */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
/** * Returns true if the given attribute name is specified, false otherwise. */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
/** * Returns true if the given attribute name is specified, false otherwise.<p> * * @param data the tag data * @param attributeName the attribute name * @return true if the given attribute name is specified, false otherwise */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
/** * Returns true if the given attribute name is specified, false otherwise. */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
/** * Returns true if the given attribute name is specified, false otherwise.<p> * * @param data the tag data * @param attributeName the attribute name * @return true if the given attribute name is specified, false otherwise */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
/** * Returns true if the given attribute name is specified, false otherwise. */ public static boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
private String getValue(TagData data, String name, String defaultValue) { Object value = data.getAttribute(name); if (value instanceof String) { return (String) value; } return defaultValue; } }
protected boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
public boolean isDynamicAttribute(String attName) { return (super.getAttribute(attName) instanceof CompiledScript); }
protected boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
protected boolean isSpecified(TagData data, String attributeName) { return (data.getAttribute(attributeName) != null); }
public Object getAttribute(String attName) { Object value = super.getAttribute(attName); if (value instanceof CompiledScript) { return ((CompiledScript) value).execute(null); } return value; }
@Override protected String getClassName(TagData data) { final Object defaultValue = data.getAttribute(ATTR_DEFAULT_VALUE); final String className = safeGetStringAttribute(data, ATTR_RETURN_CLASS, OBJECT_CLASS_NAME); if (defaultValue != null) { return defaultValue.getClass().getName(); } else if (className != null){ return className; } else { return OBJECT_CLASS_NAME; } } }
@Override public ValidationMessage[] validate(TagData data) { final List<ValidationMessage> messages = new ArrayList<ValidationMessage>(); Object o = data.getAttribute("fname"); if (o == null) { messages.add(new ValidationMessage(data.getId(), "fname cannot be null.")); } if (messages.size() == 0) { return null; } return messages.toArray(new ValidationMessage[messages.size()]); } }