This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

commandlink not working

 
kahkean chor
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<h:panelGrid columns="3" styleClass="loginSignup" rendered="#{member.verify}">
<h:commandLink value="login" action="login"/> <hutputText value="/"/><h:commandLink value="Sign up" action="signup"/>
</h:panelGrid>
<h:panelGrid styleClass="loginSignup" rendered="#{not member.verify}">
<h:commandLink value="Logout" immediate="true" action="#{member.validateLogout()}"/>
</h:panelGrid>


public String validateLogout(){
return "failure";
}


<h:commandLink value="Logout" immediate="true" action="#{member.validateLogout()}"/> <- tis statement is not working!!anyone can help?
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First a couple of suggestions from our FAQ:

ItDoesntWorkIsUseless
UseCodeTags (XML code works well for JSF)

Is that validateLogout() method part of a managed bean named "member"? Does the method not get called? Does it get called, but the navigation doesn't go where you expect?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17628
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your action statement isn't working because the action isn't a statement. It's an EL expression that references a backing bean action method, not calls it directly.

Lose the "()".
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic