@Control(parents={Tab.class,pl.fhframework.model.forms.GroupingComponent.class,Row.class,pl.fhframework.model.forms.Form.class,Repeater.class}, invalidParents=TableOptimized.class, canBeDesigned=true) @DocumentedComponent(category=TABLE_AND_TREE, documentationExample=true, value="TableOptimized", icon="fa fa-table") public class TableOptimized extends Repeater implements ITabular, IChangeableByClient, IEventSourceContainer, IRowNumberOffsetSupplier, Boundable, CompactLayout, IDesignerEventListener, IHasBoundableLabel
Examplecollection- table modelselected- selected rowiterator- bind variable used in ColumnOptimized componentsonRowClick- server side action executed when table row is chosen
rowList::= class Car {id, name}
<Table iterator="item" onRowClick="-" selected="{selectedElement}" collection="{rowList}">
<ColumnOptimized label="Lp" value="{item.id}"/>
<ColumnOptimized label="Name" value="{item.name}"/>
</Table>Repeater.RepeaterIterationContextComponent.ComponentAttr, Component.IGenerationUtils| Modifier and Type | Field and Description |
|---|---|
protected int |
displayedRowsCount |
protected boolean |
fixedHeader |
protected Footer |
footer |
protected boolean |
ieFocusFixEnabled |
protected static String |
LABEL_ATTR |
protected Collection |
mainCollection |
protected static String |
MULTISELECT |
protected Map<Integer,Integer> |
rowIndexMappings |
protected boolean |
rowIndexMappingsChanged |
protected boolean |
rowStylesChanged |
protected ModelBinding<Map> |
rowStylesMap |
protected Map<Integer,String> |
rowStylesMapping |
protected ModelBinding |
selectedElementBinding |
protected int[] |
selectedRowsNumbers |
protected static String |
SELECTION_CHECKBOXES |
protected List<LowLevelRowMetadata> |
tableRowMetadata |
protected boolean |
tableRowMetadataChanged |
protected List<TableRowOptimized> |
tableRows |
iterationContext, NO_OFFSET_ROW_NUMBERACCESSIBILITY, RESOLUTION_SIZEON_DROP_COMPONENT, ON_RESIZE_COMPONENT| Constructor and Description |
|---|
TableOptimized(Form form) |
addSubcomponent, getBoundCollection, getGroupingComponentForNewComponents, getIteratorInfo, getNonVisualSubcomponents, postClone, processComponentChange, remSpecial, setProcessComponentStateChangegetHeight, getHint, getHintBinding, getHintPlacement, getHintTrigger, getHintType, getHorizontalAlign, getHtmlAccessibilityRole, getInlineStyle, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleClasses, getVerticalAlign, getWidth, getWrapperStyle, isPush, refreshElementToForm, refreshView, setHeight, setHintBinding, setHintPlacement, setHintTrigger, setHintType, setHorizontalAlign, setHtmlAccessibilityRole, setInlineStyle, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPush, setStyleClasses, setVerticalAlign, setWidth, setWrapperStyle, tryParseAttributeInPixelOrPercentageUnit, tryParseAttributeInPixelUnit, tryParseAttributeInPixelUnitareModelValuesTheSame, areValuesTheSame, calculateAvailability, clone, convertBindingValueToString, convertBindingValueToString, convertValue, convertValueToString, convertValueToString, createAdHocModelBinding, equals, finalizeReading, generateId, getAccessibilityRules, getAvailability, getAvailabilityModelBinding, getAvailablityAffectingActions, getBindingContext, getEventProcessingForm, getForm, getGeneratedIdPrefix, getGenerationUtils, getGroupingParentComponent, getId, getOnDesignerToolboxDrop, getRawId, getType, hashCode, isArtificial, isGeneratedId, isInitDone, isInvisible, isStopProcessingUpdateView, onProcessingFinish, onProcessingStart, preConfigureClear, prepareEventDataArgument, refreshAvailability, resetInitDone, setArtificial, setAvailability, setAvailabilityModelBinding, setBindingContext, setGenerationUtils, setGroupingParentComponent, setId, setInvisible, setOnDesignerToolboxDrop, setOnDesignerToolboxDrop, setRawId, setStopProcessingUpdateView, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetColumnsgetOptionalFormatter, updateBinding, updateBinding, updateBindingForValue, updateBindingForValuegetLabelModelBindingmovedoActionForEveryActiveSubcomponent, doActionForEverySubcomponentgetBindedSubcomponentsgetIteratorInfos, setInteratorComponentFactorygetIteratorDefiningComponentdoActionForEveryRepeatedSubcomponent, getRepeatedComponentsisDesignActionAllowed, isDesignDeletableisModificationEventprotected static final String LABEL_ATTR
@XMLProperty @DocumentedComponentAttribute(value="Enables fixed headers when scrolling. Works only if table height is set.") @DesignerXMLProperty(functionalArea=SPECIFIC, priority=15) protected boolean fixedHeader
@XMLProperty(value="selected") @DocumentedComponentAttribute(boundable=true, value="Selected table row") @DesignerXMLProperty(functionalArea=CONTENT, priority=11, bindingOnly=true) protected ModelBinding selectedElementBinding
protected List<TableRowOptimized> tableRows
@XMLMetadataSubelement protected Footer footer
protected List<LowLevelRowMetadata> tableRowMetadata
protected boolean tableRowMetadataChanged
protected int displayedRowsCount
protected int[] selectedRowsNumbers
protected Collection mainCollection
protected boolean rowIndexMappingsChanged
@XMLProperty @DocumentedComponentAttribute(defaultValue="false", value="Enables IE inline elements focus fix. Attribute is ignored in non-IE browsers. If this attribute is set to true, spanning columns doesn\'t work.") @DesignerXMLProperty(functionalArea=SPECIFIC, priority=79) protected boolean ieFocusFixEnabled
protected static final String SELECTION_CHECKBOXES
@XMLProperty @DesignerXMLProperty(allowedTypes=java.util.Map.class, functionalArea=LOOK_AND_STYLE, priority=69) @DocumentedComponentAttribute(value="Map of colored rows in pattern like <BusinessObject, Color>", boundable=true) protected ModelBinding<Map> rowStylesMap
protected boolean rowStylesChanged
protected static final String MULTISELECT
public TableOptimized(Form form)
public int getRowNumberOffset()
getRowNumberOffset in interface IRowNumberOffsetSupplierpublic void doActionForEverySubcomponent(java.util.function.Consumer<Component> action)
doActionForEverySubcomponent in interface IGroupingComponent<Component>public void processComponents()
processComponents in interface IGroupingComponent<Component>processComponents in interface IRepeatableprocessComponents in class Repeaterprotected void calculateRowspan(ColumnOptimized column)
protected Map<?,String> extractRowStylesMapping(ModelBinding<Map> rowStylesMap)
protected Collection extractCollection(IndexedModelBinding collectionBinding, int[] parentIteratorIndices, boolean isMainLevel)
protected void createIteratorStructureRows(List<LowLevelRowMetadata> alreadyAddedRows, List<Iterator> childenIterators, Map<String,RowIteratorMetadata> parentContext, int[] parentIndices, Iterator myIterator)
protected void addLowLevelRow(List<LowLevelRowMetadata> alreadyAddedRows, Map<String,RowIteratorMetadata> context, String iterator, RowIteratorMetadata iteratorMetadata)
public void refreshView(Set<ElementChanges> changeSet)
refreshView in class Repeaterprotected ElementChanges updateView()
updateView in class Repeaterpublic ActionBinding getRowBinding(ActionBinding binding, Component clonedComponent, Map<String,String> iteratorReplacements)
public ModelBinding getRowBinding(ModelBinding binding, Component clonedComponent, Map<String,String> iteratorReplacements)
protected int[] getSelectedRowNumberBasedOnBinding(Collection collection, boolean multiselect)
public void updateModel(ValueChange valueChange)
updateModel in interface IChangeableByClientprotected List<Object> getSelectedElementsBasedOnRowsNumbers(Collection<Object> bindedObjectsList, int[] selectedRowsNumbers)
protected Collection<Object> getBindedObjectsList()
public Optional<ActionBinding> getEventHandler(InMessageEventData eventData)
getEventHandler in interface IEventSourcegetEventHandler in class Componentpublic IEventSource getEventSource(String elementId)
getEventSource in interface IEventSourceContainerpublic List<Component> getSubcomponents()
getSubcomponents in interface IGroupingComponent<Component>getSubcomponents in class Repeaterpublic boolean isComponentFactorySupported()
isComponentFactorySupported in interface IIteratorRepeatablepublic void doActionForEverySubcomponentInlcudingRepeated(java.util.function.Consumer<Component> action)
doActionForEverySubcomponentInlcudingRepeated in interface IGroupingComponent<Component>public IGroupingComponent getGroupingComponent(Component formElement)
getGroupingComponent in interface IGroupingComponent<Component>public void removeSubcomponent(Component removedFormElement)
removeSubcomponent in interface IGroupingComponent<Component>removeSubcomponent in class Repeaterpublic void onDesignerAddDefaultSubcomponent(SpacerService spacerService)
onDesignerAddDefaultSubcomponent in interface IDesignerEventListenerpublic void onDesignerBeforeAdding(IGroupingComponent<?> parent, SpacerService spacerService)
onDesignerBeforeAdding in interface IDesignerEventListenerpublic void setOnRowClick(ActionBinding onRowClick)
public IActionCallbackContext setOnRowClick(IActionCallback onRowClick)
public void setOnRowDoubleClick(ActionBinding onRowDoubleClick)
public IActionCallbackContext setOnRowDoubleClick(IActionCallback onRowDoubleClick)
public void move(Component columnComponent, int vector)
move in interface IEditableGroupingComponent<Component>public boolean isSelectionCheckboxes()
protected boolean processLabelBinding(ElementChanges elementChanges)
protected ColumnOptimized createExampleColumn(int nameSuffix)
Copyright © 2020. All rights reserved.