• Post Reply Bookmark Topic Watch Topic
  • New Topic

rich faces pick list with valueChangeListener attribute ( not working)

 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am developing a form in which am using a rich pick list , the problem which i am facing is that when the user selects a lot of elements or all the elements in the pick list ( something like 400 elements) and copy them (coping those elements will take some few seconds ) and then save the form . in this case the form will be saved but not all the copied (selected elements) of the pick list will be saved and some times none of the elements will be saved.

you can observe that from the example http://liferay.exadel.com/web/guest;jsessionid=5E45C276F516901C9064389596B3415E ( second example notice that when you copy all the elements , the no of the options choosen will take time till it appears)

is there any way to restrict the user so that I allow enabling the save button only after option choosen appears.
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Here I am trying to add the attribute valueChangeListener in the rich:pickList , but it is not working which means that it is not calling the method "processValueChangeUsers" in the backing bean


<rich:pickList value="#{usersBean.selectedUsers}" showButtonsLabel="false" valueChangeListener="#{usersBean.processValueChangeUsers}" onlistchanged="submit()" immediate="true">
<f:selectItems value="#{usersBean.allUsers}" />
</rich:pickList>


note : it does not work means that "processValueChangeUsers" method will be called only when the form is submitted , it will not be called when the values in the pick list are changed .
any one can help me to solve this issue
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Any one to help me ...................???
 
Max Katz
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ValueChangeEvent is a server-side event. When you move items from one side to another that's only happening on the client. So, when you submit the form, the listener is called. As an alternative, you can attach a4j:support tag to fire an Ajax request on list change.

Max
http://mkblog.exadel.com
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot Mr.Max Katz for your reply ,

I have got the point , Now I am facing another problem , My form now contains only picklist which contains 400 users and only a save button , the problem is arising when the user selects all the 400 users and click on save button , saving the form takes long time around 20 minutes ???

note that there will be no problem if the number of the selected users are around 100.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!