Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

sx tags's listenTopics gets called many many times!  RSS feed

Yar lag
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a simple situation where inside a div, it has the following items:

<sx:autocompleter valueNotifyTopics="change" />
<sx:submit targets="windowframe" listenTopics="change" indicator="loader" cssStyle="display:none" />

The idea, is that when you select something in the autocompleter, it submits the form to somewhere.

Now everything works, it does submit. But the problem is, this div is loaded using <sx:div>'s ajax. That means this div can be loaded into the current document multiple times. And I find each time this div is loaded, the listenTopics get added once. So if I fire the ajax div 5 times, the form will be submitted 5 times when I choose something in the autocompleter! Any ideas how to fix this? Please help! Thank you!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!