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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bk1heExlbmd0aCA6PSA1MA0KICAgICAgICAgICAgOm5NaW5MZW5ndGggOj0gMTANCiAgICAgICAgICAgIDpsTGFiZWxOZXdMaW5lIDo9IC5ULg0KICAgICAgICAgICAgOkNyZWF0ZSgpDQogICAgICAgICBFTkQgV0lUSA0KICAgICAgICAgV0lUSCBPQkpFQ1QgV0VtYWlsKCk6TmV3KCBvR3JvdXAgKQ0KICAgICAgICAgICAgOmNJZCA6PSAiZW1haWwiDQogICAgICAgICAgICA6Y05hbWUgOj0gImVtYWlsIg0KICAgICAgICAgICAgOmNQbGFjZUhvbGRlciA6PSAiZW1haWwiDQogICAgICAgICAgICA6Y0F1dG9Db21wbGV0ZSA6PSAiZW1haWwiDQogICAgICAgICAgICA6Y0xhYmVsIDo9ICJFbWFpbDoiDQogICAgICAgICAgICA6bk1heExlbmd0aCA6PSA1MA0KICAgICAgICAgICAgOm5NaW5MZW5ndGggOj0gMTANCiAgICAgICAgICAgIDpsTGFiZWxOZXdMaW5lIDo9IC5ULg0KICAgICAgICAgICAgOkNyZWF0ZSgpDQogICAgICAgICBFTkQgV0lUSA0KICAgICAgICAgV0lUSCBPQkpFQ1QgV0RhdGVUaW1lKCk6TmV3KCBvR3JvdXAgKQ0KICAgICAgICAgICAgOmNJZCA6PSAiYmlydGhkYXkiDQogICAgICAgICAgICA6Y05hbWUgOj0gImJpcnRoZGF5Ig0KICAgICAgICAgICAgOmNBdXRvQ29tcGxldGUgOj0gImJkYXkiDQogICAgICAgICAgICA6Y0xhYmVsIDo9ICJEYXkgb2YgYmlydGg6Ig0KICAgICAgICAgICAgOmxMYWJlbE5ld0xpbmUgOj0gLlQuDQogICAgICAgICAgICA6T25WYWxpZGF0ZSA6PSAiU3J2X0NoZWNrRGF0ZSINCiAgICAgICAgICAgIDpDcmVhdGUoKQ0KICAgICAgICAgRU5EIFdJVEgNCiAgICAgICAgIFdJVEggT0JKRUNUIFdDaGVja2JveCgpOk5ldyggb0dyb3VwICkNCiAgICAgICAgICAgIDpjSWQgOj0gImFkdiINCiAgICAgICAgICAgIDpjTmFtZSA6PSAiYWR2Ig0KICAgICAgICAgICAgOmNMYWJlbCA6PSAiWW91IHdhbnQgdG8gcmVjZWl2ZSBhZHZlcnRpc2luZyBmcm9tIHVzIg0KICAgICAgICAgICAgOkNyZWF0ZSgpDQogICAgICAgICBFTkQgV0lUSA0KICAgICAgICAgV0lUSCBPQkpFQ1QgV1RleHQoKTpOZXcoIG9Hcm91cCApDQogICAgICAgICAgICA6Y1RleHQgOj0gIllvdXIgYWN0dWFsIFhhaWxlciB2ZXJzaW9uOjxicj4iDQogICAgICAgICAgICA6QWRkU3R5bGUoImRpc3BsYXk6YmxvY2s7bWFyZ2luOjEwcHggMHB4OyIpDQogICAgICAgICAgICA6Q3JlYXRlKCkNCiAgICAgICAgIEVORCBXSVRIDQogICAgICAgICBXSVRIIE9CSkVDVCBXUmFkaW9NZW51KCk6TmV3KCBvR3JvdXAgKQ0KICAgICAgICAgICAgOmNJZCA6PSAieGFpbGVyX3ZlcnNpb24iDQogICAgICAgICAgICA6Y05hbWUgOj0gInhhaWxlcl92ZXJzaW9uIg0KICAgICAgICAgICAgOkFkZFJhZGlvKCAiTm9uZSIgKQ0KICAgICAgICAgICAgOkFkZFJhZGlvKCAiUGVyc29uYWwiICkNCiAgICAgICAgICAgIDpBZGRSYWRpbyggIlByb2Zlc3Npb25hbCIgKQ0KICAgICAgICAgICAgOkFkZFJhZGlvKCAiRW50ZXJwcmlzZSIgKQ0KICAgICAgICAgICAgOm5TZWxlY3RlZCA6PSAxDQogICAgICAgICAgICA6bEhvcml6b250YWwgOj0gLlQuDQogICAgICAgICAgICA6Q3JlYXRlKCkNCiAgICAgICAgIEVORCBXSVRIDQogICAgICBFTkQgV0lUSA0KICAgICAgV0lUSCBPQkpFQ1QgV0J1dHRvbigpOk5ldyggOjpvRm9ybSApDQogICAgICAgICA6Y1R5cGUgOj0gInN1Ym1pdCINCiAgICAgICAgIDpjVGV4dCA6PSAiT2siDQ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