Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

sx:tree and sx:tabbedpanel do not integrate

RajibJana

2008-09-18

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi All,

I am building a application using struts 2.1.2.

In my application, I want to have tree and by clicking a tree node, an
action will excute and attached JSP with the action will have a tabbedpanel.
( just like a standard java GUI).

I have searched the showcase examples and found out the dynamic tree example
where action is invoked by clicking the tree node. Below is the code:

------
<script language="JavaScript" type="text/javascript">
  dojo.event.topic.subscribe("treeSelected", function
treeNodeSelected(node) {
    dojo.io.bind({
       url: "<s:url
value='/tags/ui/ajax/dynamicTreeSelectAction.action'/>?nodeId="+node.node.widgetId,
       load: function(type, data, evt) {
          var divDisplay = dojo.byId("displayId");
          divDisplay.innerHTML=data;
       },
       mimeType: "text/html"
    });
  });
</script>

<sx:tree
  id="tree"
  rootNode="%{treeRootNode}"
  childCollectionProperty="children"
  nodeIdProperty="id"
  nodeTitleProperty="name"
  selectedNotifyTopics="treeSelected" >
   
</sx:tree>

<div id="displayId">
Please click on any of the tree nodes.
</div>
-----

The result jsp of dynamicTreeSelectAction displays the nodeid and nodename
in the div tag.

If I put a sx:tabbedpanel in this result jsp, then tabbedpanel does not
render at all, in stead the content of panels are shown only( not the visual
tabs).

I put the alert to see the innerhtml, it shows the correct content.

Where I went wrong?

Please help.


Regards

Rajib
Technical Architect



--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.