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


Java BodyTagSupport.EVAL_PAGE属性代码示例

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


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

示例1: doEndTag

/**
 * ${@inheritDoc}
 */
public int doEndTag() throws JspException {
    if (sortable && attributeName == null && sortAttribute == null) {
        throw new JspException("Sortable columns must use either attr or sortAttr");
    }
    checkForBoundsAndAttrs();
    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    if (command.equals(ListCommand.RENDER)) {
        ListTagUtil.write(pageContext, "</td>");
    }
    else if (command.equals(ListCommand.ENUMERATE) &&
                        !StringUtils.isBlank(filterAttr)) {
        setupColumnFilter();
    }

    return BodyTagSupport.EVAL_PAGE;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:19,代码来源:ColumnTag.java

示例2: doStartTag

/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {

    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    listName = parent.getUniqueName();
    int retval = BodyTagSupport.SKIP_BODY;
    setupRhnSet();
    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader(parent);
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        renderCheckbox();
    }
    return retval;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:25,代码来源:SelectableColumnTag.java

示例3: doEndTag

/**
 * ${@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    // print the hidden fields after the list widget is printed
    // but before the form of the listset is closed.
    ListTagUtil.write(pageContext, String.format(HIDDEN_TEXT,
            ListTagUtil.makeParentIsAnElementLabel(getUniqueName()),
            parentIsElement));

    // here decorators should insert other e.g hidden input fields
    for (ListDecorator dec : getDecorators()) {
        dec.afterList();
    }

    ListTagUtil.write(pageContext, "<!-- END " + getUniqueName() + " -->");
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:20,代码来源:ListTag.java

示例4: doStartTag

/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {

    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    listName = parent.getUniqueName();
    int retval = BodyTagSupport.SKIP_BODY;

    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        renderHiddenField();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader(parent);
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        render(valueExpr);
    }
    return retval;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:26,代码来源:RadioColumnTag.java

示例5: doEndTag

@Override
public int doEndTag() throws JspException
{
   try
   {
      BodyContent bc = this.getBodyContent();
      String body = bc.getString();
      JspWriter out = this.pageContext.getOut();
      out.println("<body>");
      out.print(body);

      JSONStructure jsonStructure = new JSONStructure(0);
      this.marshaller.marschall(this.serializationData, jsonStructure);
      String json = jsonStructure.toString();

      out.println("<script>\nvar bz_davide_dm_widgets = " + json + "</script>");
      out.println("</body>");
      return BodyTagSupport.EVAL_PAGE;
   }
   catch (Exception exxx)
   {
      throw new JspException(exxx);
   }
}
 
开发者ID:davidebz,项目名称:DMWeb,代码行数:24,代码来源:DMWebFragmentBodyTagLibrary.java

示例6: doStartTag

/**
 * ${@inheritDoc}
 */
public int doStartTag() throws JspException {
    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    int retval = BodyTagSupport.SKIP_BODY;
    currentSortDir = fetchSortDir();

    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        retval = BodyTagSupport.EVAL_PAGE;
        if (isSortable()) {
            parent.setSortable(true);
        }
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        if (isBound) {
            renderBound();
            retval = BodyTagSupport.SKIP_BODY;
        }
        else {
            renderUnbound();
            retval = BodyTagSupport.EVAL_BODY_INCLUDE;
        }
    }
    return retval;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:33,代码来源:ColumnTag.java

示例7: doEndTag

/**
 * {@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    ListCommand command = ListTagUtil.
                                        getCurrentCommand(this, pageContext);
    if (command.equals(ListCommand.RENDER)) {
        ListTagUtil.write(pageContext, "</td>");
    }
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:13,代码来源:SelectableColumnTag.java

示例8: doEndTag

/**
 * ${@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    setupPageData();
    if ((null != exportColumns) && (null != pageData)) {
        renderExport();
    }
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:12,代码来源:CSVTag.java

示例9: doEndTag

/**
 * {@inheritDoc}
 */
public int doEndTag() throws JspException {
    endForm();
    return BodyTagSupport.EVAL_PAGE;
}
 
开发者ID:spacewalkproject,项目名称:spacewalk,代码行数:7,代码来源:ListSetTag.java

示例10: doEndTag

@Override
public int doEndTag() throws JspException
{
   try
   {
      DMWebFragmentBodyTagLibrary container = (DMWebFragmentBodyTagLibrary) BodyTagSupport.findAncestorWithClass(this,
                                                                                                                 DMWebFragmentBodyTagLibrary.class);

      Class clazz = Class.forName(this.viewclass);

      AbstractHtmlElementView[] views;

      BodyContent bc = this.getBodyContent();
      if (bc != null)
      {
         String body = bc.getString();

         Constructor initConstructor = null;
         for (Constructor constructor : clazz.getConstructors())
         {
            if (constructor.getParameterTypes().length == 1)
            {
               initConstructor = constructor;
            }
         }

         Object initParameters = initConstructor.getParameterTypes()[0].newInstance();

         W3CXMLStructure w3cxmlStructure = new W3CXMLStructure(new ByteArrayInputStream(body.getBytes("UTF-8")));
         container.unmarshaller.unmarschall(w3cxmlStructure, initParameters);

         Object viewObject = initConstructor.newInstance(initParameters);

         if (viewObject instanceof ArrayList)
         {
            views = ((ArrayList<AbstractHtmlElementView>) viewObject).toArray(new AbstractHtmlElementView[0]);
         }
         else
         {
            views = new AbstractHtmlElementView[] { (AbstractHtmlElementView) viewObject };
         }

      }
      else
      {
         views = new AbstractHtmlElementView[] { (AbstractHtmlElementView) clazz.newInstance() };
      }

      StringBuffer generatedHtml = new StringBuffer();

      for (AbstractHtmlElementView view : views)
      {
         AbstractHtmlElementView.generateServerSideHtml(container.serializationData, view, generatedHtml);
      }

      this.pageContext.getOut().print(generatedHtml.toString());

      return BodyTagSupport.EVAL_PAGE;
   }
   catch (Exception exxx)
   {
      throw new JspException(exxx);
   }
}
 
开发者ID:davidebz,项目名称:DMWeb,代码行数:64,代码来源:DMWebFragmentTagLibrary.java


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