Search in sources :

Example 6 with PropertySelector

use of com.codename1.rad.models.PropertySelector in project CodeRAD by shannah.

the class ImageContainer method createToStorage.

public static ImageContainer createToStorage(Entity entity, Property property, String storageFile) {
    ImageContainer out = new ImageContainer();
    out.storageFile = storageFile;
    out.useStorage = true;
    out.property = new PropertySelector(entity, property);
    return out;
}
Also used : PropertySelector(com.codename1.rad.models.PropertySelector)

Example 7 with PropertySelector

use of com.codename1.rad.models.PropertySelector in project CodeRAD by shannah.

the class TabsEntityView method createListTab.

private EntityView createListTab(ListNode ln) {
    PropertySelector selector = ln.createPropertySelector(getEntity());
    if (selector == null) {
        return null;
    }
    EntityList tabEntity = selector.getEntityList(null);
    if (tabEntity == null) {
        return null;
    }
    ln.setAttributesIfNotExists(UI.param(SCROLLABLE_Y, true));
    return new EntityListView(tabEntity, ln);
}
Also used : PropertySelector(com.codename1.rad.models.PropertySelector) EntityList(com.codename1.rad.models.EntityList)

Example 8 with PropertySelector

use of com.codename1.rad.models.PropertySelector 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);
}
Also used : EntityViewFactory(com.codename1.rad.ui.EntityViewFactory) Entity(com.codename1.rad.models.Entity) PropertySelector(com.codename1.rad.models.PropertySelector)

Aggregations

PropertySelector (com.codename1.rad.models.PropertySelector)6 PropertySelectorAttribute (com.codename1.rad.attributes.PropertySelectorAttribute)2 ResultParser (com.codename1.rad.io.ResultParser)1 Bindable (com.codename1.rad.models.Bindable)1 Entity (com.codename1.rad.models.Entity)1 EntityList (com.codename1.rad.models.EntityList)1 Property (com.codename1.rad.models.Property)1 PropertyChangeEvent (com.codename1.rad.models.PropertyChangeEvent)1 Tags (com.codename1.rad.models.Tags)1 EntityViewFactory (com.codename1.rad.ui.EntityViewFactory)1 Component (com.codename1.ui.Component)1 ActionListener (com.codename1.ui.events.ActionListener)1 FocusListener (com.codename1.ui.events.FocusListener)1