@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,
value="TableOptimized",
icon="fa fa-table")
public class TableOptimized
extends Repeater
implements pl.fhframework.model.forms.ITabular, pl.fhframework.model.forms.IChangeableByClient, pl.fhframework.events.IEventSourceContainer, pl.fhframework.binding.IRowNumberOffsetSupplier, pl.fhframework.model.forms.Boundable, pl.fhframework.model.forms.CompactLayout, pl.fhframework.model.forms.designer.IDesignerEventListener, pl.fhframework.core.forms.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.RepeaterIterationContext| 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 pl.fhframework.binding.ModelBinding<Map> |
rowStylesMap |
protected Map<Integer,String> |
rowStylesMapping |
protected pl.fhframework.binding.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_NUMBER| Constructor and Description |
|---|
TableOptimized(pl.fhframework.model.forms.Form form) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLowLevelRow(List<LowLevelRowMetadata> alreadyAddedRows,
Map<String,RowIteratorMetadata> context,
String iterator,
RowIteratorMetadata iteratorMetadata) |
protected void |
calculateRowspan(ColumnOptimized column) |
protected ColumnOptimized |
createExampleColumn(int nameSuffix) |
protected void |
createIteratorStructureRows(List<LowLevelRowMetadata> alreadyAddedRows,
List<Iterator> childenIterators,
Map<String,RowIteratorMetadata> parentContext,
int[] parentIndices,
Iterator myIterator) |
void |
doActionForEverySubcomponent(java.util.function.Consumer<pl.fhframework.model.forms.Component> action) |
void |
doActionForEverySubcomponentInlcudingRepeated(java.util.function.Consumer<pl.fhframework.model.forms.Component> action) |
protected Collection |
extractCollection(pl.fhframework.binding.IndexedModelBinding collectionBinding,
int[] parentIteratorIndices,
boolean isMainLevel) |
protected Map<?,String> |
extractRowStylesMapping(pl.fhframework.binding.ModelBinding<Map> rowStylesMap) |
List<Iterator> |
getAllIterators() |
protected Collection<Object> |
getBindedObjectsList() |
Optional<pl.fhframework.binding.ActionBinding> |
getEventHandler(pl.fhframework.model.dto.InMessageEventData eventData) |
pl.fhframework.events.IEventSource |
getEventSource(String elementId) |
pl.fhframework.model.forms.IGroupingComponent |
getGroupingComponent(pl.fhframework.model.forms.Component formElement) |
pl.fhframework.binding.ActionBinding |
getRowBinding(pl.fhframework.binding.ActionBinding binding,
pl.fhframework.model.forms.Component clonedComponent,
Map<String,String> iteratorReplacements) |
pl.fhframework.binding.ModelBinding |
getRowBinding(pl.fhframework.binding.ModelBinding binding,
pl.fhframework.model.forms.Component clonedComponent,
Map<String,String> iteratorReplacements) |
int |
getRowNumberOffset() |
protected List<Object> |
getSelectedElementsBasedOnRowsNumbers(Collection<Object> bindedObjectsList,
int[] selectedRowsNumbers) |
protected int[] |
getSelectedRowNumberBasedOnBinding(Collection collection,
boolean multiselect) |
List<pl.fhframework.model.forms.Component> |
getSubcomponents() |
void |
init() |
boolean |
isComponentFactorySupported() |
boolean |
isSelectionCheckboxes() |
void |
move(pl.fhframework.model.forms.Component columnComponent,
int vector) |
void |
onDesignerAddDefaultSubcomponent(pl.fhframework.model.forms.SpacerService spacerService) |
void |
onDesignerBeforeAdding(pl.fhframework.model.forms.IGroupingComponent<?> parent,
pl.fhframework.model.forms.SpacerService spacerService) |
void |
processComponents() |
protected boolean |
processLabelBinding(pl.fhframework.model.dto.ElementChanges elementChanges) |
void |
refreshView(Set<pl.fhframework.model.dto.ElementChanges> changeSet) |
void |
removeSubcomponent(pl.fhframework.model.forms.Component removedFormElement) |
void |
setOnRowClick(pl.fhframework.binding.ActionBinding onRowClick) |
pl.fhframework.binding.IActionCallbackContext |
setOnRowClick(pl.fhframework.binding.IActionCallback onRowClick) |
void |
setOnRowDoubleClick(pl.fhframework.binding.ActionBinding onRowDoubleClick) |
pl.fhframework.binding.IActionCallbackContext |
setOnRowDoubleClick(pl.fhframework.binding.IActionCallback onRowDoubleClick) |
void |
updateModel(pl.fhframework.model.dto.ValueChange valueChange) |
protected pl.fhframework.model.dto.ElementChanges |
updateView() |
addSubcomponent, getBoundCollection, getGroupingComponentForNewComponents, getIteratorInfo, getNonVisualSubcomponents, postClone, processComponentChange, remSpecial, setProcessComponentStateChangegetHeight, getHint, getHintBinding, getHintPlacement, getHintTrigger, getHorizontalAlign, getInlineStyle, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleClasses, getVerticalAlign, getWidth, getWrapperStyle, isPush, refreshElementToForm, refreshView, setHeight, setHintBinding, setHintPlacement, setHintTrigger, setHorizontalAlign, 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, getGroupingParentComponent, getId, getOnDesignerToolboxDrop, getRawId, getType, hashCode, isArtificial, isGeneratedId, isInitDone, isInvisible, isStopProcessingUpdateView, onProcessingFinish, onProcessingStart, preConfigureClear, prepareEventDataArgument, refreshAvailability, resetInitDone, setArtificial, setAvailability, setAvailabilityModelBinding, setBindingContext, setGroupingParentComponent, setId, setInvisible, setOnDesignerToolboxDrop, setOnDesignerToolboxDrop, setRawId, setStopProcessingUpdateView, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetOptionalFormatter, updateBinding, updateBinding, updateBindingForValue, updateBindingForValuedoActionForEveryActiveSubcomponent, doActionForEverySubcomponentgetIteratorInfos, setInteratorComponentFactorygetIteratorDefiningComponentdoActionForEveryRepeatedSubcomponent, getRepeatedComponentsprotected 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 pl.fhframework.binding.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 pl.fhframework.binding.ModelBinding<Map> rowStylesMap
protected boolean rowStylesChanged
protected static final String MULTISELECT
public int getRowNumberOffset()
getRowNumberOffset in interface pl.fhframework.binding.IRowNumberOffsetSupplierpublic void doActionForEverySubcomponent(java.util.function.Consumer<pl.fhframework.model.forms.Component> action)
doActionForEverySubcomponent in interface pl.fhframework.model.forms.IGroupingComponent<pl.fhframework.model.forms.Component>public void processComponents()
processComponents in interface pl.fhframework.model.forms.IGroupingComponent<pl.fhframework.model.forms.Component>processComponents in interface pl.fhframework.model.forms.IRepeatableprocessComponents in class Repeaterprotected void calculateRowspan(ColumnOptimized column)
protected Map<?,String> extractRowStylesMapping(pl.fhframework.binding.ModelBinding<Map> rowStylesMap)
protected Collection extractCollection(pl.fhframework.binding.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<pl.fhframework.model.dto.ElementChanges> changeSet)
refreshView in class Repeaterprotected pl.fhframework.model.dto.ElementChanges updateView()
updateView in class Repeaterpublic pl.fhframework.binding.ActionBinding getRowBinding(pl.fhframework.binding.ActionBinding binding,
pl.fhframework.model.forms.Component clonedComponent,
Map<String,String> iteratorReplacements)
public pl.fhframework.binding.ModelBinding getRowBinding(pl.fhframework.binding.ModelBinding binding,
pl.fhframework.model.forms.Component clonedComponent,
Map<String,String> iteratorReplacements)
protected int[] getSelectedRowNumberBasedOnBinding(Collection collection, boolean multiselect)
public void updateModel(pl.fhframework.model.dto.ValueChange valueChange)
updateModel in interface pl.fhframework.model.forms.IChangeableByClientprotected List<Object> getSelectedElementsBasedOnRowsNumbers(Collection<Object> bindedObjectsList, int[] selectedRowsNumbers)
protected Collection<Object> getBindedObjectsList()
public Optional<pl.fhframework.binding.ActionBinding> getEventHandler(pl.fhframework.model.dto.InMessageEventData eventData)
getEventHandler in interface pl.fhframework.events.IEventSourcegetEventHandler in class pl.fhframework.model.forms.Componentpublic pl.fhframework.events.IEventSource getEventSource(String elementId)
getEventSource in interface pl.fhframework.events.IEventSourceContainerpublic List<pl.fhframework.model.forms.Component> getSubcomponents()
getSubcomponents in interface pl.fhframework.model.forms.IGroupingComponent<pl.fhframework.model.forms.Component>getSubcomponents in class Repeaterpublic boolean isComponentFactorySupported()
isComponentFactorySupported in interface pl.fhframework.core.forms.iterators.IIteratorRepeatablepublic void doActionForEverySubcomponentInlcudingRepeated(java.util.function.Consumer<pl.fhframework.model.forms.Component> action)
doActionForEverySubcomponentInlcudingRepeated in interface pl.fhframework.model.forms.IGroupingComponent<pl.fhframework.model.forms.Component>public pl.fhframework.model.forms.IGroupingComponent getGroupingComponent(pl.fhframework.model.forms.Component formElement)
getGroupingComponent in interface pl.fhframework.model.forms.IGroupingComponent<pl.fhframework.model.forms.Component>public void removeSubcomponent(pl.fhframework.model.forms.Component removedFormElement)
removeSubcomponent in interface pl.fhframework.model.forms.IGroupingComponent<pl.fhframework.model.forms.Component>removeSubcomponent in class Repeaterpublic void onDesignerAddDefaultSubcomponent(pl.fhframework.model.forms.SpacerService spacerService)
onDesignerAddDefaultSubcomponent in interface pl.fhframework.model.forms.designer.IDesignerEventListenerpublic void onDesignerBeforeAdding(pl.fhframework.model.forms.IGroupingComponent<?> parent,
pl.fhframework.model.forms.SpacerService spacerService)
onDesignerBeforeAdding in interface pl.fhframework.model.forms.designer.IDesignerEventListenerpublic void setOnRowClick(pl.fhframework.binding.ActionBinding onRowClick)
public pl.fhframework.binding.IActionCallbackContext setOnRowClick(pl.fhframework.binding.IActionCallback onRowClick)
public void setOnRowDoubleClick(pl.fhframework.binding.ActionBinding onRowDoubleClick)
public pl.fhframework.binding.IActionCallbackContext setOnRowDoubleClick(pl.fhframework.binding.IActionCallback onRowDoubleClick)
public void move(pl.fhframework.model.forms.Component columnComponent,
int vector)
move in interface pl.fhframework.model.forms.IEditableGroupingComponent<pl.fhframework.model.forms.Component>public boolean isSelectionCheckboxes()
protected boolean processLabelBinding(pl.fhframework.model.dto.ElementChanges elementChanges)
protected ColumnOptimized createExampleColumn(int nameSuffix)
Copyright © 2019. All rights reserved.