First time here? Check out the FAQ!
![]() | 1 | initial version | |
good night all,
before I using form="@id('fx')",, save, reset & search buttons working fine but without any validation, after I modify became the following code, save & reset still working fine but search button not works.
Would you like to explain me about @load @save and before | after work with viewmodel.
<groupbox form="@id('fx') @load(vm.current) @save(vm.current, before='save') @validator(vm.formValidator)">
<row>
<cell>Username</cell>
<cell><textbox value="@bind(fx.username)" type="text" focus="true" /></cell>
<cell><label sclass="red" value="@bind(vmsgs['fkey1'])"/></cell>
</row>
<button label="Save" onClick="@command('save')" image="/image/iconcrud/btn_save.gif" />
<button label="Reset" onClick="@command('reset')" image="/image/iconcrud/btn_reset.gif" />
<button label="Search" onClick="@command('search')" image="/image/iconcrud/btn_search.gif" />
Thanks
![]() | 2 | edit question |
good night all,
before I using form="@id('fx')",, save, reset & search buttons working fine but without any validation, after I modify became the following code, save & reset still working fine but search button not works.
Would you like to explain me about @load @save and before | after work with viewmodel.
[edited] based on my code below, save button & reset button works fine, but search button doesnt work, when I treid to trace the object 'current' when search button was clicked however the object 'current' is null, why ? how to get object from textbox that fill with some character when search button was clicked ?
thanks [/edited]
<groupbox form="@id('fx') @load(vm.current) @save(vm.current, before='save') @validator(vm.formValidator)">
<row>
<cell>Username</cell>
<cell><textbox value="@bind(fx.username)" type="text" focus="true" /></cell>
<cell><label sclass="red" value="@bind(vmsgs['fkey1'])"/></cell>
</row>
<button label="Save" onClick="@command('save')" image="/image/iconcrud/btn_save.gif" />
<button label="Reset" onClick="@command('reset')" image="/image/iconcrud/btn_reset.gif" />
<button label="Search" onClick="@command('search')" image="/image/iconcrud/btn_search.gif" />
Thanks