Re: struts 2.0.9 with the dynamic tree

2007-09-17 Thread Session A Mwamufiya
Please, has anyone figured out how to make the tree selection work with struts 
2.0.9?  The showcase example, the way it stands doesn't work for 2.0.9 (it 
didn't work for 2.0.6 either, but I found a hack that involved changing the 
struts-core jar file).  I thought it was supposed to be fixed in 2.0.9.  Any 
updates on this?

Thanks,
Session


 Hi,
 
 I recently upgraded to struts 2.0.9, and now my tree viewer doesn't
 respond to node selections any more.
 
 Here's my jsp script: script function treeNodeSelected(nodeId) { 
 dojo.io.bind({ url: s:url
 value='/tags/ui/ajax/dynamicTreeSelectAction.action' /?nodeId=+nodeId, 
 load: function(type, data, evt) {}, mimeType: text/html }); };
 
 dojo.event.topic.subscribe(treeSelected, this, treeNodeSelected); 
 /script
 
 s:tree theme=ajax rootNode=%{treeRootNode} 
 childCollectionProperty=childrenNodes nodeIdProperty=id 
 nodeTitleProperty=name treeSelectedTopic=treeSelected /s:tree
 
 The action that's suppose to execute when a selection is made is
 dynamicTreeSelectAction; but it never gets called (I use logging in the
 execute() and setNodeId() methods)
 
 Has anyone gotten around this problem?
 
 
 - 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]



Re: struts 2.0.9 with the dynamic tree

2007-09-17 Thread Vo Van Thuong

Hi,
I also had the same problem, and have found the solution:
   + create a new folder named ajax under folder template (template 
has same level as WEB-INF
   and put the attached file tree.ftl in that folder 
(template\ajax\tree.ftl)
   + try this new function, in which parameter nodeId is replaced with 
message


function treeNodeSelected(message) {
   dojo.io.bind({
 url: s:url value='/tags/ui/ajax/dynamicTreeSelectAction.action' 
/?nodeId=+message.node.widgetId,

 load: function(type, data, evt) {},
 mimeType: text/html
   });
 };

Hope this would help,
Thuong


   template\ajax
- Original Message - 
From: Session A Mwamufiya [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, September 17, 2007 11:08 PM
Subject: Re: struts 2.0.9 with the dynamic tree


Please, has anyone figured out how to make the tree selection work with 
struts 2.0.9?  The showcase example, the way it stands doesn't work for 
2.0.9 (it didn't work for 2.0.6 either, but I found a hack that involved 
changing the struts-core jar file).  I thought it was supposed to be fixed 
in 2.0.9.  Any updates on this?


Thanks,
Session



Hi,

I recently upgraded to struts 2.0.9, and now my tree viewer doesn't
respond to node selections any more.

Here's my jsp script: script function treeNodeSelected(nodeId) {
dojo.io.bind({ url: s:url
value='/tags/ui/ajax/dynamicTreeSelectAction.action' /?nodeId=+nodeId,
load: function(type, data, evt) {}, mimeType: text/html }); };

dojo.event.topic.subscribe(treeSelected, this, treeNodeSelected);
/script

s:tree theme=ajax rootNode=%{treeRootNode}
childCollectionProperty=childrenNodes nodeIdProperty=id
nodeTitleProperty=name treeSelectedTopic=treeSelected /s:tree

The action that's suppose to execute when a selection is made is
dynamicTreeSelectAction; but it never gets called (I use logging in the
execute() and setNodeId() methods)

Has anyone gotten around this problem?


- 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]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]