File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts 2 AJAX tag questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 AJAX tag questions" Watch "Struts 2 AJAX tag questions" New topic

Struts 2 AJAX tag questions

Haitao Lok

Joined: May 05, 2008
Posts: 8

I am learning how to use AJAX-enabled tags in Struts 2. Here is a code snippet:

1: <div style="text-align: right;">
2: <s:a theme="ajax" notifyTopics="/refresh">Refresh</s:a>
3: </div>
4: <s iv id="persons" theme="ajax" href="%{descrsUrl}"
5: loadingText="Loading..." indicator="indicator1"
6: listenTopics="/refresh"/>

Here are my questions:
1. I didn't see the 'refresh' topic declared anywhere in the file. Is it something that the <s:a> tag understands what to do with? And what exactly does line 2 mean?
2. What do lines 4 through 6 do here? I think I understand the id, theme, href, loadText and indicator attributes here.

Thanks in advance.

Guang Ji

Joined: Oct 06, 2008
Posts: 1
I have the same question.
I agree. Here's the link:
subject: Struts 2 AJAX tag questions
jQuery in Action, 3rd edition