我有一个primafaces selectOneMenu。当我点击渲染菜单时,下拉列表没有出现,浏览器正在发出此错误。我正在使用IE 8和primefaces 5.但是当我改为h:selectOneMenu时,下拉工作正常。请帮忙,我被卡住了。这是我的代码:
<p:selectOneMenu id="app" value="#{refbean.selapp}" rendered="#{refbean.selItem =='SMS NOTIFICATION'}">
<f:selectItem itemValue="Select" itemLabel="Select Application"></f:selectItem>
<f:selectItems value="#{refbean.appList}"></f:selectItems>
<f:ajax event="change"
execute="@this"
render="shownotif"
listener="#{refbean.setNotificationValues}">
</f:ajax>
</p:selectOneMenu>
I also tried using <script src="http://code.jquery.com/jquery-migrate-1.1.1.js"></script> but the issue still remains.
I am not able to test the ajax call because the drop down menu is not populated at all in the first place. When I click on the drop down menu i see the javascript error in the browser : `$browser.msie is null or not an object.` Here is my full code :
<p:panelGrid id="showOption">
<p:row id="showsms" rendered="#{refbean.selItem =='SMS NOTIFICATION'}">
<p:column>
<p:outputLabel value="#{msg['createcr.app']}" rendered="#{refbean.selItem =='SMS NOTIFICATION'}" styleClass="LabelDescription"></p:outputLabel>
</p:column>
<p:column>
<p:selectOneMenu id="app" value="#{refbean.selapp}" rendered="#{refbean.selItem =='SMS NOTIFICATION'}">
<f:selectItem itemValue="Select" itemLabel="Select Application"></f:selectItem>
<f:selectItems value="#{refbean.appList}"></f:selectItems>
<f:ajax event="change"
execute="@this"
render="shownotif"
listener="#{refbean.setNotificationValues}">
</f:ajax>
</p:selectOneMenu>
</p:column>
</p:row>
<p:row id="shownotif" rendered="#{refbean.selItem == 'SMS NOTIFICATION'}">
<p:column>
<p:outputLabel value="#{msg['createcr.notif']}" styleClass="LabelDescription"></p:outputLabel>
</p:column>
<p:column>
<p:selectOneMenu id="notif" value="#{refbean.selnot}" rendered="#{refbean.selItem == 'SMS NOTIFICATION'}">
<f:selectItem itemValue="Select" itemLabel="Select Notification List"></f:selectItem>
<f:selectItems value="#{refbean.noList}"></f:selectItems>
<f:ajax event="change"
execute="@this"
render="showtext"
listener="#{refbean.setSelNotification}"></f:ajax>
</p:selectOneMenu>
</p:column>
</p:row>
</p:panelGrid>
答案 0 :(得分:0)
尝试使用jquery-browser-plugin,放置jquery.browser.min.js并将其包含在您的网络应用中
用于浏览器检测的jQuery插件。 jQuery删除了对1.9.1浏览器检测的支持,因此它被抽象为jQuery插件