i would suggest including handler attribute e.g.
<script type=text/javvascript>
function handler(widget,node) {
node.innerHtml="new content goes here";
}
</script>
<sx:div id="node" href="/AjaxTest.action"
handler="hander" >
</sx:div>
i would suggest reading and studying XMLHttpRequest for an understanding of
Asynchronous Request Model as implemented by AJAX..
Saludos Cordiales,
Martin Gainty
______________________________________________
Porfavor no modifica o interrupta esta communicacion/Please dont interrupt or
modify this transmission.
> From: [email protected]
> Date: Sat, 20 Feb 2010 09:20:25 +0700
> Subject: Content DIV update strategy
> To: [email protected]
>
> Hi all,
> I would like your advise for a problem I'm facing with sx:div.
>
> I'm using JDK 1.5, Struts 2.1.6 and Firefox 3.0.18 under Ubuntu.
>
> In our application, we have a central sx:div in the Main action page where
> the content is displayed. It is declared as follows:
>
> <sx:div id="contentDiv" listenTopics="showActionContent_topic"
> executeScripts="true">
> <s:action name="ListOwnProjects" namespace="/"
> executeResult="true"/> <!-- Default action -->
> </sx:div>
>
>
> Then, the action ListOwnProjects displays as follows:
>
> <s:url id="viewOwnProject" action="ViewOwnProject" namespace="/">
> <s:param name="id" value="%{id}"/>
> </s:url>
> <sx:a href="%{viewOwnProject}" targets="contentDiv">
> <s:property value="name"/>
> </sx:a>
>
>
> This means (or so is my understanding) that the content div should be
> updated from an element inside itself. This, however, brings the whole page
> (Main) into "contentDiv" and not the content of "ViewOwnProject" action.
>
> The different JSPs are placed correctly and struts.xml associates the
> actions with the proper files (everything is ok if I call these actions
> separately).
>
> <sx:head/> is set and working in other places of the code.
>
> Any hint?
> Thanks,
>
> Jose A. Corbacho
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/201469226/direct/01/