1

How to repeat html components in zul

asked 2014-05-05 13:38:22 +0800

sathishk gravatar image sathishk
17 5

updated 2015-01-28 05:56:48 +0800

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

is there a way i can iterate a list for html li inside a single ul like this...

<h:ul >
    <!--here should be the iterator which wil use @load(somelist) (not an element like a div or listbox)-->
        <h:li>
            <h:img src="@load(somelist.anyVariable)" />
        </h:li>
    -------iterator closed------------------
</h:ul>

please provide me some hint. please

here is my code of zul.

<div class="tab_scroll" >
   <h:ul >
    ----here i need the iterator------
        <h:li class="project_box">
        <h:a class="month_g cboxElement" href="@load(inode.large)" title="@load(inode.imagename)">
            <h:img src="@load(inode.thumb)" />
            <h:div> Belvedere A Elevation 1 </h:div>
        </h:a>
       </h:li>
      -----iterator closed-------
   </h:ul>
</div>
delete flag offensive retag edit

Comments

can't you set the children in the h:ul and then the template where your comment is?

chillworld ( 2014-05-05 13:47:28 +0800 )edit

i have done that, but it is not working.

sathishk ( 2014-05-05 14:03:09 +0800 )edit

vlayout suport also the children attribute. Give that your satisfaction?

chillworld ( 2014-05-05 14:18:57 +0800 )edit

vlayout is creating extra div elements inside ul . I need a simple iterator. please help

sathishk ( 2014-05-05 14:31:38 +0800 )edit

post a little more code of the zul plz. Dont forget you can put the children higher in the hierarchy(so if you have somewhere there a div...).

chillworld ( 2014-05-05 14:36:37 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-05-05 15:35:14 +0800

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

updated 2014-05-06 10:33:36 +0800

<div class="tab_scroll" children="@load(vm.imgList)">
   <h:ul >
       <template  name="children" var="inode">
           <h:li class="project_box">
               <h:a class="month_g cboxElement" href="@load(inode.large)" title="@load(inode.imagename)">
                   <h:img src="@load(inode.thumb)" />
                   <h:div> Belvedere A Elevation 1 </h:div>
               </h:a>
           </h:li>
       </template>
   </h:ul>
</div>
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-05-05 13:38:22 +0800

Seen: 62 times

Last updated: Jan 28 '15

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