开发者

How to make a scrollable, clickable list of items in Dojo?

开发者 https://www.devze.com 2022-12-12 20:19 出处:网络
I\'m totally new to Dojo (using 1.3 via Google\'s XD), and want to try to do things the \'right way\', but don\'t see an obvious dojo.layout.*Container for this.

I'm totally new to Dojo (using 1.3 via Google's XD), and want to try to do things the 'right way', but don't see an obvious dojo.layout.*Container for this.

Basically, I have a UI with a list of categories on the left, and then a list of data on the right.

So say there are 20 categories and each one has 20 items in it. I want to be able to click on a category and then display the appropriate list on the right.

开发者_如何学C

But I don't see a Container that just holds a list of ContentPanes. My gut feeling is that the layout should be:

  • BorderContainer:
    • leading: ???Container
      • 1 ContentPane per category
    • center: ???Container
      • 1 ContentPane per item in selected category.

But I have no idea what that ???Container should be.

Some options I've thought of:

  • Using a dojox.Tree for the Categories. Not ideal, since my categories aren't heirarchical, and I'd have to alter the CSS to hide the +/- and lines.

  • Using a diji.Menu for the categories. Close, but I want to highlight the selected category, and it doesn't feel like Menus are made for that.

  • Building my own _Container subclass. Seems doable, but is that really necessary?

  • Using Templated Widgets. Seems maybe the best approach I've found, but I'm unclear if that's really what I want to do.

So, any advice would be greatly appreciated.


Sounds like you want dijit.layout.StackContainer.

0

精彩评论

暂无评论...
验证码 换一张
取 消