baba.kabira
baba.kabira

Reputation: 3171

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)

Upvotes: 0

Views: 2927

Answers (1)

Max Katz
Max Katz

Reputation: 1582

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

Upvotes: 1

Related Questions