src/lib/components/bound-field/bound-field.component.ts
Angular Component for the BoundField Control.
changeDetection | ChangeDetectionStrategy.OnPush |
providers |
{ provide: DataControlFieldComponent, useExisting: BoundFieldComponent }
|
selector | wm-bound-field |
styleUrls | ./bound-field.component.scss |
templateUrl | ./bound-field.component.html |
Properties |
|
Methods |
Inputs |
Accessors |
constructor(refChange: ChangeDetectorRef, render2: Renderer2, elem: ElementRef, webComponents: WebComponentsService, bringTopServ1: BringTopService)
|
||||||||||||||||||
Creates an instance of BoundFieldComponent.
Parameters :
|
dataField | |
Type : string
|
|
Gets/sets the dataField property. |
dataFormatString | |
Type : string
|
|
Gets/sets the dataFormat property. |
headerText | |
Type : string
|
|
Inherited from
DataControlFieldComponent
|
|
Defined in
DataControlFieldComponent:94
|
|
Gets/sets the headerText property. |
sortExpression | |
Type : string
|
|
Inherited from
DataControlFieldComponent
|
|
Defined in
DataControlFieldComponent:108
|
|
Gets/sets the sortExpression property. |
visible | |
Type : boolean
|
|
Inherited from
DataControlFieldComponent
|
|
Defined in
DataControlFieldComponent:144
|
|
Gets/sets the visible property. |
isBindedEvent | ||||||
isBindedEvent(event: string)
|
||||||
Inherited from
DataControlFieldComponent
|
||||||
Defined in
DataControlFieldComponent:170
|
||||||
Override the isBindedEvent to get the event from the Field model
Parameters :
Returns :
boolean
{boolean} |
Private dataFieldInternal |
Type : string
|
Default value : ''
|
Property to save the dataField value. |
Private dataFormatStringInternal |
Type : string
|
Default value : ''
|
Property to save the dataFormatString value. |
Private headerTextInternal |
Type : string
|
Default value : ''
|
Inherited from
DataControlFieldComponent
|
Defined in
DataControlFieldComponent:50
|
Property to save the headerText value. |
Private sortExpressionInternal |
Type : string
|
Default value : ''
|
Inherited from
DataControlFieldComponent
|
Defined in
DataControlFieldComponent:58
|
Property to save the sortExpression value. |
Private visibleInternal |
Default value : true
|
Inherited from
DataControlFieldComponent
|
Defined in
DataControlFieldComponent:66
|
Property to save the visible value. |
dataField | ||||||
getdataField()
|
||||||
setdataField(value: string)
|
||||||
Gets/sets the dataField property.
Parameters :
Returns :
void
|
dataFormatString | ||||||
getdataFormatString()
|
||||||
setdataFormatString(value: string)
|
||||||
Gets/sets the dataFormat property.
Parameters :
Returns :
void
|
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ElementRef,
Input,
Optional,
Renderer2
} from '@angular/core';
import { dataTransfer, BringTopService } from '@mobilize/base-components';
import { ErrorCodes, ExceptionHandlerClass } from '@mobilize/webmap-core';
import { WebComponentsService } from '@mobilize/winforms-components';
import { DataControlFieldComponent } from '../data-control-field/data-control-field.component';
/**
* Angular Component for the BoundField Control.
*
* @export
* @class BoundFieldComponent
* @extends {ControlComponent}
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'wm-bound-field',
templateUrl: './bound-field.component.html',
styleUrls: ['./bound-field.component.scss'],
providers: [
{ provide: DataControlFieldComponent, useExisting: BoundFieldComponent }
],
inputs: ['model']
})
@dataTransfer(['bndfld'])
@ExceptionHandlerClass(ErrorCodes.Winforms)
export class BoundFieldComponent extends DataControlFieldComponent {
/**
* Property to save the dataField value.
*
* @private
* @memberof BoundFieldComponent
*/
private dataFieldInternal = '';
/**
* Property to save the dataFormatString value.
*
* @private
* @memberof BoundFieldComponent
*/
private dataFormatStringInternal = '';
/**
* Creates an instance of BoundFieldComponent.
*
* @param {ChangeDetectorRef} refChange
* @param {Renderer2} render2
* @param {ElementRef} elem
* @param {WebComponentsService} webComponents
* @param {BringTopService} bringTopServ1
* @memberof BoundFieldComponent
*/
constructor(
private refChange: ChangeDetectorRef,
private render2: Renderer2,
private elem: ElementRef,
webComponents: WebComponentsService,
@Optional() private bringTopServ1: BringTopService
) {
super(refChange, render2, elem, webComponents, bringTopServ1);
}
/**
* Gets/sets the dataField property.
*
* @memberof BoundFieldComponent
*/
@Input()
set dataField(value: string) {
this.dataFieldInternal = value;
}
get dataField(): string {
return this.model?.DataField ?? this.dataFieldInternal;
}
/**
* Gets/sets the dataFormat property.
*
* @memberof BoundFieldComponent
*/
@Input()
set dataFormatString(value: string) {
this.dataFormatStringInternal = value;
}
get dataFormatString(): string {
return this.model?.DataFormatString ?? this.dataFormatStringInternal;
}
}
<div></div>
./bound-field.component.scss