当前位置: 首页>>代码示例>>Java>>正文


Java JspFragment.invoke方法代码示例

本文整理汇总了Java中javax.servlet.jsp.tagext.JspFragment.invoke方法的典型用法代码示例。如果您正苦于以下问题:Java JspFragment.invoke方法的具体用法?Java JspFragment.invoke怎么用?Java JspFragment.invoke使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.servlet.jsp.tagext.JspFragment的用法示例。


在下文中一共展示了JspFragment.invoke方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
/**
 * Create the form tag.
 * 
 * @see javax.servlet.jsp.tagext.SimpleTagSupport#doTag()
 */
public void doTag() throws JspException {
      
	
       context = (PageContext) getJspContext();
    JspWriter out = context.getOut();
    
       
    try {
        out.print("<script ");
    	out.print(getJavascriptAttributes());
    	out.print(">");
    	
    	JspFragment body = getJspBody();
    	if( body != null)
    	{
    		body.invoke(null);
    	}
           out.print("</script>");
    	
    	
       } catch (Exception e) {
           throw new JspException(e);
       }
}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:30,代码来源:JavascriptTag.java

示例2: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
public void doTag() throws JspException {
	JspFragment body = getJspBody();
	PageContext pageContext = (PageContext) getJspContext();
	JspWriter o = pageContext.getOut();

	try {
		o.print("<th ");
		o.print(getAttributes());
		o.print(">");
		if( body != null )
		{
		    body.invoke(null);
		}
		o.print("</th>");

	} catch (Exception e) {
		throw new JspException(e);
	}
}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:20,代码来源:TableHeadTag.java

示例3: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
public void doTag() throws JspException {

		JspFragment body = getJspBody();
		PageContext pageContext = (PageContext) getJspContext();
		JspWriter o = pageContext.getOut();

		try {
			o.print("<thead ");
			o.print(getAttributes());
			o.print(">");
			if( body != null)
			{
			    body.invoke(null);
			}
			o.print("</thead>");

		} catch (Exception e) {
			throw new JspException(e);
		}
	}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:21,代码来源:TableHeaderSectionTag.java

示例4: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
public void doTag() throws JspException {
	   JspFragment body = getJspBody();
       PageContext pageContext = (PageContext) getJspContext();
       JspWriter out = pageContext.getOut();
       
       try {
    	   out.print("<th ");
    	   out.print(getAttributes());
    	   out.print(">\n");
    	   
    	   if( body!= null )
    	   {
    	       body.invoke(null);
    	   }
    	   
    	   out.print("</th>");
    	   
       } catch (Exception e) {
          throw new JspException(e);
       }
       
}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:23,代码来源:TableThTag.java

示例5: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
public void doTag() throws JspException {
	log.debug("do tag called");

	JspFragment body = getJspBody();
	PageContext pageContext = (PageContext) getJspContext();
	JspWriter o = pageContext.getOut();

	try {
		o.print("<table ");
		o.print(getHtmlTableAttributes());
		o.print(">");
		if( body != null )
		{
		    body.invoke(null);
		}
		o.print("</table>");

	} catch (Exception e) {
		throw new JspException(e);
	}

}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:23,代码来源:TableTag.java

示例6: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
/**
 * Create the form tag.
 * 
 * @see javax.servlet.jsp.tagext.SimpleTagSupport#doTag()
 */
public void doTag() throws JspException {
      
	JspFragment body = getJspBody();
       PageContext pageContext = (PageContext) getJspContext();
    JspWriter out = pageContext.getOut();
    
       
    try {
        out.print("\n<form ");
    	out.print(getAttributes());
    	out.print(">");
    	if( body!= null )
    	{
    		out.print("<input type=\"hidden\" name=\"formName\" value=\"" + getName() + "\"/>");
            body.invoke(null);
    	}
    	out.print("</form>");
    	
       } catch (Exception e) {
           throw new JspException(e);
       }
}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:28,代码来源:BasicFormTag.java

示例7: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
/**
 * Create the form tag.
 * 
 * @see javax.servlet.jsp.tagext.SimpleTagSupport#doTag()
 */
public void doTag() throws JspException {
	
	PageContext context = (PageContext) getJspContext();
	o = context.getOut();
	JspFragment body = getJspBody();
	try
	{
	    o.print("<div " + getAttributes().toString() + ">");
	    if(body != null)
	    {
	    	body.invoke(null);
	    }
	    o.print("</div>");
	    
	}
	catch(Exception e)
	{
		throw new JspException("error occured in DivTag", e);
	}
	

}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:28,代码来源:DivTag.java

示例8: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
public void doTag() throws JspException {

		JspFragment body = getJspBody();
		PageContext pageContext = (PageContext) getJspContext();
		JspWriter o = pageContext.getOut();

		try {
			o.print("<caption ");
			o.print(getAttributes());
			o.print(">");
			if(body != null)
			{
			    body.invoke(null);
			}
			o.print("</caption>");

		} catch (Exception e) {
			throw new JspException(e);
		}
	}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:21,代码来源:CaptionTag.java

示例9: executeTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
@Override
public Tag executeTag() throws JspException, IOException {
    Boolean testValue;

    Object tagValue = getTagValue(test);
    if (tagValue instanceof Boolean) {
        testValue = (Boolean) tagValue;
    } else {
        testValue = Boolean.valueOf((String) tagValue);
    }

    if (testValue != null && testValue) {
        JspFragment body = getJspBody();
        if (body != null) {
            body.invoke(null);
        }
    }
    return null;
}
 
开发者ID:jefalbino,项目名称:jsmart-web,代码行数:20,代码来源:RenderTagHandler.java

示例10: executeTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
@Override
public Tag executeTag() throws JspException, IOException {

    JspTag parent = getParent();
    if (!(parent instanceof FormTagHandler) && !(parent instanceof RestTagHandler)) {
        throw ConstraintTagException.fromConstraint("recaptcha", "Tag must be placed inside [form] or [rest] tag");
    }

    // Just to call nested tags
    JspFragment body = getJspBody();
    if (body != null) {
        body.invoke(null);
    }

    setRandomId("recaptcha");

    // ReCaptcha V2
    if (version.equals(ReCaptchaHandler.RECAPTCHA_V2)) {
        return executeRecaptchaV2(parent);
    }
    // ReCaptcha V1
    return executeRecaptchaV1(parent);
}
 
开发者ID:jefalbino,项目名称:jsmart-web,代码行数:24,代码来源:ReCaptchaTagHandler.java

示例11: executeTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
@Override
public Tag executeTag() throws JspException, IOException {

    // Just to call nested tags
    JspFragment body = getJspBody();
    if (body != null) {
        body.invoke(null);
    }

    Tag inputPart = executeInputPart();
    Tag listPart = executeListPart();
    
    appendDocScript(getAjaxFunction());

    Set set = new Set();
    set.addTag(inputPart);
    set.addTag(listPart);
    return set;
}
 
开发者ID:jefalbino,项目名称:jsmart-web,代码行数:20,代码来源:AutoCompleteTagHandler.java

示例12: invokeFragmentIfNeeded

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
private String invokeFragmentIfNeeded(
        JspFragment fragment,
        String defaultValue,
        int currentIndex) throws JspException {
    PageContext p = pageContext;
    StringWriter w = new StringWriter();
    if (fragment != null) {
        if (currentIndex > 0) p.setAttribute(var, currentIndex);
        try {
            fragment.invoke(w);
        } catch (IOException e) {throw new JspException(e);}
        if (currentIndex > 0) p.removeAttribute(var);
    } else {
        w.append(Strings.substitute(
                defaultValue,
                Maps.hash(var, String.valueOf(currentIndex))));
    }
    return w.toString();
}
 
开发者ID:ctc-g,项目名称:sinavi-jfw,代码行数:20,代码来源:PageNavigationTag.java

示例13: executeTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
@Override
public Tag executeTag() throws JspException, IOException {

    StringWriter sw = new StringWriter();
    JspFragment body = getJspBody();
    if (body != null) {
        body.invoke(sw);
    }

    Td td = new Td();
    td.addAttribute("id", id)
        .addAttribute("style", getTagValue(style))
        .addAttribute("class", getTagValue(styleClass))
        .addText(executeExpressions(sw.toString()));
    return td;
}
 
开发者ID:jefalbino,项目名称:jsmart-web,代码行数:17,代码来源:ColumnTagHandler.java

示例14: executeTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
@Override
public Tag executeTag() throws JspException, IOException {
    // Look for parameters
    JspFragment body = getJspBody();
    if (body != null) {
        body.invoke(null);
    }

    String resource = (String) getTagValue(res);
    String resourceKey = (String) getTagValue(key);

    String message = getResourceString(resource, resourceKey);
    if (!params.isEmpty()) {
        message = formatText(message, params);
    }
    printOutput(message);
    return null;
}
 
开发者ID:jefalbino,项目名称:jsmart-web,代码行数:19,代码来源:TextTagHandler.java

示例15: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入方法依赖的package包/类
public void doTag() throws JspException {
	try {
		// Writer für die Ausgabe
		JspWriter out = getJspContext().getOut();
		out.println("Echo:");
		// Ausgabe des Body
		JspFragment f = getJspBody();
		if (f != null) {
			f.invoke(out);
		}
	} catch (IOException e) {
		throw new JspException(e.getMessage());
	}
}
 
开发者ID:thomasdarimont,项目名称:asw-web2-examples,代码行数:15,代码来源:EchoTag.java


注:本文中的javax.servlet.jsp.tagext.JspFragment.invoke方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。