Hello,
I am trying to create a custom component container widget based on ‘https://vaadin.com/wiki/-/wiki/Main/Creating%20a%20simple%20component%20container’. And what I needed in the Widget side is to traverse through the child components, I’m overriding add(Widget w) method at client side.
public class MyComponentContainerWidget extends FlowPanel {
//This code is incomplete, but to specify my issue.
@Override
public void add(Widget widget) {
super.add(widget);
if (widget instanceof VAbstractOrderedLayout) {
VAbstractOrderedLayout abstractLayout = (VAbstractOrderedLayout) widget;
int count = abstractLayout.getWidgetCount();
}
}
}
Here I am adding a VerticalLayout with some components added to it, at server side, and when I tried to check the “count” here in the client side(aboe code), it seems to be 0 always. So I hope either this is not the right way or some bug is there. Anybody please give me an idea for this?