File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Applying Rico effect for each iteration-created div Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Applying Rico effect for each iteration-created div" Watch "Applying Rico effect for each iteration-created div" New topic
Author

Applying Rico effect for each iteration-created div

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

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

Joined: Jan 10, 2002
Posts: 60774
    
  65

Please be sure to post questions regarding JSP mechanisms in the JSP forum. This post has been moved there.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

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

Joined: Nov 08, 2003
Posts: 3476

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

Joined: Jan 10, 2002
Posts: 60774
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applying Rico effect for each iteration-created div
 
Similar Threads
Problems to hide div
Struts: How does indexed data get into a Form Bean?
struts logic:iterate problem
Identifying position of the highlighted row
Problems to hide div