javax.servlet.jsp.tagext.TagData Java Examples

The following examples show how to use javax.servlet.jsp.tagext.TagData. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ShowNavigationTagExtraInfo.java    From openemm with GNU Affero General Public License v3.0 6 votes vote down vote up
/**
 * Getter for property variableInfo.
 *
 * @return Value of property variableInfo.
 */
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    String prefix=(String)data.getAttribute("prefix");
    
    if(prefix==null) {
        prefix = "";
    }
    
    return new VariableInfo[]
    {
        new VariableInfo(prefix+"_navigation_switch", "String", true, VariableInfo.NESTED),
        new VariableInfo(prefix+"_navigation_isHighlightKey", "Boolean", true, VariableInfo.NESTED),
        new VariableInfo(prefix+"_navigation_token", "String", true, VariableInfo.NESTED),
        new VariableInfo(prefix+"_navigation_href", "String", true, VariableInfo.NESTED),
        new VariableInfo(prefix+"_navigation_navMsg", "String", true, VariableInfo.NESTED),
        new VariableInfo(prefix+"_navigation_index", "Integer", true, VariableInfo.NESTED),
        new VariableInfo(prefix+"_navigation_conditionSatisfied", "Boolean", true, VariableInfo.NESTED)
    };
}
 
Example #2
Source File: DefineObjectsTag168.java    From portals-pluto with Apache License 2.0 6 votes vote down vote up
public VariableInfo[] getVariableInfo(TagData tagData) {
    VariableInfo[] info = new VariableInfo[]{
    	new VariableInfo("renderRequest",
    					 "javax.portlet.RenderRequest",
    					 true,
    					 VariableInfo.AT_BEGIN),
        new VariableInfo("renderResponse",
           				 "javax.portlet.RenderResponse",
           				 true,
          				 VariableInfo.AT_BEGIN),                            
        new VariableInfo("portletConfig",
                         "javax.portlet.PortletConfig",
                         true,
                         VariableInfo.AT_BEGIN)                                              
    };
    return info;
}
 
Example #3
Source File: TestScriptingVariabler.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
/**
 * Return information about the scripting variables to be created.
 */
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[] {
        new VariableInfo("Test", "java.lang.String", true,
            VariableInfo.AT_END)
    };
}
 
Example #4
Source File: Node.java    From packagedrone with Eclipse Public License 1.0 5 votes vote down vote up
public void setTagData(TagData tagData) {
    this.tagData = tagData;
    this.varInfos = tagInfo.getVariableInfo(tagData);
    if (this.varInfos == null) {
	this.varInfos = ZERO_VARIABLE_INFO;
    }
}
 
Example #5
Source File: BaseTEI.java    From feilong-taglib with Apache License 2.0 5 votes vote down vote up
/**
 * 显示 {@link javax.servlet.jsp.tagext.TagData}里面的信息,一般用于 debug.
 *
 * @param tagData
 *            the tag data
 * @return the map< string, object>
 * @see javax.servlet.jsp.tagext.TagData#getAttributes()
 * @since 1.4.0
 */
protected static Map<String, Object> getTagDataAttributeMap(TagData tagData){
    Map<String, Object> map = new TreeMap<>();

    Enumeration<String> attributes = tagData.getAttributes();
    while (attributes.hasMoreElements()){
        String key = attributes.nextElement();
        map.put(key, tagData.getAttribute(key));
    }
    return map;
}
 
Example #6
Source File: PagerTagExtraInfo.java    From feilong-taglib with Apache License 2.0 5 votes vote down vote up
@Override
// 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.
public ValidationMessage[] validate(TagData tagData){
    if (LOGGER.isDebugEnabled()){
        Map<String, Object> map = getTagDataAttributeMap(tagData);
        LOGGER.debug(JsonUtil.format(map));
    }
    return super.validate(tagData);
}
 
Example #7
Source File: PagerTagExtraInfo.java    From feilong-taglib with Apache License 2.0 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData tagData){
    //如果不设置 使用 ${feilongPagerHtml1 } 是正常的
    //但是如果使用 <%=feilongPagerHtml1%> 会提示 feilongPagerHtml1 cannot be resolved to a variable

    String pagerHtmlAttributeName = defaultIfNullOrEmpty(
                    tagData.getAttributeString("pagerHtmlAttributeName"),
                    DEFAULT_PAGE_ATTRIBUTE_PAGER_HTML_NAME);

    VariableInfo variableInfo = new VariableInfo(pagerHtmlAttributeName, String.class.getName(), true, VariableInfo.AT_END);
    return ConvertUtil.toArray(variableInfo);
}
 
Example #8
Source File: FooTagExtraInfo.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[]
        {
            new VariableInfo("member",
                             "String",
                             true,
                             VariableInfo.NESTED)
        };
}
 
Example #9
Source File: TestScriptingVariabler.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
/**
 * Return information about the scripting variables to be created.
 */
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[] {
        new VariableInfo("Test", "java.lang.String", true,
            VariableInfo.AT_END)
    };
}
 
Example #10
Source File: TestGenerator.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[] {
            new VariableInfo("now", Bean.class.getCanonicalName(),
                    true, VariableInfo.AT_END)
        };
}
 
Example #11
Source File: FooTagExtraInfo.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[]
        {
            new VariableInfo("member",
                             "String",
                             true,
                             VariableInfo.NESTED)
        };
}
 
Example #12
Source File: BundleTei.java    From unitime with Apache License 2.0 5 votes vote down vote up
public VariableInfo [] getVariableInfo(TagData data) {
	String name = data.getAttributeString("name");
	String id = data.getAttributeString("id");
	try {
		Class.forName(Localization.ROOT + name);
		return new VariableInfo[] {
				new VariableInfo(id == null ? BundleTag.DEFAULT_ID : id, Localization.ROOT + name, true, VariableInfo.NESTED)
			};
	} catch (ClassNotFoundException e) {
		return new VariableInfo[] {
				new VariableInfo(id == null ? BundleTag.DEFAULT_ID : id, name, true, VariableInfo.NESTED)
			};
	}
}
 
Example #13
Source File: Node.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
public void setTagData(TagData tagData) {
    this.tagData = tagData;
    this.varInfos = tagInfo.getVariableInfo(tagData);
    if (this.varInfos == null) {
        this.varInfos = ZERO_VARIABLE_INFO;
    }
}
 
Example #14
Source File: ContextExtraInfo.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
  return new VariableInfo[] {
    new VariableInfo(NavigatorApplicationIF.NAV_APP_KEY,
                     "net.ontopia.topicmaps.nav2.core.NavigatorApplicationIF",
                     true, VariableInfo.NESTED),
    new VariableInfo(NavigatorApplicationIF.CONTEXT_KEY,
                     "net.ontopia.topicmaps.nav2.taglibs.logic.ContextTag",
                     true, VariableInfo.NESTED)
  };
}
 
Example #15
Source File: FooTagExtraInfo.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[]
        {
            new VariableInfo("member",
                             "String",
                             true,
                             VariableInfo.NESTED)
        };
}
 
Example #16
Source File: TestGenerator.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[] {
            new VariableInfo("now", Bean.class.getCanonicalName(),
                    true, VariableInfo.AT_END)
        };
}
 
Example #17
Source File: CheckUserExtraInfo.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
  return new VariableInfo[] {
    new VariableInfo(NavigatorApplicationIF.USER_KEY,
                     "net.ontopia.topicmaps.nav2.core.UserIF",
                     true, VariableInfo.AT_END)
  };
}
 
Example #18
Source File: Node.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
public void setTagData(TagData tagData) {
    this.tagData = tagData;
    this.varInfos = tagInfo.getVariableInfo(tagData);
    if (this.varInfos == null) {
        this.varInfos = ZERO_VARIABLE_INFO;
    }
}
 
Example #19
Source File: BaseURLTag.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
public VariableInfo[] getVariableInfo(TagData tagData) {
    VariableInfo vi[] = null;
    String var = tagData.getAttributeString("var");
    if (var != null) {
        vi = new VariableInfo[1];
        vi[0] =
        	new VariableInfo(var, "java.lang.String", true,
                         VariableInfo.AT_BEGIN);
    }
    return vi;
}
 
Example #20
Source File: TestScriptingVariabler.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
/**
 * Return information about the scripting variables to be created.
 */
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[] {
        new VariableInfo("Test", "java.lang.String", true,
            VariableInfo.AT_END)
    };
}
 
Example #21
Source File: TestGenerator.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[] {
            new VariableInfo("now", Bean.class.getCanonicalName(),
                    true, VariableInfo.AT_END)
        };
}
 
Example #22
Source File: FooTagExtraInfo.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[]
        {
            new VariableInfo("member",
                             "String",
                             true,
                             VariableInfo.NESTED)
        };
}
 
Example #23
Source File: Node.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
public void setTagData(TagData tagData) {
    this.tagData = tagData;
    this.varInfos = tagInfo.getVariableInfo(tagData);
    if (this.varInfos == null) {
        this.varInfos = ZERO_VARIABLE_INFO;
    }
}
 
Example #24
Source File: FooTagExtraInfo.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData data) {
    return new VariableInfo[]
        {
            new VariableInfo("member",
                             "String",
                             true,
                             VariableInfo.NESTED)
        };
}
 
Example #25
Source File: CollectionTagExtraInfo.java    From fenixedu-academic with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData arg0) {
    return new VariableInfo[] { new VariableInfo("id", "java.util.Collection", true, VariableInfo.AT_END) };

}
 
Example #26
Source File: SessionContextTei.java    From unitime with Apache License 2.0 4 votes vote down vote up
public VariableInfo [] getVariableInfo(TagData data) {
	return new VariableInfo[] {
		new VariableInfo("sessionContext", SessionContext.class.getName(), true, VariableInfo.AT_BEGIN)
	};
}
 
Example #27
Source File: DefineObjectsTag286.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
public VariableInfo[] getVariableInfo(TagData tagData) {
   return info286;
}
 
Example #28
Source File: DefineObjectsTag362.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData tagData) {
   return info362.toArray(new VariableInfo[0]);
}
 
Example #29
Source File: EnumDescriptionTagExtraInfo.java    From fenixedu-academic with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public VariableInfo[] getVariableInfo(TagData arg0) {
    return new VariableInfo[] { new VariableInfo("id", "java.lang.String", true, VariableInfo.AT_END) };

}
 
Example #30
Source File: Node.java    From packagedrone with Eclipse Public License 1.0 4 votes vote down vote up
public TagData getTagData() {
    return tagData;
}