2

Grid in Grid please help

asked 2014-02-11 15:05:19 +0800

grzesiek gravatar image grzesiek flag of Poland
72 1 5

updated 2014-02-11 18:03:10 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

hi

it's only example but solution will be very helpful for me

public Class Country{

private int id;

private String country;

private List<city> cityList;

... }


public class City{

private int id;

private String city;

... }


public class CountryVM{

.....

public List<country> countryList;

....

}

and I need show in one grid Countries and cities like below


div apply="org.zkoss.bind.BindComposer"

viewModel="@id('vm') @init('resources.CountryVM')">


<grid model="@load(vm.countryList)">

   <columns>

    <column label="id" />

    <column label="Country" />

    <column label="" />

    </columns>

    <template name="model">

    <row>

       <label value="@load(each.id)"></label>

       <label value="@load(each.country)"></label>

       <div>

        <grid model=???>

           <columns>
             <column label="city" />
           </columns>
           <template name=??? ">
             <row>
               <label value="???"></label>
             </row>
           </template>
            </grid>
       </div>
    </row>
     </template>
   </grid>

/div> "


but I don't now how to populate data in inner grid

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-02-11 18:44:49 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9
https://github.com/chillw...

mine 100's answer :)

Take a look at mine last answer on this topic(full example with a specific notifychanged) :

http://forum.zkoss.org/question/90188/notifychange-to-grid-that-is-inside-a-row-of-another-grid/#90284

Greetz chill.

link publish delete flag offensive edit
0

answered 2014-02-11 21:58:10 +0800

grzesiek gravatar image grzesiek flag of Poland
72 1 5

Great, it's working,

Thank You Very Much

link publish delete flag offensive edit
Your answer
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: 2014-02-11 15:05:19 +0800

Seen: 10 times

Last updated: Feb 11 '14

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