Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Dynamic Javascript and Spring

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Spring with JSTL to present information on a web page. I will need to build a tabbed menu dynamically based on user credentials. For example one user may end up with 4 tabs and another with 2. I could do this rather easily with ASP.NET by injecting dynamic javascript into the asp.net page event. But I am not sure how I would do this in Spring and JSTL. Any help is appreciated.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[quote=Charles Owen]I am using Spring with JSTL to present information on a web page. I will need to build a tabbed menu dynamically based on user credentials. For example one user may end up with 4 tabs and another with 2. I could do this rather easily with ASP.NET by injecting dynamic javascript into the asp.net page event. But I am not sure how I would do this in Spring and JSTL. Any help is appreciated.[/quote]

With Spring Security it is extremely easy. Just use the Spring security tag library in your page. <security:ifAnyGranted={}> That isn't the exact tag, but the tag is just like that and anything between the open and close tag will only appear if the user has any of the roles stated in the tag for ifAnyGranted, that you write.

Mark
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a link to the Spring Security documentation on JSP tag libs

Tag lib documentation

It is also useful to note that you can use SPEL which makes it even more powerful as Craig Walls pointed out in THIS POST
 
Charles Owen
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We resolved this by creating a tiles definition for the tabs, then using a combination of CSS, Javascript, and JSTL.
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic