This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sx tags's listenTopics gets called many many times!

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