[aida] Subtle bug on updating WebElements

Alex Baran aleksijb at gmail.com
Tue Apr 21 13:03:39 CEST 2009


2009/4/21 Herbert König <herbertkoenig at gmx.net>:
> 2- This bug defeats the purpose of Ajax updates as soon as WebGrid (and
>   possible user components) are involved.
> 3- The problem is located in WebForm>>registerIdFor: by using
>   elementForMethod: to set the id which may result in duplicate id's
>   for different elements.

Herbert, would it be possible for you to try some modifications on
your code? In my cases it works, but produce a lot of garbage. I just
want to know if it works in more complicated environment, and delve
into garbage problem later. Modifications is for concept testing only.

Please comment bellow lines in WebForm>>registerIdFor:
	"(anElement method notNil and: [self app session lastRequest isAjaxRequest
		and: [self isRegisteredMethod: anElement method]])
			ifTrue: [self registerIdFor: anElement instead: (self
elementForMethod: anElement method)]."

This commented lines used to make old-new components replacement. We
will provide another implementation.
Please modify method WebApplication>>respondToAjaxRequest, after line
"e := self ajaxUpdateOfOld: oldElement." add:

	oldElement id isNil ifFalse:
		[e id isNil ifTrue: [ajaxForm registerIdFor: e instead: oldElement]].

This will replace old element with new element without searching by a selector.


Alex


More information about the Aida mailing list