Search in sources :

Example 1 with AfterCompose

use of org.zkoss.bind.annotation.AfterCompose in project collect by openforis.

the class SchemaLayoutSimpleVM method afterCompose.

@AfterCompose
public void afterCompose(@ContextParam(ContextType.VIEW) Component view) {
    // if one root entity is defined, select it
    List<EntityDefinition> rootEntities = getRootEntities();
    if (rootEntities.size() == 1) {
        EntityDefinition mainRootEntity = rootEntities.get(0);
        performNodeTreeFilterChange(mainRootEntity, null);
    }
}
Also used : EntityDefinition(org.openforis.idm.metamodel.EntityDefinition) AfterCompose(org.zkoss.bind.annotation.AfterCompose)

Example 2 with AfterCompose

use of org.zkoss.bind.annotation.AfterCompose in project collect by openforis.

the class SchemaVM method doAfterCompose.

@AfterCompose
public void doAfterCompose(@ContextParam(ContextType.VIEW) Component view) {
    Selectors.wireComponents(view, this, false);
    Selectors.wireEventListeners(view, this);
    selectedTreeViewType = TreeViewType.ENTRY.name().toLowerCase(Locale.ENGLISH);
    // select first root entity
    List<EntityDefinition> rootEntities = getRootEntities();
    if (rootEntities.size() > 0) {
        EntityDefinition mainRootEntity = rootEntities.get(0);
        performNodeTreeFilterChange(mainRootEntity, null);
    }
}
Also used : EntityDefinition(org.openforis.idm.metamodel.EntityDefinition) AfterCompose(org.zkoss.bind.annotation.AfterCompose)

Aggregations

EntityDefinition (org.openforis.idm.metamodel.EntityDefinition)2 AfterCompose (org.zkoss.bind.annotation.AfterCompose)2