简体   繁体   中英

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. 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.
  2. If I use process attribute of tag "a4j:jsFunction", action method is called twice, Why So?
  3. Even actionListener fails to solve the issue.

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)

I would start with placing a4j:jsFunction outside h:selectManyCheckbox, it shouldn't be nested inside.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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