使用font-awesome图标对JSF <h:commandbutton>有限制吗?

时间:2018-05-16 11:36:54

标签: jsf jsf-2.2

我正在研究JSF 2.2

Font awesome'fonts'使用提交类型的html按钮。因为<h:commandButton>正是如此;一个提交类型的按钮,为什么我不能添加它真棒?

这是jsf中<h:commandButton>的限制吗?

我的代码:

  <h:commandButton 
      styleClass="btn btn-default" 
      action="#{myBean.name}" >

      <i class="fa fa-trash" style="font-size: 1em"> </i>

  </h:commandButton>

我知道我可以使用<h:commandLink>来代替here。但是当我制作一个按钮时,它不能直观地建立链接,这就是<h:commandLink>所显示的内容。

0 个答案:

没有答案