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


Java JspFragment类代码示例

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


JspFragment类属于javax.servlet.jsp.tagext包,在下文中一共展示了JspFragment类的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("<a ");
		o.print(getAttributes());
		o.print(">");
		if( body != null )
		{
		    body.invoke(null);
		}
		o.print("</a>");

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

示例3: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入依赖的package包/类
public void doTag() throws JspException {
	
		TableRowTag rowTag = (TableRowTag) findAncestorWithClass(this,
				TableRowTag.class);
		
		ColumnTag columnTag = (ColumnTag)findAncestorWithClass(this,
				ColumnTag.class);
		
		if (columnTag == null) {
			throw new JspTagException("the <ur:columnContent> tag must"
					+ " be nested within a <ur:column> tag");
		}
		
		if (rowTag.isProcessColumn()) 
        {
			JspFragment body = getJspBody();
			try {
				body.invoke(null);
			} catch (IOException e) {
				e.printStackTrace();
				throw new JspException("Error in columnContent", e);
			}
        }
}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:25,代码来源:ColumnContentTag.java

示例4: 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

示例5: 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

示例6: 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

示例7: 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("<td ");
		o.print(getAttributes());
		o.print(">");
		if( body != null)
		{
		    body.invoke(null);
		}
		o.print("</td>");

	} catch (Exception e) {
		throw new JspException(e);
	}
}
 
开发者ID:nate-rcl,项目名称:irplus,代码行数:20,代码来源:TableDataTag.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: 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("<tr ");
		o.print(getAttributes());
		o.print(">");
		if( body != null )
		{
		    body.invoke(null);
		}
		o.print("</tr>");

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

示例10: 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

示例11: 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

示例12: 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

示例13: doTag

import javax.servlet.jsp.tagext.JspFragment; //导入依赖的package包/类
@SuppressWarnings ( "unchecked" )
@Override
public void doTag () throws JspException, IOException
{
    final Map<String, LinkedList<JspFragment>> stacks = (Map<String, LinkedList<JspFragment>>)getJspContext ().getAttribute ( PushTag.ATTR, PageContext.REQUEST_SCOPE );

    if ( stacks == null )
    {
        return;
    }

    final LinkedList<JspFragment> stack = stacks.get ( this.name );
    if ( stack == null )
    {
        return;
    }

    for ( final JspFragment fragment : stack )
    {
        fragment.invoke ( getJspContext ().getOut () );
    }

    stack.clear ();
}
 
开发者ID:ctron,项目名称:package-drone,代码行数:25,代码来源:PopTag.java

示例14: setJspBody

import javax.servlet.jsp.tagext.JspFragment; //导入依赖的package包/类
@Override
@SuppressWarnings ( "unchecked" )
public void setJspBody ( final JspFragment jspBody )
{
    super.setJspBody ( jspBody );

    Map<String, LinkedList<JspFragment>> stacks = (Map<String, LinkedList<JspFragment>>)getJspContext ().getAttribute ( ATTR, PageContext.REQUEST_SCOPE );
    if ( stacks == null )
    {
        stacks = new HashMap<> ();
        getJspContext ().setAttribute ( ATTR, stacks, PageContext.REQUEST_SCOPE );
    }

    LinkedList<JspFragment> stack = stacks.get ( this.name );
    if ( stack == null )
    {
        stack = new LinkedList<> ();
        stacks.put ( this.name, stack );
    }

    stack.add ( jspBody );
}
 
开发者ID:ctron,项目名称:package-drone,代码行数:23,代码来源:PushTag.java

示例15: 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


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