Re: AjaxFormComponentUpdatingBehavior works only on first element in a ListView

2014-01-04 Thread Peter Henderson
Hi Igor.

Try calling
listView.setReuseItems(true)

Hope that helps

Peter.






On 4 January 2014 17:09, Igor Dvorzhak idm...@gmail.com wrote:

 I am attaching AjaxFormComponentUpdatingBehavior to a DropDownChoice
 element in a ListView which displays a hidden panel on change event. It
 works for the first element in the ListView but not for subsequently added
 elements.

 I have tracked the cause:

 All subsequent AJAX behaviours are bounded to the first element, because
 all DropDownChoice elements in the ListView have the same generated HTML
 id.

 Actually when change event triggered on the first element the number of
 AJAX requests sent is equal to the number of elements in ListView.


 Does anybody know how to fix this?



Re: AjaxFormComponentUpdatingBehavior works only on first element in a ListView

2014-01-04 Thread medb
Hi Peter,

I have already used the listView.setReuseItems(true) method.

The actual problem not in refreshing the ListView but in the registering
AJAX behavior for DropDownChoice element in it, because the event (AJAX
request) is fired only for the first element in a ListView not for the any
of the subsequently added elements. In fact for each subsequently added
DropDownChoice behavior created but for some reason all of them (behaviors)
are registered on the first element.

The same problem (with code) described here:
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-event-works-only-on-first-element-ListView-td4662721.html

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-works-only-on-first-element-in-a-ListView-tp4663459p4663463.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxFormComponentUpdatingBehavior works only on first element in a ListView

2014-01-04 Thread Sven Meier

Check your markup for explicit html ids (not wicket ids):

select id=foo wicket:id=foo...

Remove them.

Regards
Sven

On 01/04/2014 06:09 PM, Igor Dvorzhak wrote:

I am attaching AjaxFormComponentUpdatingBehavior to a DropDownChoice
element in a ListView which displays a hidden panel on change event. It
works for the first element in the ListView but not for subsequently added
elements.

I have tracked the cause:

All subsequent AJAX behaviours are bounded to the first element, because
all DropDownChoice elements in the ListView have the same generated HTML
id.

Actually when change event triggered on the first element the number of
AJAX requests sent is equal to the number of elements in ListView.


Does anybody know how to fix this?




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: AjaxFormComponentUpdatingBehavior works only on first element in a ListView

2014-01-04 Thread Igor Dvorzhak
Sven,

You are right, it helped. Thank you very much.

Best,
Igor

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-works-only-on-first-element-in-a-ListView-tp4663459p4663465.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org