VLF-ONE Client Side Repository Validation
Posted: Fri Aug 31, 2018 1:11 am
Ok, so in SP2 I have heard that Repository Validation now works on VLWeb client fields. Spinning up one of the new SP2 demo templates show this.
This does not seem to work in VLF-ONE as the control does not get highlighted. Only the message appears.
When trying to figure out why, I discover on the VLWeb template, there is a "Validate" method on Dialogs and Views.
There is no such method on the VF_AC010O object, but there are some avValidate methods
I can't find any documentation on these.
Are these used to perform client side validation like in VLWeb's Dialog and View?
How do you use them?
Can client side repository validation be done in VLF-ONE or are we stuck doing it the old way. viewtopic.php?f=3&t=193&p=2388
EDIT
I've been experimenting with the avValidate methods but not getting expected results.
I track the controls in the uInitialize
And on the button click
But the avValidateAllTrackedMDControls always returns true. A difference from this method and the VLWeb method is that this method does not include the Table, which should be required as far as I know.
Code: Select all
evtroutine handling(#SaveIcon.Click)
if (#COM_OWNER.Validate( Update #xContacts ))
#COM_OWNER.Save
endif
endroutine
Are these used to perform client side validation like in VLWeb's Dialog and View?
How do you use them?
Can client side repository validation be done in VLF-ONE or are we stuck doing it the old way. viewtopic.php?f=3&t=193&p=2388
EDIT
I've been experimenting with the avValidate methods but not getting expected results.
I track the controls in the uInitialize
Code: Select all
mthroutine name(uInitialize) options(*REDEFINE)
* Do any initialization defined in the ancestor
#COM_ANCESTOR.uInitialize
#ASCSRHObjectManager.Register command(#COM_OWNER)
* Build collection of Editable fields
#COM_OWNER.CollectEditableControls( #COM_OWNER.ComponentControls )
#COM_OWNER.avTrackControlChanges incontainer(#ContainerPanel)
#SaveButton.Enabled := False
endroutine
Code: Select all
evtroutine handling(#SaveButton.Click)
if (#COM_OWNER.avValidateAllTrackedMDControls( UPDATE ))
#COM_OWNER.avQueueAsyncOperation busystatetext('Saving') operationid(SAVE)
endif
endroutine