File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes sx tags's listenTopics gets called many many times! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "sx tags Watch "sx tags New topic
Author

sx tags's listenTopics gets called many many times!

Yar lag
Greenhorn

Joined: Apr 14, 2009
Posts: 10
Hello,

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

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

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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sx tags's listenTopics gets called many many times!
 
Similar Threads
Autocompleter - NoSuchMethodException
Struts2 - linked autocompleter problem
Struts 2 autocompleter
Autocompleter with ajax theme
Autocompleter