public class Controller<COLLECTIONTYPE extends Collection<T>,T> extends Compositor<COLLECTIONTYPE,T>
BeanCollector to show a list of beans providing their actions. the defined bean should have some
actions to change attributes in an easy way - like de- or increasing a value. The best use-case is to show a set of
buttons with pictures on a touch-screen.
Through the bean-definition of BeanDefinition.name, a special bean, holding the actions, can start a selected action
through #doAction(String).
The super class Compositor tries to build actions given by baseAttribute and targetAttribute.
The second possibility for creating actions is to set an itemProvider through setItemProvider(Increaser).| Modifier and Type | Field and Description |
|---|---|
static String |
POSTFIX_CTRLACTION |
static String |
PREFIX_CTRLACTION |
actionEnablerRule, baseAttribute, forceUserInteraction, iconAttribute, targetAttribute, targetTypeACTION_DELETE, ACTION_NEW, ACTION_OPEN, beanFinder, collection, composition, deleteAction, editAction, isStaticCollection, KEY_COMMANDHANDLER, newAction, openAction, POSTFIX_COLLECTOR, POSTFIX_QUICKSEARCH, quickSearchAction, reloadBean, resetAction, searchAction, searchStatus, selectionProvider, simpleList, workingModeactions, activationActionNames, allDefinitionsCached, attributeDefinitions, attributeFilter, crossChecker, extension, isconnected, isdefault, isNested, name, plugins, PREFIX_VIRTUAL, presentable, presentationHelper, strict, valueExpression, valueGroups| Modifier | Constructor and Description |
|---|---|
protected |
Controller()
constructor
|
|
Controller(de.tsl2.nano.bean.def.BeanDefinition<T> beanDef,
de.tsl2.nano.bean.def.BeanDefinition<T> baseType,
String baseAttribute,
String targetAttribute,
String iconAttribute)
constructor
|
|
Controller(Class<T> beanDef,
Class<T> baseType,
String baseAttribute,
String targetAttribute,
String iconAttribute) |
|
Controller(String beanName) |
|
Controller(String beanName,
String baseType,
String baseAttribute,
String targetAttribute,
String iconAttribute)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
count() |
static String |
createActionName(int row,
String id) |
static String |
createBeanDefName(Class<?> beanDef,
Class<?> baseType) |
String |
createName(Class<?> beanDef,
Class<?> baseType) |
Object |
doAction(String actionIdWithRowNumber,
Map context)
extracts the bean-instance and the action id and starts it.
|
Collection<de.tsl2.nano.action.IAction> |
getActions() |
de.tsl2.nano.bean.def.Bean<T> |
getBean(T instance) |
de.tsl2.nano.bean.def.Bean<T> |
getBean(T instance,
Collection<T> collected)
gets the defined bean (see
BeanDefinition.name for the given instance. |
Increaser |
getItemProvider() |
de.tsl2.nano.bean.def.ValueExpression<T> |
getValueExpression() |
boolean |
isCreationOnly() |
boolean |
isTransparent() |
boolean |
isVirtual() |
<B extends de.tsl2.nano.bean.def.BeanDefinition<T>> |
onActivation(Map context) |
Compositor<COLLECTIONTYPE,T> |
refreshed() |
void |
setCreationOnly(boolean creationOnly) |
Controller |
setItemProvider(Increaser itemProvider) |
void |
setPresentationValues(boolean showText,
boolean transparent,
boolean creationOnly) |
void |
setShowText(boolean showText) |
void |
setTransparent(boolean isTransparent) |
boolean |
showText() |
createBeanDefName, createCompositorActionId, createCompositorActions, createCompositorActions, getParentInstance, getTargetType, initDeserialization, setForceUserInteraction, setTargetTypeaddColumnDefinition, addMode, assignColumnValues, checkBeforeDelete, createBeanCollectorHolder, createCollector, createDeleteAction, createItem, createNewAction, createOpenAction, createResetAction, createSearchAction, deleteItem, doAutomaticSearch, editItem, fillContext, getActionByName, getBeanCollector, getBeanCollector, getBeanCollector, getBeanFinder, getColumnDefinitions, getColumnDefinitionsIndexSorted, getColumnLabels, getColumnSortingActions, getColumnText, getColumnText, getColumnText, getColumnText, getColumnValue, getColumnValue, getColumnValueEx, getComposition, getCurrentData, getFirstSelectedElement, getGroupByFor, getGroups, getOrderByColumns, getQuickSearchAction, getSearchAction, getSearchPanelActions, getSearchPanelBeans, getSelectionProvider, getSummary, getSummaryText, getType, getWorkingMode, hasFilter, hashCode, hasMode, hasSearchRequestChanged, hasSelection, init, isMultiValue, isPersistable, isReloadBean, isSaveable, isSimpleList, nextRow, onDeactivation, refresh, removeMode, replaceBean, selectFirstElement, setAttributeFilter, setBeanFinder, setColumnDefinitions, setCompositionParent, setMode, setName, setReloadBean, setSelected, setSelectionProvider, setSimpleList, shiftSortIndexes, sort, toString, toValueMap, wasActivatedaddAction, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addPlugin, addValueGroup, autoInit, clearCache, connect, connect, connect, connect, createAttributeDefinition, createInstance, define, deleteDefinition, deleteDefinition, deleteDefinitions, dump, equals, fromValueMap, fromValueMap, getAction, getActionsByClass, getActionsByClass, getActivationActionNames, getAttribute, getAttributeDefinitions, getAttributeNames, getAttributes, getBeanAttributes, getBeanDefinition, getBeanDefinition, getBeanDefinition, getBeanDefinition, getDeclaringClass, getDefinitionDirectory, getDefinitionFile, getId, getIdAttribute, getName, getNameAndPath, getNestingBean, getPlugins, getPresentable, getPresentationHelper, getValueGroups, hasAttribute, initSerialization, injectIntoRuleCovers, isConfigurable, isCreatable, isDefault, isInterface, isNested, isSelectable, isStale, loadVirtualDefinitions, loadVirtualDefinitions, refreshAttributeDefinitions, removeAttributes, removePlugin, saveBeanDefinition, saveDefinition, setActions, setActivationActionNames, setAttrDef, setColumnDefinitionOrder, setDefault, setDefaultValues, setDefaultValues, setIdAttribute, setNested, setNumberDef, setPresentable, setPresentationHelper, setValueExpression, toString, toValueMap, toValueMap, toValueMapcall, call, call, call, call, call, call, call, callMethod, callMethod, callMethod, copy, copy, copyValues, copyValues, copyValues, createBeanClass, createBeanClass, createInstance, createInstance, createInstance, fieldsOf, filterMethods, findAttributes, getAnnotation, getAnnotationValues, getAttribute, getAttribute, getAttributeNames, getAttributePath, getAttributes, getBeanClass, getBeanClass, getBeanClass, getClazz, getDefiningClass, getDefiningClass, getField, getField, getFieldNames, getFilteredAttributes, getFilteredMethods, getInterfaces, getMethods, getMethods, getMultiValueAttributes, getName, getName, getPackageName, getPath, getPath, getSimpleName, getSingleValueAttributes, getSortedAttributes, getStatic, getValue, getValue, hasConstructor, hasDefaultConstructor, hasDefaultConstructor, hasDefaultConstructor, hasField, hasStringConstructor, isAnnotationPresent, isAssignableFrom, isDefaultInstanceable, isFinal, isFinal, isInheritance, isInstanceOf, isPublicClassName, load, load, resetValues, setField, setField, setValuepublic static final String PREFIX_CTRLACTION
public static final String POSTFIX_CTRLACTION
protected Controller()
public Controller(String beanName)
public Controller(String beanName, String baseType, String baseAttribute, String targetAttribute, String iconAttribute)
beanType - workingMode - public Controller(de.tsl2.nano.bean.def.BeanDefinition<T> beanDef, de.tsl2.nano.bean.def.BeanDefinition<T> baseType, String baseAttribute, String targetAttribute, String iconAttribute)
beanType - workingMode - public String createName(Class<?> beanDef, Class<?> baseType)
createName in class Compositor<COLLECTIONTYPE extends Collection<T>,T>public de.tsl2.nano.bean.def.Bean<T> getBean(T instance, Collection<T> collected)
BeanDefinition.name for the given instance.instance - collected - (optional) to add actions only once per instancepublic Collection<de.tsl2.nano.action.IAction> getActions()
getActions in class Compositor<COLLECTIONTYPE extends Collection<T>,T>public Object doAction(String actionIdWithRowNumber, Map context)
actionIdWithRowNumber - the row-number has to be one-based!session - public boolean isVirtual()
isVirtual in class Compositor<COLLECTIONTYPE extends Collection<T>,T>public de.tsl2.nano.bean.def.ValueExpression<T> getValueExpression()
getValueExpression in class de.tsl2.nano.bean.def.BeanDefinition<T>public Compositor<COLLECTIONTYPE,T> refreshed()
refreshed in class Compositor<COLLECTIONTYPE extends Collection<T>,T>public <B extends de.tsl2.nano.bean.def.BeanDefinition<T>> B onActivation(Map context)
onActivation in class Compositor<COLLECTIONTYPE extends Collection<T>,T>public Increaser getItemProvider()
public Controller setItemProvider(Increaser itemProvider)
itemProvider - The itemProvider to set.public boolean showText()
public boolean isTransparent()
public boolean isCreationOnly()
public void setShowText(boolean showText)
public void setTransparent(boolean isTransparent)
public void setCreationOnly(boolean creationOnly)
public void setPresentationValues(boolean showText,
boolean transparent,
boolean creationOnly)
protected long count()
count in class de.tsl2.nano.bean.def.BeanCollector<COLLECTIONTYPE extends Collection<T>,T>Copyright © 2012–2020. All rights reserved.