-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Download: Java All-in-One For Dummies, 7th Edition ($27 Value) — free for your email
By News Staff,
- ebook offer
- sponsored
- (and 3 more)
- 0 replies
- 2 views
-
Learn Java with Projects (worth $44.99) but free in exchange for your email
By News Staff,
- packt
- ebook offer
- (and 2 more)
- 0 replies
- 3 views
-
JavaScript from Frontend to Backend ($20.99 Value) FREE for your work email
By News Staff,
- ebook offer
- sponsored
- (and 3 more)
- 0 replies
- 3 views
-
- 0 replies
- 3 views
-
Job Ready Java ($24 value) free download for a Limited Time
By News Staff,
- ebook offer
- java
- (and 1 more)
- 0 replies
- 2 views
-
Question
Lord Method Man
I'm trying to redo how a website handles permission access to elements. Right now we have it so when someone logs in (ActiveUser) they have an ArrayList of Integers corresponding to the FunctionIDs they are permitted access to. For example when I log in I have the values 1, 2, 6, 7 in my ActiveUser.permissions List.
The problem is that I'm trying to render elements in JSF using <h:tag rendered="#{activeUser.permissions.contains(x)}"> for elements. This is always returning false regardless of the values in the List. I have verified that the value is in fact in my List using Debugging mode.
Also, if I replace #{activeUser.permissions.contains(1)} with #{activeUser.permissions.get(0) == 1} it works and the element renders. I know that .contains(<literal int>) works for java.lang.Integers, so I have the feeling this has something to do with JSF.
Link to comment
Share on other sites
0 answers to this question
Recommended Posts