org.apache.wicket.markup.html.panel.Fragment.renderFragment()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.apache.wicket.markup.html.panel.Fragment.renderFragment()方法的一些代码示例,展示了Fragment.renderFragment()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.renderFragment()方法的具体详情如下:
包路径:org.apache.wicket.markup.html.panel.Fragment
类名称:Fragment
方法名:renderFragment

Fragment.renderFragment介绍

[英]Render the markup starting at the current position of the markup strean
[中]从标记的当前位置开始呈现标记

代码示例

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * 
 * @see org.apache.wicket.Component#onComponentTagBody(org.apache.wicket.markup.MarkupStream,
 *      org.apache.wicket.markup.ComponentTag)
 */
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
{
  // Skip the components body. It will be replaced by the fragment
  if (((ComponentTag)markupStream.get(markupStream.getCurrentIndex() - 1)).isOpen())
  {
    markupStream.skipRawMarkup();
  }
  final MarkupStream providerMarkupStream = chooseMarkupStream(markupStream);
  if (providerMarkupStream == null)
  {
    throw new MarkupNotFoundException(
      "Fragment: No markup stream found for providing markup container " +
        markupProvider.toString() + ". Fragment: " + toString());
  }
  renderFragment(providerMarkupStream, openTag);
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * 
 * @see org.apache.wicket.Component#onComponentTagBody(org.apache.wicket.markup.MarkupStream,
 *      org.apache.wicket.markup.ComponentTag)
 */
@Override
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
{
  // Skip the components body. It will be replaced by the fragment
  if (((ComponentTag)markupStream.get(markupStream.getCurrentIndex() - 1)).isOpen())
  {
    markupStream.skipRawMarkup();
  }
  final MarkupStream providerMarkupStream = chooseMarkupStream(markupStream);
  if (providerMarkupStream == null)
  {
    throw new MarkupNotFoundException(
      "Fragment: No markup stream found for providing markup container " +
        markupProvider.toString() + ". Fragment: " + toString());
  }
  renderFragment(providerMarkupStream, openTag);
}

相关文章