use of com.codename1.rad.ui.EntityViewFactory in project CodeRAD by shannah.
the class DefaultEntityViewFactory method createView.
@Override
public EntityView createView(Entity entity, ViewNode node) {
ViewType type = (ViewType) node.findAttribute(ViewType.class);
if (type == null) {
type = ViewType.MULTIBUTTON;
}
EntityViewFactory f = registry.get(type);
if (f == null) {
throw new IllegalArgumentException("Factory doesn't know how to build view " + type);
}
EntityView out = f.createView(entity, node);
return makeSwipeable(entity, node, (Component) out);
}
use of com.codename1.rad.ui.EntityViewFactory in project CodeRAD by shannah.
the class TabsEntityView method createViewTab.
private EntityView createViewTab(ViewNode vn) {
EntityViewFactory factory = vn.getViewFactory(null);
if (factory == null) {
return null;
}
Entity tabEntity = null;
PropertySelector sel = vn.createPropertySelector(getEntity());
if (sel == null) {
return null;
}
tabEntity = sel.getEntity(null);
if (tabEntity == null) {
return null;
}
return factory.createView(tabEntity, vn);
}
Aggregations