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.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
tree grid help
I trying to use treegrid, first I catch all the code in demo and put in my app, but the tree grid don`t show the childs, he only show the first time..
so now I tryng to create my ow DemoContainer just like this:
public class DemoContainer extends HierarchicalContainer implements Collapsible, Measurable {
static final String PROPERTY_NAME = "Name";
static final String PROPERTY_HOURS = "Hoursdone";
public DemoContainer() {
super.addContainerProperty("Name", String.class, "");
super.addContainerProperty("Hoursdone", String.class, "");
}
public Item addItem(TbCategoriaReceitaDespesa categoria){
Item r = super.addItem(categoria);
r.getItemProperty("Name").setValue(categoria.getNmDespesaCategoria());
r.getItemProperty("Hoursdone").setValue(categoria.getIdDespesaCategoria());
super.setChildrenAllowed(r,true);
return r;
}
public void addChildren(TbCategoriaReceitaDespesa categoria, TbCategoriaReceitaDespesa parent){
Item r = addItem(categoria);
super.setParent(categoria,parent);
}
@Override
public void setCollapsed(Object o, boolean b) {
System.out.println("entrou 1");
}
@Override
public boolean isCollapsed(Object o) {
System.out.println("entrou 2");
return true;
}
@Override
public int getDepth(Object o) {
return 0;
}
}
But in my Code I can`t add children he put below the parent and not inside.
how can I fix this?
tks
Last updated on
this is my screen when I use the hole demo in my app,
Last updated on
You cannot reply to this thread.