@Component(value="cuba_DynamicAttributesGuiTools")
public class DynamicAttributesGuiTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DataManager |
dataManager |
protected DynamicAttributes |
dynamicAttributes |
protected Metadata |
metadata |
static java.lang.String |
NAME |
protected ReferenceToEntitySupport |
referenceToEntitySupport |
protected WindowConfig |
windowConfig |
Constructor and Description |
---|
DynamicAttributesGuiTools() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
attributeShouldBeShownOnTheScreen(java.lang.String screen,
java.lang.String component,
CategoryAttribute attribute) |
protected java.util.Set<java.lang.Class> |
collectEntityClasses(View view,
java.util.Set<View> visited) |
protected java.util.Set<java.lang.Class> |
collectEntityClassesWithDynamicAttributes(View view) |
PickerField.LookupAction |
createLookupAction(PickerField pickerField,
java.lang.String joinClause,
java.lang.String whereClause)
Creates the lookup action that will open the lookup screen with the dynamic filter applied.
|
CollectionDatasource |
createOptionsDatasourceForLookup(com.haulmont.chile.core.model.MetaClass metaClass,
java.lang.String joinClause,
java.lang.String whereClause)
Creates the collection datasource that is used for selecting the dynamic attribute value.
|
java.util.Set<CategoryAttribute> |
getAttributesToShowOnTheScreen(com.haulmont.chile.core.model.MetaClass metaClass,
java.lang.String screen,
java.lang.String component)
Get attributes which should be added automatically to the screen and component.
|
void |
initDefaultAttributeValues(BaseGenericIdEntity item,
com.haulmont.chile.core.model.MetaClass metaClass) |
void |
initEntityPickerField(PickerField pickerField,
CategoryAttribute categoryAttribute)
Initializes the pickerField for selecting the dynamic attribute value.
|
void |
listenCategoryChanges(Datasource ds) |
void |
listenDynamicAttributesChanges(Datasource datasource)
Enforce the datasource to change modified status if dynamic attribute is changed
|
void |
reloadDynamicAttributes(BaseGenericIdEntity entity)
Reload dynamic attributes on the entity
|
boolean |
screenContainsDynamicAttributes(View mainDatasourceView,
java.lang.String screenId)
Method checks whether any class in the view hierarchy contains dynamic attributes that must be displayed on
the current screen
|
public static final java.lang.String NAME
@Inject protected DynamicAttributes dynamicAttributes
@Inject protected WindowConfig windowConfig
@Inject protected Metadata metadata
@Inject protected ReferenceToEntitySupport referenceToEntitySupport
@Inject protected DataManager dataManager
public void listenDynamicAttributesChanges(Datasource datasource)
public java.util.Set<CategoryAttribute> getAttributesToShowOnTheScreen(com.haulmont.chile.core.model.MetaClass metaClass, java.lang.String screen, @Nullable java.lang.String component)
public boolean screenContainsDynamicAttributes(View mainDatasourceView, java.lang.String screenId)
protected java.util.Set<java.lang.Class> collectEntityClassesWithDynamicAttributes(@Nullable View view)
protected java.util.Set<java.lang.Class> collectEntityClasses(View view, java.util.Set<View> visited)
public void initDefaultAttributeValues(BaseGenericIdEntity item, com.haulmont.chile.core.model.MetaClass metaClass)
public void listenCategoryChanges(Datasource ds)
protected boolean attributeShouldBeShownOnTheScreen(java.lang.String screen, java.lang.String component, CategoryAttribute attribute)
public void initEntityPickerField(PickerField pickerField, CategoryAttribute categoryAttribute)
pickerField
- PickerField component whose lookup action must be initializedcategoryAttribute
- CategoryAttribute that is represented by the pickerFieldpublic CollectionDatasource createOptionsDatasourceForLookup(com.haulmont.chile.core.model.MetaClass metaClass, java.lang.String joinClause, java.lang.String whereClause)
public PickerField.LookupAction createLookupAction(PickerField pickerField, java.lang.String joinClause, java.lang.String whereClause)
public void reloadDynamicAttributes(BaseGenericIdEntity entity)