Jsf 如何获取rich:hashParam的参数值
我试图用rich:hashParam标记将值传递给rich:popupanel,下面是我的代码Jsf 如何获取rich:hashParam的参数值,jsf,richfaces,Jsf,Richfaces,我试图用rich:hashParam标记将值传递给rich:popupanel,下面是我的代码 <h:commandLink value="Edit"> <rich:componentControl target="editPanel" operation="show"> <a4j:param noEscape="true" value="event" /> <rich:hashParam> <a4j:para
<h:commandLink value="Edit">
<rich:componentControl target="editPanel" operation="show">
<a4j:param noEscape="true" value="event" />
<rich:hashParam>
<a4j:param name="categoryId" value="#{ c.categoryId }" />
<a4j:param name="categoryName" value="#{ c.name }" />
<a4j:param name="categoryParent" value="#{ c.parent }" />
</rich:hashParam>
</rich:componentControl>
例如:
有人知道这件事吗?提前谢谢。嗯,我自己解决了这个问题。我没有使用rich:hashParam
传递参数,而是使用a4j:param
将参数传递到弹出面板,并将值分配给支持bean属性。然后重新渲染显示参数值的a4j:outputPanel
<h:form id="editDataForm">
<!-- server do something with the 'categoryId' parameter it gets -->
<a4j:commandLink action="#{ testBackingBean.editData }" value="Edit" render="dataContent" oncomplete="#{rich:component('editPanel')}.show()">
<a4j:param name="data" value="#{ c.categoryId }" assignTo="#{ testBackingBean.categoryId }"/>
</a4j:commandLink>
</h:form>
<!--...-->
<rich:popupPanel id="editPanel">
<a4j:outputPanel id="dataContent" layout="inline">
<h:outputText value="ID:"/>
<h:outputText value="#{ testBackingBean.dataToEdit.categoryId }"/>
</a4j:outputPanel>
</rich:popupPanel>
<h:form id="editDataForm">
<!-- server do something with the 'categoryId' parameter it gets -->
<a4j:commandLink action="#{ testBackingBean.editData }" value="Edit" render="dataContent" oncomplete="#{rich:component('editPanel')}.show()">
<a4j:param name="data" value="#{ c.categoryId }" assignTo="#{ testBackingBean.categoryId }"/>
</a4j:commandLink>
</h:form>
<!--...-->
<rich:popupPanel id="editPanel">
<a4j:outputPanel id="dataContent" layout="inline">
<h:outputText value="ID:"/>
<h:outputText value="#{ testBackingBean.dataToEdit.categoryId }"/>
</a4j:outputPanel>
</rich:popupPanel>