Hello Rickard,

your result so far loks really great! But now to your questions:


Dr. Flink wrote:
> 
> The tree controllers store is bound to the new controller through:
> <p><code>treeController.bind("selection[0].folders", desktopController,
> "model");</code></p>
> 
That looks like it exactly the way i thought of it. :)


Dr. Flink wrote:
> 
> To mark the items as selected in the right pane I made a new Appearence I
> named "desktopitem". Is this the correct way to go?
> 
Yes, why not. You can always apply your own appearance if you like it.
Another possibility is to overwrite the original appearance called
'listitem'.


Dr. Flink wrote:
> 
> I want the tree root content to be initially loaded into the right pane. I
> tried this, but with no result:
> <pre>
> store.addListener("loaded", function(ev) {
>     tree.getRoot().setOpen(true);
>     tree.addToSelection(tree.getRoot());
>     treeController.bind("selection[0].folders", desktopController,
> "model");
> }, this);
> </pre>
> 
Your code is doing three things at once. 
First, the opening of the root folder should work, right? You can see an
example here:
http://demo.qooxdoo.org/current/demobrowser/#data~JsonToTree.html
Second, you are selecting the root. Well, maybe thats working but your
tree's root folder is not visible so you will not see it (i guess). Perhaps
you should try to make the root node visible to see if its working. Another
tip to the selection handling. You can always use models and push them into
the selection array of the controller. That way, you dont have to bother
with any tree folder at all!
Third, you set up the binding. That's working but you don't need to put that
line into the loaded handler. The binding can handle that nicely without any
extra code. As soon as the a selection is made, the model of the list
controller will be set.


Dr. Flink wrote:
> 
> I want the user to be able to navigate through all the arrow keys, not
> just left/right. Any Ideas?
> I guess it must have something to do with:
> <pre>
> orientation :
> {
>     check : ["horizontal", "vertical"],
>     init : "horizontal",
>     apply : "_applyOrientation"
> },
> ...
> ...
> _applyOrientation : function(value, old)
> {
>     // Configure spacing
>     this._applySpacing(this.getSpacing());
> },
> </pre>
> ...I would like to use "both" ;).
> 
The orientation property is for the look of the list. Take a look at the
list demo to see how it can be used:
http://demo.qooxdoo.org/current/demobrowser/#widget~List.html
Enabling both would be some kind of 'i don't know what to do'. ;) 
But thats an interesting task because you have to subclass the list and
handle the "up" and "down" keys yourself by stepping the right amount of
list items. So you need to know how many list items are in one line to do
that job right.


Dr. Flink wrote:
> 
> And, my last question (for now). Is it possible to mark a folder as "leaf"
> in the model?
> I do not want the deepest level to be visible in the tree if it is "files"
> and not "folders".
> In other words: Automobil.se -> Subfolder 1 (leaf).
> ...but still, the content inside of subfolder 1 will be rendered in the
> desktop container (right pane).
> 
Well, we don't have such a functionality exactly as you need it. But i can
imagine that you put an extra flog into your model which holds a boolean
value if the folder should be visible or not. That flag could be bound to
visibility property of the widget, which should do this job.

Regards,
Martin
-- 
View this message in context: 
http://n2.nabble.com/Bind-tree-controller-to-a-composite-container-tp4255140p4271028.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to