0

What is wrong whit this code? I can not update the idOfForm (selectManyListbox )?

<h:form id="idOfForm">    
    <h:selectManyListbox id="userListId" size="10" value="#{userBean.selectedAvailableUsers}">
                                                    <f:selectItems 
                                                        value="#{userBean.availableUsers}" /> 
                                                    <f:converter converterId="userConverter" /> 
                                                </h:selectManyListbox> 
    </h:form>



        <h:commandLink value="#{userBean.id}"
                                    action="#{userBean.update()}">
                                    <f:setPropertyActionListener
                                        target="#{userBean.selectedUser}" value="#{userBean}" />
                                        <f:ajax execute="@form" render=":idOfForm" />
                                </h:commandLink>
geek_winner
  • 15
  • 1
  • 8

1 Answers1

0

you can execute an update from your managedBean like this

RequestContext.getCurrentInstance().update("form1");

also read this question Render multiple components with f:ajax it's look like a similar question.

Try it

Community
  • 1
  • 1
Yagami Light
  • 1,680
  • 3
  • 17
  • 36