| Author |
Date inside iterator
|
Sachin Adat
Ranch Hand
Joined: Sep 03, 2007
Posts: 213
|
|
Can someone lead me to a good struts 2 iterator tutorial.
I want to show a date (basically use <s:date>) inside an iterator.
|
SCJP 6
How To Ask Questions On Java Ranch - How To Answer Questions On Java Ranch
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
Did you look at the iterator tag reference??
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
Sachin Adat
Ranch Hand
Joined: Sep 03, 2007
Posts: 213
|
|
Yes Ankit, I started from that
and I am able to see my date in long using this:
But I want to see it in the date format, something like this:
which comes as empty
|
 |
Sachin Adat
Ranch Hand
Joined: Sep 03, 2007
Posts: 213
|
|
Has no one ever got a requirement like this
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
Is the startTime property a Date object or something else. You said that when you use s:property to print the date, you get it in long format, but the toString method of Date class doesn't print a long value. Its not clearly given in the documentation of s:date tag whether it accepts only date objects or not (I've never used s:date so I can't say anything for sure)...
|
 |
Sachin Adat
Ranch Hand
Joined: Sep 03, 2007
Posts: 213
|
|
Wow, nice catch Ankit, the place where I was using s:date without an iterator was a date and it was working fine.
And, inside the iterator I m getting a long, so it would not show the date.
Thanks a lot, I think I can fix it now
|
 |
 |
|
|
subject: Date inside iterator
|
|
|