Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FormView

For form widgets.

Hierarchy

Implements

Index

Properties

Protected _config

Protected _eventBus

_eventBus: EventBus = new EventBus(this)

Protected _model

_model: Model

Protected _widgets

_widgets: JsonObject<IWidget>

Static WIDGET_ATTRIBUTE

WIDGET_ATTRIBUTE: string = "js-wgt"

Methods

Protected _fire

Protected _newWidget

Protected _render

  • _render(): void

addWidget

clear

  • clear(): this
  • Clear all widgets.

    Returns this

config

destroy

  • destroy(): void

destroyWidget

  • destroyWidget(id: string): View

eachWidget

  • eachWidget(fn: (w: IWidget) => void): void

getModel

getWidget

  • getWidget<W>(id: string): W

getWidgets

iniValues

  • Read ini-values of all widgets or Write ini-values of designative widgets.

    Returns JsonObject<any>

  • Parameters

    • values: JsonObject<any>
    • Optional render: boolean

    Returns this

initialize

  • initialize(): void

off

  • off(type?: string): void
  • Parameters

    • Optional type: string

    Returns void

on

removeWidget

  • removeWidget(id: string): View

render

  • render(): void

reset

  • reset(): this
  • 重置每个IWidget的值

    Returns this

validate

  • validate(id?: string): boolean
  • True when all widgets are right.

    Parameters

    • Optional id: string

    Returns boolean

values

  • Read values of all widgets or Write values of designative widgets.

    Returns JsonObject

  • Parameters

    • values: any

    Returns this