Revision history [back]

click to hide/show revision 1
initial version

asked 2013-02-18 16:16:28 +0800

progamerdotcom gravatar image progamerdotcom

mvvm, load or save with after or before for seach command

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

mvvm, load or save with after or before for seach command

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

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More