Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Miller Columns Widget
Hello everyone!
I have created a Miller Columns widget for Vaadin. This Miller Columns component can be used to display hierarchical data, and on the server-side the component extends Vaadin's Tree component. A picture tells more than thousand words:
See this demo to test the component. Also source codes and Vaadin 6.2 compatible jar are available.
-Henri
This is really nice.
Quick bug report. When you are in the right edge of the screen already and navigate deeper, the widget should automatically scroll horizontally to show the selected tree node children. To correct, always when selecting, scroll as far right as possible.
Love the widget, its great!
Is there any way to remove the button scroll bar?
Thank you!
Mark
Hi,
The height calculations of the component expect that the horizontal scrollbar is always visible. So, unfortunately, it's not possible.
-Henri
Hi Henri,
I'm trying to use this component again as its very handy in certain circumstances, but I'm not understanding its behavior right now: why do I have to click on an element to make it selected? Whats the meaning of the second click? The first click opens, and the second click highlights, but I would like a single click to open and highlight, like a normal tree operates. Can you help?
Thank you,
Mark
Edit:
PS. I've noticed that this causes a problem when I want to add child elements, so I need a way to select a parent element with a single click, as it takes 2 right now to select a parent so that children can be added to the selected parent
Wow, I love this component! I noticed that it will keep track of what you have opened up as you move between branches of the tree. Is there a way to do this programmatically? Or to be able to open a branch programmatically?
Great component, thanks again!
Mark
Mark Waschkowski: Wow, I love this component! I noticed that it will keep track of what you have opened up as you move between branches of the tree. Is there a way to do this programmatically? Or to be able to open a branch programmatically?
Have you tried to say
millerColumns.expandItem(myItemId);
OK, thanks!
I've tried for hours now to update the addon so that I can have a single select behavior, but failed. I had code like this:
client.updateVariable(uidlId, "openedKeys", new String[] { item.getKey() }, false);
client.updateVariable(uidlId, "rootKey", item.getKey(), false);
client.updateVariable(uidlId, "expand",new String[] { item.getKey() }, true);
client.updateVariable(uidlId, "requestChildTree", true, false);
but nothing seems to work. :( Then I noticed there is a 'partialUpdate' section of code that does some important stuff, is there something special I need to do to activate the partial update?
Thanks,
Mark
Hi Henri,
I expect that you are very busy, but a little help would go a long way here, and I'm stuck!
Thanks,
Mark
Not sure what you are exactly trying to do. MillerColums extends Tree on the server side so that's why there is that partial update thing.
Unfortunately the component throws NullPointerException when processing data from client-side widget, when the tree is lazy-built (using expand and collapse listeners).
112 @Override
113 public void changeVariables(Object source, Map variables) {
114 super.changeVariables(source, variables);
115 if (variables.containsKey("openedKeys")) {
116 opened.clear();
117 final String[] openedKeys = (String[]) variables.get("openedKeys");
118 for (String key : openedKeys) {
119 Object itemId = itemIdMapper.get(key);
120 opened.put(getParent(itemId), itemId);
121 }
122 }
123 if (variables.containsKey("openedKey")) {
124 openedItemId = itemIdMapper
125 .get((String) variables.get("openedKey"));
126 }
127 }
The itemId in line 119 get's nulled in this case, so the next line throws the exception.
It's null because int the event processing code of the tree component, itemIdMapper gets all the mappings cleared.