• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

View layer logic - where should it go?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic