What version are you using? using head svn , I modified showcase's
remote link first example to this:
<s:a
theme="ajax"
href="%{ajaxTest}"
indicator="indicator"
targets="t1,t2" notifyTopics="/after"
preInvokeJS="alert('test')">Update 'Div 1' and 'Div 2', publish topic
'/after', use indicator</s:a>
and it shows "test". "preInvokeJS" is deprecated. If you are using head
svn, use "notifyTopics" instead. See showcase for examples, or this link:
http://struts.apache.org/2.x/docs/ajax-tags.html
regards
musachy
Célio Cidral Junior wrote:
Hi,
The preInvokeJS attribute does not work for the <a> tag as described
in the example from <http://struts.apache.org/2.x/docs/a.html>. That
feature seems to be originated from the issue
<http://issues.apache.org/struts/browse/WW-912>. Below is a snippet of
my source JSP code.
<s:a href="%{delete}"
preInvokeJS="confirm('%{getText('confirm-delete')}')">
<s:text name="record.delete"/>
</s:a>
The anchor works properly, except that it does not call the confirm()
method. The generated HTML gives me this code:
<a href="/sed/listUsers!delete.do?id=1">Deletar</a>
And there's no occurrence of the word "confirm" in the whole HTML code
nor there's any reference to an external JS file.
I presume I'm not missing anything. Any guess whether this feature is
actually working or not?
Célio.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]