Hi Michael,

I guess Martin is the right one to answer you about object handling of qooxdoo. 
But I would advise you to handle such a use case differently.

First of all finding the right tree item by model is a public API of the 
virtual tree [1].
But your problem should be solved one step before. If you want to identify an 
model item, I would advise you to collect all model items also in an Array. 
That means your tree structure will not be changed but parallel you can just 
push a created model item to a flat array. So search on this array is very 
easy. Than just use the API I told before and you will get what you expected.

Sure such a redesign of your model architecture is a big step for one use case, 
but in my opinion its always a good idea to search, manipulate, merge and 
update on a dedicated model layer.

[1] 
http://demo.qooxdoo.org/current/apiviewer/#qx.ui.tree.VirtualTree~openNodeAndParents!method_public


Gruß
Mustafa Sak

Applications & Integration

1&1 Internet AG
Ernst-Frey-Straße 10
DE-76135 Karlsruhe


-----Ursprüngliche Nachricht-----
Von: Michael Elsdörfer [mailto:[email protected]] 
Gesendet: Mittwoch, 7. August 2013 15:43
An: qooxdoo Development
Betreff: [qooxdoo-devel] The Object Idendity issue

I take it this has been discussed before a number of times, e.g.

http://qooxdoo.678.n2.nabble.com/Adding-quot-modelPath-quot-property-to-qx-data-controller-List-td6648554.html

So I construct a tree using databinding. I then have a server-side search 
function that returns objects or object ids of the type used by the tree model. 
I want to select one of the objects indicated by the server in the tree.

What Qooxdoo would have me do now is iterate over the tree, recursively, in 
order to find the correct instance to add to the selection.

I could also manually keep a hash of ids => instances, and maintain that hash 
whenever new objects are created/deleted.

Quite possible to do, of course. But no fun whatsoever. Shouldn't Qooxdoo 
desire to make this use case, and related ones discussed in the link above, 
easier for the developer?

Michael

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to