Refine search
/** * Information on the scripting objects created by this tag at runtime. * This is a convenience method on the associated TagExtraInfo class. * * @param data TagData describing this action. * @return if a TagExtraInfo object is associated with this TagInfo, the * result of getTagExtraInfo().getVariableInfo( data ), otherwise * null. */ public VariableInfo[] getVariableInfo(TagData data) { VariableInfo[] result = null; TagExtraInfo tei = getTagExtraInfo(); if (tei != null) { result = tei.getVariableInfo( data ); } 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. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time 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 ) { TagExtraInfo tei = getTagExtraInfo(); if( tei == null ) { return null; } return tei.validate( data ); }
tagInfo.getBodyContent().equals(TagInfo.BODY_CONTENT_JSP)) { err.jspError(n, "jsp.error.simpletag.badbodycontent", tagInfo.getTagClassName()); if (tagInfo.hasDynamicAttributes() && !n.implementsDynamicAttributes()) { err.jspError(n, "jsp.error.dynamic.attributes.not.implemented", TagExtraInfo tei = tagInfo.getTagExtraInfo(); if (tei != null && tei.getVariableInfo(tagData) != null && tei.getVariableInfo(tagData).length > 0 && tagInfo.getTagVariableInfos().length > 0) { err.jspError("jsp.error.non_null_tei_and_var_subelems",
TagInfo info = getTagInfo(decl, tei, prefix, uri); if (info != null) { tei.setTagInfo(info); if (!tei.isValid(td)) { ValidationMessage[] messages = tei.validate(td); for (int i = 0; i < messages.length; i++) { fValidationMessages.add(messages[i]); VariableInfo[] vInfos = tei.getVariableInfo(td); if (vInfos != null) { for (int i = 0; i < vInfos.length; i++) {
/** * 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 }; } } }
_varInfo = _tagInfo.getVariableInfo(tagData); } catch (Exception e) { throw error(e); _varInfo = fillVariableInfo(_tagInfo.getTagVariableInfos(), tagData); TagExtraInfo tei = _tagInfo.getTagExtraInfo(); ValidationMessage []messages; if (tei != null) { messages = tei.validate(tagData);
tagExtraInfo.setTagInfo(this);
@Override public VariableInfo[] getVariableInfo(TagData data) { if (_tagExtraInfo == null) return null; else return _tagExtraInfo.getVariableInfo(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 ValidationMessage []validate(TagData data) { if (_tagExtraInfo == null) return null; else return _tagExtraInfo.validate(data); } }
&& tagInfo.getBodyContent().equalsIgnoreCase( TagInfo.BODY_CONTENT_JSP)) { err.jspError(n, "jsp.error.simpletag.badbodycontent", tagInfo .getTagClassName()); if (tagInfo.hasDynamicAttributes() && !n.implementsDynamicAttributes()) { err.jspError(n, "jsp.error.dynamic.attributes.not.implemented", TagExtraInfo tei = tagInfo.getTagExtraInfo(); if (tei != null && tei.getVariableInfo(tagData) != null && tei.getVariableInfo(tagData).length > 0 && tagInfo.getTagVariableInfos().length > 0) { err.jspError("jsp.error.non_null_tei_and_var_subelems", n
tagExtraInfo.setTagInfo(this); tagExtraInfo.setTagInfo(this);
/** * Information about the variables created by the tag at runtime. * * @param data information about the tag instance */ public VariableInfo[] getVariableInfo(TagData data) { if (this.tagExtraInfo == null) return null; else return this.tagExtraInfo.getVariableInfo(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; }
/** * Validate attributes. */ public ValidationMessage []validate(TagData data) { if (this.tagExtraInfo == null) return null; else return this.tagExtraInfo.validate(data); } }
&& tagInfo.getBodyContent().equalsIgnoreCase( TagInfo.BODY_CONTENT_JSP)) { err.jspError(n, "jsp.error.simpletag.badbodycontent", tagInfo .getTagClassName()); if (tagInfo.hasDynamicAttributes() && !n.implementsDynamicAttributes()) { err.jspError(n, "jsp.error.dynamic.attributes.not.implemented", TagExtraInfo tei = tagInfo.getTagExtraInfo(); if (tei != null && tei.getVariableInfo(tagData) != null && tei.getVariableInfo(tagData).length > 0 && tagInfo.getTagVariableInfos().length > 0) { err.jspError("jsp.error.non_null_tei_and_var_subelems", n
/** * Information on the scripting objects created by this tag at runtime. * This is a convenience method on the associated TagExtraInfo class. * * @param data TagData describing this action. * @return if a TagExtraInfo object is associated with this TagInfo, the * result of getTagExtraInfo().getVariableInfo( data ), otherwise * null. */ public VariableInfo[] getVariableInfo(TagData data) { VariableInfo[] result = null; TagExtraInfo tei = getTagExtraInfo(); if (tei != null) { result = tei.getVariableInfo( data ); } 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. * This is a convenience method on the associated TagExtraInfo class. * * @param data The translation-time 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 ) { TagExtraInfo tei = getTagExtraInfo(); if( tei == null ) { return null; } return tei.validate( data ); }