/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * Request-time attributes are indicated as such in the TagData parameter. * Because of the higher quality validation messages possible, * this is the preferred way to do validation (although isValid() * still works). * * <p>JSP 2.0 and higher containers call validate() instead of isValid(). * The default implementation of this method is to call isValid(). If * isValid() returns false, a generic ValidationMessage[] is returned * indicating isValid() returned false.</p> * * @param data The TagData instance. * @return A null object, or zero length array if no errors, an * array of ValidationMessages otherwise. * @since JSP 2.0 */ public ValidationMessage[] validate( TagData data ) { ValidationMessage[] result = null; if( !isValid( data ) ) { result = new ValidationMessage[] { new ValidationMessage( data.getId(), "isValid() == false" ) }; } return result; }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * Request-time attributes are indicated as such in the TagData parameter. * Because of the higher quality validation messages possible, * this is the preferred way to do validation (although isValid() * still works). * * <p>JSP 2.0 and higher containers call validate() instead of isValid(). * The default implementation of this method is to call isValid(). If * isValid() returns false, a generic ValidationMessage[] is returned * indicating isValid() returned false.</p> * * @param data The TagData instance. * @return A null object, or zero length array if no errors, an * array of ValidationMessages otherwise. * @since JSP 2.0 */ public ValidationMessage[] validate( TagData data ) { ValidationMessage[] result = null; if( !isValid( data ) ) { result = new ValidationMessage[] { new ValidationMessage( data.getId(), "isValid() == false" ) }; } return result; }
public boolean isValid(TagData data) { if (_tagExtraInfo == null) return true; else return _tagExtraInfo.isValid(data); }
/** * Returns true if the tag instance is valid. * * @param data information about the tag instance */ public boolean isValid(TagData data) { if (this.tagExtraInfo == null) return true; else return this.tagExtraInfo.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Translation-time validation of the attributes. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time TagData instance. * @return Whether the data is valid. */ public boolean isValid(TagData data) { TagExtraInfo tei = getTagExtraInfo(); if (tei == null) { return true; } return tei.isValid(data); }
/** * Validates the tag. */ public ValidationMessage []validate(TagData data) { if (isValid(data)) return null; else { ValidationMessage msg; String prefix = getTagInfo().getTagLibrary().getShortName(); String name = getTagInfo().getTagName(); if (prefix != null) name = prefix + ':' + name; msg = new ValidationMessage(null, "tag <" + name + "> was not valid according to validator `" + getClass().getName() + "'"); return new ValidationMessage[] { msg }; } } }