On 15.05.2009 10:56, panyasan wrote:
> I found the root of the problem with a little thinking. Why would a build
> version fail when the source works? The reason is, as so often, the evil
> "eval". When I eval strings containing variable names, and the build
> generator job optimizes the variable names, it will no longer work. Duh.
>
> So may I present to you the fully working cross-window synchronized
> TreeVirtual:
>
> http://m53s12.vlinux.de/cboulanger/databinding/build/
>    
Damn, your tree is working reaaly fast :(
I need to use similar tree, but(!) with more additional columns, so it's 
awfully slow, if many nodes are open.
Also, if you'll get into some lags, you could think of something that 
helps me:
             this.tree.getDataRowRenderer().setHighlightFocusRow(false);
             this.tree.setFocusCellOnMouseMove(false);
             this.tree.setShowCellFocusIndicator(false);

or add close-all-oothers-node feature, like did I:
         treeOpen: function(e)
         {
             var node = e.getData();
             this.closeAllExceptNode(this.tree, node);
             // your logic goes here;
         },
         closeAllExceptNode: function(tree, node)
         {
             if(node.parentNodeId == 0)
                 return;
             var arr = tree.getDataModel().getData();
             var parent = arr[node.parentNodeId];

             for(var i = 0; i < parent.children.length; i++)
             {
                 if(parent.children[i] != node.nodeId)
                 {
                     var child = arr[parent.children[i]];
                     if(child.bOpened)
                     {
                         child.bOpened = false;
                     }
                 }
             }
         },

> Let me repeat the instructions from my last post:
>
> 1) With the button "Open new browser window", create two windows showing the
> application. They should share the same php session (this works in FF and
> Safari, not sure about IE), which is necessary, because the php backend
> stores the shared data simply in $_SESSION. In a real use case, each
> application can sit in different browsers or on different computers, and the
> data will come from a database.
>
> 2) In both windows, turn the event transport on by clicking on the next
> button. This starts a request that is repeated each 3 seconds to transport
> events to the server and polls new events from the server.  Both
> applications register themselves with an unique UUID at the server and start
> exchanging events through the server.
>
> 3) When manipulating the tree in one window (add child, prune, rename), the
> "change" and "changeBubble" events that do the synchronization of
> synchronized trees in the application itself, are transformed into data
> structures and sent to the server and picked up by the other application,
> and the tree(s) manipulated accordingly. Of course, in a real application,
> the server would not simply forward the event, but check permissions, save
> it into database, and so on.
>
> 4) Please note that this feature does not work with the random tree
> generation since each application is sent a completely different tree - and
> therefore those trees cannot be synchronized.
>
> Setting up the server synchronization is as easy as doing
>
>      myJsonRpcStore.setUseEventTransport(true);
>
> and supplying the following service methods: register, unregister, getEvents
> (see
> https://qooxdoo-contrib.svn.sourceforge.net/svnroot/qooxdoo-contrib/trunk/qooxdoo-contrib/qcl/trunk/application/databinding/services/qcl/Databinding.php)
>
> Enjoy,
>
> Christian
>
>    


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to