struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose A. Corbacho" <mcco...@gmail.com>
Subject Content DIV update strategy
Date Sat, 20 Feb 2010 02:20:25 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message