• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applying Rico effect for each iteration-created div

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • 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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic