This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

View layer logic - where should it go?  RSS feed

 
Ross Hendry
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got a tree-like data structure which I'm displaying on a web page. As the user navigates through a breadcrumb trail is left behind to let them retrace their steps.

e.g. Root / First Group / Second Group / Third Group (where the groups are links back up)

At the moment the function to create the links is in the jsp. It's only used in one place so this seemed the pragmatic option though I'm not sure if it's "correct". I realise it wouldn't make any sense to put it in the entity itself but would a static class that generates the links, callable from the jsp make more sense?

Just curious about people's opinions and experiences on this one.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ross Hendry:
... It's only used in one place so ...


What do you mean by this?
There is only one JSP that shows this?
 
Ross Hendry
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
What do you mean by this?
There is only one JSP that shows this?


Yes. The breadcrumb trail is only used in one place.

At least, it was at time of posting. The customer's wanting it in a couple of other places now so I'll be writing that bean for reusability.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!