0

Change the viewModel on java

asked 2013-05-27 18:08:10 +0800

ghost22 gravatar image ghost22
1

Hi, i have a zul file that use a specific viewModel . Here the code

<window id="indexWin" apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vm') @init('com.single.FirstController') @AfterCompose(superclass=true)"> ....

After some operation i put in this zul a new tab like

        Window window = (Window) Executions.createComponents("myzul.zul", component, null);
    searchTabPanel.appendChild(window);
    homeTabPanels.appendChild(searchTabPanel);

in myzul.zul i have another view model like

<window apply="org.zkoss.bind.BindComposer"
    viewModel="@id('vm') @init('com.single.myNewController') @AfterCompose(superclass=true)">

Now when I go to a @comand written in 'myNewController' I get an error saying that the command does not exist in 'FirstController' .... there is a method to take all the @command myNewController?

delete flag offensive retag edit

Comments

Can you provide proper code?so it will be easy .

psingh ( 2013-05-28 13:54:42 +0800 )edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-05-27 18:08:10 +0800

Seen: 29 times

Last updated: May 27 '13

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