0

I have a certain method verifying the user role and permission returning a boolean on the managed bean, when read by the JSF page, I get this message:

Sept. 25, 2015 4:54:29 PM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource
WARNING: JSF1064: Unable to locate or use a resource, /module/usermanager/backend/true.xhtml.

While the true is the result from the method and that renders a certain viewAction or any component like this

<f:viewAction action="#{userloginMB.verifyPermission(2,5,2)}" />
<p:column style="width:20%" rendered="#userloginMB.verifyPermission(1,2,2)==true}">

Is there a way to make not consider returned vars as a redirection?

Roman Melnyk
  • 1,101
  • 1
  • 7
  • 20
Chaibi Alaa
  • 1,216
  • 4
  • 22
  • 45
  • What are you trying to do with `` in first place? – BalusC Sep 25 '15 at 19:42
  • That verifies if the user has the primitive permission of viewing the page – Chaibi Alaa Sep 25 '15 at 19:51
  • Those two rendered are just a sample not in same place neither in same page – Chaibi Alaa Sep 25 '15 at 20:14
  • Why exactly are you returning `true` as navigation outcome? What exactly did you expect when it returns `false`? It should instead return the view you'd like to navigate to. – BalusC Sep 25 '15 at 20:52
  • It means user is permitted to see that part of page otherwise it returns false and its not rendered – Chaibi Alaa Sep 25 '15 at 20:53
  • There is the `` not for. You should return `null` if you want to stay on same view, else return a valid view ID where you'd like to redirect to. – BalusC Sep 25 '15 at 20:54
  • Okey and for the other component ? It needs a returned value to render – Chaibi Alaa Sep 25 '15 at 21:15
  • 1
    It will always evaluate true because the value is not interpreted as an EL expression, but as a literal string which is not null nor empty. – BalusC Sep 26 '15 at 06:48
  • Thank you. Yout guideline helped me as i separated the method into one to verify if user logged in with a method returning a void and another for components returing a boolean and xith this i get no more messages. Thank you – Chaibi Alaa Sep 26 '15 at 11:34

0 Answers0