1

zk mvvm > what's the best component to make LOV (list of value) of a master data [closed]

asked 2013-02-15 02:06:18 +0800

progamerdotcom gravatar image progamerdotcom
117 5

Still working in mstRoleAccess.zul && MstRoleAccessVM

<grid>
        <columns visible="false">
            <column width="100px" />
            <column width="200px" />
            <column width="100px" />
        </columns>
        <rows>
            <row>
                <cell>Role Id</cell>
                <cell><textbox value="@bind(vm.current.vroleid)" type="text" focus="true" /></cell>
                <cell><button label="LOV Role" /></cell>
            </row>
            <row>
                <cell>Menu Id</cell>
                <cell><textbox value="@bind(vm.current.vmenuid)" type="text" /></cell>
                <cell><button label="LOV Menu" /></cell>
            </row>
            <row>
                <cell>Status</cell>
                <cell><textbox value="@bind(vm.current.vstat)" type="text" /></cell>
            </row>
            <row>
                <cell colspan="3">

                    <space width="100px" />
                    <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" />

                </cell> 
            </row>
        </rows>
    </grid>

I want to make a LOV of a master data (such as MasterRole or MasterMenu), when user click "LOV Role" button then shows a window that contents listbox of roles, and if user chooses a row of listbox then this LOV window close automatically and fill textbox of vroleid.

thanks alot, && sorry for my english

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by sjoshi
close date 2013-02-18 17:35:19

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-02-15 06:59:49 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

See Here i made a example it will help you to use binding in your code also

link publish delete flag offensive edit
0

answered 2013-02-16 13:15:41 +0800

progamerdotcom gravatar image progamerdotcom
117 5

its works,, thank sjoshi.

@Command("openPopRole") 
public void openPopRole(@ContextParam (ContextType.VIEW) Component view){
    Executions.getCurrent().createComponents("/popup/popupRole.zul", view, null);
}

@SuppressWarnings("rawtypes")
@Command("choose")
public void choose(@ContextParam (ContextType.VIEW) Component view){
    Map param = new HashMap();
    param.put("roleParam", current);
    Binder bind = (Binder) view.getParent().getAttribute("binder");
    if (bind == null) return;

    bind.postCommand("sendParamRole", param);
    view.detach();
}

thanks

link publish delete flag offensive edit

Comments

1

Please accept answer and close the question

sjoshi ( 2013-02-17 08:19:00 +0800 )edit

yes, I accept the answer, sorry how to close the question , thank

progamerdotcom ( 2013-02-18 15:32:00 +0800 )edit
1

Please accept answer by click on Check Image below the up-down arrow

sjoshi ( 2013-02-18 15:58:22 +0800 )edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-02-15 02:06:18 +0800

Seen: 26 times

Last updated: Feb 16 '13

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