Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts 2.1.6: keeping information in the same div - using tree node  RSS feed

Mick Smith
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All

I am fairly new to struts. I have been trying to implement the dynamic tree example using <sx:tree> as demonstration in struts-showcase-2.1.6: Tree Example (dynamic).

I have the tree appearing fine and when I click on my nodes the corresponding dojo.bind executes fine and delivers my returned jsp page in the correct div.

However it is when I process information on the resulting jsp in that div, I get taken out of the div! I want to stay in that div and have all future information displayed there.

What do I need to do to constantly keep the executed form on that jsp page, within the div element?

Below are the relevent bits in my jsp page:{

url: "<s:url value='retrieveWBSElementDetail-"+wbsId+".action'/>",

load: function(type, data, evt) {

var divDisplay = dojo.byId("wbsDetails");



mimeType: "text/html"


<div id="tree">


<sx:div label="WBS" id="wbsDetails" loadingText="Loading..."/>

So when a node is clicked on the tree, wbsDetails div gets popuplated fine. However in the resulting page that gets rendered in the div, when I execute a submit or edit in that div, I get taken out of that page altogether & end up in a new jsp based on actions result. I need to stay in that div. The page that gets rendered in wbsDetails div is a standard jsp page with a form. The form has a submit button, whose target I have put to be wbsDetails. But as already mentioned this doesnt work. I was hoping when i submit that form, the target will take into effect and update my div.

I have also tried to used <sx:bind> on the form containing the page that is rendered in the div. however, as soon as I process something new on this page, I go out of my div and into the resulting jsp as per the struts.xml

help is very much appreciated.

Thanking you so much in advance.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!