• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applying Rico effect for each iteration-created div

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I'm using Rico lib to creating rounded divs.
Inside my JSP page, I iterate over a collection , and for each item in this collection, I want to create a rounded div.
The problem is how to apply the Rico effect to each div ?
As you may know, Rico required the div id in order to create a rounded one and inside my JSP iteration, I can't assign the same id for each div.
A snippet :

Any ideas ?
[ March 13, 2007: Message edited by: John Todd ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to post questions regarding JSP mechanisms in the JSP forum. This post has been moved there.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you are using the JSTL, I am sure that you have a copy of the JSTL Spec handy.

Look up <c:forEach> and study its capabilities. You will find something that can help you create unique ids within its bounds.
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I don't the exact number of the iterations.
And as you know, Rico use something like :
var roundCorners = Rico.Corner.round.bind(Rico.Corner);
roundCorners('perPanel', {blend:false});
So, suppose the JSTL iteration tag generated ids like : id1, id2 ...
how to pass these ids to Rico ?
BTW, my Rico code resides in SiteMesh template, so DIV's ids must be known.
What about creating a Rico rounded div for each iteration (putting Rico JavaScript inside the iteration) ?
Another ideas ?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Todd:
And as you know, Rico use something like :



Actually, no I don't. The only part of Rico that I've studied is its Ajax handling (which I found to be interesting, but too bizarre for actual use).

So, suppose the JSTL iteration tag generated ids like : id1, id2 ...
how to pass these ids to Rico ?



Beats me. I don't see anywhere in your code where an id is required. You'll either need to study the Rico documentation to find out how to use the methods, or find a forum where Rico is more prevelantly used.

The part of the question you asked regarded how to generate unique ids: that's easily handled with the JSTL and EL, Using them afterwards, is a Rico issue.
reply
    Bookmark Topic Watch Topic
  • New Topic