views:

103

answers:

1

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.

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.

+1  A: 

Sounds like you want dijit.layout.StackContainer.

Bill Keese
What's the best way to make the stack 'buttons' stack vertically instead of horizontally?
Ryan
How about making them display:block?
Bill Keese