Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/399.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

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
Java JSF-2A4J:actionParam在一个commandlink错误中_Java_Jsf - Fatal编程技术网

Java JSF-2A4J:actionParam在一个commandlink错误中

Java JSF-2A4J:actionParam在一个commandlink错误中,java,jsf,Java,Jsf,我的jsp中有这样的结构: <h:commandLink action=#{docbean.save}> <a4j:actionParam name="somename" value="bill_all" assignTo="#{billdoc.billType}"/> <a4j:actionParam name="somename" value="bill_document" assignTo="#{docbean.doctype}"/> &

我的jsp中有这样的结构:

<h:commandLink action=#{docbean.save}>
    <a4j:actionParam name="somename" value="bill_all" assignTo="#{billdoc.billType}"/>
    <a4j:actionParam name="somename" value="bill_document" assignTo="#{docbean.doctype}"/>
</h:commandLink>

调试时,我看到billdoc.billtype和docbean.doctype具有相同的值:“bill\u document”

是虫子吗?如果不是,那么我如何为我的托管bean赋予价值

更新:

找到了答案:


我有两个动作参数,一个名字。ActionParam是f:actionListener+f:param。因此,如果您有几个ActionParam,并且只有一个名称,那么您就会遇到我遇到的问题。RichFaces和JSF不会就此警告您。

首先,您需要在此处留出空间
首先,您需要在此处留出空间
尝试使用a4j:commandLink。或者,如果您坚持使用h:commandLink,请尝试将您的a4j:actionParams嵌入到a4j:support标记中。

尝试使用a4j:commandLink。或者-如果您坚持使用h:commandLink-尝试将a4j:actionParams嵌入到a4j:support标记中。

我尝试替换为,但没有任何效果。表单已提交,下注操作不执行。也许是不允许进去的?@Yurish-是允许的。检查您的日志并检查我的更新。我尝试替换为,但没有任何结果。表单已提交,下注操作不执行。也许是不允许进去的?@Yurish-是允许的。检查您的日志和我的更新。
<f:setPropertyActionListener value="bill_all" target="#{billdoc.billType}" />