简体   繁体   English

Richfaces a4j的问题:jsFunction

[英]Problem with richfaces a4j:jsFunction

<h:selectManyCheckbox id="accountGroup" layout="pagedirection" 
   value="#{xxx.accountGroup}" style="FONT-SIZE: 11px;" 
   onclick="selectAllAccountGroup(this.value);fireAjax();">

   <f:selectItem itemValue="0" itemLabel="Select All" />
   <f:selectItems value="#{xxx.userGroup}" />

   <a4j:jsFunction name="fireAjax" action="#{xxx.groupChanged}" 
     ajaxSingle="true" reRender="accountNumbersOp" process="accountGroup">
   </a4j:jsFunction>

</h:selectManyCheckbox> 

Above is a list of check-boxes with select all option, if select all is selected all check-boxes are selected.以上是带有 select all 选项的复选框列表,如果 select all 被选中,则所有复选框都被选中。 On the basis of selected values I have to populate another check-box list, whose logic is in action method.根据选定的值,我必须填充另一个复选框列表,其逻辑在操作方法中。 I am facing few issues.我面临几个问题。

  1. If I remove process attribute of tag "a4j:jsFunction", action method is called but I don't get the updated value of check-boxes list in action method.如果我删除标记“a4j:jsFunction”的进程属性,则会调用 action 方法,但我没有在 action 方法中获得复选框列表的更新值。
  2. If I use process attribute of tag "a4j:jsFunction", action method is called twice, Why So?如果我使用标签“a4j:jsFunction”的进程属性,动作方法会被调用两次,为什么?
  3. Even actionListener fails to solve the issue.甚至 actionListener 也无法解决问题。

Any suggestions how can I accomplish this in a better way.任何建议我如何才能以更好的方式完成此任务。

I am on jsf 1.2, richfaces 3.3.3, weblogic 10.3.2(Portal)我在 jsf 1.2,richfaces 3.3.3,weblogic 10.3.2(门户)

I would start with placing a4j:jsFunction outside h:selectManyCheckbox, it shouldn't be nested inside.我将从将 a4j:jsFunction 放在 h:selectManyCheckbox 之外开始,它不应该嵌套在里面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM