菜单项的 ID 未呈现 [英] Id of menuitem is not rendered

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

问题描述

将应用程序从 primefaces 3.4.2 升级到 primefaces-4.0.jar 后,p:menuitem 没有它的 id 字段.

After upgrading application from primefaces 3.4.2 to primefaces-4.0.jar, p:menuitem doesn't have it's id field.

这是我的代码

 <h:form id="menuform">
 <p:menuitem id="A" value="value1" url="#" />

4.0 下:

 <a tabIndex="-1" class="ui-menuitem-link ui-corner-all" href="#">
 <span class="ui-menuitem-text">value1</span></a>

在 3.4.2 下:

<a class="ui-menuitem-link ui-corner-all" id="menuform:A" href="#">
<span class="ui-menuitem-text">value1</span></a>

因此,我在稍后获取菜单项组件 ID 时遇到未定义或空引用脚本错误.

Due to this I am getting undefined or null reference script error while getting the menu item component id later on.

推荐答案

这是一个 PrimeFaces 错误.我已经打开了一个问题 #1039,因为这个问题有更多的细节.https://github.com/primefaces/primefaces/issues/1039如果你喜欢,就上它.

This is a PrimeFaces bug. I already opened an Issue #1039 because of that problem with more details. https://github.com/primefaces/primefaces/issues/1039 Upcote it if you like.

这篇关于菜单项的 ID 未呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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