Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.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 使用p:commandButton传递字符串参数_Jsf_Jsf 2 - Fatal编程技术网

Jsf 使用p:commandButton传递字符串参数

Jsf 使用p:commandButton传递字符串参数,jsf,jsf-2,Jsf,Jsf 2,我想使用notificationUpdate函数发送两个参数。我能够成功地传递p.email,但当我试图以字符串形式发送状态时,它将以null传递 <p:commandLink value="Views" action="#{statusBean.update(p.statusId)}" ajax="true" style="text-decora

我想使用notificationUpdate函数发送两个参数。我能够成功地传递p.email,但当我试图以字符串形式发送状态时,它将以null传递

<p:commandLink value="Views"
                                    action="#{statusBean.update(p.statusId)}" ajax="true"
                                    style="text-decoration:none;color:white;" update=":statusBlock" >
                                    <f:actionListener binding="#{notificationBean.notificationUpdate(p.email,status)}" />
</p:commandLink>

如果您想将“状态”字符串作为值发送,请尝试按以下方式发送:

<f:actionListener binding="#{notificationBean.notificationUpdate(p.email,'status')}" /> 

请为您的问题添加上下文<代码>状态属于什么类型?从哪个角度看?