Jsf 2 它不工作';ActionExpression';在动态菜单中。素面
我的代码如下:Jsf 2 它不工作';ActionExpression';在动态菜单中。素面,jsf-2,primefaces,Jsf 2,Primefaces,我的代码如下: <h:form> <p:accordionPanel> <p:tab title="TAB 1"> <h:panelGrid columns="2" cellpadding="10"> <p:menu model="#{usuarioSesion.miMenu}" /> </h:panelGrid> </p:tab> <p:tab t
<h:form>
<p:accordionPanel>
<p:tab title="TAB 1">
<h:panelGrid columns="2" cellpadding="10">
<p:menu model="#{usuarioSesion.miMenu}" />
</h:panelGrid>
</p:tab>
<p:tab title="TAB 2">
<h:panelGrid columns="2" cellpadding="10">
Ayuda
</h:panelGrid>
</p:tab>
</p:accordionPanel>
</h:form>
当我单击菜单项运行此代码时,永远不会执行方法listar1(),listar2()
原因是什么
但是,对于此代码:
<h:form>
<h:panelGrid columns="2" cellpadding="10">
<p:menu model="#{usuarioSesion.miMenu}" />
</h:panelGrid>
</h:form>
菜单很好用。为什么
谢谢解决方法:我发现添加:
<h:panelGrid columns="2" cellpadding="10" style="display:none">
<p:menu model="#{usuarioSesion.miMenu}" />
</h:panelGrid>
到您的表单,解决问题。最终形式的内容将是:
<h:form>
<p:accordionPanel>
<p:tab title="TAB 1">
<h:panelGrid columns="2" cellpadding="10">
<p:menu model="#{usuarioSesion.miMenu}" />
</h:panelGrid>
</p:tab>
<p:tab title="TAB 2">
<h:panelGrid columns="2" cellpadding="10">
Ayuda
</h:panelGrid>
</p:tab>
</p:accordionPanel>
<h:panelGrid columns="2" cellpadding="10" style="display:none">
<p:menu model="#{usuarioSesion.miMenu}" />
</h:panelGrid>
</h:form>
阿尤达
请添加您的PF和JSF版本。
<h:form>
<p:accordionPanel>
<p:tab title="TAB 1">
<h:panelGrid columns="2" cellpadding="10">
<p:menu model="#{usuarioSesion.miMenu}" />
</h:panelGrid>
</p:tab>
<p:tab title="TAB 2">
<h:panelGrid columns="2" cellpadding="10">
Ayuda
</h:panelGrid>
</p:tab>
</p:accordionPanel>
<h:panelGrid columns="2" cellpadding="10" style="display:none">
<p:menu model="#{usuarioSesion.miMenu}" />
</h:panelGrid>
</h:form>