BootsFaces selectMultiMenu无法正确呈现 [英] BootsFaces selectMultiMenu does not render correctly

查看:94
本文介绍了BootsFaces selectMultiMenu无法正确呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Mojarra 2.2.7,PrimeFaces 5.2,BootsFaces 0.7.0。



我正在创建我的第一个BootsFaces页面。我已经配置好了,加载了资源,并且能够创建一个带有 b:inputText b:selectOneMenu的面板的容器。现在,我想添加一个。在发布新版本的BootsFaces之前,您有三个选择:




  • 添加< b:dropMenu / > 在页面上的某个位置(例如,到导航栏)。

  • 手动添加缺少的依赖项:
    xml
    < h:head>
    < h:outputStylesheet库= bsf name = css / dropdowns.css>< / h:outputStylesheet>
    < h:outputScript库= bsf name = js / dropdown.js target = body>< / h:outputScript>
    < / h:head>

  • 如果您是冒险家,请构建并使用开发人员版本的BootsFaces(BootsFaces 0.8.0-SNAPSHOT)。它是 https://github.com/TheCoder4eu/BootsFaces-OSP 上的Maven项目主持人。 / li>


我还上传了演示项目,显示前两种解决方法。


I'm on Mojarra 2.2.7, PrimeFaces 5.2, BootsFaces 0.7.0.

I'm creating my first BootsFaces page. I've got it configured, resources are loaded and I was able to create a container with a panel with a b:inputText and a b:selectOneMenu. Now I would like to add a b:selectMultiMenu:

<b:selectMultiMenu nonSelectedText="Please select">
  <f:selectItem itemLabel="Option 1" itemValue="1"/>
  <f:selectItem itemLabel="Option 2" itemValue="2"/>
  <f:selectItem itemLabel="Option 3" itemValue="3"/>
</b:selectMultiMenu>

It's rendered incorrectly (options are always visible, on top of the button), but the options are selectable; also the caret is missing:

Is this a common pitfall?

I have checked my browsers debugging tools (Chromium) and no errors are visible in the network pane; for example /javax.faces.resource/css/bootstrap-multiselect.css?ln=bsf, /javax.faces.resource/js/bootstrap-multiselect.js?ln=bsf and other resources are loaded. Also no errors in the Javascript console. So I can't find any obvious errors.

解决方案

Thanks for reporting this bug. I've opened a ticket on our Bugtracker. Until the new version of BootsFaces is published, you have three choices:

  • Add an <b:dropMenu /> somewhere on your page (for example, to the navbar).
  • Add the missing dependencies by hand: xml <h:head> <h:outputStylesheet library="bsf" name="css/dropdowns.css"></h:outputStylesheet> <h:outputScript library="bsf" name="js/dropdown.js" target="body"></h:outputScript> </h:head>
  • If you're the adventurous one, build and use the developer version of BootsFaces (BootsFaces 0.8.0-SNAPSHOT). It's a Maven project host at https://github.com/TheCoder4eu/BootsFaces-OSP.

I've also uploaded a demo project showing the first two workarounds.

这篇关于BootsFaces selectMultiMenu无法正确呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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