如何让< f:facet>包含多个组件?它只显示第一个 [英] How to let <f:facet> contain multiple components? It shows only the first

查看:89
本文介绍了如何让< f:facet>包含多个组件?它只显示第一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用<f:facet>创建一个表头,并且我希望在它旁边有一个符号.但是,它似乎运行不佳.该符号未呈现.

I use <f:facet> to create a table header and I want a symbol beside it. However, it doesn't seem to work well. The symbol is not rendered.

JSF:

<h:column id="subject_column">
  <f:facet name="header">
    <h:commandLink value="Subject" id="sort_by_subjects"
                   action="#{xxx.sort}">
      <f:param id="sortBySubject" name="sortBy" value="SUBJECT"/>
    </h:commandLink>
    <span>${isAscending}</span>
  </f:facet>
  <h:outputText value="#{email.emailSubject}"/>
</h:column>

${isAscending}包含箭头符号并表示顺序.我想在<h:commandLink>旁边展示它.

${isAscending} contains the arrow symbol and represents the order. I would like to show it beside <h:commandLink>.

推荐答案

<f:facet>只能有一个孩子.将多个子项包装在<h:panelGroup>中.

The <f:facet> can have only one child. Wrap multiple children in a <h:panelGroup>.

<h:column>
    <f:facet name="header">
        <h:panelGroup>
            <h:commandLink ... />
            <h:outputText ... />
        </h:panelGroup>
    </f:facet>
    ...
</h:column>

这篇关于如何让&lt; f:facet&gt;包含多个组件?它只显示第一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆