2 Replies Latest reply on Aug 22, 2009 2:01 PM by giuseppe naddeo

    elements of SelectManyListbox can not be update after ajax call

    radouane el marjani Newbie

      I have a SelectOneListbox, comment text area, SelectManyListbox, "add" button and "remove" Button (<a4j:commandLink action=#{}) .
      I select an element from SelectOneListbox, I write a comment on the text area and I click on the add button to add the element in SelectManyListbox and it must be removed from SelectOneListbox.
      To remove I select the elements in SelectManyListbox, I click on remove button and then the elements must be added back to SelectOneListbox and removed from SelectManyListbox.
      This all is puting in< rich:togglePanel  id="mypanel">" after every click is a new render of this panel.

      I write my code in a conversation, the list in "SelectOneListbox" is a factory, for selected element in both lists as for SelectManyListbox I use "In" and "Out" annotation.

      My problem is: after selection of element in SelectOneListbox and  a click on add button, after rendering the element is to see in SelectManyListbox but it can't be removed from the source "SlectOneListbox" even if by debuging I see on the list of SelectOneListbox that the element is realy deleted but this list can't be updated after clicking on add button, the List will be updated if I select a new element and after add clicking. the second element is to see on the SelectManyListbox with the first one, now the list of SelectOneListbox is a step late updated, the first one select element is not to see there but the second still there until I select and add the third one...
      By removing the elements from the SelctManyListbox is the same Behaviour, it will be updated a step late and the elements will be back to the SelectOneListbox direct after clicking.

      Know somebody this problem, I have to add some other properties on the a4j:commandLink. I put here just my actions and the reRender panel?

      I wait of answer or an idea. Thanks and kind regards,