@Control(parents={Tab.class,pl.fhframework.model.forms.GroupingComponent.class,Row.class,pl.fhframework.model.forms.Form.class,Repeater.class}, invalidParents=Table.class, canBeDesigned=true) @DocumentedComponent(category=TABLE_AND_TREE, value="Table that allows to arrange data like text, images, links, other tables, etc. into rows and columns of cells.", icon="fa fa-table") public class Table extends Repeater implements ITabular, IChangeableByClient, IEventSourceContainer, IRowNumberOffsetSupplier, Boundable, CompactLayout, IDesignerEventListener, IHasBoundableLabel
Examplecollection- table modelselected- selected rowiterator- bind variable used in Column componentsonRowClick- server side action executed when table row is chosen
rowList::= class Car {id, name}
<Table iterator="item" onRowClick="-" selected="{selectedElement}" collection="{rowList}">
<Column label="Lp" value="{item.id}"/>
<Column label="Name" value="{item.name}"/>
</Table>Repeater.RepeaterIterationContextComponent.ComponentAttr, Component.IGenerationUtils| Modifier and Type | Field and Description |
|---|---|
protected int |
displayedRowsCount |
protected Footer |
footer |
protected boolean |
ieFocusFixEnabled |
protected static String |
LABEL_ATTR |
protected Collection |
mainCollection |
protected static String |
MULTISELECT |
protected int[] |
selectedRowsNumbers |
protected static String |
SELECTION_CHECKBOXES |
protected List<LowLevelRowMetadata> |
tableRowMetadata |
protected boolean |
tableRowMetadataChanged |
protected List<TableRow> |
tableRows |
iterationContext, NO_OFFSET_ROW_NUMBERACCESSIBILITY, RESOLUTION_SIZEON_DROP_COMPONENT, ON_RESIZE_COMPONENTaddSubcomponent, 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
@XMLMetadataSubelement protected Footer footer
protected List<LowLevelRowMetadata> tableRowMetadata
protected boolean tableRowMetadataChanged
protected int displayedRowsCount
protected int[] selectedRowsNumbers
protected Collection mainCollection
@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
protected static final String MULTISELECT
public Table(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 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 Repeaterpublic 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 Column createExampleColumn(int nameSuffix)
Copyright © 2020. All rights reserved.