xaWeb - Form init
This sample show how to initialize the input fields values with a service event
Form init
This button shows xaWeb source code
I2luY2x1ZGUgInhhV2ViLmNoIg0KDQpDTEFTUyBXRG9jTWFpbiBGUk9NIFdEb2MNCg0KICAgREFUQSBvRm9ybQ0KDQogICBNRVRIT0QgQ3JlYXRlRG9jKCkNCiAgIE1FVEhPRCBBY3RfUnVuRm9ybSgpDQogICBNRVRIT0QgU3J2X0NoZWNrRGF0ZSggaFBhcmFtcyApDQogICBNRVRIT0QgRnJtX015Rm9ybSggaFBhcmFtcyApDQogICBNRVRIT0QgU3J2X0ZybUluaXQoIGhQYXJhbXMgKQ0KDQpFTkQgQ0xBU1MNCg0KLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCg0KTUVUSE9EIENyZWF0ZURvYygpIENMQVNTIFdEb2NNYWluDQoNCiAgIExPQ0FMIGNDb2RlLCBjSnMNCg0KICAgV0lUSCBPQkpFQ1QgV0Jhc2ljQ29udGV4dCgpOk5ldyggU2VsZiApDQogICAgICA6Y1RoZW1lIDo9ICJsaWdodCINCiAgIEVORCBXSVRIDQoNCiAgIFRFWFQgSU5UTyBjSnMNCiAgICAgIGZ1bmN0aW9uIHNob3dDb2RlKCkgew0KICAgICAgICAgY29uc3QgZWxlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoInNvdXJjZSIpOw0KICAgICAgICAgaWYgKGVsZSkgew0KICAgICAgICAgICAgZWxlLnZhbHVlID0geGFfYjY0dG9Vbmljb2RlKGVsZS52YWx1ZSk7DQogICAgICAgICAgICBlbGUuaGlkZGVuID0gZmFsc2U7DQogICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiYnRuc291cmNlIikuc3R5bGUuZGlzcGxheSA9ICJub25lIjsNCiAgICAgICAgIH0NCiAgICAgIH0NCiAgIEVORFRFWFQNCg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KICAgICAgICAgICAgOmNUZXh0IDo9ICIgKDUgZGlnaXRzKSINCiAgICAgICAgICAgIDpjTGFiZWwgOj0gIlVzZXIgY29kZToiDQogICAgICAgICAgICA6bk1pbiA6PSAxDQogICAgICAgICAgICA6bk1heCA6PSA5OTk5OQ0KICAgICAgICAgICAgOm5TaXplIDo9IDUNCiAgICAgICAgICAgIDpPblZhbGlkYXRlIDo9ICJDaGVja1VzZXJDb2RlIg0KICAgICAgICAgICAgOmxMYWJlbE5ld0xpbmUgOj0gLnQuDQogICAgICAgICAgICA6Q3JlYXRlKCkNCiAgICAgICAgIEVORCBXSVRIDQogICAgICAgICBXSVRIIE9CSkVDVCBXRWRpdCgpOk5ldyggb0dyb3VwICkNCiAgICAgICAgICAgIDpjSWQgOj0gInVzZXJuYW1lIg0KICAgICAgICAgICAgOmNMYWJlbCA6PSAiVXNlciBuYW1lOiINCiAgICAgICAgICAgIDpjUGxhY2VIb2xkZXIgOj0gInVzZXIgbmFtZSINCiAgICAgICAgICAgIDpjQXV0b0NvbXBsZXRlIDo9ICJuYW1lIg0KICAgICAgICAgICAgOm5NYXhMZW5ndGggOj0gNTANCiAgICAgICAgICAgIDpuTWluTGVuZ3RoIDo9IDEwDQogICAgICAgICAgICA6bExhYmVsTmV3TGluZSA6PSAuVC4NCiAgICAgICAgICAgIDpjVmFsdWUgOj0gImlnbmFjaW8iDQogICAgICAgICAgICA6Q3JlYXRlKCkNCiAgICAgICAgIEVORCBXSVRIDQoNCiAgICAgICAgIFdJVEggT0JKRUNUIFdFZGl0KCk6TmV3KCBvR3JvdXAgKQ0KICAgICAgICAgICAgOmNJZCA6PSAiYWRkcmVzczEiDQogICAgICAgICAgICA6Y1BsYWNlSG9sZGVyIDo9ICJhZGRyZXNzIg0KICAgICAgICAgICAgOmNBdXRvQ29tcGxldGUgOj0gImFkZHJlc3MtbGluZTEiDQogICAgICAgICAgICA6Y0xhYmVsIDo9ICJBZGRyZXNzOiINCiAgICAgICAgICAgIDpuTWF4TGVuZ3RoIDo9IDUwDQogICAgICAgICAgICA6bk1pbkxlbmd0aCA6PSAxMA0KICAgICAgICAgICAgOmxMYWJlbE5ld0xpbmUgOj0gLlQuDQogICAgICAgICAgICA6Q3JlYXRlKCkNCiAgICAgICAgIEVORCBXSVRIDQogICAgICAgICBXSVRIIE9CSkVDVCBXRW1haWwoKTpOZXcoIG9Hcm91cCApDQogICAgICAgICAgICA6Y0lkIDo9ICJlbWFpbCINCiAgICAgICAgICAgIDpjTmFtZSA6PSAiZW1haWwiDQogICAgICAgICAgICA6Y1BsYWNlSG9sZGVyIDo9ICJlbWFpbCINCiAgICAgICAgICAgIDpjQXV0b0NvbXBsZXRlIDo9ICJlbWFpbCINCiAgICAgICAgICAgIDpjTGFiZWwgOj0gIkVtYWlsOiINCiAgICAgICAgICAgIDpuTWF4TGVuZ3RoIDo9IDUwDQogICAgICAgICAgICA6bk1pbkxlbmd0aCA6PSAxMA0KICAgICAgICAgICAgOmxMYWJlbE5ld0xpbmUgOj0gLlQuDQogICAgICAgICAgICA6Q3JlYXRlKCkNCiAgICAgICAgIEVORCBXSVRIDQogICAgICAgICBXSVRIIE9CSkVDVCBXRGF0ZVRpbWUoKTpOZXcoIG9Hcm91cCApDQogICAgICAgICAgICA6Y0lkIDo9ICJiaXJ0aGRheSINCiAgICAgICAgICAgIDpjTmFtZSA6PSAiYmlydGhkYXkiDQogICAgICAgICAgICA6Y0F1dG9Db21wbGV0ZSA6PSAiYmRheSINCiAgICAgICAgICAgIDpjTGFiZWwgOj0gIkRheSBvZiBiaXJ0aDoiDQogICAgICAgICAgICA6bExhYmVsTmV3TGluZSA6PSAuVC4NCiAgICAgICAgICAgIDpPblZhbGlkYXRlIDo9ICJTcnZfQ2hlY2tEYXRlIg0KICAgICAgICAgICAgOkNyZWF0ZSgpDQogICAgICAgICBFTkQgV0lUSA0KICAgICAgICAgV0lUSCBPQkpFQ1QgV0NoZWNrYm94KCk6TmV3KCBvR3JvdXAgKQ0KICAgICAgICAgICA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