• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Conditional display of DisplayTable of DisplayTag

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

I'm using DisplayTag library to display the table in my JSP. I'm using a Table Decorator to have a hyperlink to a column.
Now, I want to display th table with hyperlink to few users depending on their role. And I want to display a regular table
with no hyperlink to another set of users. So I'm using JSTL for the conditional check. But it is throwing errors as the start tag
is inside the condition.


The error is

Could anybody please help me to get around with it.
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are the errors at compile time?
 
Soumya Manjunath
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

No, I don't get any compilation errors. When I try to access the page I get the above error.

Please give some inputs.
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well Soumya,

when you try to access the page did you login as a user that is authorized or not?

Well, regardless of if the user is authorized or not, I think it's a bad idea how you have set up two different <display:table> withing <c:choose>

instead I think you should try this



BTW, why is
doesn't seem like that will work or makes sense if authorized is just a boolean not an object

 
Soumya Manjunath
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Davie. I made the changes as per your suggestion but the erros hasn't gone yet.



I get this unterminated flag error. Not sure how to get around with this.
 
What are you doing in my house? Get 'em tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic