Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Conditional display of DisplayTable of DisplayTag

 
Soumya Manjunath
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are the errors at compile time?
 
Soumya Manjunath
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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.
 
Davie Lin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic