首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SelectOneMenu不工作,获取TypeError:$.browser未定义

问SelectOneMenu不工作,获取TypeError:$.browser未定义
EN

Stack Overflow用户
提问于 2014-09-06 19:45:51
回答 1查看 666关注 0票数 1

我试图使用primefaces的selectonemenu元素,但是当我单击下拉箭头时,什么都不会发生。

我正在使用Primefaces 5.0.1。

这是我所包含的脚本的顺序:

头部:

<h:outputScript name="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"/>

):之前的 (at layout.xhtml )

代码语言:javascript
复制
<h:outputScript name="js/vendor/jquery-1.11.0.min.js"/>
<h:outputScript name="jquery/jquery-plugins.js" library="primefaces"/>
<h:outputScript name="js/vendor/bootstrap.min.js"/>
<h:outputScript name="js/main.js"/>

我到目前为止尝试过的

  1. 我尝试过将this browser定义包含到document.ready函数中,但是我得到了这个错误TypeError: n.easing[this.easing] is not a function,下拉菜单出现在视图端口的左边边缘。
  2. 删除<h:outputScript name="js/vendor/jquery-1.11.0.min.js"/>,以便只使用PrimefacesjQuery` `,这导致了一个完美工作的下拉菜单,但也使标题的肚脐处的下拉菜单无法工作。
  3. 尝试包含js/vendor/jquery-migrate-1.2.1.min.js,但得到了与以前相同的结果,控制台上出现了以下错误: TypeError: n.easingthis.easing不是一个函数 TypeError: this.preShowValue未定义

我就是这样使用< p:selectOneMenu>的:

代码语言:javascript
复制
<div class="col-md-4">
    <p:inplace id="house-type" editor="true">
        <p:selectOneMenu value="#{houseProfileView.houseType}" >
            <f:selectItem itemLabel="Appartment" itemValue="Appartment" />
            <f:selectItem itemLabel="House" itemValue="House" />
        </p:selectOneMenu>
    </p:inplace>
</div>
EN

回答 1

Stack Overflow用户

发布于 2014-09-07 12:02:54

尝试对所有的target="head"使用属性h:outputScript。将ui:insert with h:outputScript添加到头页,然后将其作为ui:define: target problem when using templates填充到模板中

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25704115

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档