Loop using For component for Tapestry 4 -
i having trouble using component tapestry 4.0. need implement 1-n sturcture groups , fields. 1 group has many fields.
display groups, fields first group repeated other groups. not find how implement correctly.
group1
- field11
- field12
- field13
group2
- field11
- field12
- field13
code : <form jwcid="groupsform"> <div jwcid="groupcontainer"> <span jwcid="@insert" value="ognl:currentgroup.name"/> <div jwcid="fieldcontainer"> <span jwcid="@insert" value="ognl:currentfield.name"/> </div> </div> </form> <conmponent id="groupcontainer" type="for"> <binding name="source" value="groupslist"/> <binding name="value" value="currentgroup"/> </component> <component id="fieldcontainer" type="for"> <binding name="source" value="fielslist"/> <binding name="value" value="currentfield"/> </component> public list getgroupslist(){ return getgroups(); } public list getfieldslist(){ return getfields(getcurrentgroup().getname()) }
thanks help.
Comments
Post a Comment