reset password
Author Message
ellen214
Posts: 11
Posted 17:36 Apr 12, 2009 |

you said we can't use scripting elements. like <%......%>

can we use any jstl tags?

you said "The blog entries are displayed in reverse chronological order with the most recent entry displayed first."

but the time and date are created automatically when i instantiate the model.

since we don't need to implement "create new blog entries", it is hard to know the order is correct.

two pre-created entries are created automatically at the same time.

cysun
Posts: 2935
Posted 17:40 Apr 12, 2009 |

Yes, you can use JSTL tags.

And you can also create entries with different dates - not every Calendar/Date object in Java has to be "now".

ellen214
Posts: 11
Posted 18:30 Apr 12, 2009 |
cysun wrote:

Yes, you can use JSTL tags.

And you can also create entries with different dates - not every Calendar/Date object in Java has to be "now".

-----------------------------------------------------------------------------------------------------------------------------------------

do we realy need to sort them by date?

I use an arraylist to save the blog Entry.  date is created when the model instantiate.

since we don't modify the date, i just get the arraylist by reverse order.

if it is okay, i am done with it. and i already did "add blog entry" function.

so, add blog entry to the end of the arraylist, get the arraylist by reverse order. ok?

cysun
Posts: 2935
Posted 21:43 Apr 12, 2009 |
ellen214 wrote:
cysun wrote:

Yes, you can use JSTL tags.

And you can also create entries with different dates - not every Calendar/Date object in Java has to be "now".

-----------------------------------------------------------------------------------------------------------------------------------------

do we realy need to sort them by date?

I use an arraylist to save the blog Entry.  date is created when the model instantiate. [...]

That's fine.