That  issue was fixed on 2.1 only (like must of the ajax issues). A lot of
changes and bug fixes have been made to the ajax theme (there is no more
ajax theme to start with, there is a plugin instead) for 2.1. There will be
a 2.1, we just don't know when :)

regards
musachy

On 4/30/07, Minerva CC <[EMAIL PROTECTED]> wrote:

I refered to the problem with treenode. The previous emails are included
here. I thought there would be a new release called 2.1.  When will we be
able to see 2.0.8? Does it work with new Dojo API or the problem is fixed?

Thanks,
Willa

-------------------------------

This was fixed on trunk, which will be 2.1. The problem you are having is
because Dojo changed the API, now instead of passing the id, an object is
passed, with a "node" property pointing to the widget object for the
selected node, so to get the id of that node, do something like:

dojo.even.topic.subscribe("your_topic_here", function(e){
    alert("The id is:" + e.node.widgetId);
});

musachy

On 4/16/07, Minerva CC <[EMAIL PROTECTED]> wrote:
>
> Hi Dave,
>
> Thanks for pointing out the problem. But, how can we work around before
> you guys post the fix?
>
> I tried to just put the dojo code that generated by the tree tag and
> combined with the code in the showcase and the solution posted by Manu
> Mahajan. My test.jsp looks like follows.
>
> Now,  it can fire a node selected event. However, when I tried to show
> which node has been selected by display the nodeId, I got [object
Object]
> displayed. I tried nodeId.id and it didn't work either. I am not familar
> with dojo, would you mind to tell me how can I get the id value?
>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <html>
> <head>
> <script type="text/javascript">
> </script>
> </head>
> <body>
> <link rel="stylesheet" href="/person/struts/xhtml/styles.css"
> type="text/css"/>
> <script language="JavaScript" type="text/javascript">
> // Dojo configuration
> djConfig = {
> baseRelativePath: "/person/struts/dojo",
> isDebug: false,
> bindEncoding: "UTF-8",
> debugAtAllCosts: true // not needed, but allows the Venkman debugger to
> work with the includes
> };
> </script>
> <script language="JavaScript" type="text/javascript"
> src="/person/struts/dojo/dojo.js"></script>
> <script language="JavaScript" type="text/javascript"
> src="/person/struts/simple/dojoRequire.js"></script>
> <script language="JavaScript" type="text/javascript"
> src="/person/struts/ajax/dojoRequire.js"></script>
> <script language="JavaScript" type="text/javascript"
> src="/person/struts/CommonFunctions.js"></script>
> <script language="JavaScript" type="text/javascript">
> <!--
> dojo.require("dojo.lang.*");
> dojo.require("dojo.widget.*");
> dojo.require("dojo.widget.Tree");
> // dojo.hostenv.writeIncludes();
> -->
> </script>
> <script>
> function treeNodeSelected(nodeId) {
> alert ('treenode selected: '+ nodeId);
> dojo.io.bind({
> url: "<s:url value='showtree.action' />?search_order_id="+nodeId,
> load: function(type, data, evt) {
> var displayDiv = dojo.byId("displayId");
> displayDiv.innerHTML = data;
> },
> mimeType: "text/html"
> });
> };
> dojo.event.topic.subscribe("nodeSelected", this, "treeNodeSelected");
> </script>
> <dojo:TreeSelector widgetId="treeSelector"
> eventNames="select:nodeSelected"></dojo:TreeSelector>
> <div dojoType="Tree" selector="treeSelector">
> <div dojoType="TreeNode" title="root" id="0">
> <div dojoType="TreeNode" title="node1" id="1">
> </div>
> <div dojoType="TreeNode" title="node2" id="2">
> </div>
> </div>
> </div>
>
> </body>
>
>
>
> ----- Original Message ----
> From: Dave Newton <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <user@struts.apache.org>
> Sent: Friday, April 13, 2007 4:53:15 PM
> Subject: Re: [S2] How to link Tree Node to another dynamic ajax div
>
>
> --- Minerva CC <[EMAIL PROTECTED]> wrote:
> > I followed the instruction for the tree tag and
> > created a treeview. Now, I want to select a tree
> > node and display some data in another ajax div.
>
> IIRC you need to use Dojo topics to do useful things
> with tree events. Alas, I do not think they are
> working currently as discussed in a thread a week or
> two ago (where I swore my code worked but it had
> apparently broken at least a few weeks before and I
> hadn't noticed :/
>
> For further details, search the archives for thread (I
> don't recall the subject) and look for Manu Mahajan's
> messages as he was the driver behind a potential fix.
>
> https://issues.apache.org/struts/browse/WW-1813
>
> d.
>




----- Original Message ----
From: Musachy Barroso <[EMAIL PROTECTED]>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Monday, April 30, 2007 4:51:05 PM
Subject: Re: When will Struts 2.1 be released?


You should probably use 2.0.6, as there is no date set for 2.1 (has ever
been a date?). What problems are you referring to? There is a 2.0.8release
coming up.

musachy

On 4/30/07, Minerva CC <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I plan to use Struts 2 to build a demo by the end of May. Is there any
> release date has been set? Should I wait for the new release or work
around
> with the problems that the current version has?
>
> Thanks,
> Willa
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com




--
"Hey you! Would you help me to carry the stone?" Pink Floyd

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com




--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Reply via email to