passing present viewmodel to included page. [closed]

asked 2013-07-30 09:53:42 +0800

nsharma gravatar image nsharma flag of India
917 1 11

updated 2013-07-30 10:04:18 +0800

Hello,here is a weird situation, and guess i have tried everything what i think should have worked.

look below the code first ,in this i have taken a groupbox and a div in vlayout,In div their is a include component,I want to pass the present viewModel object(vm) to the viewmodel of this included page.

    <window mode="modal" popup="true" width="1000px" height="635px"
        apply="org.zkoss.bind.BindComposer" border="normal"
        viewModel="@id('vm') @init('xxx.ViewModel')">
            <groupbox width="100%" mold="3d" height="280px"
                <include   src="@bind(vm.path)"


included page viewmodel code:

    public void afterCompose(@ExecutionParam("viewModelArg") ViewModel viewModel  ){}

initially somehow it was working ,but as i have changed some code inside my project(don't have any idea about the change,but its not relative as much i know to this code),Now it has stopped working.and gives a null value to viewModel.

The situation is that ,we can have only string type value and for non string-typed their is no clear documentation about how to retrieve the value in included page viewmodel.I get a NULL everytime. Thanks in advance.

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by nsharma
close date 2013-08-05 09:54:18

Question tools

1 follower



Asked: 2013-07-30 09:53:42 +0800

Seen: 22 times

Last updated: Jul 30 '13

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