當前位置: 首頁>>代碼示例>>Java>>正文


Java TagExtraInfo類代碼示例

本文整理匯總了Java中javax.servlet.jsp.tagext.TagExtraInfo的典型用法代碼示例。如果您正苦於以下問題:Java TagExtraInfo類的具體用法?Java TagExtraInfo怎麽用?Java TagExtraInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TagExtraInfo類屬於javax.servlet.jsp.tagext包,在下文中一共展示了TagExtraInfo類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: JasperTagInfo

import javax.servlet.jsp.tagext.TagExtraInfo; //導入依賴的package包/類
public JasperTagInfo(String tagName,
        String tagClassName,
        String bodyContent,
        String infoString,
        TagLibraryInfo taglib,
        TagExtraInfo tagExtraInfo,
        TagAttributeInfo[] attributeInfo,
        String displayName,
        String smallIcon,
        String largeIcon,
        TagVariableInfo[] tvi,
        String mapName) {

    super(tagName, tagClassName, bodyContent, infoString, taglib,
            tagExtraInfo, attributeInfo, displayName, smallIcon, largeIcon,
            tvi);
    
    this.dynamicAttrsMapName = mapName;
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:20,代碼來源:JasperTagInfo.java

示例2: settingExtraInfo

import javax.servlet.jsp.tagext.TagExtraInfo; //導入依賴的package包/類
protected void settingExtraInfo(
        JspProcessor processor, Hashtable seed) {
    TagExtraInfo tei =
            (TagExtraInfo) ObjectUtil.newInstance(getExtraInfoClass());

    boolean hasNestedVariable = existsNestedVariable(tei, seed);
    boolean hasDynamicName = existsDynamicName(seed);

    TLDScriptingVariableInfo variableInfo = new TLDScriptingVariableInfo();

    variableInfo.setTagExtraInfo(tei);
    variableInfo.setNestedVariable(hasNestedVariable);
    variableInfo.setDynamicName(hasDynamicName);
    if (hasNestedVariable) {
        ScriptableTagData tagData = new ScriptableTagData(seed);
        if (hasDynamicName) {
            variableInfo.setTagData(tagData);
        } else {
            variableInfo.setVariableInfos(tei.getVariableInfo(tagData));
        }
    }

    processor.setTLDScriptingVariableInfo(variableInfo);
}
 
開發者ID:seasarorg,項目名稱:mayaa,代碼行數:25,代碼來源:TLDProcessorDefinition.java

示例3: JasperTagInfo

import javax.servlet.jsp.tagext.TagExtraInfo; //導入依賴的package包/類
public JasperTagInfo(String tagName, String tagClassName, String bodyContent, String infoString,
		TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, String displayName,
		String smallIcon, String largeIcon, TagVariableInfo[] tvi, String mapName) {

	super(tagName, tagClassName, bodyContent, infoString, taglib, tagExtraInfo, attributeInfo, displayName,
			smallIcon, largeIcon, tvi);

	this.dynamicAttrsMapName = mapName;
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:10,代碼來源:JasperTagInfo.java

示例4: end

import javax.servlet.jsp.tagext.TagExtraInfo; //導入依賴的package包/類
protected void end(String body) {
    try {
        Class clazz = ObjectUtil.loadClass(body, TagExtraInfo.class);
        setTeiClass(clazz);
    } catch (RuntimeException e) {
        if (LOG.isErrorEnabled()) {
            LOG.error(e.getMessage());
        }
        _handler.invalidate();
    }
}
 
開發者ID:seasarorg,項目名稱:mayaa,代碼行數:12,代碼來源:TagTagHandler.java

示例5: setExtraInfoClass

import javax.servlet.jsp.tagext.TagExtraInfo; //導入依賴的package包/類
public void setExtraInfoClass(Class teiClass) {
    if (teiClass == null
            || TagExtraInfo.class.isAssignableFrom(teiClass) == false) {
        throw new IllegalArgumentException();
    }
    _teiClass = teiClass;
}
 
開發者ID:seasarorg,項目名稱:mayaa,代碼行數:8,代碼來源:TLDProcessorDefinition.java

示例6: existsNestedVariable

import javax.servlet.jsp.tagext.TagExtraInfo; //導入依賴的package包/類
protected boolean existsNestedVariable(
        TagExtraInfo tei, Hashtable seed) {
    VariableInfo[] dummy = tei.getVariableInfo(new DummyTagData(seed));
    if (dummy != null) {
        for (int i = 0; i < dummy.length; i++) {
            if (dummy[i].getScope() == VariableInfo.NESTED) {
                return true;
            }
        }
    }
    return false;
}
 
開發者ID:seasarorg,項目名稱:mayaa,代碼行數:13,代碼來源:TLDProcessorDefinition.java

示例7: visit

import javax.servlet.jsp.tagext.TagExtraInfo; //導入依賴的package包/類
@Override
public void visit(Node.CustomTag n) throws JasperException {

	TagInfo tagInfo = n.getTagInfo();
	if (tagInfo == null) {
		err.jspError(n, "jsp.error.missing.tagInfo", n.getQName());
	}

	/*
	 * The bodycontent of a SimpleTag cannot be JSP.
	 */
	if (n.implementsSimpleTag() && tagInfo.getBodyContent().equalsIgnoreCase(TagInfo.BODY_CONTENT_JSP)) {
		err.jspError(n, "jsp.error.simpletag.badbodycontent", tagInfo.getTagClassName());
	}

	/*
	 * If the tag handler declares in the TLD that it supports dynamic
	 * attributes, it also must implement the DynamicAttributes
	 * interface.
	 */
	if (tagInfo.hasDynamicAttributes() && !n.implementsDynamicAttributes()) {
		err.jspError(n, "jsp.error.dynamic.attributes.not.implemented", n.getQName());
	}

	/*
	 * Make sure all required attributes are present, either as
	 * attributes or named attributes (<jsp:attribute>). Also make sure
	 * that the same attribute is not specified in both attributes or
	 * named attributes.
	 */
	TagAttributeInfo[] tldAttrs = tagInfo.getAttributes();
	String customActionUri = n.getURI();
	Attributes attrs = n.getAttributes();
	int attrsSize = (attrs == null) ? 0 : attrs.getLength();
	for (int i = 0; i < tldAttrs.length; i++) {
		String attr = null;
		if (attrs != null) {
			attr = attrs.getValue(tldAttrs[i].getName());
			if (attr == null) {
				attr = attrs.getValue(customActionUri, tldAttrs[i].getName());
			}
		}
		Node.NamedAttribute na = n.getNamedAttributeNode(tldAttrs[i].getName());

		if (tldAttrs[i].isRequired() && attr == null && na == null) {
			err.jspError(n, "jsp.error.missing_attribute", tldAttrs[i].getName(), n.getLocalName());
		}
		if (attr != null && na != null) {
			err.jspError(n, "jsp.error.duplicate.name.jspattribute", tldAttrs[i].getName());
		}
	}

	Node.Nodes naNodes = n.getNamedAttributeNodes();
	int jspAttrsSize = naNodes.size() + attrsSize;
	Node.JspAttribute[] jspAttrs = null;
	if (jspAttrsSize > 0) {
		jspAttrs = new Node.JspAttribute[jspAttrsSize];
	}
	Hashtable<String, Object> tagDataAttrs = new Hashtable<String, Object>(attrsSize);

	checkXmlAttributes(n, jspAttrs, tagDataAttrs);
	checkNamedAttributes(n, jspAttrs, attrsSize, tagDataAttrs);

	TagData tagData = new TagData(tagDataAttrs);

	// JSP.C1: It is a (translation time) error for an action that
	// has one or more variable subelements to have a TagExtraInfo
	// class that returns a non-null object.
	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.getQName());
	}

	n.setTagData(tagData);
	n.setJspAttributes(jspAttrs);

	visitBody(n);
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:80,代碼來源:Validator.java

示例8: setTagExtraInfo

import javax.servlet.jsp.tagext.TagExtraInfo; //導入依賴的package包/類
public void setTagExtraInfo(TagExtraInfo tei) {
    _tei = tei;
}
 
開發者ID:seasarorg,項目名稱:mayaa,代碼行數:4,代碼來源:TLDScriptingVariableInfo.java


注:本文中的javax.servlet.jsp.tagext.TagExtraInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。