This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

View layer logic - where should it go?  RSS feed

 
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.
 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!