• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How would i obtain a value from logic: iter.. and pass to scriplet

 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im iterating through a collection and I was wondering how I would obtain a value from a and pass it to xxx. A is an object which has a field named date which holds a Date value.

<logic:iterate id="a" name="bb" >

<% StringBuffer d = new SimpleDateFormat("MMMM d, yyyy").format( xxx , new StringBuffer(), new FieldPosition(0) );
%>

thank you all
[ February 16, 2005: Message edited by: john mattucci ]
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Replace xxx with a.

It's really that simple. You might have to specify logic:iterate's type attribute to say what kind of object a is but that's all.
 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
date is an element in class a , so would i be able to pass a.date to xxx
[ February 16, 2005: Message edited by: john mattucci ]
 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u were right u need the type attribute
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic