// Test visibility
if(itemUIRegistry.getVisiblity(widget) == false)
return null;
WidgetBean bean = new WidgetBean();
if(widget.getItem()!=null) {
Item item = ItemResource.getItem(widget.getItem());
if(item!=null) {
bean.item = ItemResource.createItemBean(item, false, UriBuilder.fromUri(uri).build().toASCIIString());
}
}
bean.widgetId = widgetId;
bean.icon = itemUIRegistry.getIcon(widget);
bean.labelcolor = itemUIRegistry.getLabelColor(widget);
bean.valuecolor = itemUIRegistry.getValueColor(widget);
bean.label = itemUIRegistry.getLabel(widget);
bean.type = widget.eClass().getName();
if (widget instanceof LinkableWidget) {
LinkableWidget linkableWidget = (LinkableWidget) widget;
EList<Widget> children = itemUIRegistry.getChildren(linkableWidget);
if(widget instanceof Frame) {
int cntWidget=0;
for(Widget child : children) {
widgetId += "_" + cntWidget;
WidgetBean subWidget = createWidgetBean(sitemapName, child, drillDown, uri, widgetId);
if(subWidget != null) {
bean.widgets.add(subWidget);
cntWidget++;
}
}