Hi Actually the contents in the li keep repeating . So I want to click on the first View / 2nd View / 3rd View button and so on which is why I wanted to use the List object.
If i define a container then I need to define 3 separate View links . Correct me if I am wrong Regards Hari On Sat, Feb 21, 2009 at 1:20 PM, John <[email protected]> wrote: > > List is a one dimension array and you should use List[i] to access its > element. > Because all the elements inside \ul\li do not have a common separator, > thus, > you cannot use the separator attribute. This is the second scenario I > described > in the tutorial, > > > http://groups.google.com/group/tellurium-users/browse_thread/thread/5579a536818cf6be > > But from your html, seems you better use a Container because the > advantage of > template is to describe multiple similar objects, but inside /ul/li, > the objects are all > different, you can just use Container to describe it. > > Thanks, > > Jian > > On Feb 21, 2:26 am, Harihara Vinayakaram <[email protected]> wrote: > > Hi > > The mailing list has an example of List and an explanation of the > > algorithm. It was very useful . I have some doubts regarding its usage. > > > > I have the following html > > <div id="featured-products_block_center" class="block > products_block"> > > <h4>featured products</h4> > > <div class="block_content"> > > > <ul> > > <li> > > <h5><a href="" title="">xxx</a></h5> > > <p class="product_desc"> > > <a href=".." title="More">...</a> > > </p> > > <a href="..." title=".." class="product_image"><img > > src="..." alt="..." height="129" width="129" /></a> > > <p> > > <span class="price">...<br /> > > <span style="font-size:xx-small">(taxes > > extra)</span></span> > > <a class="button" href="..." title="View">View</a> > > <a class="..." rel="..." href="..." title="Add to cart">Add > to > > cart</a> > > </p> > > </li> > > </ul> > > </div> > > </div> > > > > That is a list with ul and a separator as li . > > > > I defined my template to be something like > > > > ui.Container(uid: "featuredproducts", clocator: [id: > > "featured-products_block_center", tag: "div"], group: "true") { > > ui.List(uid: "list", clocator: [tag: "ul"], separator: "li") > { > > UrlLink(uid: "all", clocator: [text: "View", class: > > "button", title: "View"]) > > UrlLink(uid: "all", clocator: [title: "Add to cart"]) > > } > > } > > > > and the access > > > > was like > > * click featuredproducts.list[1][1] * > > > > and I got a number format exception > > > > I tried > > click featuredproducts.list[1] and I got no error but this does not > > link on the link titled View > > > > My question : > > How do I access the element titled View > > > > using a List template > > > > Thanks > > Regards > > Hari > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tellurium-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en -~----------~----~----~----~------~----~------~--~---
