You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

PRIM_DLG - ClearErrors Method
Clears errors of fields in the dialog
Member of PRIM_DLG (PRIM_DLG)

Details


ClearErrors method will set all fields HasError property to false within the Dialog.

Example


This example shows all fields having errors set using the Validation method.
Pressing the clear errors button will set the HasError property false for all fields and change their theme from error.
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME) Layoutmanager(#LayoutPage)
Define_Com Class(#PRIM_TBLO) Name(#LayoutPage)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutPageRow1) Displayposition(1) Parent(#LayoutPage)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutpageColumn1) Displayposition(1) Parent(#LayoutPage)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutPageItem1) Column(#LayoutpageColumn1) Parent(#LayoutPage) Row(#LayoutPageRow1)
Define_Com Class(#PRIM_TBLO) Name(#LayoutView)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutViewRow1) Parent(#LayoutView) Displayposition(1)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutViewColumn1) Parent(#LayoutView) Displayposition(1)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutViewItem1) Alignment(TopLeft) Column(#LayoutViewColumn1) Manage(#EmployeeIdentification) Parent(#LayoutView) Row(#LayoutViewRow1) Sizing(FitToWidth) Flow(Down) Marginleft(8) Marginright(8) Margintop(8)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutViewItem2) Alignment(TopLeft) Column(#LayoutViewColumn1) Manage(#EmployeeSurname) Parent(#LayoutView) Row(#LayoutViewRow1) Sizing(FitToWidth) Flow(Down) Marginleft(8) Marginright(8) Margintop(8)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutViewItem3) Alignment(TopLeft) Column(#LayoutViewColumn1) Manage(#EmployeeGivenNames) Parent(#LayoutView) Row(#LayoutViewRow1) Sizing(FitToWidth) Flow(Down) Marginleft(8) Marginright(8) Margintop(8)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutViewItem4) Alignment(TopLeft) Column(#LayoutViewColumn1) Manage(#EmployeeStartDate) Parent(#LayoutView) Row(#LayoutViewRow1) Sizing(FitToWidth) Flow(Down) Marginleft(8) Marginright(8) Margintop(8)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutViewItem5) Alignment(TopLeft) Column(#LayoutViewColumn1) Manage(#ButtonValidate) Parent(#LayoutView) Row(#LayoutViewRow1) Sizing(FitToWidth) Flow(Down) Marginleft(8) Marginright(8) Margintop(8)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutViewItem6) Alignment(TopLeft) Column(#LayoutViewColumn1) Manage(#ButtonClear) Parent(#LayoutView) Row(#LayoutViewRow1) Sizing(FitToWidth) Flow(Down)
Define_Com Class(#PRIM_DLG) Name(#Dialog) Width(1200) Height(800) Layoutmanager(#LayoutView)
Define_Com Class(#xEmployeeIdentification.EditField) Name(#EmployeeIdentification) Displayposition(1) Tabposition(4) Left(8) Top(8) Width(1184) Parent(#Dialog)
Define_Com Class(#xEmployeeSurname.EditField) Name(#EmployeeSurname) Displayposition(2) Tabposition(3) Left(8) Top(91) Width(1184) Parent(#Dialog)
Define_Com Class(#xEmployeeGivenNames.EditField) Name(#EmployeeGivenNames) Displayposition(3) Tabposition(2) Left(8) Top(174) Width(1184) Parent(#Dialog)
Define_Com Class(#xEmployeeStartDate.DateTimeField) Name(#EmployeeStartDate) Displayposition(4) Tabposition(1) Left(8) Top(257) Width(1184) Parent(#Dialog)
Define_Com Class(#prim_md.FlatButton) Name(#ButtonValidate) Displayposition(5) Tabposition(6) Caption('Validate') Left(8) Top(340) Width(1184) Parent(#Dialog)
Define_Com Class(#prim_md.FlatButton) Name(#ButtonClear) Displayposition(6) Tabposition(5) Caption('Clear Errors') Left(0) Top(376) Width(1200) Parent(#Dialog)
Evtroutine Handling(#COM_OWNER.Initialize)
#Dialog.show
#Dialog.Validate( Update #xEmployee )
Endroutine
Evtroutine Handling(#ButtonValidate.Click)
#Dialog.Validate( Update #xEmployee )
Endroutine
Evtroutine Handling(#ButtonClear.Click)
#Dialog.ClearErrors
Endroutine
End_Com

See also

All Component Classes
Technical Reference

  • No labels