Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/fsharp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 如何获取rich:hashParam的参数值_Jsf_Richfaces - Fatal编程技术网

Jsf 如何获取rich:hashParam的参数值

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

我试图用rich:hashParam标记将值传递给rich:popupanel,下面是我的代码

<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>